Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
monorepo f-emoji-picker global styles updated
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr committed Oct 8, 2023
1 parent e411b95 commit 2fcc586
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$sizes: (
"medium": 36px,
"small": 28px
);

$state-colors: (
"primary": var(--color-primary-default),
"success": var(--color-success-default),
"warning": var(--color-warning-default),
"danger": var(--color-danger-default)
);

$variants: (
"curved": 4px,
"round": 22px,
"block": 0px
);

$categories: (
"fill": (
"background": var(--color-input-default),
"hover": var(--color-input-default-hover),
"border": 1px solid var(--color-input-default)
),
"outline": (
"background": transparent,
"hover": var(--color-surface-default-hover),
"border": 1px solid var(--color-border-default)
)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import "./../../mixins/scss/mixins";
@import "./f-emoji-picker-variables";

f-emoji-picker {
display: flex;
flex: 1 0 auto;
&[disabled] {
@include disabled();
}
&[state="default"] {
@include input-color("default");
}
@each $state, $color in $state-colors {
&[state="#{$state}"] {
@include input-color($state);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,11 @@

// common mixins imported from this file
@import "./../../mixins/scss/mixins";
@import "./f-emoji-picker-variables";
/**
START : scss maps to hold repsective attribute values
**/

$sizes: (
"medium": 36px,
"small": 28px
);

$state-colors: (
"primary": var(--color-primary-default),
"success": var(--color-success-default),
"warning": var(--color-warning-default),
"danger": var(--color-danger-default)
);

$variants: (
"curved": 4px,
"round": 22px,
"block": 0px
);

$categories: (
"fill": (
"background": var(--color-input-default),
"hover": var(--color-input-default-hover),
"border": 1px solid var(--color-input-default)
),
"outline": (
"background": transparent,
"hover": var(--color-surface-default-hover),
"border": 1px solid var(--color-border-default)
)
);

:host {
.f-emoji-picker {
@include base();
Expand Down Expand Up @@ -128,22 +98,6 @@ $categories: (
}
}

f-emoji-picker {
display: flex;
flex: 1 0 auto;
&[disabled] {
@include disabled();
}
&[state="default"] {
@include input-color("default");
}
@each $state, $color in $state-colors {
&[state="#{$state}"] {
@include input-color($state);
}
}
}

em-emoji-picker {
--font-family: var(--flow-font);
--color-border: var(--color-input-default);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, PropertyValueMap, unsafeCSS } from "lit";
import { property, query, queryAssignedElements } from "lit/decorators.js";
import eleStyle from "./f-emoji-picker.scss?inline";
import globalStyle from "./f-emoji-picker-global.scss?inline";
import { FRoot } from "../../mixins/components/f-root/f-root";
import data, { Category, EmojiMartData } from "@emoji-mart/data";
import { Picker } from "emoji-mart";
Expand All @@ -9,6 +10,8 @@ import { FText } from "../f-text/f-text";
import { FIcon } from "../f-icon/f-icon";
import { FPopover } from "../f-popover/f-popover";
import { flowElement } from "./../../utils";
import { injectCss } from "@cldcvr/flow-core-config";
injectCss("f-emoji-picker", globalStyle);

export type FEmojiPickerState = "primary" | "default" | "success" | "warning" | "danger";

Expand Down Expand Up @@ -60,6 +63,7 @@ export class FEmojiPicker extends FRoot {
*/
static styles = [
unsafeCSS(eleStyle),
unsafeCSS(globalStyle),
...FDiv.styles,
...FText.styles,
...FPopover.styles,
Expand Down

0 comments on commit 2fcc586

Please sign in to comment.