You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2024/02/26 20:44:05 UTC

(camel-karavan) 02/03: DslSelector style

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git

commit d65b578e7f4af01cd626fb53aa5c23a8db58d07a
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Mon Feb 26 11:58:21 2024 -0500

    DslSelector style
---
 karavan-designer/src/designer/karavan.css          | 111 -------------------
 .../src/designer/route/DslSelector.css             | 122 +++++++++++++++++++++
 .../src/designer/route/DslSelector.tsx             |  19 ++--
 3 files changed, 130 insertions(+), 122 deletions(-)

diff --git a/karavan-designer/src/designer/karavan.css b/karavan-designer/src/designer/karavan.css
index 6184b230..9e5826a8 100644
--- a/karavan-designer/src/designer/karavan.css
+++ b/karavan-designer/src/designer/karavan.css
@@ -525,117 +525,6 @@
     margin-top: 16px;
 }
 
-.dsl-modal {
-    height: 80%;
-    color: var(--pf-v5-global--Color--100);
-}
-
-.dsl-modal .dsl-card {
-    cursor: pointer;
-}
-
-.dsl-modal .dsl-card .pf-v5-c-card__header-main {
-    display: flex;
-    flex-direction: row;
-}
-
-.dsl-modal .dsl-card .header-labels .pf-v5-c-card__header-main {
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-}
-
-.dsl-modal .dsl-card .icon {
-    height: 20px;
-    width: auto;
-    border: none;
-    margin-right: 6px;
-    -webkit-user-select: none;
-    -khtml-user-select: none;
-    -moz-user-select: none;
-    -o-user-select: none;
-    user-select: none;
-}
-
-.dsl-modal .search {
-    width: 350px;
-    position: absolute;
-    top: 24px;
-    right: 72px;
-    display:flex;
-    justify-content:flex-end;
-}
-
-.dsl-modal .search .pf-v5-c-form__group{
-    grid-template-columns:auto !important;
-}
-
-.dsl-modal .search .pf-v5-c-form__group-label {
-    padding: 0;
-    margin: auto;
-}
-
-.dsl-modal .search .text-field {
-    height: auto;
-}
-
-.dsl-modal .pf-v5-c-form.pf-v5-m-horizontal .pf-v5-c-form__group {
-    display: contents;
-}
-
-.dsl-modal .pf-v5-c-card__body {
-    padding-bottom: 0;
-    height: 54px;
-}
-
-
-.dsl-modal .dsl-card p {
-    overflow: hidden;
-    display: -webkit-box;
-    -webkit-line-clamp: 2;
-    -webkit-box-orient: vertical;
-}
-.dsl-modal .pf-v5-c-card__footer {
-    padding-bottom: 1em;
-}
-
-.dsl-modal .footer {
-    display: flex;
-    flex-direction: row;
-    margin-top: 6px;
-    flex-wrap: wrap;
-}
-
-.dsl-modal .dsl-card .header-labels {
-    padding: 5px;
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-}
-
-.dsl-modal .dsl-card .footer-labels {
-    padding: 5px;
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-}
-
-.dsl-modal .version,
-.dsl-modal .support-type,
-.dsl-modal .support-level {
-    white-space: nowrap;
-}
-
-.dsl-modal .labels {
-    opacity: 0.5;
-    font-weight: 200;
-    text-wrap: nowrap;
-}
-
-.dsl-modal .dsl-card:hover .labels {
-    opacity: 1;
-}
-
 .move-modal {
     width: 270px !important;
 }
diff --git a/karavan-designer/src/designer/route/DslSelector.css b/karavan-designer/src/designer/route/DslSelector.css
new file mode 100644
index 00000000..4bca7774
--- /dev/null
+++ b/karavan-designer/src/designer/route/DslSelector.css
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.dsl-modal {
+    height: 80%;
+    color: var(--pf-v5-global--Color--100);
+}
+
+.dsl-modal .dsl-card {
+    cursor: pointer;
+}
+
+.dsl-modal .dsl-card .pf-v5-c-card__header-main {
+    display: flex;
+    flex-direction: row;
+}
+
+.dsl-modal .dsl-card .header-labels .pf-v5-c-card__header-main {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+}
+
+.dsl-modal .dsl-card .icon {
+    height: 20px;
+    width: auto;
+    border: none;
+    margin-right: 6px;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+.dsl-modal .search {
+    position: absolute;
+    top: 24px;
+    right: 72px;
+    display:flex;
+    justify-content:flex-end;
+}
+
+.dsl-modal .search .pf-v5-c-form__group-label {
+    padding: 0;
+    margin: auto;
+}
+
+.dsl-modal .search .text-field {
+    height: auto;
+}
+
+.dsl-modal .pf-v5-c-form.pf-v5-m-horizontal .pf-v5-c-form__group {
+    display: contents;
+}
+
+.dsl-modal .pf-v5-c-card__body {
+    padding-bottom: 0;
+    height: 54px;
+}
+
+
+.dsl-modal .dsl-card p {
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+}
+.dsl-modal .pf-v5-c-card__footer {
+    padding-bottom: 1em;
+}
+
+.dsl-modal .footer {
+    display: flex;
+    flex-direction: row;
+    margin-top: 6px;
+    flex-wrap: wrap;
+}
+
+.dsl-modal .dsl-card .header-labels {
+    padding: 5px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+}
+
+.dsl-modal .dsl-card .footer-labels {
+    padding: 5px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+}
+
+.dsl-modal .version,
+.dsl-modal .support-type,
+.dsl-modal .support-level {
+    white-space: nowrap;
+}
+
+.dsl-modal .labels {
+    opacity: 0.5;
+    font-weight: 200;
+    text-wrap: nowrap;
+}
+
+.dsl-modal .dsl-card:hover .labels {
+    opacity: 1;
+}
diff --git a/karavan-designer/src/designer/route/DslSelector.tsx b/karavan-designer/src/designer/route/DslSelector.tsx
index d5613b70..7edfd421 100644
--- a/karavan-designer/src/designer/route/DslSelector.tsx
+++ b/karavan-designer/src/designer/route/DslSelector.tsx
@@ -21,7 +21,7 @@ import {
     Tab, Tabs, TabTitleText,
     Text, TextInput, ToggleGroup, ToggleGroupItem,Switch
 } from '@patternfly/react-core';
-import '../karavan.css';
+import './DslSelector.css';
 import {CamelUi} from "../utils/CamelUi";
 import {DslMetaModel} from "../utils/DslMetaModel";
 import {useDesignerStore, useSelectorStore} from "../DesignerStore";
@@ -67,24 +67,21 @@ export function DslSelector (props: Props) {
 
     function searchInput() {
         return (
-            <Form isHorizontal className="search" autoComplete="off">
-              {selectorTabIndex === 'kamelet' &&   <FormGroup fieldId="switch">
-                
+            <Flex className="search">
+              {selectorTabIndex === 'kamelet' && <FlexItem>
                     <Switch
                         label="Custom only"
                         id="switch"
                         isChecked={customOnly}
                         onChange={(_event, checked) => setCustomOnly(checked)}
                     />
-                </FormGroup>}
-                  
-                
-                <FormGroup fieldId="search">
-                    <TextInput className="text-field" type="text" id="search" name="search"
+                </FlexItem>}
+                <FlexItem>
+                    <TextInput className="text-field" type="text" id="search" name="search" autoComplete={"off"}
                                value={filter}
                                onChange={(_, value) => setFilter(value)}/>
-                </FormGroup>
-            </Form>
+                </FlexItem>
+            </Flex>
         )
     }