From 649ed4bb5ef8f78563d92d8c00e8df488edf715f Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 8 Oct 2024 12:53:34 +0300 Subject: [PATCH] Add splitter --- assets/styles/presets/aura/components.css | 1 + assets/styles/presets/aura/splitter.css | 56 +++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 assets/styles/presets/aura/splitter.css diff --git a/assets/styles/presets/aura/components.css b/assets/styles/presets/aura/components.css index 223f8871..75557c29 100644 --- a/assets/styles/presets/aura/components.css +++ b/assets/styles/presets/aura/components.css @@ -3,4 +3,5 @@ @import './fieldset'; @import './panel'; @import './scrollpanel'; +@import './splitter'; @import './toolbar'; diff --git a/assets/styles/presets/aura/splitter.css b/assets/styles/presets/aura/splitter.css new file mode 100644 index 00000000..e2f9f6f8 --- /dev/null +++ b/assets/styles/presets/aura/splitter.css @@ -0,0 +1,56 @@ +.p-splitter { + @apply flex flex-wrap + border border-surface-200 dark:border-surface-700 rounded-md + bg-surface-0 dark:bg-surface-900 + text-surface-700 dark:text-surface-0 +} + +.p-splitter-vertical { + @apply flex-col +} + +.p-splitter-gutter { + @apply flex-grow-0 flex-shrink-0 flex items-center justify-center z-10 bg-surface-200 dark:bg-surface-700 +} + +.p-splitter-gutter-handle { + @apply rounded-md bg-transparent + focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-primary + transition-colors duration-200 +} + +.p-splitter-horizontal.p-splitter-resizing { + @apply cursor-col-resize select-none +} + +.p-splitter-vertical.p-splitter-resizing { + @apply cursor-row-resize select-none +} + +.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle { + @apply h-[24px] w-full +} + +.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle { + @apply w-[24px] h-full +} + +.p-splitter-horizontal > .p-splitter-gutter { + @apply cursor-col-resize +} + +.p-splitter-vertical > .p-splitter-gutter { + @apply cursor-row-resize +} + +.p-splitterpanel { + @apply flex-grow overflow-hidden +} + +.p-splitterpanel-nested { + @apply flex +} + +.p-splitterpanel .p-splitter { + @apply flex-grow border-none +} \ No newline at end of file