= ({
+ cqlPreviewText = "placeholder text",
+ isMobile = false,
+}) => {
+ return (
+
+
+ CQL søgestreng
+
+ {cqlPreviewText}
+
+
+
+
+
+
+ );
+};
+
+export default InputPreview;
diff --git a/src/stories/Library/input-with-dropdown/InputWithDropdown.tsx b/src/stories/Library/input-with-dropdown/InputWithDropdown.tsx
new file mode 100644
index 000000000..e24b73e18
--- /dev/null
+++ b/src/stories/Library/input-with-dropdown/InputWithDropdown.tsx
@@ -0,0 +1,42 @@
+import { Dropdown } from "../dropdown/Dropdown";
+
+export interface InputWithDropdownProps {
+ inputPlaceholder: string;
+}
+
+export const InputWithDropdown: React.FC
= ({
+ inputPlaceholder,
+}) => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default {};
diff --git a/src/stories/Library/input-with-dropdown/input-with-dropdown.scss b/src/stories/Library/input-with-dropdown/input-with-dropdown.scss
new file mode 100644
index 000000000..2f38d3418
--- /dev/null
+++ b/src/stories/Library/input-with-dropdown/input-with-dropdown.scss
@@ -0,0 +1,53 @@
+.input-with-dropdown {
+ position: relative;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: $s-md;
+ padding-right: 48px;
+
+ @include breakpoint-s {
+ margin-bottom: $s-lg;
+ flex-direction: row;
+ padding-right: 0px;
+ height: 48px;
+ }
+
+ @include breakpoint-m {
+ margin-bottom: $s-lg;
+ }
+
+ &__input {
+ @extend %text-body-small-regular;
+ width: 100%;
+ min-height: 48px;
+ border: 1px solid $c-global-tertiary-1;
+ padding-left: $s-md;
+ background-color: transparent;
+ }
+
+ &__dropdown {
+ width: 100%;
+ height: 48px;
+ min-height: 48px;
+ margin-top: -1px;
+
+ @include breakpoint-s {
+ width: 200px;
+ margin: 0 0 0 -1px;
+ }
+ }
+
+ &__icon {
+ width: 25px;
+ cursor: pointer;
+ position: absolute;
+ top: 12px;
+ right: $s-sm;
+
+ @include breakpoint-s {
+ margin: 0 $s-md $s-lg $s-md;
+ position: relative;
+ }
+ }
+}
diff --git a/src/stories/Library/multiselect/Multiselect.stories.tsx b/src/stories/Library/multiselect/Multiselect.stories.tsx
new file mode 100644
index 000000000..d969d8b60
--- /dev/null
+++ b/src/stories/Library/multiselect/Multiselect.stories.tsx
@@ -0,0 +1,42 @@
+import { ComponentStory, ComponentMeta } from "@storybook/react";
+import { withDesign } from "storybook-addon-designs";
+import { Multiselect as MultiselectComp } from "./Multiselect";
+
+export default {
+ title: "Library / Dropdown / Multiselect",
+ component: MultiselectComp,
+ decorators: [withDesign],
+ argTypes: {
+ options: {
+ defaultValue: ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"],
+ control: {
+ type: "array",
+ },
+ },
+ isOpen: {
+ defaultValue: true,
+ control: {
+ type: "boolean",
+ },
+ },
+ withCaption: {
+ defaultValue: false,
+ control: {
+ type: "boolean",
+ },
+ },
+ },
+ parameters: {
+ design: {
+ type: "figma",
+ url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?type=design&node-id=9759%3A31313&mode=design&t=TmGJu5BAOnJAi4UR-1",
+ },
+ layout: "centered",
+ },
+} as ComponentMeta;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+export const Multiselect = Template.bind({});
diff --git a/src/stories/Library/multiselect/Multiselect.tsx b/src/stories/Library/multiselect/Multiselect.tsx
new file mode 100644
index 000000000..a0092b3de
--- /dev/null
+++ b/src/stories/Library/multiselect/Multiselect.tsx
@@ -0,0 +1,53 @@
+import { Checkbox } from "../Forms/checkbox/Checkbox";
+
+export type MultiselectProps = {
+ options: string[];
+ isOpen?: boolean;
+ withCaption?: boolean;
+};
+
+export const Multiselect: React.FC = ({
+ options,
+ isOpen = false,
+ withCaption,
+}) => {
+ return (
+ <>
+ {withCaption && (
+ Caption for multiselect
+ )}
+
+
+ Mulighed 1, Mulighed 2, Mulighed 3, Mulighed 4
+
+
+
+
+ {isOpen && (
+
+ {options.map((item, index) => (
+ -
+ {item}
+
+
+ ))}
+
+ )}
+
+ >
+ );
+};
diff --git a/src/stories/Library/multiselect/multiselect.scss b/src/stories/Library/multiselect/multiselect.scss
new file mode 100644
index 000000000..8bab09bf3
--- /dev/null
+++ b/src/stories/Library/multiselect/multiselect.scss
@@ -0,0 +1,73 @@
+.multiselect {
+ position: relative;
+ width: 100%;
+ height: 48px;
+ background-color: transparent;
+ display: flex;
+ align-items: center;
+ flex-direction: row;
+ border: 1px solid $c-global-tertiary-1;
+
+ &__selected {
+ @extend %text-button-placeholder;
+ width: 100%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding: 0 $s-md;
+ cursor: pointer;
+ }
+
+ &__opener {
+ width: 44px;
+ min-width: 44px;
+ height: 48px;
+ border-left: 1px solid $c-global-tertiary-1;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ }
+
+ &__icon {
+ margin: auto;
+ }
+
+ &__options {
+ @extend %text-body-medium-regular-placeholder;
+ width: 100%;
+ padding: $s-md 0;
+ position: absolute;
+ top: 47px;
+ background-color: $c-global-primary;
+ z-index: 1;
+ display: flex;
+ flex-direction: column;
+ outline: 1px solid $c-global-tertiary-1;
+ }
+
+ &__option {
+ position: relative;
+ width: 100%;
+ height: 28px;
+ padding: 0 0 0 $s-md;
+ cursor: pointer;
+
+ &.multiselect__option--highlighted {
+ background-color: $c-global-secondary;
+ }
+ }
+
+ &__checkbox {
+ position: absolute;
+ right: $s-sm;
+ top: 0px;
+ }
+
+ &__caption {
+ @extend %text-small-caption;
+ width: 100%;
+ height: $s-lg;
+ margin-bottom: $s-sm;
+ padding-top: $s-xs;
+ }
+}
diff --git a/src/styles/scss/shared.scss b/src/styles/scss/shared.scss
index e5561e624..f73b704de 100644
--- a/src/styles/scss/shared.scss
+++ b/src/styles/scss/shared.scss
@@ -81,3 +81,22 @@
width: 1.25em;
}
}
+
+.focus-styling {
+ &:focus {
+ outline: none;
+ border: 1px solid $c-text-primary-black;
+ }
+ &__input {
+ &:focus {
+ outline: none;
+ border: 1px solid $c-text-primary-black;
+ background-color: $c-text-primary-white;
+ }
+ }
+}
+
+.inline-icon {
+ display: inline;
+ margin: 0 0 -5px 5px;
+}