From dcf8db1410f1ee4dcef36b13c8ca9e6e4d60103d Mon Sep 17 00:00:00 2001 From: gucal Date: Wed, 3 Apr 2024 13:01:59 +0300 Subject: [PATCH] Remove pt doc --- components/doc/accordion/pt/ptdoc.js | 144 ------ components/doc/autocomplete/pt/ptdoc.js | 111 ----- components/doc/avatar/pt/ptdoc.js | 49 -- components/doc/badge/pt/ptdoc.js | 46 -- components/doc/blockui/pt/ptdoc.js | 83 ---- components/doc/breadcrumb/pt/ptdoc.js | 91 ---- components/doc/button/pt/ptdoc.js | 67 --- components/doc/calendar/pt/ptdoc.js | 100 ---- components/doc/card/pt/ptdoc.js | 85 ---- components/doc/carousel/pt/ptdoc.js | 294 ----------- components/doc/cascadeselect/pt/ptdoc.js | 343 ------------- components/doc/chart/pt/ptdoc.js | 161 ------ components/doc/checkbox/pt/ptdoc.js | 84 ---- components/doc/chip/pt/ptdoc.js | 73 --- components/doc/chips/pt/ptdoc.js | 84 ---- components/doc/colorpicker/pt/ptdoc.js | 81 --- components/doc/confirmdialog/pt/ptdoc.js | 91 ---- components/doc/confirmpopup/pt/ptdoc.js | 103 ---- components/doc/contextmenu/pt/ptdoc.js | 463 ------------------ components/doc/datascroller/pt/ptdoc.js | 263 ---------- components/doc/datatable/pt/ptdoc.js | 270 ---------- components/doc/dataview/pt/ptdoc.js | 419 ---------------- components/doc/dialog/pt/ptdoc.js | 109 ----- components/doc/divider/pt/ptdoc.js | 83 ---- components/doc/dock/pt/ptdoc.js | 182 ------- components/doc/dropdown/pt/ptdoc.js | 126 ----- components/doc/editor/pt/ptdoc.js | 80 --- components/doc/fieldset/pt/ptdoc.js | 96 ---- components/doc/fileupload/pt/ptdoc.js | 108 ---- components/doc/galleria/pt/ptdoc.js | 184 ------- components/doc/iconfield/pt/ptdoc.js | 26 - components/doc/image/pt/ptdoc.js | 77 --- components/doc/inplace/pt/ptdoc.js | 93 ---- components/doc/inputmask/pt/ptdoc.js | 98 ---- components/doc/inputnumber/pt/ptdoc.js | 120 ----- components/doc/inputswitch/pt/ptdoc.js | 84 ---- components/doc/inputtext/pt/ptdoc.js | 80 --- components/doc/inputtextarea/pt/ptdoc.js | 88 ---- components/doc/knob/pt/ptdoc.js | 76 --- components/doc/listbox/pt/ptdoc.js | 122 ----- components/doc/megamenu/pt/ptdoc.js | 408 --------------- components/doc/mention/pt/ptdoc.js | 263 ---------- components/doc/menu/pt/ptdoc.js | 195 -------- components/doc/menubar/pt/ptdoc.js | 454 ----------------- components/doc/message/pt/ptdoc.js | 69 --- components/doc/messages/pt/ptdoc.js | 91 ---- components/doc/metergroup/pt/ptdoc.js | 454 ----------------- components/doc/multiselect/pt/ptdoc.js | 171 ------- components/doc/multistatecheckbox/pt/ptdoc.js | 115 ----- components/doc/orderlist/pt/ptdoc.js | 196 -------- components/doc/organizationchart/pt/ptdoc.js | 189 ------- components/doc/overlaypanel/pt/ptdoc.js | 86 ---- components/doc/paginator/pt/ptdoc.js | 114 ----- components/doc/panel/pt/ptdoc.js | 94 ---- components/doc/panelmenu/pt/ptdoc.js | 423 ---------------- components/doc/password/pt/ptdoc.js | 76 --- components/doc/picklist/pt/ptdoc.js | 246 ---------- components/doc/progressbar/pt/ptdoc.js | 65 --- components/doc/progressspinner/pt/ptdoc.js | 65 --- components/doc/radiobutton/pt/ptdoc.js | 155 ------ components/doc/rating/pt/ptdoc.js | 76 --- components/doc/scrollpanel/pt/ptdoc.js | 118 ----- components/doc/scrolltop/pt/ptdoc.js | 98 ---- components/doc/selectbutton/pt/ptdoc.js | 83 ---- components/doc/sidebar/pt/ptdoc.js | 105 ---- components/doc/skeleton/pt/ptdoc.js | 61 --- components/doc/slider/pt/ptdoc.js | 84 ---- components/doc/speeddial/pt/ptdoc.js | 148 ------ components/doc/splitbutton/pt/ptdoc.js | 139 ------ components/doc/splitter/pt/ptdoc.js | 59 --- components/doc/steps/pt/ptdoc.js | 111 ----- components/doc/tabmenu/pt/ptdoc.js | 112 ----- components/doc/tabview/pt/ptdoc.js | 137 ------ components/doc/tag/pt/ptdoc.js | 63 --- components/doc/terminal/pt/ptdoc.js | 216 -------- components/doc/tieredmenu/pt/ptdoc.js | 451 ----------------- components/doc/timeline/pt/ptdoc.js | 98 ---- components/doc/toast/pt/ptdoc.js | 98 ---- components/doc/togglebutton/pt/ptdoc.js | 84 ---- components/doc/toolbar/pt/ptdoc.js | 112 ----- components/doc/tooltip/pt/ptdoc.js | 87 ---- components/doc/tree/pt/ptdoc.js | 128 ----- components/doc/treeselect/pt/ptdoc.js | 152 ------ components/doc/treetable/pt/ptdoc.js | 203 -------- components/doc/tristatecheckbox/pt/ptdoc.js | 91 ---- components/doc/virtualscroller/pt/ptdoc.js | 131 ----- pages/accordion/index.js | 6 - pages/autocomplete/index.js | 6 - pages/avatar/index.js | 6 - pages/badge/index.js | 6 - pages/blockui/index.js | 6 - pages/breadcrumb/index.js | 8 +- pages/button/index.js | 6 - pages/calendar/index.js | 6 - pages/card/index.js | 6 - pages/carousel/index.js | 6 - pages/cascadeselect/index.js | 6 - pages/chart/index.js | 6 - pages/checkbox/index.js | 6 - pages/chip/index.js | 6 - pages/chips/index.js | 6 - pages/colorpicker/index.js | 6 - pages/confirmdialog/index.js | 6 - pages/confirmpopup/index.js | 10 +- pages/contextmenu/index.js | 14 +- pages/datascroller/index.js | 6 - pages/datatable/index.js | 6 - pages/dataview/index.js | 6 - pages/dialog/index.js | 10 +- pages/divider/index.js | 6 - pages/dock/index.js | 6 - pages/dropdown/index.js | 6 - pages/editor/index.js | 6 - pages/fieldset/index.js | 6 - pages/fileupload/index.js | 6 - pages/galleria/index.js | 6 - pages/image/index.js | 6 - pages/inplace/index.js | 6 - pages/inputmask/index.js | 6 - pages/inputnumber/index.js | 6 - pages/inputswitch/index.js | 6 - pages/inputtext/index.js | 6 - pages/inputtextarea/index.js | 6 - pages/knob/index.js | 6 - pages/listbox/index.js | 6 - pages/megamenu/index.js | 6 - pages/mention/index.js | 6 - pages/menu/index.js | 6 - pages/menubar/index.js | 6 - pages/message/index.js | 6 - pages/messages/index.js | 8 +- pages/multiselect/index.js | 6 - pages/multistatecheckbox/index.js | 6 - pages/orderlist/index.js | 6 - pages/organizationchart/index.js | 6 - pages/overlaypanel/index.js | 6 - pages/paginator/index.js | 6 - pages/panel/index.js | 6 - pages/panelmenu/index.js | 6 - pages/password/index.js | 6 - pages/picklist/index.js | 6 - pages/progressbar/index.js | 6 - pages/progressspinner/index.js | 6 - pages/radiobutton/index.js | 6 - pages/rating/index.js | 6 - pages/scrollpanel/index.js | 6 - pages/scrolltop/index.js | 6 - pages/selectbutton/index.js | 6 - pages/sidebar/index.js | 8 +- pages/skeleton/index.js | 6 - pages/slider/index.js | 6 - pages/speeddial/index.js | 6 - pages/splitbutton/index.js | 6 - pages/splitter/index.js | 6 - pages/steps/index.js | 6 - pages/tabmenu/index.js | 6 - pages/tabview/index.js | 6 - pages/tag/index.js | 6 - pages/terminal/index.js | 6 - pages/tieredmenu/index.js | 6 - pages/timeline/index.js | 6 - pages/toast/index.js | 6 - pages/togglebutton/index.js | 6 - pages/toolbar/index.js | 8 +- pages/tooltip/index.js | 6 - pages/tree/index.js | 6 - pages/treeselect/index.js | 6 - pages/treetable/index.js | 6 - pages/tristatecheckbox/index.js | 6 - pages/virtualscroller/index.js | 6 - 170 files changed, 12 insertions(+), 13027 deletions(-) delete mode 100644 components/doc/accordion/pt/ptdoc.js delete mode 100644 components/doc/autocomplete/pt/ptdoc.js delete mode 100644 components/doc/avatar/pt/ptdoc.js delete mode 100644 components/doc/badge/pt/ptdoc.js delete mode 100644 components/doc/blockui/pt/ptdoc.js delete mode 100644 components/doc/breadcrumb/pt/ptdoc.js delete mode 100644 components/doc/button/pt/ptdoc.js delete mode 100644 components/doc/calendar/pt/ptdoc.js delete mode 100644 components/doc/card/pt/ptdoc.js delete mode 100644 components/doc/carousel/pt/ptdoc.js delete mode 100644 components/doc/cascadeselect/pt/ptdoc.js delete mode 100644 components/doc/chart/pt/ptdoc.js delete mode 100644 components/doc/checkbox/pt/ptdoc.js delete mode 100644 components/doc/chip/pt/ptdoc.js delete mode 100644 components/doc/chips/pt/ptdoc.js delete mode 100644 components/doc/colorpicker/pt/ptdoc.js delete mode 100644 components/doc/confirmdialog/pt/ptdoc.js delete mode 100644 components/doc/confirmpopup/pt/ptdoc.js delete mode 100644 components/doc/contextmenu/pt/ptdoc.js delete mode 100644 components/doc/datascroller/pt/ptdoc.js delete mode 100644 components/doc/datatable/pt/ptdoc.js delete mode 100644 components/doc/dataview/pt/ptdoc.js delete mode 100644 components/doc/dialog/pt/ptdoc.js delete mode 100644 components/doc/divider/pt/ptdoc.js delete mode 100644 components/doc/dock/pt/ptdoc.js delete mode 100644 components/doc/dropdown/pt/ptdoc.js delete mode 100644 components/doc/editor/pt/ptdoc.js delete mode 100644 components/doc/fieldset/pt/ptdoc.js delete mode 100644 components/doc/fileupload/pt/ptdoc.js delete mode 100644 components/doc/galleria/pt/ptdoc.js delete mode 100644 components/doc/iconfield/pt/ptdoc.js delete mode 100644 components/doc/image/pt/ptdoc.js delete mode 100644 components/doc/inplace/pt/ptdoc.js delete mode 100644 components/doc/inputmask/pt/ptdoc.js delete mode 100644 components/doc/inputnumber/pt/ptdoc.js delete mode 100644 components/doc/inputswitch/pt/ptdoc.js delete mode 100644 components/doc/inputtext/pt/ptdoc.js delete mode 100644 components/doc/inputtextarea/pt/ptdoc.js delete mode 100644 components/doc/knob/pt/ptdoc.js delete mode 100644 components/doc/listbox/pt/ptdoc.js delete mode 100644 components/doc/megamenu/pt/ptdoc.js delete mode 100644 components/doc/mention/pt/ptdoc.js delete mode 100644 components/doc/menu/pt/ptdoc.js delete mode 100644 components/doc/menubar/pt/ptdoc.js delete mode 100644 components/doc/message/pt/ptdoc.js delete mode 100644 components/doc/messages/pt/ptdoc.js delete mode 100644 components/doc/metergroup/pt/ptdoc.js delete mode 100644 components/doc/multiselect/pt/ptdoc.js delete mode 100644 components/doc/multistatecheckbox/pt/ptdoc.js delete mode 100644 components/doc/orderlist/pt/ptdoc.js delete mode 100644 components/doc/organizationchart/pt/ptdoc.js delete mode 100644 components/doc/overlaypanel/pt/ptdoc.js delete mode 100644 components/doc/paginator/pt/ptdoc.js delete mode 100644 components/doc/panel/pt/ptdoc.js delete mode 100644 components/doc/panelmenu/pt/ptdoc.js delete mode 100644 components/doc/password/pt/ptdoc.js delete mode 100644 components/doc/picklist/pt/ptdoc.js delete mode 100644 components/doc/progressbar/pt/ptdoc.js delete mode 100644 components/doc/progressspinner/pt/ptdoc.js delete mode 100644 components/doc/radiobutton/pt/ptdoc.js delete mode 100644 components/doc/rating/pt/ptdoc.js delete mode 100644 components/doc/scrollpanel/pt/ptdoc.js delete mode 100644 components/doc/scrolltop/pt/ptdoc.js delete mode 100644 components/doc/selectbutton/pt/ptdoc.js delete mode 100644 components/doc/sidebar/pt/ptdoc.js delete mode 100644 components/doc/skeleton/pt/ptdoc.js delete mode 100644 components/doc/slider/pt/ptdoc.js delete mode 100644 components/doc/speeddial/pt/ptdoc.js delete mode 100644 components/doc/splitbutton/pt/ptdoc.js delete mode 100644 components/doc/splitter/pt/ptdoc.js delete mode 100644 components/doc/steps/pt/ptdoc.js delete mode 100644 components/doc/tabmenu/pt/ptdoc.js delete mode 100644 components/doc/tabview/pt/ptdoc.js delete mode 100644 components/doc/tag/pt/ptdoc.js delete mode 100644 components/doc/terminal/pt/ptdoc.js delete mode 100644 components/doc/tieredmenu/pt/ptdoc.js delete mode 100644 components/doc/timeline/pt/ptdoc.js delete mode 100644 components/doc/toast/pt/ptdoc.js delete mode 100644 components/doc/togglebutton/pt/ptdoc.js delete mode 100644 components/doc/toolbar/pt/ptdoc.js delete mode 100644 components/doc/tooltip/pt/ptdoc.js delete mode 100644 components/doc/tree/pt/ptdoc.js delete mode 100644 components/doc/treeselect/pt/ptdoc.js delete mode 100644 components/doc/treetable/pt/ptdoc.js delete mode 100644 components/doc/tristatecheckbox/pt/ptdoc.js delete mode 100644 components/doc/virtualscroller/pt/ptdoc.js diff --git a/components/doc/accordion/pt/ptdoc.js b/components/doc/accordion/pt/ptdoc.js deleted file mode 100644 index b3d7f826a8..0000000000 --- a/components/doc/accordion/pt/ptdoc.js +++ /dev/null @@ -1,144 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Accordion, AccordionTab } from '@/components/lib/accordion/Accordion'; - -export function PTDoc(props) { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) { - return 'bg-primary'; - } - }; - - const code = { - basic: ` - - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - header={tab.title}> -

- {tab.content} -

-
- ) - })} -
- `, - javascript: ` -import React from 'react'; -import { Accordion, AccordionTab } from 'primereact/accordion'; - -export default function PTDemo() { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) return 'bg-primary'; - }; - - return ( -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - header={tab.title}> -

- {tab.content} -

-
- ) - })} -
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Accordion, AccordionTab } from 'primereact/accordion'; - -export default function PTDemo() { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) return 'bg-primary'; - }; - - return ( -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - header={tab.title}> -

- {tab.content} -

-
- ) - })} -
-
- ) -} - ` - }; - - return ( - <> - -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - header={tab.title} - > -

{tab.content}

-
- ); - })} -
-
- - - ); -} diff --git a/components/doc/autocomplete/pt/ptdoc.js b/components/doc/autocomplete/pt/ptdoc.js deleted file mode 100644 index 86bf17c447..0000000000 --- a/components/doc/autocomplete/pt/ptdoc.js +++ /dev/null @@ -1,111 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { AutoComplete } from '@/components/lib/autocomplete/AutoComplete'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - const [items, setItems] = useState([]); - - const search = (event) => { - setItems([...Array(10).keys()].map((item) => event.query + '-' + item)); - }; - - const code = { - basic: ` - setValue(e.value)} - pt={{ - input: { root: { className: 'w-16rem' } }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary-300' : undefined - }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { AutoComplete } from "primereact/autocomplete"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - const [items, setItems] = useState([]); - - const search = (event) => { - setItems([...Array(10).keys()].map(item => event.query + '-' + item)); - } - - return ( -
- setValue(e.value)} - pt={{ - input: { root: { className: 'w-16rem' } }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary-300' : undefined - }) - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { AutoComplete, AutoCompleteCompleteEvent } from "primereact/autocomplete"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - const [items, setItems] = useState([]); - - const search = (event: AutoCompleteCompleteEvent) => { - setItems([...Array(10).keys()].map(item => event.query + '-' + item)); - } - - return ( -
- setValue(e.value)} - pt={{ - input: { root: { className: 'w-16rem' } }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary-300' : undefined - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - pt={{ - input: { root: { className: 'w-16rem' } }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary-300' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/avatar/pt/ptdoc.js b/components/doc/avatar/pt/ptdoc.js deleted file mode 100644 index 084a005b27..0000000000 --- a/components/doc/avatar/pt/ptdoc.js +++ /dev/null @@ -1,49 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Avatar } from '@/components/lib/avatar/Avatar'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Avatar } from 'primereact/avatar'; - -export default function PTDemo() { - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Avatar } from 'primereact/avatar'; - -export default function PTDemo() { - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - - ); -} diff --git a/components/doc/badge/pt/ptdoc.js b/components/doc/badge/pt/ptdoc.js deleted file mode 100644 index b678a439d6..0000000000 --- a/components/doc/badge/pt/ptdoc.js +++ /dev/null @@ -1,46 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Badge } from '@/components/lib/badge/Badge'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Badge } from 'primereact/badge'; - -export default function PTDemo() { - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Badge } from 'primereact/badge'; - -export default function PTDemo() { - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/blockui/pt/ptdoc.js b/components/doc/blockui/pt/ptdoc.js deleted file mode 100644 index 2830a32db6..0000000000 --- a/components/doc/blockui/pt/ptdoc.js +++ /dev/null @@ -1,83 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { BlockUI } from '@/components/lib/blockui/BlockUI'; -import { Button } from '@/components/lib/button/Button'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [blocked, setBlocked] = useState(false); - const code = { - basic: ` - - - `, - javascript: ` -import React, { useState } from 'react'; -import { BlockUI } from 'primereact/blockui'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [blocked, setBlocked] = useState(false); - - return ( -
-
- - -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - `, - typescript: ` -import React, { useState } from 'react'; -import { BlockUI } from 'primereact/blockui'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [blocked, setBlocked] = useState(false); - - return ( -
-
- - -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - ` - }; - - return ( - <> - -
-
-
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- - - ); -} diff --git a/components/doc/breadcrumb/pt/ptdoc.js b/components/doc/breadcrumb/pt/ptdoc.js deleted file mode 100644 index 905c6202e4..0000000000 --- a/components/doc/breadcrumb/pt/ptdoc.js +++ /dev/null @@ -1,91 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { BreadCrumb } from '@/components/lib/breadcrumb/BreadCrumb'; - -export function PTDoc(props) { - const items = [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }]; - const home = { icon: 'pi pi-home', url: 'https://primereact.org' }; - - const code = { - basic: ` - ({ - className: props.index === items.length - 1 ? 'font-italic' : undefined - }) - }} -/> - `, - javascript: ` -import React from 'react'; -import { BreadCrumb } from 'primereact/breadcrumb'; - -export default function PTDemo() { - const items = [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }]; - const home = { icon: 'pi pi-home', url: 'https://primereact.org' } - - return ( -
- ({ - className: props.index === items.length - 1 ? 'font-italic' : undefined - }) - }} - model={items} - home={home} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { BreadCrumb } from 'primereact/breadcrumb'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }]; - const home: MenuItem = { icon: 'pi pi-home', url: 'https://primereact.org' } - - return ( -
- ({ - className: props.index === items.length - 1 ? 'font-italic' : undefined - }) - }} - model={items} - home={home} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ - className: props.index === items.length - 1 ? 'font-italic' : undefined - }) - }} - model={items} - home={home} - /> -
- - - ); -} diff --git a/components/doc/button/pt/ptdoc.js b/components/doc/button/pt/ptdoc.js deleted file mode 100644 index 2245eed621..0000000000 --- a/components/doc/button/pt/ptdoc.js +++ /dev/null @@ -1,67 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; - -export function PTDoc(props) { - const code = { - basic: ` - - - - - - - ); - }; - - return ( -
- -
- ) -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { ProductService } from './service/ProductService'; -import { Button } from 'primereact/button'; -import { DataScroller } from 'primereact/datascroller'; -import { Rating } from 'primereact/rating'; -import { Tag } from 'primereact/tag'; - -interface Product { - id: string; - code: string; - name: string; - description: string; - image: string; - price: number; - category: string; - quantity: number; - inventoryStatus: string; - rating: number; -} - -export default function BasicDemo() { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProducts().then((data) => setProducts(data)); - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - const getSeverity = (product: Product) => { - switch (product.inventoryStatus) { - case 'INSTOCK': - return 'success'; - - case 'LOWSTOCK': - return 'warning'; - - case 'OUTOFSTOCK': - return 'danger'; - - default: - return null; - } - }; - - const itemTemplate = (data: Product) => { - return ( -
-
- {data.name} -
-
-
-
{data.name}
-
{data.description}
-
-
- - - - {data.category} - -
-
-
- \${data.price} - - -
-
-
-
- ); - }; - - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/datatable/pt/ptdoc.js b/components/doc/datatable/pt/ptdoc.js deleted file mode 100644 index 120f5a8eb7..0000000000 --- a/components/doc/datatable/pt/ptdoc.js +++ /dev/null @@ -1,270 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Column } from '@/components/lib/column/Column'; -import { DataTable } from '@/components/lib/datatable/DataTable'; -import { useState } from 'react'; -import { ProductService } from '../../../../service/ProductService'; -import DeferredDemo from '@/components/demo/DeferredDemo'; - -export function PTDoc(props) { - const [products, setProducts] = useState([]); - - const loadDemoData = () => { - ProductService.getProductsMini().then((data) => setProducts(data)); - }; - - const code = { - basic: ` - - - - - - - `, - javascript: ` -import React, { useState, useEffect } from 'react'; -import { DataTable } from 'primereact/datatable'; -import { Column } from 'primereact/column'; -import { ProductService } from './service/ProductService'; - -export default function PTDemo() { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProductsMini().then(data => setProducts(data)); - }, []); - - return ( - - - - - - - - ); -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { DataTable } from 'primereact/datatable'; -import { Column } from 'primereact/column'; -import { ProductService } from './service/ProductService'; - -interface Product { - id: string; - code: string; - name: string; - description: string; - image: string; - price: number; - category: string; - quantity: number; - inventoryStatus: string; - rating: number; -} - -export default function PTDemo() { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProductsMini().then(data => setProducts(data)); - }, []); - - return ( - - - - - - - ); -} - `, - data: ` -{ - id: '1000', - code: 'f230fh0g3', - name: 'Bamboo Watch', - description: 'Product Description', - image: 'bamboo-watch.jpg', - price: 65, - category: 'Accessories', - quantity: 24, - inventoryStatus: 'INSTOCK', - rating: 5 -}, -... - ` - }; - - return ( - <> - - -
- - - - - - -
-
- - - ); -} diff --git a/components/doc/dataview/pt/ptdoc.js b/components/doc/dataview/pt/ptdoc.js deleted file mode 100644 index d78908c210..0000000000 --- a/components/doc/dataview/pt/ptdoc.js +++ /dev/null @@ -1,419 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; -import { DataView, DataViewLayoutOptions } from '@/components/lib/dataview/DataView'; -import { Rating } from '@/components/lib/rating/Rating'; -import { Tag } from '@/components/lib/tag/Tag'; -import { useEffect, useState } from 'react'; -import { ProductService } from '../../../../service/ProductService'; - -export function PTDoc(props) { - const [products, setProducts] = useState([]); - const [layout, setLayout] = useState('grid'); - - useEffect(() => { - ProductService.getProducts().then((data) => setProducts(data.slice(0, 6))); - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - const getSeverity = (product) => { - switch (product.inventoryStatus) { - case 'INSTOCK': - return 'success'; - - case 'LOWSTOCK': - return 'warning'; - - case 'OUTOFSTOCK': - return 'danger'; - - default: - return null; - } - }; - - const listItem = (product) => { - return ( -
-
- {product.name} -
-
-
{product.name}
- -
- - - {product.category} - - -
-
-
- ${product.price} -
-
-
-
- ); - }; - - const gridItem = (product) => { - return ( -
-
-
-
- - {product.category} -
- -
-
- {product.name} -
{product.name}
- -
-
- ${product.price} -
-
-
- ); - }; - - const itemTemplate = (product, layout) => { - if (!product) { - return; - } - - if (layout === 'list') { - return listItem(product); - } else if (layout === 'grid') { - return gridItem(product); - } - }; - - const header = () => { - return ( -
- setLayout(e.value)} - pt={{ - listButton: ({ props }) => ({ className: props.layout === 'list' ? 'bg-teal-400 border-teal-400' : 'undefined' }), - gridButton: ({ props }) => ({ className: props.layout === 'grid' ? 'bg-teal-400 border-teal-400' : 'undefined' }) - }} - /> -
- ); - }; - - const code = { - basic: ` - - `, - javascript: ` -import React, { useState, useEffect } from 'react'; -import { ProductService } from './service/ProductService'; -import { Button } from 'primereact/button'; -import { DataView, DataViewLayoutOptions } from 'primereact/dataview'; -import { Rating } from 'primereact/rating'; -import { Tag } from 'primereact/tag'; - -export default function BasicDemo() { - const [products, setProducts] = useState([]); - const [layout, setLayout] = useState('grid'); - - useEffect(() => { - ProductService.getProducts().then((data) => setProducts(data.slice(0, 12))); - }, []); - - const getSeverity = (product) => { - switch (product.inventoryStatus) { - case 'INSTOCK': - return 'success'; - - case 'LOWSTOCK': - return 'warning'; - - case 'OUTOFSTOCK': - return 'danger'; - - default: - return null; - } - }; - - const listItem = (product) => { - return ( -
-
- {product.name} -
-
-
{product.name}
- -
- - - {product.category} - - -
-
-
- \${product.price} - -
-
-
-
- ); - }; - - const gridItem = (product) => { - return ( -
-
-
-
- - {product.category} -
- -
-
- {product.name} -
{product.name}
- -
-
- \${product.price} - -
-
-
- ); - }; - - const itemTemplate = (product, layout) => { - if (!product) { - return; - } - - if (layout === 'list') return listItem(product); - else if (layout === 'grid') return gridItem(product); - }; - - const header = () => { - return ( -
- setLayout(e.value)} - pt={{ - listButton: ({ props }) => ({ className: props.layout === 'list' ? 'bg-teal-400 border-teal-400' : 'undefined' }), - gridButton: ({ props }) => ({ className: props.layout === 'grid' ? 'bg-teal-400 border-teal-400' : 'undefined' }) - }} - /> -
- ); - }; - - return ( -
- -
- ) -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { ProductService } from './service/ProductService'; -import { Button } from 'primereact/button'; -import { DataView, DataViewLayoutOptions } from 'primereact/dataview'; -import { Rating } from 'primereact/rating'; -import { Tag } from 'primereact/tag'; - -interface Product { - id: string; - code: string; - name: string; - description: string; - image: string; - price: number; - category: string; - quantity: number; - inventoryStatus: string; - rating: number; -} - -export default function BasicDemo() { - const [products, setProducts] = useState([]); - const [layout, setLayout] = useState('grid'); - - useEffect(() => { - ProductService.getProducts().then((data) => setProducts(data.slice(0, 12))); - }, []); - - const getSeverity = (product) => { - switch (product.inventoryStatus) { - case 'INSTOCK': - return 'success'; - - case 'LOWSTOCK': - return 'warning'; - - case 'OUTOFSTOCK': - return 'danger'; - - default: - return null; - } - }; - - const listItem = (product: Product) => { - return ( -
-
- {product.name} -
-
-
{product.name}
- -
- - - {product.category} - - -
-
-
- \${product.price} - -
-
-
-
- ); - }; - - const gridItem = (product: Product) => { - return ( -
-
-
-
- - {product.category} -
- -
-
- {product.name} -
{product.name}
- -
-
- \${product.price} - -
-
-
- ); - }; - - const itemTemplate = (product: Product, layout: string) => { - if (!product) { - return; - } - - if (layout === 'list') return listItem(product); - else if (layout === 'grid') return gridItem(product); - }; - - const header = () => { - return ( -
- setLayout(e.value)} - pt={{ - listButton: ({ props }) => ({ className: props.layout === 'list' ? 'bg-teal-400 border-teal-400' : 'undefined' }), - gridButton: ({ props }) => ({ className: props.layout === 'grid' ? 'bg-teal-400 border-teal-400' : 'undefined' }) - }} - /> -
- ); - }; - - return ( -
- -
- ) -} - `, - data: ` -/* ProductService */ -{ - id: '1000', - code: 'f230fh0g3', - name: 'Bamboo Watch', - description: 'Product Description', - image: 'bamboo-watch.jpg', - price: 65, - category: 'Accessories', - quantity: 24, - inventoryStatus: 'INSTOCK', - rating: 5 -}, -... - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/dialog/pt/ptdoc.js b/components/doc/dialog/pt/ptdoc.js deleted file mode 100644 index 941f7a701c..0000000000 --- a/components/doc/dialog/pt/ptdoc.js +++ /dev/null @@ -1,109 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; -import { Dialog } from '@/components/lib/dialog/Dialog'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [visible, setVisible] = useState(false); - - const code = { - basic: ` - setVisible(false)} - pt={{ - root: { className: 'w-12 sm:w-9 md:w-6' } - }} -> - - `, - javascript: ` -import React, { useState } from 'react'; -import { Dialog } from 'primereact/dialog'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [visible, setVisible] = useState(false); - - return ( -
-
- ) -} - `, - typescript: ` -import React, { useState } from 'react'; -import { Dialog } from 'primereact/dialog'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [visible, setVisible] = useState(false); - - return ( -
-
- ) -} - ` - }; - - return ( - <> - -
-
- - - ); -} diff --git a/components/doc/divider/pt/ptdoc.js b/components/doc/divider/pt/ptdoc.js deleted file mode 100644 index 5199fdcbcc..0000000000 --- a/components/doc/divider/pt/ptdoc.js +++ /dev/null @@ -1,83 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Divider } from '@/components/lib/divider/Divider'; - -export function PTDoc(props) { - const code = { - basic: ` -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrudexercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum doloreeu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpaqui officia deserunt mollit anim id est laborum. -

- - Center - -

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremquelaudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasiarchitecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequunturmagni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit,sed quia non numquam eius modi. -

- `, - javascript: ` -import React from 'react'; -import { Divider } from 'primereact/divider'; - -export default function PTDemo() { - return ( -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

- - Center - -

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Divider } from 'primereact/divider'; - -export default function PTDemo() { - return ( -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

- - Center - -

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-
- ) -} - ` - }; - - return ( - <> - -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

- - Center - -

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-
- - - ); -} diff --git a/components/doc/dock/pt/ptdoc.js b/components/doc/dock/pt/ptdoc.js deleted file mode 100644 index b90c3babb8..0000000000 --- a/components/doc/dock/pt/ptdoc.js +++ /dev/null @@ -1,182 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Dock } from '@/components/lib/dock/Dock'; - -export function PTDoc(props) { - const items = [ - { - label: 'Finder', - icon: () => Finder - }, - { - label: 'App Store', - icon: () => App Store - }, - { - label: 'Photos', - icon: () => Photos - }, - { - label: 'Trash', - icon: () => trash - } - ]; - - const positions = [ - { - label: 'Bottom', - value: 'bottom' - }, - { - label: 'Top', - value: 'top' - }, - { - label: 'Left', - value: 'left' - }, - { - label: 'Right', - value: 'right' - } - ]; - - const code = { - basic: ` - -`, - javascript: ` -import React from 'react'; -import { Dock } from 'primereact/dock'; -import './DockDemo.css'; - -export default function PTDemo() { - const items = [ - { - label: 'Finder', - icon: () => Finder, - }, - { - label: 'App Store', - icon: () => App Store, - }, - { - label: 'Photos', - icon: () => Photos, - }, - { - label: 'Trash', - icon: () => trash, - } - ]; - - return ( -
-
- -
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Dock } from 'primereact/dock'; -import { MenuItem } from 'primereact/menuitem'; -import './DockDemo.css'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Finder', - icon: () => Finder, - }, - { - label: 'App Store', - icon: () => App Store, - }, - { - label: 'Photos', - icon: () => Photos, - }, - { - label: 'Trash', - icon: () => trash, - } - ]; - - return ( -
-
- -
-
- ) -} - `, - extFiles: { - 'DockDemo.css': ` -/* DockDemo.css */ -.dock-demo .dock-window { - width: 100%; - height: 450px; - position: relative; - background-image: url('https://primefaces.org/cdn/primereact/images/dock/window.jpg'); - background-repeat: no-repeat; - background-size: cover; -} -.dock-demo .p-dock { - z-index: 1000; -} - ` - } - }; - - return ( - <> - -

- Menu requires a collection of menuitems as its model. Default location is bottom and other sides are also available when defined with the position property. -

-
-
-
- -
-
- - - ); -} diff --git a/components/doc/dropdown/pt/ptdoc.js b/components/doc/dropdown/pt/ptdoc.js deleted file mode 100644 index e5a2d68b02..0000000000 --- a/components/doc/dropdown/pt/ptdoc.js +++ /dev/null @@ -1,126 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Dropdown } from '@/components/lib/dropdown/Dropdown'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [selectedCity, setSelectedCity] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - const code = { - basic: ` - setSelectedCity(e.value)} - options={cities} - optionLabel="name" - placeholder="Select a City" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Dropdown } from 'primereact/dropdown'; - -export default function PTDemo() { - const [selectedCity, setSelectedCity] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - placeholder="Select a City" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { Dropdown, DropdownChangeEvent } from 'primereact/dropdown'; - -interface City { - name: string; - code: string; -} - -export default function PTDemo() { - const [selectedCity, setSelectedCity] = useState(null); - const cities: City[] = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - placeholder="Select a City" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - placeholder="Select a City" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/editor/pt/ptdoc.js b/components/doc/editor/pt/ptdoc.js deleted file mode 100644 index 4a5536977e..0000000000 --- a/components/doc/editor/pt/ptdoc.js +++ /dev/null @@ -1,80 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Editor } from '@/components/lib/editor/Editor'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [text, setText] = useState(''); - - const code = { - basic: ` - setText(e.htmlValue)} - pt={{ - content: { style: { height: '320px' } }, - toolbar: { className: 'surface-ground' } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Editor } from "primereact/editor"; - -export default function PTDemo() { - const [text, setText] = useState(''); - - return ( -
- setText(e.htmlValue)} - pt={{ - content: { style: { height: '320px' } }, - toolbar: { className: 'surface-ground' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { Editor, EditorTextChangeEvent } from "primereact/editor"; - -export default function PTDemo() { - const [text, setText] = useState(''); - - return ( -
- setText(e.htmlValue)} - pt={{ - content: { style: { height: '320px' } }, - toolbar: { className: 'surface-ground' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setText(e.htmlValue)} - pt={{ - content: { style: { height: '320px' } }, - toolbar: { className: 'surface-ground' } - }} - /> -
- - - ); -} diff --git a/components/doc/fieldset/pt/ptdoc.js b/components/doc/fieldset/pt/ptdoc.js deleted file mode 100644 index f7d64e559e..0000000000 --- a/components/doc/fieldset/pt/ptdoc.js +++ /dev/null @@ -1,96 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Fieldset } from '@/components/lib/fieldset/Fieldset'; - -export function PTDoc(props) { - const code = { - basic: ` -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrudexercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillumdolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, suntin culpa qui officia deserunt mollit anim id est laborum. -

-
- `, - javascript: ` -import React from 'react'; -import { Fieldset } from 'primereact/fieldset'; - -export default function PTDemo() { - return ( -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Fieldset } from 'primereact/fieldset'; - -export default function PTDemo() { - return ( -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - ` - }; - - return ( - <> - -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- - - ); -} diff --git a/components/doc/fileupload/pt/ptdoc.js b/components/doc/fileupload/pt/ptdoc.js deleted file mode 100644 index 5389c59d5e..0000000000 --- a/components/doc/fileupload/pt/ptdoc.js +++ /dev/null @@ -1,108 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { FileUpload } from '@/components/lib/fileupload/FileUpload'; - -export function PTDoc(props) { - const code = { - basic: ` -Drag and drop files to here to upload.

} -/> - `, - javascript: ` -import React from 'react'; -import { FileUpload } from 'primereact/fileupload'; - -export default function PTDemo() { - - return ( -
- Drag and drop files to here to upload.

} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Toast } from 'primereact/toast'; -import { FileUpload } from 'primereact/fileupload'; - -export default function PTDemo() { - - return ( -
- Drag and drop files to here to upload.

} - /> -
- ) -} - ` - }; - - return ( - <> - -
- Drag and drop files to here to upload.

} - /> -
- - - ); -} diff --git a/components/doc/galleria/pt/ptdoc.js b/components/doc/galleria/pt/ptdoc.js deleted file mode 100644 index 4569135141..0000000000 --- a/components/doc/galleria/pt/ptdoc.js +++ /dev/null @@ -1,184 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Galleria } from '@/components/lib/galleria/Galleria'; -import { useEffect, useState } from 'react'; -import { PhotoService } from '../../../../service/PhotoService'; - -export function PTDoc(props) { - const [images, setImages] = useState(null); - - const responsiveOptions = [ - { - breakpoint: '991px', - numVisible: 4 - }, - { - breakpoint: '767px', - numVisible: 3 - }, - { - breakpoint: '575px', - numVisible: 1 - } - ]; - - useEffect(() => { - PhotoService.getImages().then((data) => setImages(data)); - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - const itemTemplate = (item) => { - return {item.alt}; - }; - - const thumbnailTemplate = (item) => { - return {item.alt}; - }; - - const code = { - basic: ` - - `, - javascript: ` -import React, { useState, useEffect } from 'react'; -import { Galleria } from 'primereact/galleria'; -import { PhotoService } from './service/PhotoService'; - -export default function PTDemo() { - const [images, setImages] = useState(null); - const responsiveOptions = [ - { - breakpoint: '991px', - numVisible: 4 - }, - { - breakpoint: '767px', - numVisible: 3 - }, - { - breakpoint: '575px', - numVisible: 1 - } - ]; - - useEffect(() => { - PhotoService.getImages().then(data => setImages(data)); - }, []) - - const itemTemplate = (item) => { - return {item.alt} - } - - const thumbnailTemplate = (item) => { - return {item.alt} - } - - return ( -
- -
- ) -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { Galleria, GalleriaResponsiveOptions } from 'primereact/galleria'; -import { PhotoService } from './service/PhotoService'; - -export default function PTDemo() { - const [images, setImages] = useState(null); - const responsiveOptions: GalleriaResponsiveOptions[] = [ - { - breakpoint: '991px', - numVisible: 4 - }, - { - breakpoint: '767px', - numVisible: 3 - }, - { - breakpoint: '575px', - numVisible: 1 - } - ]; - - useEffect(() => { - PhotoService.getImages().then(data => setImages(data)); - }, []); - - const itemTemplate = (item: any) => { - return {item.alt} - } - - const thumbnailTemplate = (item: any) => { - return {item.alt} - } - - return ( -
- -
- ) -} - `, - data: ` -/* PhotoService */ -{ - itemImageSrc: 'https://primefaces.org/cdn/primereact/images/galleria/galleria1.jpg', - thumbnailImageSrc: 'https://primefaces.org/cdn/primereact/images/galleria/galleria1s.jpg', - alt: 'Description for Image 1', - title: 'Title 1' -}, -... - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/iconfield/pt/ptdoc.js b/components/doc/iconfield/pt/ptdoc.js deleted file mode 100644 index 781271232a..0000000000 --- a/components/doc/iconfield/pt/ptdoc.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputText } from '@/components/lib/inputtext/InputText'; - -export function PTDoc(props) { - return ( - <> - -

- InputText is used as a controlled input with value and onChange properties. -

-
-
- setValue(e.target.value)} - pt={{ - root: { className: 'border-primary-400' } - }} - /> -
- - - ); -} diff --git a/components/doc/image/pt/ptdoc.js b/components/doc/image/pt/ptdoc.js deleted file mode 100644 index 958e41c63a..0000000000 --- a/components/doc/image/pt/ptdoc.js +++ /dev/null @@ -1,77 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Image } from '@/components/lib/image/Image'; - -export function PTDoc(props) { - const code = { - basic: ` -Image - `, - javascript: ` -import React from 'react'; -import { Image } from 'primereact/image'; - -export default function PTDemo() { - return ( -
- Image -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Image } from 'primereact/image'; - -export default function PTDemo() { - return ( -
- Image -
- ) -} - ` - }; - - return ( - <> - -
- Image -
- - - ); -} diff --git a/components/doc/inplace/pt/ptdoc.js b/components/doc/inplace/pt/ptdoc.js deleted file mode 100644 index 6f7e45121a..0000000000 --- a/components/doc/inplace/pt/ptdoc.js +++ /dev/null @@ -1,93 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Inplace, InplaceContent, InplaceDisplay } from '@/components/lib/inplace/Inplace'; - -export function PTDoc(props) { - const code = { - basic: ` - - View Content - -

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

-
-
- `, - javascript: ` -import React from 'react'; -import { Inplace } from 'primereact/inplace'; - -export default function PTDemo() { - return ( -
- - View Content - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est - laborum. -

-
-
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Inplace } from 'primereact/inplace'; - -export default function PTDemo() { - return ( -
- - View Content - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est - laborum. -

-
-
-
- ) -} - ` - }; - - return ( - <> - -
- - View Content - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est - laborum. -

-
-
-
- - - ); -} diff --git a/components/doc/inputmask/pt/ptdoc.js b/components/doc/inputmask/pt/ptdoc.js deleted file mode 100644 index b74edd3049..0000000000 --- a/components/doc/inputmask/pt/ptdoc.js +++ /dev/null @@ -1,98 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputMask } from '@/components/lib/inputmask/InputMask'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - - const code = { - basic: ` - setValue(e.target.value)} - mask="99-999999" - placeholder="99-999999" - pt={{ - input: { - root: { - className: 'border-teal-400' - } - } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { InputMask } from "primereact/inputmask"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - mask="99-999999" - placeholder="99-999999" - pt={{ - input: { - root: { - className: 'border-teal-400' - } - } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { InputMask, InputMaskChangeEvent } from "primereact/inputmask"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - mask="99-999999" - placeholder="99-999999" - pt={{ - input: { - root: { - className: 'border-teal-400' - } - } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.target.value)} - mask="99-999999" - placeholder="99-999999" - pt={{ - root: { - className: 'border-teal-400' - } - }} - /> -
- - - ); -} diff --git a/components/doc/inputnumber/pt/ptdoc.js b/components/doc/inputnumber/pt/ptdoc.js deleted file mode 100644 index a3ea33023b..0000000000 --- a/components/doc/inputnumber/pt/ptdoc.js +++ /dev/null @@ -1,120 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputNumber } from '@/components/lib/inputnumber/InputNumber'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(20); - - const code = { - basic: ` - setValue(e.value)} - showButtons - buttonLayout="horizontal" - step={0.25} - decrementButtonClassName="p-button-danger" - incrementButtonClassName="p-button-success" - incrementButtonIcon="pi pi-plus" - decrementButtonIcon="pi pi-minus" - mode="currency" - currency="EUR" - pt={{ - incrementButton: { className: 'bg-teal-500 border-teal-500' }, - decrementButton: { className: 'bg-orange-500 border-orange-500' } - }} -/> -`, - javascript: ` -import React, { useState } from "react"; -import { InputNumber } from 'primereact/inputnumber'; - -export default function PTDemo() { - const [value, setValue] = useState(20); - - return ( -
- setValue(e.value)} - showButtons - buttonLayout="horizontal" - step={0.25} - decrementButtonClassName="p-button-danger" - incrementButtonClassName="p-button-success" - incrementButtonIcon="pi pi-plus" - decrementButtonIcon="pi pi-minus" - mode="currency" - currency="EUR" - pt={{ - incrementButton: { className: 'bg-teal-500 border-teal-500' }, - decrementButton: { className: 'bg-orange-500 border-orange-500' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { InputNumber, InputNumberValueChangeEvent } from 'primereact/inputnumber'; - -export default function PTDemo() { - const [value, setValue] = useState(20); - - return ( -
- setValue(e.value)} - showButtons - buttonLayout="horizontal" - step={0.25} - decrementButtonClassName="p-button-danger" - incrementButtonClassName="p-button-success" - incrementButtonIcon="pi pi-plus" - decrementButtonIcon="pi pi-minus" - mode="currency" - currency="EUR" - pt={{ - incrementButton: { className: 'bg-teal-500 border-teal-500' }, - decrementButton: { className: 'bg-orange-500 border-orange-500' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - showButtons - buttonLayout="horizontal" - step={0.25} - decrementButtonClassName="p-button-danger" - incrementButtonClassName="p-button-success" - incrementButtonIcon="pi pi-plus" - decrementButtonIcon="pi pi-minus" - mode="currency" - currency="EUR" - pt={{ - incrementButton: { className: 'bg-teal-500 border-teal-500' }, - decrementButton: { className: 'bg-orange-500 border-orange-500' } - }} - /> -
- - - ); -} diff --git a/components/doc/inputswitch/pt/ptdoc.js b/components/doc/inputswitch/pt/ptdoc.js deleted file mode 100644 index fe808de53e..0000000000 --- a/components/doc/inputswitch/pt/ptdoc.js +++ /dev/null @@ -1,84 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputSwitch } from '@/components/lib/inputswitch/InputSwitch'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [checked, setChecked] = useState(false); - - const code = { - basic: ` - setChecked(e.value)} - pt={{ - slider: ({ props }) => ({ - className: props.checked ? 'bg-teal-400' : 'bg-red-400' - }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { InputSwitch } from "primereact/inputswitch"; - -export default function PTDemo() { - const [checked, setChecked] = useState(false); - - return ( -
- setChecked(e.value)} - pt={{ - slider: ({ props }) => ({ - className: props.checked ? 'bg-teal-400' : 'bg-red-400' - }) - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { InputSwitch, InputSwitchChangeEvent } from "primereact/inputswitch"; - -export default function PTDemo() { - const [checked, setChecked] = useState(false); - - return ( -
- setChecked(e.value)} - pt={{ - slider: ({ props }) => ({ - className: props.checked ? 'bg-teal-400' : 'bg-red-400' - }) - }} - /> -
- ); -} - ` - }; - - return ( - <> - -
- setChecked(e.value)} - pt={{ - slider: ({ props }) => ({ - className: props.checked ? 'bg-teal-400' : 'bg-red-400' - }) - }} - /> -
- - - ); -} diff --git a/components/doc/inputtext/pt/ptdoc.js b/components/doc/inputtext/pt/ptdoc.js deleted file mode 100644 index 00b97c9e8e..0000000000 --- a/components/doc/inputtext/pt/ptdoc.js +++ /dev/null @@ -1,80 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputText } from '@/components/lib/inputtext/InputText'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - - const code = { - basic: ` - setValue(e.target.value)} - pt={{ - root: { className: 'border-primary-400' } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { InputText } from "primereact/inputtext"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - pt={{ - root: { className: 'border-primary-400' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { InputText } from "primereact/inputtext"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - pt={{ - root: { className: 'border-primary-400' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -

- InputText is used as a controlled input with value and onChange properties. -

-
-
- setValue(e.target.value)} - pt={{ - root: { className: 'border-primary-400' } - }} - /> -
- - - ); -} diff --git a/components/doc/inputtextarea/pt/ptdoc.js b/components/doc/inputtextarea/pt/ptdoc.js deleted file mode 100644 index 492f002661..0000000000 --- a/components/doc/inputtextarea/pt/ptdoc.js +++ /dev/null @@ -1,88 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { InputTextarea } from '@/components/lib/inputtextarea/InputTextarea'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - - const code = { - basic: ` - setValue(e.target.value)} - pt={{ - root: { - rows: 5, - cols: 30 - } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { InputTextarea } from "primereact/inputtextarea"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - pt={{ - root: { - rows: 5, - cols: 30 - } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { InputTextarea } from "primereact/inputtextarea"; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- ) => setValue(e.target.value)} - pt={{ - root: { - rows: 5, - cols: 30 - } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.target.value)} - pt={{ - root: { - rows: 5, - cols: 30 - } - }} - /> -
- - - ); -} diff --git a/components/doc/knob/pt/ptdoc.js b/components/doc/knob/pt/ptdoc.js deleted file mode 100644 index ffe01af20c..0000000000 --- a/components/doc/knob/pt/ptdoc.js +++ /dev/null @@ -1,76 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Knob } from '@/components/lib/knob/Knob'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(0); - - const code = { - basic: ` - setValue(e.value)} - pt={{ - value: { style: { stroke: 'var(--cyan-500)' } } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Knob } from 'primereact/knob'; - -export default function PTDemo() { - const [value, setValue] = useState(0); - - return ( -
- setValue(e.value)} - pt={{ - value: { style: { stroke: 'var(--cyan-500)' } } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { Knob, KnobChangeEvent } from 'primereact/knob'; - -export default function PTDemo() { - const [value, setValue] = useState(0); - - return ( -
- setValue(e.value)} - pt={{ - value: { style: { stroke: 'var(--cyan-500)' } } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - pt={{ - value: { style: { stroke: 'var(--cyan-500)' } } - }} - /> -
- - - ); -} diff --git a/components/doc/listbox/pt/ptdoc.js b/components/doc/listbox/pt/ptdoc.js deleted file mode 100644 index 3ecfaca9c9..0000000000 --- a/components/doc/listbox/pt/ptdoc.js +++ /dev/null @@ -1,122 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { ListBox } from '@/components/lib/listbox/ListBox'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [selectedCity, setSelectedCity] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - const code = { - basic: ` - setSelectedCity(e.value)} - options={cities} - optionLabel="name" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { ListBox } from 'primereact/listbox'; - -export default function PTDemo() { - const [selectedCity, setSelectedCity] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { ListBox, ListBoxChangeEvent } from 'primereact/listbox'; - -interface City { - name: string; - code: string; -} - -export default function PTDemo() { - const [selectedCity, setSelectedCity] = useState(null); - const cities: City[] = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setSelectedCity(e.value)} - options={cities} - optionLabel="name" - pt={{ - root: { className: 'w-full md:w-14rem' }, - item: ({ context }) => ({ - className: context.selected ? 'bg-primary' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/megamenu/pt/ptdoc.js b/components/doc/megamenu/pt/ptdoc.js deleted file mode 100644 index 854fcd0260..0000000000 --- a/components/doc/megamenu/pt/ptdoc.js +++ /dev/null @@ -1,408 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { MegaMenu } from '@/components/lib/megamenu/MegaMenu'; - -export function PTDoc(props) { - const items = [ - { - label: 'Videos', - icon: 'pi pi-fw pi-video', - items: [ - [ - { - label: 'Video 1', - items: [{ label: 'Video 1.1' }, { label: 'Video 1.2' }] - }, - { - label: 'Video 2', - items: [{ label: 'Video 2.1' }, { label: 'Video 2.2' }] - } - ], - [ - { - label: 'Video 3', - items: [{ label: 'Video 3.1' }, { label: 'Video 3.2' }] - }, - { - label: 'Video 4', - items: [{ label: 'Video 4.1' }, { label: 'Video 4.2' }] - } - ] - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-users', - items: [ - [ - { - label: 'User 1', - items: [{ label: 'User 1.1' }, { label: 'User 1.2' }] - }, - { - label: 'User 2', - items: [{ label: 'User 2.1' }, { label: 'User 2.2' }] - } - ], - [ - { - label: 'User 3', - items: [{ label: 'User 3.1' }, { label: 'User 3.2' }] - }, - { - label: 'User 4', - items: [{ label: 'User 4.1' }, { label: 'User 4.2' }] - } - ], - [ - { - label: 'User 5', - items: [{ label: 'User 5.1' }, { label: 'User 5.2' }] - }, - { - label: 'User 6', - items: [{ label: 'User 6.1' }, { label: 'User 6.2' }] - } - ] - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - [ - { - label: 'Event 1', - items: [{ label: 'Event 1.1' }, { label: 'Event 1.2' }] - }, - { - label: 'Event 2', - items: [{ label: 'Event 2.1' }, { label: 'Event 2.2' }] - } - ], - [ - { - label: 'Event 3', - items: [{ label: 'Event 3.1' }, { label: 'Event 3.2' }] - }, - { - label: 'Event 4', - items: [{ label: 'Event 4.1' }, { label: 'Event 4.2' }] - } - ] - ] - }, - { - label: 'Settings', - icon: 'pi pi-fw pi-cog', - items: [ - [ - { - label: 'Setting 1', - items: [{ label: 'Setting 1.1' }, { label: 'Setting 1.2' }] - }, - { - label: 'Setting 2', - items: [{ label: 'Setting 2.1' }, { label: 'Setting 2.2' }] - }, - { - label: 'Setting 3', - items: [{ label: 'Setting 3.1' }, { label: 'Setting 3.2' }] - } - ], - [ - { - label: 'Technology 4', - items: [{ label: 'Setting 4.1' }, { label: 'Setting 4.2' }] - } - ] - ] - } - ]; - const code = { - basic: ` - ({ className: context.active ? 'bg-primary-200' : undefined }) - }} -/> -`, - javascript: ` -import React from 'react'; -import { MegaMenu } from 'primereact/megamenu'; - -export default function PTDemo() { - const items = [ - { - label: 'Videos', icon: 'pi pi-fw pi-video', - items: [ - [ - { - label: 'Video 1', - items: [{ label: 'Video 1.1' }, { label: 'Video 1.2' }] - }, - { - label: 'Video 2', - items: [{ label: 'Video 2.1' }, { label: 'Video 2.2' }] - } - ], - [ - { - label: 'Video 3', - items: [{ label: 'Video 3.1' }, { label: 'Video 3.2' }] - }, - { - label: 'Video 4', - items: [{ label: 'Video 4.1' }, { label: 'Video 4.2' }] - } - ] - ] - }, - { - label: 'Users', icon: 'pi pi-fw pi-users', - items: [ - [ - { - label: 'User 1', - items: [{ label: 'User 1.1' }, { label: 'User 1.2' }] - }, - { - label: 'User 2', - items: [{ label: 'User 2.1' }, { label: 'User 2.2' }] - }, - ], - [ - { - label: 'User 3', - items: [{ label: 'User 3.1' }, { label: 'User 3.2' }] - }, - { - label: 'User 4', - items: [{ label: 'User 4.1' }, { label: 'User 4.2' }] - } - ], - [ - { - label: 'User 5', - items: [{ label: 'User 5.1' }, { label: 'User 5.2' }] - }, - { - label: 'User 6', - items: [{ label: 'User 6.1' }, { label: 'User 6.2' }] - } - ] - ] - }, - { - label: 'Events', icon: 'pi pi-fw pi-calendar', - items: [ - [ - { - label: 'Event 1', - items: [{ label: 'Event 1.1' }, { label: 'Event 1.2' }] - }, - { - label: 'Event 2', - items: [{ label: 'Event 2.1' }, { label: 'Event 2.2' }] - } - ], - [ - { - label: 'Event 3', - items: [{ label: 'Event 3.1' }, { label: 'Event 3.2' }] - }, - { - label: 'Event 4', - items: [{ label: 'Event 4.1' }, { label: 'Event 4.2' }] - } - ] - ] - }, - { - label: 'Settings', icon: 'pi pi-fw pi-cog', - items: [ - [ - { - label: 'Setting 1', - items: [{ label: 'Setting 1.1' }, { label: 'Setting 1.2' }] - }, - { - label: 'Setting 2', - items: [{ label: 'Setting 2.1' }, { label: 'Setting 2.2' }] - }, - { - label: 'Setting 3', - items: [{ label: 'Setting 3.1' }, { label: 'Setting 3.2' }] - } - ], - [ - { - label: 'Technology 4', - items: [{ label: 'Setting 4.1' }, { label: 'Setting 4.2' }] - } - ] - ] - } - ]; - - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { MegaMenu } from 'primereact/megamenu'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Videos', icon: 'pi pi-fw pi-video', - items: [ - [ - { - label: 'Video 1', - items: [{ label: 'Video 1.1' }, { label: 'Video 1.2' }] - }, - { - label: 'Video 2', - items: [{ label: 'Video 2.1' }, { label: 'Video 2.2' }] - } - ], - [ - { - label: 'Video 3', - items: [{ label: 'Video 3.1' }, { label: 'Video 3.2' }] - }, - { - label: 'Video 4', - items: [{ label: 'Video 4.1' }, { label: 'Video 4.2' }] - } - ] - ] - }, - { - label: 'Users', icon: 'pi pi-fw pi-users', - items: [ - [ - { - label: 'User 1', - items: [{ label: 'User 1.1' }, { label: 'User 1.2' }] - }, - { - label: 'User 2', - items: [{ label: 'User 2.1' }, { label: 'User 2.2' }] - }, - ], - [ - { - label: 'User 3', - items: [{ label: 'User 3.1' }, { label: 'User 3.2' }] - }, - { - label: 'User 4', - items: [{ label: 'User 4.1' }, { label: 'User 4.2' }] - } - ], - [ - { - label: 'User 5', - items: [{ label: 'User 5.1' }, { label: 'User 5.2' }] - }, - { - label: 'User 6', - items: [{ label: 'User 6.1' }, { label: 'User 6.2' }] - } - ] - ] - }, - { - label: 'Events', icon: 'pi pi-fw pi-calendar', - items: [ - [ - { - label: 'Event 1', - items: [{ label: 'Event 1.1' }, { label: 'Event 1.2' }] - }, - { - label: 'Event 2', - items: [{ label: 'Event 2.1' }, { label: 'Event 2.2' }] - } - ], - [ - { - label: 'Event 3', - items: [{ label: 'Event 3.1' }, { label: 'Event 3.2' }] - }, - { - label: 'Event 4', - items: [{ label: 'Event 4.1' }, { label: 'Event 4.2' }] - } - ] - ] - }, - { - label: 'Settings', icon: 'pi pi-fw pi-cog', - items: [ - [ - { - label: 'Setting 1', - items: [{ label: 'Setting 1.1' }, { label: 'Setting 1.2' }] - }, - { - label: 'Setting 2', - items: [{ label: 'Setting 2.1' }, { label: 'Setting 2.2' }] - }, - { - label: 'Setting 3', - items: [{ label: 'Setting 3.1' }, { label: 'Setting 3.2' }] - } - ], - [ - { - label: 'Technology 4', - items: [{ label: 'Setting 4.1' }, { label: 'Setting 4.2' }] - } - ] - ] - } - ]; - - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/mention/pt/ptdoc.js b/components/doc/mention/pt/ptdoc.js deleted file mode 100644 index 592204ddeb..0000000000 --- a/components/doc/mention/pt/ptdoc.js +++ /dev/null @@ -1,263 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Mention } from '@/components/lib/mention/Mention'; -import { useEffect, useState } from 'react'; -import { CustomerService } from '../../../../service/CustomerService'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - const [customers, setCustomers] = useState([]); - const [suggestions, setSuggestions] = useState([]); - - useEffect(() => { - CustomerService.getCustomersSmall().then((data) => { - data.forEach((d) => (d.nickname = `${d.name.replace(/\s+/g, '').toLowerCase()}_${d.id}`)); - setCustomers(data); - }); - }, []); - - const onSearch = (event) => { - //in a real application, make a request to a remote url with the query and return suggestions, for demo we filter at client side - setTimeout(() => { - const query = event.query; - let suggestions; - - if (!query.trim().length) { - suggestions = [...customers]; - } else { - suggestions = customers.filter((customer) => { - return customer.nickname.toLowerCase().startsWith(query.toLowerCase()); - }); - } - - setSuggestions(suggestions); - }, 250); - }; - - const itemTemplate = (suggestion) => { - const src = 'https://primefaces.org/cdn/primereact/images/avatar/' + suggestion.representative.image; - - return ( -
- {suggestion.name} - - {suggestion.name} - @{suggestion.nickname} - -
- ); - }; - - const code = { - basic: ` - setValue(e.target.value)} - suggestions={suggestions} - onSearch={onSearch} - field="nickname" - placeholder="Enter @ to mention people" - rows={5} - cols={40} - itemTemplate={itemTemplate} - autoResize - pt={{ - items: { className: 'bg-orange-400' }, - item: { className: 'font-bold' } - }} -/> - `, - javascript: ` -import React, { useState, useEffect } from "react"; -import { Mention } from 'primereact/mention'; -import { CustomerService } from './service/CustomerService'; - -export default function BasicDemo() { - const [value, setValue] = useState(''); - const [customers, setCustomers] = useState([]); - const [suggestions, setSuggestions] = useState([]); - - useEffect(() => { - CustomerService.getCustomersSmall().then(data => { - data.forEach(d => d['nickname'] = \`\${d.name.replace(/\\s+/g, '').toLowerCase()}_\${d.id}\`); - setCustomers(data); - }); - }, []) - - const onSearch = (event) => { - //in a real application, make a request to a remote url with the query and return suggestions, for demo we filter at client side - setTimeout(() => { - const query = event.query; - let suggestions; - - if (!query.trim().length) { - suggestions = [...customers]; - } - else { - suggestions = customers.filter((customer) => { - return customer.nickname.toLowerCase().startsWith(query.toLowerCase()); - }); - } - - setSuggestions(suggestions); - }, 250); - } - - const itemTemplate = (suggestion) => { - const src = 'https://primefaces.org/cdn/primereact/images/avatar/' + suggestion.representative.image; - - return ( -
- {suggestion.name} - - {suggestion.name} - @{suggestion.nickname} - -
- ); - } - - return ( -
- setValue(e.target.value)} - suggestions={suggestions} - onSearch={onSearch} - field="nickname" - placeholder="Enter @ to mention people" - rows={5} - cols={40} - itemTemplate={itemTemplate} - autoResize - pt={{ - items: { className: 'bg-orange-400' }, - item: { className: 'font-bold' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState, useEffect } from "react"; -import { Mention, MentionSearchEvent } from 'primereact/mention'; -import { CustomerService } from './service/CustomerService'; - -export default function BasicDemo() { - const [value, setValue] = useState(''); - const [customers, setCustomers] = useState([]); - const [suggestions, setSuggestions] = useState([]); - - useEffect(() => { - CustomerService.getCustomersSmall().then(data => { - data.forEach(d => d['nickname'] = \`\${d.name.replace(/\\s+/g, '').toLowerCase()}_\${d.id}\`); - setCustomers(data); - }); - }, []) - - const onSearch = (event: MentionSearchEvent) => { - //in a real application, make a request to a remote url with the query and return suggestions, for demo we filter at client side - setTimeout(() => { - const query = event.query; - let suggestions; - - if (!query.trim().length) { - suggestions = [...customers]; - } - else { - suggestions = customers.filter((customer) => { - return customer.nickname.toLowerCase().startsWith(query.toLowerCase()); - }); - } - - setSuggestions(suggestions); - }, 250); - } - - const itemTemplate = (suggestion: any) => { - const src = 'https://primefaces.org/cdn/primereact/images/avatar/' + suggestion.representative.image; - - return ( -
- {suggestion.name} - - {suggestion.name} - @{suggestion.nickname} - -
- ); - } - - return ( -
- ) => setValue(e.target.value)} - suggestions={suggestions} - onSearch={onSearch} - field="nickname" - placeholder="Enter @ to mention people" - rows={5} - cols={40} - itemTemplate={itemTemplate} - autoResize - pt={{ - items: { className: 'bg-orange-400' }, - item: { className: 'font-bold' } - }} - /> -
- ) -} - `, - data: ` -/* CustomerService */ -{ - id: 1000, - name: 'James Butt', - country: { - name: 'Algeria', - code: 'dz' - }, - company: 'Benton, John B Jr', - date: '2015-09-13', - status: 'unqualified', - verified: true, - activity: 17, - representative: { - name: 'Ioni Bowcher', - image: 'ionibowcher.png' - }, - balance: 70663 -}, -... - ` - }; - - return ( - <> - -
- setValue(e.target.value)} - suggestions={suggestions} - onSearch={onSearch} - field="nickname" - placeholder="Enter @ to mention people" - rows={5} - cols={40} - itemTemplate={itemTemplate} - autoResize - pt={{ - items: { className: 'bg-orange-400' }, - item: { className: 'font-bold' } - }} - /> -
- - - ); -} diff --git a/components/doc/menu/pt/ptdoc.js b/components/doc/menu/pt/ptdoc.js deleted file mode 100644 index 623828401a..0000000000 --- a/components/doc/menu/pt/ptdoc.js +++ /dev/null @@ -1,195 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Menu } from '@/components/lib/menu/Menu'; -import { Toast } from '@/components/lib/toast/Toast'; -import { useRouter } from 'next/router'; -import { useRef } from 'react'; - -export function PTDoc(props) { - const toast = useRef(null); - const router = useRouter(); - const items = [ - { - label: 'Options', - items: [ - { - label: 'Update', - icon: 'pi pi-refresh', - command: () => { - toast.current.show({ severity: 'success', summary: 'Updated', detail: 'Data Updated', life: 3000 }); - } - }, - { - label: 'Delete', - icon: 'pi pi-times', - command: () => { - toast.current.show({ severity: 'warn', summary: 'Delete', detail: 'Data Deleted', life: 3000 }); - } - } - ] - }, - { - label: 'Navigate', - items: [ - { - label: 'React Website', - icon: 'pi pi-external-link', - url: 'https://reactjs.org/' - }, - { - label: 'Router', - icon: 'pi pi-upload', - command: () => { - router.push('/fileupload'); - } - } - ] - } - ]; - - const code = { - basic: ` - -`, - javascript: ` -import React, { useRef } from 'react'; -import { useRouter } from 'next/router'; -import { Menu } from 'primereact/menu'; -import { Toast } from 'primereact/toast'; - -export default function PTDemo() { - const items = [ - { - label: 'Options', - items: [ - { - label: 'Update', - icon: 'pi pi-refresh', - command: () => { - toast.current.show({ severity: 'success', summary: 'Updated', detail: 'Data Updated', life: 3000 }); - } - }, - { - label: 'Delete', - icon: 'pi pi-times', - command: () => { - toast.current.show({ severity: 'warn', summary: 'Delete', detail: 'Data Deleted', life: 3000 }); - } - } - ] - }, - { - label: 'Navigate', - items: [ - { - label: 'React Website', - icon: 'pi pi-external-link', - url: 'https://reactjs.org/' - }, - { - label: 'Router', - icon: 'pi pi-upload', - command: () => { - router.push('/fileupload'); - } - } - ] - } - ]; - - return ( -
- - -
- ) -} - `, - typescript: ` -import React, { useRef } from 'react'; -import { useRouter } from 'next/router'; -import { Menu } from 'primereact/menu'; -import { MenuItem } from 'primereact/menuitem'; -import { Toast } from 'primereact/toast'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Options', - items: [ - { - label: 'Update', - icon: 'pi pi-refresh', - command: () => { - toast.current.show({ severity: 'success', summary: 'Updated', detail: 'Data Updated', life: 3000 }); - } - }, - { - label: 'Delete', - icon: 'pi pi-times', - command: () => { - toast.current.show({ severity: 'warn', summary: 'Delete', detail: 'Data Deleted', life: 3000 }); - } - } - ] - }, - { - label: 'Navigate', - items: [ - { - label: 'React Website', - icon: 'pi pi-external-link', - url: 'https://reactjs.org/' - }, - { - label: 'Router', - icon: 'pi pi-upload', - command: () => { - router.push('/fileupload'); - } - } - ] - } - ]; - - return ( -
- - -
- ) -} - ` - }; - - return ( - <> - -
- - -
- - - ); -} diff --git a/components/doc/menubar/pt/ptdoc.js b/components/doc/menubar/pt/ptdoc.js deleted file mode 100644 index 1632dad44f..0000000000 --- a/components/doc/menubar/pt/ptdoc.js +++ /dev/null @@ -1,454 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Menubar } from '@/components/lib/menubar/Menubar'; - -export function PTDoc(props) { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - const code = { - basic: ` - ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} -/> -`, - javascript: ` -import React from 'react'; -import { Menubar } from 'primereact/menubar'; - -export default function PTDemo() { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - }, - - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - }, - - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus', - - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Menubar } from 'primereact/menubar'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - }, - - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - }, - - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus', - - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/message/pt/ptdoc.js b/components/doc/message/pt/ptdoc.js deleted file mode 100644 index 9797959510..0000000000 --- a/components/doc/message/pt/ptdoc.js +++ /dev/null @@ -1,69 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Message } from '@/components/lib/message/Message'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Message } from 'primereact/message'; - -export default function PTDemo() { - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Message } from 'primereact/message'; - -export default function PTDemo() { - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/messages/pt/ptdoc.js b/components/doc/messages/pt/ptdoc.js deleted file mode 100644 index 6c3bc12177..0000000000 --- a/components/doc/messages/pt/ptdoc.js +++ /dev/null @@ -1,91 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { useMountEffect } from '@/components/lib/hooks/Hooks'; -import { Messages } from '@/components/lib/messages/Messages'; -import { useRef } from 'react'; - -export function PTDoc(props) { - const msgs = useRef(null); - - useMountEffect(() => { - msgs.current && msgs.current.show([{ sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false }]); - }); - - const code = { - basic: ` - - `, - javascript: ` -import React, { useEffect, useRef } from 'react'; -import { useMountEffect } from 'primereact/hooks'; -import { Messages } from 'primereact/messages'; - -export default function PTDemo() { - const msgs = useRef(null); - - useMountEffect(() => { - msgs.current && msgs.current.show([ - { sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false } - ]); - }); - - return ( -
- -
- ) -} - `, - typescript: ` -import React, { useEffect, useRef } from 'react'; -import { useMountEffect } from 'primereact/hooks'; -import { Messages } from 'primereact/messages'; - -export default function PTDemo() { - const msgs = useRef(null); - - useMountEffect(() => { - msgs.current && msgs.current.show([ - { sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false } - ]); - }); - - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/metergroup/pt/ptdoc.js b/components/doc/metergroup/pt/ptdoc.js deleted file mode 100644 index 1632dad44f..0000000000 --- a/components/doc/metergroup/pt/ptdoc.js +++ /dev/null @@ -1,454 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Menubar } from '@/components/lib/menubar/Menubar'; - -export function PTDoc(props) { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - const code = { - basic: ` - ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} -/> -`, - javascript: ` -import React from 'react'; -import { Menubar } from 'primereact/menubar'; - -export default function PTDemo() { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - }, - - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - }, - - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus', - - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Menubar } from 'primereact/menubar'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - }, - - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - }, - - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus', - - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ - className: context.active ? 'bg-primary-200 border-round-sm' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/multiselect/pt/ptdoc.js b/components/doc/multiselect/pt/ptdoc.js deleted file mode 100644 index 465d6ba9fe..0000000000 --- a/components/doc/multiselect/pt/ptdoc.js +++ /dev/null @@ -1,171 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { MultiSelect } from '@/components/lib/multiselect/MultiSelect'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [selectedCities, setSelectedCities] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - const code = { - basic: ` - setSelectedCities(e.value)} - showClear={true} - options={cities} - display="chip" - optionLabel="name" - placeholder="Select Cities" - maxSelectedLabels={3} - inputId="multiselect" - pt={{ - root: { className: 'w-full md:w-20rem' }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }), - token: ({ context }) => { - switch (context.value.code) { - case 'NY': - return 'bg-red-300'; - case 'RM': - return 'bg-green-300'; - } - return 'bg-gray-100'; - } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { MultiSelect } from 'primereact/multiselect'; - -export default function PTDemo() { - const [selectedCities, setSelectedCities] = useState(null); - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCities(e.value)} - showClear={true} - options={cities} - display="chip" - optionLabel="name" - placeholder="Select Cities" - maxSelectedLabels={3} - inputId="multiselect" - pt={{ - root: { className: 'w-full md:w-20rem' }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }), - token: ({ context }) => { - switch (context.value.code) { - case 'NY': - return 'bg-red-300'; - case 'RM': - return 'bg-green-300'; - } - return 'bg-gray-100'; - } - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { MultiSelect, MultiSelectChangeEvent } from 'primereact/multiselect'; - -interface City { - name: string; - code: string; -} - -export default function PTDemo() { - const [selectedCities, setSelectedCities] = useState(null); - const cities: City[] = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - return ( -
- setSelectedCities(e.value)} - showClear={true} - options={cities} - display="chip" - optionLabel="name" - placeholder="Select Cities" - maxSelectedLabels={3} - inputId="multiselect" - pt={{ - root: { className: 'w-full md:w-20rem' }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }), - token: ({ context }) => { - switch (context.value.code) { - case 'NY': - return 'bg-red-300'; - case 'RM': - return 'bg-green-300'; - } - return 'bg-gray-100'; - } - }} - /> -
- ); -} - ` - }; - - return ( - <> - -
- setSelectedCities(e.value)} - showClear={true} - options={cities} - display="chip" - optionLabel="name" - placeholder="Select Cities" - maxSelectedLabels={3} - inputId="multiselect" - pt={{ - root: { className: 'w-full md:w-20rem' }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }), - token: ({ context }) => { - switch (context.value.code) { - case 'NY': - return 'bg-red-300'; - case 'RM': - return 'bg-green-300'; - } - - return 'bg-gray-100'; - } - }} - /> -
- - - ); -} diff --git a/components/doc/multistatecheckbox/pt/ptdoc.js b/components/doc/multistatecheckbox/pt/ptdoc.js deleted file mode 100644 index b025875313..0000000000 --- a/components/doc/multistatecheckbox/pt/ptdoc.js +++ /dev/null @@ -1,115 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { MultiStateCheckbox } from '@/components/lib/multistatecheckbox/MultiStateCheckbox'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState('public'); - const options = [ - { value: 'public', icon: 'pi pi-globe' }, - { value: 'protected', icon: 'pi pi-lock-open' }, - { value: 'private', icon: 'pi pi-lock' } - ]; - - const code = { - basic: ` - setValue(e.value)} - options={options} - optionValue="value" - pt={{ - checkbox: { - className: value ? 'bg-orange-400 border-orange-400' : undefined - } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { MultiStateCheckbox } from 'primereact/multistatecheckbox'; - -export default function PTDemo() { - const [value, setValue] = useState('public'); - const options = [ - { value: 'public', icon: 'pi pi-globe' }, - { value: 'protected', icon: 'pi pi-lock-open' }, - { value: 'private', icon: 'pi pi-lock' } - ]; - - return ( -
- setValue(e.value)} - options={options} - optionValue="value" - pt={{ - checkbox: { - className: value ? 'bg-orange-400 border-orange-400' : undefined - } - }} - /> - {value || 'no value'} -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { MultiStateCheckbox, MultiStateCheckboxChangeEvent } from 'primereact/multistatecheckbox'; - -interface Item { - value: string; - icon: string; -} - -export default function PTDemo() { - const [value, setValue] = useState('public'); - const options: Item[] = [ - { value: 'public', icon: 'pi pi-globe' }, - { value: 'protected', icon: 'pi pi-lock-open' }, - { value: 'private', icon: 'pi pi-lock' } - ]; - - return ( -
- setValue(e.value)} - options={options} - optionValue="value" - pt={{ - checkbox: { - className: value ? 'bg-orange-400 border-orange-400' : undefined - } - }} - /> - {value || 'no value'} -
- ); -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - options={options} - optionValue="value" - pt={{ - checkbox: { - className: value ? 'bg-orange-400 border-orange-400' : undefined - } - }} - /> - {value || 'no value'} -
- - - ); -} diff --git a/components/doc/orderlist/pt/ptdoc.js b/components/doc/orderlist/pt/ptdoc.js deleted file mode 100644 index 1dd8ae5ea7..0000000000 --- a/components/doc/orderlist/pt/ptdoc.js +++ /dev/null @@ -1,196 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { OrderList } from '@/components/lib/orderlist/OrderList'; -import { useEffect, useState } from 'react'; -import { ProductService } from '../../../../service/ProductService'; - -export function PTDoc(props) { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setProducts(data)); - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - const itemTemplate = (item) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- ${item.price} -
- ); - }; - - const code = { - basic: ` - setProducts(e.value)} - itemTemplate={itemTemplate} - header="Products" - pt={{ - list: { style: { height: 'auto' } }, - moveUpButton: { - root: { className: 'bg-teal-400 border-teal-400' } - }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} -> - `, - javascript: ` -import React, { useState, useEffect } from 'react'; -import { OrderList } from 'primereact/orderlist'; -import { ProductService } from './service/ProductService'; - -export default function PTDemo() { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setProducts(data)); - }, []); - - const itemTemplate = (item) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- \${item.price} -
- ); - }; - - return ( -
- setProducts(e.value)} - itemTemplate={itemTemplate} - header="Products" - pt={{ - list: { style: { height: 'auto' } }, - moveUpButton: { - root: { className: 'bg-teal-400 border-teal-400' } - }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - > -
- ) -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { OrderList } from 'primereact/orderlist'; -import { ProductService } from './service/ProductService'; - -interface Product { - id: string; - code: string; - name: string; - description: string; - image: string; - price: number; - category: string; - quantity: number; - inventoryStatus: 'string', - rating: number; -} - -export default function PTDemo() { - const [products, setProducts] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setProducts(data)); - }, []); - - const itemTemplate = (item: Product) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- \${item.price} -
- ); - }; - - return ( -
- setProducts(e.value)} - itemTemplate={itemTemplate} - header="Products" - pt={{ - list: { style: { height: 'auto' } }, - moveUpButton: { - root: { className: 'bg-teal-400 border-teal-400' } - }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - > -
- ) -} - `, - data: ` -/* ProductService */ -{ - id: '1000', - code: 'f230fh0g3', - name: 'Bamboo Watch', - description: 'Product Description', - image: 'bamboo-watch.jpg', - price: 65, - category: 'Accessories', - quantity: 24, - inventoryStatus: 'INSTOCK', - rating: 5 -}, -... - ` - }; - - return ( - <> - -
- setProducts(e.value)} - itemTemplate={itemTemplate} - header="Products" - pt={{ - list: { style: { height: 'auto' } }, - moveUpButton: { - root: { className: 'bg-teal-400 border-teal-400' } - }, - item: ({ context }) => ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/organizationchart/pt/ptdoc.js b/components/doc/organizationchart/pt/ptdoc.js deleted file mode 100644 index f93fd6b9a6..0000000000 --- a/components/doc/organizationchart/pt/ptdoc.js +++ /dev/null @@ -1,189 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { OrganizationChart } from '@/components/lib/organizationchart/OrganizationChart'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [selection, setSelection] = useState([]); - const [data] = useState([ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina' - }, - { - label: 'Croatia' - } - ] - }, - { - label: 'France', - expanded: true, - children: [ - { - label: 'France' - }, - { - label: 'Morocco' - } - ] - } - ] - } - ]); - - const code = { - basic: ` - setSelection(e.data)} - pt={{ - node: ({ context }) => ({ - className: context.selected ? 'border-orange-400 border-round-sm' : 'border-primary-400 border-round-sm' - }) - }} -/> - `, - javascript: ` -import React, { useState } from 'react'; -import { OrganizationChart } from 'primereact/organizationchart'; - -export default function PTDemo() { - const [selection, setSelection] = useState([]); - const [data] = useState([ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina' - }, - { - label: 'Croatia' - } - ] - }, - { - label: 'France', - expanded: true, - children: [ - { - label: 'France' - }, - { - label: 'Morocco' - } - ] - } - ] - } - ]); - - return ( -
- setSelection(e.data)} - pt={{ - node: ({ context }) => ({ - className: context.selected ? 'border-orange-400 border-round-sm' : 'border-primary-400 border-round-sm' - }) - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from 'react'; -import { OrganizationChart } from 'primereact/organizationchart'; -import { TreeNode } from 'primereact/treenode'; - -export default function PTDemo() { - const [selection, setSelection] = useState([]); - const [data] = useState([ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina', - expanded: true, - children: [ - { - label: 'Argentina' - }, - { - label: 'Croatia' - } - ] - }, - { - label: 'France', - expanded: true, - children: [ - { - label: 'France' - }, - { - label: 'Morocco' - } - ] - } - ] - } - ]); - - return ( -
- setSelection(e.data)} - pt={{ - node: ({ context }) => ({ - className: context.selected ? 'border-orange-400 border-round-sm' : 'border-primary-400 border-round-sm' - }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setSelection(e.data)} - pt={{ - node: ({ context }) => ({ - className: context.selected ? 'border-orange-400 border-round-sm' : 'border-primary-400 border-round-sm' - }) - }} - /> -
- - - ); -} diff --git a/components/doc/overlaypanel/pt/ptdoc.js b/components/doc/overlaypanel/pt/ptdoc.js deleted file mode 100644 index cf8e10bbf7..0000000000 --- a/components/doc/overlaypanel/pt/ptdoc.js +++ /dev/null @@ -1,86 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; -import { OverlayPanel } from '@/components/lib/overlaypanel/OverlayPanel'; -import { useRef } from 'react'; - -export function PTDoc(props) { - const op = useRef(null); - - const code = { - basic: ` - - Bamboo Watch - - `, - javascript: ` -import React, { useRef } from 'react'; -import { OverlayPanel } from 'primereact/overlaypanel'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const op = useRef(null); - - return ( -
-
- ); -} - `, - typescript: ` -import React, { useRef } from 'react'; -import { OverlayPanel } from 'primereact/overlaypanel'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const op = useRef(null); - - return ( -
-
- ); -} - ` - }; - - return ( - <> - -
-
- - - ); -} diff --git a/components/doc/paginator/pt/ptdoc.js b/components/doc/paginator/pt/ptdoc.js deleted file mode 100644 index 9ec891171d..0000000000 --- a/components/doc/paginator/pt/ptdoc.js +++ /dev/null @@ -1,114 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Paginator } from '@/components/lib/paginator/Paginator'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [first, setFirst] = useState(0); - const [rows, setRows] = useState(10); - - const onPageChange = (event) => { - setFirst(event.first); - setRows(event.rows); - }; - - const code = { - basic: ` - ({ - className: context.active ? 'bg-primary' : undefined - }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Paginator } from 'primereact/paginator'; - -export default function PTDemo() { - const [first, setFirst] = useState(0); - const [rows, setRows] = useState(10); - - const onPageChange = (event) => { - setFirst(event.first); - setRows(event.rows); - }; - - return ( -
- ({ - className: context.active ? 'bg-primary' : undefined - }) - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { Paginator, PaginatorPageChangeEvent } from 'primereact/paginator'; - -export default function PTDemo() { - const [first, setFirst] = useState(0); - const [rows, setRows] = useState(10); - - const onPageChange = (event: PaginatorPageChangeEvent) => { - setFirst(event.first); - setRows(event.rows); - }; - - return ( -
- ({ - className: context.active ? 'bg-primary' : undefined - }) - }} - /> -
- ); -} - ` - }; - - return ( - <> - -
- ({ - className: context.active ? 'bg-primary' : undefined - }) - }} - /> -
- - - ); -} diff --git a/components/doc/panel/pt/ptdoc.js b/components/doc/panel/pt/ptdoc.js deleted file mode 100644 index 18ae0d2aee..0000000000 --- a/components/doc/panel/pt/ptdoc.js +++ /dev/null @@ -1,94 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Panel } from '@/components/lib/panel/Panel'; - -export function PTDoc(props) { - const code = { - basic: ` - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
- `, - javascript: ` -import React from 'react'; -import { Panel } from 'primereact/panel'; - -export default function PTDemo() { - return ( -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { Panel } from 'primereact/panel'; - -export default function PTDemo() { - return ( -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- ) -} - ` - }; - - return ( - <> - -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
-
- - - ); -} diff --git a/components/doc/panelmenu/pt/ptdoc.js b/components/doc/panelmenu/pt/ptdoc.js deleted file mode 100644 index 888aa68939..0000000000 --- a/components/doc/panelmenu/pt/ptdoc.js +++ /dev/null @@ -1,423 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { PanelMenu } from '@/components/lib/panelmenu/PanelMenu'; - -export function PTDoc(props) { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - } - ]; - const code = { - basic: ` - ({ className: context.active ? 'bg-primary-200' : undefined }), - action: ({ context }) => ({ className: context.active ? 'bg-primary-100' : undefined }) - }} -/> -`, - javascript: ` -import React from 'react'; -import { PanelMenu } from 'primereact/panelmenu'; - -export default function PTDemo() { - const items = [ - { - label:'File', - icon:'pi pi-fw pi-file', - items:[ - { - label:'New', - icon:'pi pi-fw pi-plus', - items:[ - { - label:'Bookmark', - icon:'pi pi-fw pi-bookmark' - }, - { - label:'Video', - icon:'pi pi-fw pi-video' - } - ] - }, - { - label:'Delete', - icon:'pi pi-fw pi-trash' - }, - { - label:'Export', - icon:'pi pi-fw pi-external-link' - } - ] - }, - { - label:'Edit', - icon:'pi pi-fw pi-pencil', - items:[ - { - label:'Left', - icon:'pi pi-fw pi-align-left' - }, - { - label:'Right', - icon:'pi pi-fw pi-align-right' - }, - { - label:'Center', - icon:'pi pi-fw pi-align-center' - }, - { - label:'Justify', - icon:'pi pi-fw pi-align-justify' - } - ] - }, - { - label:'Users', - icon:'pi pi-fw pi-user', - items:[ - { - label:'New', - icon:'pi pi-fw pi-user-plus' - }, - { - label:'Delete', - icon:'pi pi-fw pi-user-minus' - }, - { - label:'Search', - icon:'pi pi-fw pi-users', - items:[ - { - label:'Filter', - icon:'pi pi-fw pi-filter', - items:[ - { - label:'Print', - icon:'pi pi-fw pi-print' - } - ] - }, - { - icon:'pi pi-fw pi-bars', - label:'List' - } - ] - } - ] - }, - { - label:'Events', - icon:'pi pi-fw pi-calendar', - items:[ - { - label:'Edit', - icon:'pi pi-fw pi-pencil', - items:[ - { - label:'Save', - icon:'pi pi-fw pi-calendar-plus' - }, - { - label:'Delete', - icon:'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label:'Archive', - icon:'pi pi-fw pi-calendar-times', - items:[ - { - label:'Remove', - icon:'pi pi-fw pi-calendar-minus' - } - ] - } - ] - } - ]; - - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }), - action: ({ context }) => ({ className: context.active ? 'bg-primary-100' : undefined }) - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { PanelMenu } from 'primereact/panelmenu'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label:'File', - icon:'pi pi-fw pi-file', - items:[ - { - label:'New', - icon:'pi pi-fw pi-plus', - items:[ - { - label:'Bookmark', - icon:'pi pi-fw pi-bookmark' - }, - { - label:'Video', - icon:'pi pi-fw pi-video' - } - ] - }, - { - label:'Delete', - icon:'pi pi-fw pi-trash' - }, - { - label:'Export', - icon:'pi pi-fw pi-external-link' - } - ] - }, - { - label:'Edit', - icon:'pi pi-fw pi-pencil', - items:[ - { - label:'Left', - icon:'pi pi-fw pi-align-left' - }, - { - label:'Right', - icon:'pi pi-fw pi-align-right' - }, - { - label:'Center', - icon:'pi pi-fw pi-align-center' - }, - { - label:'Justify', - icon:'pi pi-fw pi-align-justify' - } - ] - }, - { - label:'Users', - icon:'pi pi-fw pi-user', - items:[ - { - label:'New', - icon:'pi pi-fw pi-user-plus' - }, - { - label:'Delete', - icon:'pi pi-fw pi-user-minus' - }, - { - label:'Search', - icon:'pi pi-fw pi-users', - items:[ - { - label:'Filter', - icon:'pi pi-fw pi-filter', - items:[ - { - label:'Print', - icon:'pi pi-fw pi-print' - } - ] - }, - { - icon:'pi pi-fw pi-bars', - label:'List' - } - ] - } - ] - }, - { - label:'Events', - icon:'pi pi-fw pi-calendar', - items:[ - { - label:'Edit', - icon:'pi pi-fw pi-pencil', - items:[ - { - label:'Save', - icon:'pi pi-fw pi-calendar-plus' - }, - { - label:'Delete', - icon:'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label:'Archive', - icon:'pi pi-fw pi-calendar-times', - items:[ - { - label:'Remove', - icon:'pi pi-fw pi-calendar-minus' - } - ] - } - ] - } - ]; - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }), - action: ({ context }) => ({ className: context.active ? 'bg-primary-100' : undefined }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ className: context.active ? 'bg-primary-200' : undefined }), - action: ({ context }) => ({ className: context.active ? 'bg-primary-100' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/password/pt/ptdoc.js b/components/doc/password/pt/ptdoc.js deleted file mode 100644 index b9c44faed8..0000000000 --- a/components/doc/password/pt/ptdoc.js +++ /dev/null @@ -1,76 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Password } from '@/components/lib/password/Password'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(''); - - const code = { - basic: ` - setValue(e.target.value)} - pt={{ - info: { className: 'font-bold' } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Password } from 'primereact/password'; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- setValue(e.target.value)} - pt={{ - info: { className: 'font-bold' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { Password } from 'primereact/password'; - -export default function PTDemo() { - const [value, setValue] = useState(''); - - return ( -
- ) => setValue(e.target.value)} - pt={{ - info: { className: 'font-bold' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.target.value)} - pt={{ - info: { className: 'font-bold' } - }} - /> -
- - - ); -} diff --git a/components/doc/picklist/pt/ptdoc.js b/components/doc/picklist/pt/ptdoc.js deleted file mode 100644 index 54ff0572cc..0000000000 --- a/components/doc/picklist/pt/ptdoc.js +++ /dev/null @@ -1,246 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { PickList } from '@/components/lib/picklist/PickList'; -import { useEffect, useState } from 'react'; -import { ProductService } from '../../../../service/ProductService'; - -export function PTDoc(props) { - const [source, setSource] = useState([]); - const [target, setTarget] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setSource(data)); - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - const onChange = (event) => { - setSource(event.source); - setTarget(event.target); - }; - - const itemTemplate = (item) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- ${item.price} -
- ); - }; - - const code = { - basic: ` - ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} -/> - `, - javascript: ` -import React, { useState, useEffect } from 'react'; -import { PickList } from 'primereact/picklist'; -import { ProductService } from './service/ProductService'; - -export default function PTDemo() { - const [source, setSource] = useState([]); - const [target, setTarget] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setSource(data)); - }, []); - - const onChange = (event) => { - setSource(event.source); - setTarget(event.target); - }; - - const itemTemplate = (item) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- \${item.price} -
- ); - }; - - return ( -
- ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState, useEffect } from 'react'; -import { PickList } from 'primereact/picklist'; -import { ProductService } from './service/ProductService'; - -interface Product { - id: string; - code: string; - name: string; - description: string; - image: string; - price: number; - category: string; - quantity: number; - inventoryStatus: 'string', - rating: number; -} - -export default function PTDemo() { - const [source, setSource] = useState([]); - const [target, setTarget] = useState([]); - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setSource(data)); - }, []); - - const onChange = (event) => { - setSource(event.source); - setTarget(event.target); - }; - - const itemTemplate = (item: Product) => { - return ( -
- {item.name} -
- {item.name} -
- - {item.category} -
-
- \${item.price} -
- ); - }; - - return ( -
- ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - /> -
- ); -} - `, - data: ` -/* ProductService */ -{ - id: '1000', - code: 'f230fh0g3', - name: 'Bamboo Watch', - description: 'Product Description', - image: '/bamboo-watch.jpg', - price: 65, - category: 'Accessories', - quantity: 24, - inventoryStatus: 'INSTOCK', - rating: 5 -}, -... - ` - }; - - return ( - <> - -
- ({ className: context.selected ? 'bg-blue-100' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/progressbar/pt/ptdoc.js b/components/doc/progressbar/pt/ptdoc.js deleted file mode 100644 index cdf47c9ca2..0000000000 --- a/components/doc/progressbar/pt/ptdoc.js +++ /dev/null @@ -1,65 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { ProgressBar } from '@/components/lib/progressbar/ProgressBar'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { ProgressBar } from 'primereact/progressbar'; - -export default function PTDemo() { - return ( -
- -
- ); -} - `, - typescript: ` -import React from 'react'; -import { ProgressBar } from 'primereact/progressbar'; - -export default function PTDemo() { - return ( -
- -
- ); -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/progressspinner/pt/ptdoc.js b/components/doc/progressspinner/pt/ptdoc.js deleted file mode 100644 index 4b1a93a44e..0000000000 --- a/components/doc/progressspinner/pt/ptdoc.js +++ /dev/null @@ -1,65 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { ProgressSpinner } from '@/components/lib/progressspinner/ProgressSpinner'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { ProgressSpinner } from 'primereact/progressspinner'; - -export default function PTDemo() { - return ( -
- -
- ); -} - `, - typescript: ` -import React from 'react'; -import { ProgressSpinner } from 'primereact/progressspinner'; - -export default function PTDemo() { - return ( -
- -
- ); -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/radiobutton/pt/ptdoc.js b/components/doc/radiobutton/pt/ptdoc.js deleted file mode 100644 index 899a0b08f5..0000000000 --- a/components/doc/radiobutton/pt/ptdoc.js +++ /dev/null @@ -1,155 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { RadioButton } from '@/components/lib/radiobutton/RadioButton'; -import { useState } from 'react'; - -export function PTDoc(props) { - const categories = [ - { name: 'Accounting', key: 'A' }, - { name: 'Marketing', key: 'M' }, - { name: 'Production', key: 'P' }, - { name: 'Research', key: 'R' } - ]; - const [selectedCategory, setSelectedCategory] = useState(categories[1]); - - const code = { - basic: ` - setSelectedCategory(e.value)} - checked={selectedCategory.key === category.key} - pt={{ - input: { - className: selectedCategory.key === category.key ? 'bg-orange-500 border-orange-500' : undefined - } - }} -/> - `, - javascript: ` -import React from 'react'; -import { RadioButton } from "primereact/radiobutton"; - -export default function PTDemo() { - const categories = [ - { name: 'Accounting', key: 'A' }, - { name: 'Marketing', key: 'M' }, - { name: 'Production', key: 'P' }, - { name: 'Research', key: 'R' } - ]; - const [selectedCategory, setSelectedCategory] = useState(categories[1]); - - - return ( -
-
- {categories.map((category) => { - return ( -
- setSelectedCategory(e.value)} - checked={selectedCategory.key === category.key} - pt={{ - input: { - className: selectedCategory.key === category.key ? 'bg-orange-500 border-orange-500' : undefined - } - }} - /> - -
- ); - })} -
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { RadioButton } from "primereact/radiobutton"; -import { RadioButton, RadioButtonChangeEvent } from "primereact/radiobutton"; - -interface Category { - name: string; - key: string; -} - -export default function PTDemo() { - const categories = [ - { name: 'Accounting', key: 'A' }, - { name: 'Marketing', key: 'M' }, - { name: 'Production', key: 'P' }, - { name: 'Research', key: 'R' } - ]; - const [selectedCategory, setSelectedCategory] = useState(categories[1]); - - - return ( -
-
- {categories.map((category) => { - return ( -
- setSelectedCategory(e.value)} - checked={selectedCategory.key === category.key} - pt={{ - input: { - className: selectedCategory.key === category.key ? 'bg-orange-500 border-orange-500' : undefined - } - }} - /> - -
- ); - })} -
-
- ) -} - ` - }; - - return ( - <> - -
-
- {categories.map((category) => { - return ( -
- setSelectedCategory(e.value)} - checked={selectedCategory.key === category.key} - pt={{ - input: { - className: selectedCategory.key === category.key ? 'bg-orange-500 border-orange-500' : undefined - } - }} - /> - -
- ); - })} -
-
- - - ); -} diff --git a/components/doc/rating/pt/ptdoc.js b/components/doc/rating/pt/ptdoc.js deleted file mode 100644 index 469453e0b4..0000000000 --- a/components/doc/rating/pt/ptdoc.js +++ /dev/null @@ -1,76 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Rating } from '@/components/lib/rating/Rating'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(null); - - const code = { - basic: ` - setValue(e.value)} - pt={{ - onIcon: { className: 'text-orange-400' } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Rating } from "primereact/rating"; - -export default function PTDemo() { - const [value, setValue] = useState(null); - - return ( -
- setValue(e.value)} - pt={{ - onIcon: { className: 'text-orange-400' } - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { Rating, RatingChangeEvent } from "primereact/rating"; - -export default function PTDemo() { - const [value, setValue] = useState(null); - - return ( -
- setValue(e.value)} - pt={{ - onIcon: { className: 'text-orange-400' } - }} - /> -
- ); -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - pt={{ - onIcon: { className: 'text-orange-400' } - }} - /> -
- - - ); -} diff --git a/components/doc/scrollpanel/pt/ptdoc.js b/components/doc/scrollpanel/pt/ptdoc.js deleted file mode 100644 index b352fa9268..0000000000 --- a/components/doc/scrollpanel/pt/ptdoc.js +++ /dev/null @@ -1,118 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { ScrollPanel } from '@/components/lib/scrollpanel/ScrollPanel'; - -export function PTDoc(props) { - const code = { - basic: ` - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-

- At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa - qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus. -

-
- `, - javascript: ` -import React from 'react'; -import { ScrollPanel } from 'primereact/scrollpanel'; - -export default function PTDemo() { - return ( -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-

- At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa - qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus. -

-
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { ScrollPanel } from 'primereact/scrollpanel'; - -export default function PTDemo() { - return ( -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-

- At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa - qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus. -

-
-
- ) -} - ` - }; - - return ( - <> - -
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim - ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

-

- At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa - qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus. -

-
-
- - - ); -} diff --git a/components/doc/scrolltop/pt/ptdoc.js b/components/doc/scrolltop/pt/ptdoc.js deleted file mode 100644 index 921483e84d..0000000000 --- a/components/doc/scrolltop/pt/ptdoc.js +++ /dev/null @@ -1,98 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { ScrollTop } from '@/components/lib/scrolltop/ScrollTop'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { ScrollTop } from 'primereact/scrolltop'; - -export default function PTDemo() { - return ( -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur - adipiscing elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor - augue mauris. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet - nisl purus. Cursus sit amet dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus - viverra accumsan in nisl nisi. Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec. -

- -
-
- ); -} - `, - typescript: ` -import React from 'react'; -import { ScrollTop } from 'primereact/scrolltop'; - -export default function PTDemo() { - return ( -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur - adipiscing elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor - augue mauris. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet - nisl purus. Cursus sit amet dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus - viverra accumsan in nisl nisi. Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec. -

- -
-
- ); -} - ` - }; - - return ( - <> - -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur - adipiscing elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor - augue mauris. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet - nisl purus. Cursus sit amet dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus - viverra accumsan in nisl nisi. Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec. -

- -
-
- - - ); -} diff --git a/components/doc/selectbutton/pt/ptdoc.js b/components/doc/selectbutton/pt/ptdoc.js deleted file mode 100644 index 454b1a8930..0000000000 --- a/components/doc/selectbutton/pt/ptdoc.js +++ /dev/null @@ -1,83 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { SelectButton } from '@/components/lib/selectbutton/SelectButton'; -import { useState } from 'react'; - -export function PTDoc(props) { - const options = ['Off', 'On']; - const [value, setValue] = useState(options[0]); - - const code = { - basic: ` - setValue(e.value)} - options={options} - pt={{ - button: ({ context }) => ({ className: context.selected ? 'bg-cyan-400 border-cyan-400' : undefined }) - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { SelectButton } from 'primereact/selectbutton'; - -export default function PTDemo() { - const options = ['Off', 'On']; - const [value, setValue] = useState(options[0]); - - return ( -
- setValue(e.value)} - options={options} - pt={{ - button: ({ context }) => ({ className: context.selected ? 'bg-cyan-400 border-cyan-400' : undefined }) - }} - /> -
- ); -} - `, - typescript: ` -import React, { useState } from "react"; -import { SelectButton, SelectButtonChangeEvent } from 'primereact/selectbutton'; - -export default function PTDemo() { - const options: string[] = ['Off', 'On']; - const [value, setValue] = useState(options[0]); - - return ( -
- setValue(e.value)} - options={options} - pt={{ - button: ({ context }) => ({ className: context.selected ? 'bg-cyan-400 border-cyan-400' : undefined }) - }} - /> -
- ); -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - options={options} - pt={{ - button: ({ context }) => ({ className: context.selected ? 'bg-cyan-400 border-cyan-400' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/sidebar/pt/ptdoc.js b/components/doc/sidebar/pt/ptdoc.js deleted file mode 100644 index f9655970f3..0000000000 --- a/components/doc/sidebar/pt/ptdoc.js +++ /dev/null @@ -1,105 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; -import { Sidebar } from '@/components/lib/sidebar/Sidebar'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [visible, setVisible] = useState(false); - const code = { - basic: ` - setVisible(false)} -> -

Sidebar

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. -

-
- `, - javascript: ` -import React, { useState } from 'react'; -import { Sidebar } from 'primereact/sidebar'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [visible, setVisible] = useState(false); - - return ( -
- setVisible(false)} - > -

Sidebar

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. -

-
-
- ); -} - `, - typescript: ` -import React, { useState } from 'react'; -import { Sidebar } from 'primereact/sidebar'; -import { Button } from 'primereact/button'; - -export default function PTDemo() { - const [visible, setVisible] = useState(false); - - return ( -
- setVisible(false)} - > -

Sidebar

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. -

-
-
- ); -} - ` - }; - - return ( - <> - -
- setVisible(false)} - > -

Sidebar

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. -

-
-
- - - ); -} diff --git a/components/doc/skeleton/pt/ptdoc.js b/components/doc/skeleton/pt/ptdoc.js deleted file mode 100644 index 82328a9e97..0000000000 --- a/components/doc/skeleton/pt/ptdoc.js +++ /dev/null @@ -1,61 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Skeleton } from '@/components/lib/skeleton/Skeleton'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Skeleton } from 'primereact/skeleton'; - -export default function PTDemo() { - return ( -
- -
- ); -} - `, - typescript: ` -import React from 'react'; -import { Skeleton } from 'primereact/skeleton'; - -export default function PTDemo() { - return ( -
- -
- ); -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/slider/pt/ptdoc.js b/components/doc/slider/pt/ptdoc.js deleted file mode 100644 index 2dcdd49498..0000000000 --- a/components/doc/slider/pt/ptdoc.js +++ /dev/null @@ -1,84 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Slider } from '@/components/lib/slider/Slider'; -import { useState } from 'react'; - -export function PTDoc(props) { - const [value, setValue] = useState(null); - - const code = { - basic: ` - setValue(e.value)} - pt={{ - root: { className: 'w-14rem' }, - handle: { className: 'bg-orange-400 border-900' }, - range: { className: 'bg-orange-400' } - }} -/> - `, - javascript: ` -import React, { useState } from "react"; -import { Slider } from "primereact/slider"; - -export default function PTDemo() { - const [value, setValue] = useState(null); - - return ( -
- setValue(e.value)} - pt={{ - root: { className: 'w-14rem' }, - handle: { className: 'bg-orange-400 border-900' }, - range: { className: 'bg-orange-400' } - }} - /> -
- ) -} - `, - typescript: ` -import React, { useState } from "react"; -import { Slider, SliderChangeEvent } from "primereact/slider"; - -export default function PTDemo() { - const [value, setValue] = useState(null); - - return ( -
- setValue(e.value)} - pt={{ - root: { className: 'w-14rem' }, - handle: { className: 'bg-orange-400 border-900' }, - range: { className: 'bg-orange-400' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- setValue(e.value)} - pt={{ - root: { className: 'w-14rem' }, - handle: { className: 'bg-orange-400 border-900' }, - range: { className: 'bg-orange-400' } - }} - /> -
- - - ); -} diff --git a/components/doc/speeddial/pt/ptdoc.js b/components/doc/speeddial/pt/ptdoc.js deleted file mode 100644 index 480a9203f9..0000000000 --- a/components/doc/speeddial/pt/ptdoc.js +++ /dev/null @@ -1,148 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { SpeedDial } from '@/components/lib/speeddial/SpeedDial'; -import { classNames } from '@/components/lib/utils/Utils'; - -export function PTDoc(props) { - const items = [ - { - label: 'Add', - icon: 'pi pi-pencil' - }, - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - } - ]; - - const code = { - basic: ` - ({ - className: classNames("mt-2", { "border-1 border-primary surface-border border-round surface-ground": state.visible }) - }) - }} - model={items} - radius={80} - direction='down' -/> - `, - javascript: ` -import React, { useRef } from 'react'; -import { SpeedDial } from 'primereact/speeddial'; - -export default function PTDemo() { - const items = [ - { - label: 'Add', - icon: 'pi pi-pencil' - }, - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - } - ]; - - return ( -
-
- ({ - className: classNames("mt-2", { "border-1 border-primary surface-border border-round surface-ground": state.visible }) - }) - }} - model={items} - radius={80} - direction='down' - - /> -
-
- ) -} - `, - typescript: ` -import React, { useRef } from 'react'; -import { SpeedDial } from 'primereact/speeddial'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Add', - icon: 'pi pi-pencil' - }, - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - } - ]; - - return ( -
-
- ({ - className: classNames("mt-2", { "border-1 border-primary surface-border border-round surface-ground": state.visible }) - }) - }} - model={items} - radius={80} - direction='down' - - /> -
-
- ) -} - ` - }; - - return ( - <> - -
-
- ({ - className: classNames('mt-2', { 'border-1 border-primary surface-border border-round surface-ground': state.visible }) - }) - }} - model={items} - radius={80} - direction="down" - /> -
-
- - - ); -} diff --git a/components/doc/splitbutton/pt/ptdoc.js b/components/doc/splitbutton/pt/ptdoc.js deleted file mode 100644 index c087f0486c..0000000000 --- a/components/doc/splitbutton/pt/ptdoc.js +++ /dev/null @@ -1,139 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { SplitButton } from '@/components/lib/splitbutton/SplitButton'; - -export function PTDoc(props) { - const items = [ - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-times' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - }, - { - label: 'Upload', - icon: 'pi pi-upload' - } - ]; - - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { SplitButton } from 'primereact/splitbutton'; - -export default function PTDemo() { - const items = [ - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-times' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - }, - { - label: 'Upload', - icon: 'pi pi-upload' - } - ]; - - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { SplitButton } from 'primereact/splitbutton'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-times' - }, - { - label: 'React Website', - icon: 'pi pi-external-link' - }, - { - label: 'Upload', - icon: 'pi pi-upload' - } - ]; - - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/splitter/pt/ptdoc.js b/components/doc/splitter/pt/ptdoc.js deleted file mode 100644 index 412b5c9f1d..0000000000 --- a/components/doc/splitter/pt/ptdoc.js +++ /dev/null @@ -1,59 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Splitter, SplitterPanel } from '@/components/lib/splitter/Splitter'; - -export function PTDoc(props) { - const code = { - basic: ` - - Panel 1 - Panel 2 - - `, - javascript: ` -import React from 'react'; -import { Splitter, SplitterPanel } from 'primereact/tabview'; - -export default function PTDemo() { - - return ( -
- - Panel 1 - Panel 2 - -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Splitter, SplitterPanel } from 'primereact/tabview'; - -export default function PTDemo() { - - return ( -
- - Panel 1 - Panel 2 - -
- ) -} - ` - }; - - return ( - <> - -
- - Panel 1 - Panel 2 - -
- - - ); -} diff --git a/components/doc/steps/pt/ptdoc.js b/components/doc/steps/pt/ptdoc.js deleted file mode 100644 index 542ed5ea1c..0000000000 --- a/components/doc/steps/pt/ptdoc.js +++ /dev/null @@ -1,111 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Steps } from '@/components/lib/steps/Steps'; - -export function PTDoc(props) { - const items = [ - { - label: 'Personal' - }, - { - label: 'Seat' - }, - { - label: 'Payment' - }, - { - label: 'Confirmation' - } - ]; - - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Steps } from 'primereact/steps'; - -export default function PTDemo() { - const items = [ - { - label: 'Personal' - }, - { - label: 'Seat' - }, - { - label: 'Payment' - }, - { - label: 'Confirmation' - } - ]; - - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Steps } from 'primereact/steps'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Personal' - }, - { - label: 'Seat' - }, - { - label: 'Payment' - }, - { - label: 'Confirmation' - } - ]; - - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/tabmenu/pt/ptdoc.js b/components/doc/tabmenu/pt/ptdoc.js deleted file mode 100644 index ba71017513..0000000000 --- a/components/doc/tabmenu/pt/ptdoc.js +++ /dev/null @@ -1,112 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { TabMenu } from '@/components/lib/tabmenu/TabMenu'; - -export function PTDoc(props) { - const items = [ - { label: 'Home', icon: 'pi pi-fw pi-home' }, - { label: 'Calendar', icon: 'pi pi-fw pi-calendar' }, - { label: 'Edit', icon: 'pi pi-fw pi-pencil' }, - { label: 'Documentation', icon: 'pi pi-fw pi-file' }, - { label: 'Settings', icon: 'pi pi-fw pi-cog' } - ]; - - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { TabMenu } from 'primereact/tabmenu'; - -export default function PTDemo() { - const items = [ - { - label: 'Personal' - }, - { - label: 'Seat' - }, - { - label: 'Payment' - }, - { - label: 'Confirmation' - } - ]; - - return ( -
- -
- ) -} - `, - typescript: ` -import React from 'react'; -import { TabMenu } from 'primereact/tabmenu'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'Personal' - }, - { - label: 'Seat' - }, - { - label: 'Payment' - }, - { - label: 'Confirmation' - } - ]; - - return ( -
- -
- ) -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/tabview/pt/ptdoc.js b/components/doc/tabview/pt/ptdoc.js deleted file mode 100644 index 6eb0887d50..0000000000 --- a/components/doc/tabview/pt/ptdoc.js +++ /dev/null @@ -1,137 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { TabPanel, TabView } from '@/components/lib/tabview/TabView'; - -export function PTDoc(props) { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) { - return 'bg-primary'; - } - }; - - const code = { - basic: ` - - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - key={i} header={tab.title}> -

{tab.content}

-
- ) - })} -
- `, - javascript: ` -import React from 'react'; -import { TabView, TabPanel } from 'primereact/tabview'; - -export default function PTDemo() { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) - return 'bg-primary' - } - - return ( -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - key={i} header={tab.title}> -

{tab.content}

-
- ) - })} -
-
- ) -} - `, - typescript: ` -import React from 'react'; -import { TabView, TabPanel } from 'primereact/tabview'; - -export default function PTDemo() { - const tabs = [ - { title: 'Header 1', content: 'Tab 1 Content' }, - { title: 'Header 2', content: 'Tab 2 Content' }, - { title: 'Header 3', content: 'Tab 3 Content' } - ]; - - const panelClassName = (parent, index) => { - if (parent.state.activeIndex === index) - return 'bg-primary' - } - - return ( -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - key={i} header={tab.title}> -

{tab.content}

-
- ) - })} -
-
- ) -} - ` - }; - - return ( - <> - -
- - {tabs.map((tab, i) => { - return ( - ({ - className: panelClassName(parent, i) - }) - }} - key={i} - header={tab.title} - > -

{tab.content}

-
- ); - })} -
-
- - - ); -} diff --git a/components/doc/tag/pt/ptdoc.js b/components/doc/tag/pt/ptdoc.js deleted file mode 100644 index a9209a367c..0000000000 --- a/components/doc/tag/pt/ptdoc.js +++ /dev/null @@ -1,63 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Tag } from '@/components/lib/tag/Tag'; - -export function PTDoc(props) { - const code = { - basic: ` - - `, - javascript: ` -import React from 'react'; -import { Tag } from 'primereact/tag'; - -export default function PTDemo() { - return ( -
- -
- ); -} - `, - typescript: ` -import React from 'react'; -import { Tag } from 'primereact/tag'; - -export default function PTDemo() { - return ( -
- -
- ); -} - ` - }; - - return ( - <> - -
- -
- - - ); -} diff --git a/components/doc/terminal/pt/ptdoc.js b/components/doc/terminal/pt/ptdoc.js deleted file mode 100644 index 0b9c1bfa7a..0000000000 --- a/components/doc/terminal/pt/ptdoc.js +++ /dev/null @@ -1,216 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Terminal } from '@/components/lib/terminal/Terminal'; -import { TerminalService } from '@/components/lib/terminalservice/TerminalService'; -import { useEffect } from 'react'; - -export function PTDoc(props) { - const commandHandler = (text) => { - let response; - let argsIndex = text.indexOf(' '); - let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text; - - switch (command) { - case 'date': - response = 'Today is ' + new Date().toDateString(); - break; - - case 'greet': - response = 'Hola ' + text.substring(argsIndex + 1) + '!'; - break; - - case 'random': - response = Math.floor(Math.random() * 100); - break; - - case 'clear': - response = null; - break; - - default: - response = 'Unknown command: ' + command; - break; - } - - if (response) { - TerminalService.emit('response', response); - } else { - TerminalService.emit('clear'); - } - }; - - useEffect(() => { - TerminalService.on('command', commandHandler); - - return () => { - TerminalService.off('command', commandHandler); - }; - }, []); - - const code = { - basic: ` - - `, - javascript: ` -import React, { useEffect } from 'react'; -import { Terminal } from 'primereact/terminal'; -import { TerminalService } from 'primereact/terminalservice'; - -export default function PTDemo() { - const commandHandler = (text) => { - let response; - let argsIndex = text.indexOf(' '); - let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text; - - switch (command) { - case 'date': - response = 'Today is ' + new Date().toDateString(); - break; - - case 'greet': - response = 'Hola ' + text.substring(argsIndex + 1) + '!'; - break; - - case 'random': - response = Math.floor(Math.random() * 100); - break; - - case 'clear': - response = null; - break; - - default: - response = 'Unknown command: ' + command; - break; - } - - if (response) - TerminalService.emit('response', response); - else - TerminalService.emit('clear'); - }; - - useEffect(() => { - TerminalService.on('command', commandHandler); - - return () => { - TerminalService.off('command', commandHandler); - }; - }, []); - - return ( -
-

- Enter "date" to display the current date, "greet {'{0}'}" for a message, "random" to get a random number and "clear" to clear all commands. -

- -
- ); -} - `, - typescript: ` -import React, { useEffect } from 'react'; -import { Terminal } from 'primereact/terminal'; -import { TerminalService } from 'primereact/terminalservice'; - -export default function PTDemo() { - const commandHandler = (text: string) => { - let response: string; - let argsIndex: number = text.indexOf(' '); - let command: string = argsIndex !== -1 ? text.substring(0, argsIndex) : text; - - switch (command) { - case 'date': - response = 'Today is ' + new Date().toDateString(); - break; - - case 'greet': - response = 'Hola ' + text.substring(argsIndex + 1) + '!'; - break; - - case 'random': - response = Math.floor(Math.random() * 100); - break; - - case 'clear': - response = null; - break; - - default: - response = 'Unknown command: ' + command; - break; - } - - if (response) - TerminalService.emit('response', response); - else - TerminalService.emit('clear'); - }; - - useEffect(() => { - TerminalService.on('command', commandHandler); - - return () => { - TerminalService.off('command', commandHandler); - }; - }, []); - - return ( -
-

- Enter "date" to display the current date, "greet {'{0}'}" for a message, "random" to get a random number and "clear" to clear all commands. -

- -
- ); -} - ` - }; - - return ( - <> - -
-

- Enter "date" to display the current date, "greet {'{0}'}" for a message, "random" to get a random number and "clear" to clear all commands. -

- -
- - - ); -} diff --git a/components/doc/tieredmenu/pt/ptdoc.js b/components/doc/tieredmenu/pt/ptdoc.js deleted file mode 100644 index b5b7efadea..0000000000 --- a/components/doc/tieredmenu/pt/ptdoc.js +++ /dev/null @@ -1,451 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { TieredMenu } from '@/components/lib/tieredmenu/TieredMenu'; - -export function PTDoc(props) { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - separator: true - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - const code = { - basic: ` - ({ className: context.active ? 'bg-primary-200' : undefined }) - }} -/> - `, - javascript: ` -import React from 'react'; -import { TieredMenu } from 'primereact/tieredmenu'; - -export default function PTDemo() { - const items = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - separator: true - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { TieredMenu } from 'primereact/tieredmenu'; -import { MenuItem } from 'primereact/menuitem'; - -export default function PTDemo() { - const items: MenuItem[] = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus', - items: [ - { - label: 'Bookmark', - icon: 'pi pi-fw pi-bookmark' - }, - { - label: 'Video', - icon: 'pi pi-fw pi-video' - } - ] - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-trash' - }, - { - separator: true - }, - { - label: 'Export', - icon: 'pi pi-fw pi-external-link' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Left', - icon: 'pi pi-fw pi-align-left' - }, - { - label: 'Right', - icon: 'pi pi-fw pi-align-right' - }, - { - label: 'Center', - icon: 'pi pi-fw pi-align-center' - }, - { - label: 'Justify', - icon: 'pi pi-fw pi-align-justify' - } - ] - }, - { - label: 'Users', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-user-minus' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-users', - items: [ - { - label: 'Filter', - icon: 'pi pi-fw pi-filter', - items: [ - { - label: 'Print', - icon: 'pi pi-fw pi-print' - } - ] - }, - { - icon: 'pi pi-fw pi-bars', - label: 'List' - } - ] - } - ] - }, - { - label: 'Events', - icon: 'pi pi-fw pi-calendar', - items: [ - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { - label: 'Save', - icon: 'pi pi-fw pi-calendar-plus' - }, - { - label: 'Delete', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - }, - { - label: 'Archive', - icon: 'pi pi-fw pi-calendar-times', - items: [ - { - label: 'Remove', - icon: 'pi pi-fw pi-calendar-minus' - } - ] - } - ] - }, - { - separator: true - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-power-off' - } - ]; - - return ( -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- ({ className: context.active ? 'bg-primary-200' : undefined }) - }} - /> -
- - - ); -} diff --git a/components/doc/timeline/pt/ptdoc.js b/components/doc/timeline/pt/ptdoc.js deleted file mode 100644 index 4e01f6042b..0000000000 --- a/components/doc/timeline/pt/ptdoc.js +++ /dev/null @@ -1,98 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Timeline } from '@/components/lib/timeline/Timeline'; - -export function PTDoc(props) { - const events = [ - { status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' }, - { status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' }, - { status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' }, - { status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' } - ]; - - const code = { - basic: ` - item.status} - pt={{ - marker: { className: 'border-orange-400' } - }} -/> - `, - javascript: ` -import React from 'react'; -import { Timeline } from 'primereact/timeline'; - -export default function PTDemo() { - const events = [ - { status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' }, - { status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' }, - { status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' }, - { status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' } - ]; - - return ( -
- item.status} - pt={{ - marker: { className: 'border-orange-400' } - }} - /> -
- ) -} - `, - typescript: ` -import React from 'react'; -import { Timeline } from 'primereact/timeline'; - -interface TimelineEvent { - status?: string; - date?: string; - icon?: string; - color?: string; - image?: string; -} - -export default function PTDemo() { - const events: TimelineEvent[] = [ - { status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' }, - { status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' }, - { status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' }, - { status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' } - ]; - - return ( -
- item.status} - pt={{ - marker: { className: 'border-orange-400' } - }} - /> -
- ) -} - ` - }; - - return ( - <> - -
- item.status} - pt={{ - marker: { className: 'border-orange-400' } - }} - /> -
- - - ); -} diff --git a/components/doc/toast/pt/ptdoc.js b/components/doc/toast/pt/ptdoc.js deleted file mode 100644 index e88cee172c..0000000000 --- a/components/doc/toast/pt/ptdoc.js +++ /dev/null @@ -1,98 +0,0 @@ -import { DocSectionCode } from '@/components/doc/common/docsectioncode'; -import { DocSectionText } from '@/components/doc/common/docsectiontext'; -import { Button } from '@/components/lib/button/Button'; -import { Toast } from '@/components/lib/toast/Toast'; -import { useRef } from 'react'; - -export function PTDoc(props) { - const toast = useRef(null); - - const show = () => { - toast.current.show({ - severity: 'info', - summary: 'Info', - detail: 'Message Content', - pt: { - root: ({ index }) => ({ className: `bg-yellow-${((index > 5 && 5) || index || 1) * 100}` }) - } - }); - }; - - const code = { - basic: ` - ({ className: \`bg-yellow-\${((index > 5 && 5) || index || 1) * 100}\` }) - }} - /> -