From 4edfa8a12cf843a61cb69baeb3db247015b4dd83 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 10 Mar 2025 16:16:44 +0300 Subject: [PATCH] Preset section is added to Theming tab --- apps/showcase/assets/styles/layout/_doc.scss | 51 +++++++++++++---- .../showcase/assets/styles/layout/layout.scss | 4 +- .../components/doc/DocStyledPreset.vue | 56 +++++++++++++++++++ apps/showcase/components/doc/helpers/index.js | 3 +- apps/showcase/doc/accordion/theming/index.vue | 7 +++ .../doc/autocomplete/theming/index.vue | 7 +++ apps/showcase/doc/avatar/theming/index.vue | 7 +++ apps/showcase/doc/badge/theming/index.vue | 13 +++++ apps/showcase/doc/blockui/theming/index.vue | 7 +++ .../showcase/doc/breadcrumb/theming/index.vue | 7 +++ apps/showcase/doc/button/theming/index.vue | 7 +++ apps/showcase/doc/card/theming/index.vue | 7 +++ apps/showcase/doc/carousel/theming/index.vue | 7 +++ .../doc/cascadeselect/theming/index.vue | 7 +++ apps/showcase/doc/checkbox/theming/index.vue | 7 +++ apps/showcase/doc/chip/theming/index.vue | 7 +++ .../doc/colorpicker/theming/index.vue | 7 +++ .../doc/confirmdialog/theming/index.vue | 7 +++ .../doc/confirmpopup/theming/index.vue | 7 +++ .../doc/contextmenu/theming/index.vue | 7 +++ apps/showcase/doc/datatable/theming/index.vue | 7 +++ apps/showcase/doc/dataview/theming/index.vue | 7 +++ .../showcase/doc/datepicker/theming/index.vue | 7 +++ apps/showcase/doc/dialog/theming/index.vue | 7 +++ apps/showcase/doc/divider/theming/index.vue | 7 +++ apps/showcase/doc/dock/theming/index.vue | 7 +++ apps/showcase/doc/drawer/theming/index.vue | 7 +++ apps/showcase/doc/editor/theming/index.vue | 7 +++ apps/showcase/doc/fieldset/theming/index.vue | 7 +++ .../showcase/doc/fileupload/theming/index.vue | 7 +++ .../showcase/doc/floatlabel/theming/index.vue | 7 +++ apps/showcase/doc/galleria/theming/index.vue | 7 +++ apps/showcase/doc/iconfield/theming/index.vue | 7 +++ apps/showcase/doc/iftalabel/theming/index.vue | 7 +++ apps/showcase/doc/image/theming/index.vue | 7 +++ .../doc/imagecompare/theming/index.vue | 7 +++ apps/showcase/doc/inplace/theming/index.vue | 7 +++ .../showcase/doc/inputgroup/theming/index.vue | 7 +++ .../doc/inputnumber/theming/index.vue | 7 +++ apps/showcase/doc/inputotp/theming/index.vue | 16 +++++- apps/showcase/doc/inputtext/theming/index.vue | 7 +++ apps/showcase/doc/knob/theming/index.vue | 7 +++ apps/showcase/doc/listbox/theming/index.vue | 7 +++ apps/showcase/doc/megamenu/theming/index.vue | 7 +++ apps/showcase/doc/menu/theming/index.vue | 7 +++ apps/showcase/doc/menubar/theming/index.vue | 7 +++ apps/showcase/doc/message/theming/index.vue | 7 +++ .../showcase/doc/metergroup/theming/index.vue | 7 +++ .../doc/multiselect/theming/index.vue | 7 +++ apps/showcase/doc/orderlist/theming/index.vue | 7 +++ .../doc/organizationchart/theming/index.vue | 7 +++ apps/showcase/doc/paginator/theming/index.vue | 7 +++ apps/showcase/doc/panel/theming/index.vue | 7 +++ apps/showcase/doc/panelmenu/theming/index.vue | 7 +++ apps/showcase/doc/password/theming/index.vue | 7 +++ apps/showcase/doc/picklist/theming/index.vue | 7 +++ apps/showcase/doc/popover/theming/index.vue | 7 +++ .../doc/progressbar/theming/index.vue | 7 +++ .../doc/progressspinner/theming/index.vue | 7 +++ .../doc/radiobutton/theming/index.vue | 7 +++ apps/showcase/doc/rating/theming/index.vue | 7 +++ apps/showcase/doc/ripple/theming/index.vue | 7 +++ .../doc/scrollpanel/theming/index.vue | 7 +++ apps/showcase/doc/select/theming/index.vue | 7 +++ .../doc/selectbutton/theming/index.vue | 7 +++ apps/showcase/doc/skeleton/theming/index.vue | 7 +++ apps/showcase/doc/slider/theming/index.vue | 7 +++ apps/showcase/doc/speeddial/theming/index.vue | 7 +++ .../doc/splitbutton/theming/index.vue | 7 +++ apps/showcase/doc/splitter/theming/index.vue | 7 +++ apps/showcase/doc/stepper/theming/index.vue | 7 +++ apps/showcase/doc/tabs/theming/index.vue | 7 +++ apps/showcase/doc/tag/theming/index.vue | 7 +++ apps/showcase/doc/terminal/theming/index.vue | 7 +++ apps/showcase/doc/textarea/theming/index.vue | 7 +++ .../showcase/doc/tieredmenu/theming/index.vue | 7 +++ apps/showcase/doc/timeline/theming/index.vue | 7 +++ apps/showcase/doc/toast/theming/index.vue | 7 +++ .../doc/togglebutton/theming/index.vue | 7 +++ .../doc/toggleswitch/theming/index.vue | 7 +++ apps/showcase/doc/toolbar/theming/index.vue | 7 +++ apps/showcase/doc/tooltip/theming/index.vue | 7 +++ apps/showcase/doc/tree/theming/index.vue | 7 +++ .../showcase/doc/treeselect/theming/index.vue | 7 +++ apps/showcase/doc/treetable/theming/index.vue | 7 +++ .../doc/virtualscroller/theming/index.vue | 16 +++++- 86 files changed, 697 insertions(+), 15 deletions(-) create mode 100644 apps/showcase/components/doc/DocStyledPreset.vue diff --git a/apps/showcase/assets/styles/layout/_doc.scss b/apps/showcase/assets/styles/layout/_doc.scss index 982cb2947..8b3e2505b 100644 --- a/apps/showcase/assets/styles/layout/_doc.scss +++ b/apps/showcase/assets/styles/layout/_doc.scss @@ -112,7 +112,7 @@ align-items: center; scroll-margin-top: 6.5rem; - > a { + >a { color: var(--primary-text-color); opacity: 0.7; margin-inline-start: 1rem; @@ -123,7 +123,7 @@ @include focus-visible(); } - > .doc-section-label-badge { + >.doc-section-label-badge { margin-inline-start: 0.5rem; } @@ -132,7 +132,7 @@ } &:hover { - > a { + >a { display: block; &:hover { @@ -143,7 +143,7 @@ } .doc-section-description { - > p { + >p { font-size: 1.125rem; i { @@ -185,7 +185,7 @@ overflow-x: hidden; align-self: flex-start; - > .navbar-item { + >.navbar-item { .navbar-item-content { border-inline-start: 1px solid var(--border-color); padding-inline-start: .25rem; @@ -198,7 +198,7 @@ } .navbar-item { - > .navbar-item-content { + >.navbar-item-content { display: flex; button { @@ -230,7 +230,7 @@ } &.active-navbar-item { - > .navbar-item-content { + >.navbar-item-content { border-color: var(--primary-text-color); button { @@ -282,7 +282,7 @@ right: .75rem; gap: .5rem; display: none; - background: rgba(255,255,255,.05); + background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 2px; backdrop-filter: blur(6px); @@ -299,7 +299,7 @@ cursor: pointer; &:hover { - background-color: rgba(255,255,255,.1); + background-color: rgba(255, 255, 255, .1); color: var(--code-button-text-color); } @@ -370,7 +370,8 @@ } } - .doc-option-name, i:not(.pi) { + .doc-option-name, + i:not(.pi) { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace; position: relative; scroll-margin-top: 6.5rem; @@ -478,3 +479,33 @@ } } } + +.doc-preset-table { + border-collapse: collapse; + width: 100%; + min-width: 640px; + margin-bottom: 1.5rem; + + th { + border-bottom: 1px solid var(--border-color); + padding-block: .75rem; + padding-inline: 1rem; + text-align: start; + text-transform: capitalize; + } + + td { + padding-block: .75rem; + padding-inline: 1rem; + border-bottom: 1px solid var(--border-color); + white-space: pre-line; + line-height: 1.5; + scroll-margin-top: 6.5rem; + + &:first-child { + color: var(--primary-text-color); + font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace; + font-weight: 600; + } + } +} \ No newline at end of file diff --git a/apps/showcase/assets/styles/layout/layout.scss b/apps/showcase/assets/styles/layout/layout.scss index d15826645..f2abda045 100644 --- a/apps/showcase/assets/styles/layout/layout.scss +++ b/apps/showcase/assets/styles/layout/layout.scss @@ -11,9 +11,9 @@ @import './_news'; @import './_footer'; @import './_code'; -@import './_doc'; +@import './_doc.scss'; @import './_docsearch'; @import './_responsive'; @import './_animation'; @import './_templates'; -@import './landing/_landing'; +@import './landing/_landing'; \ No newline at end of file diff --git a/apps/showcase/components/doc/DocStyledPreset.vue b/apps/showcase/components/doc/DocStyledPreset.vue new file mode 100644 index 000000000..ac4b325d3 --- /dev/null +++ b/apps/showcase/components/doc/DocStyledPreset.vue @@ -0,0 +1,56 @@ + + + diff --git a/apps/showcase/components/doc/helpers/index.js b/apps/showcase/components/doc/helpers/index.js index ce828b8f2..e2c31ae97 100644 --- a/apps/showcase/components/doc/helpers/index.js +++ b/apps/showcase/components/doc/helpers/index.js @@ -66,7 +66,8 @@ export const getTokenOptions = (name) => { for (const [_, value] of Object.entries(tokens)) { data.push({ token: value.token, - variable: value.variable, + property: value.name.split('.').slice(1).join('.'), + 'CSS Variable': value.variable, description: value.description }); } diff --git a/apps/showcase/doc/accordion/theming/index.vue b/apps/showcase/doc/accordion/theming/index.vue index db5de5b02..c23b60e2c 100644 --- a/apps/showcase/doc/accordion/theming/index.vue +++ b/apps/showcase/doc/accordion/theming/index.vue @@ -10,6 +10,7 @@