Skip to content

Commit 3dd2291

Browse files
authored
Merge pull request #160 from betocantu93/master
Css and checkbox validity
2 parents 93fd685 + d82ec55 commit 3dd2291

File tree

5 files changed

+59
-29
lines changed

5 files changed

+59
-29
lines changed

packages/core/addon/components/eui-checkbox-group/index.hbs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
(arg-or-default @valueKey "id")
33
(arg-or-default @labelKey "label") as |valueKey labelKey|
44
}}
5+
{{!template-lint-disable}}
6+
<input
7+
tabindex="-1"
8+
style="opacity: 0px; width:0px; height:0px; position: absolute; top: 40%; border:solid 1px transparent !important; margin:0px !important;"
9+
class="fake-input-for-html-form-validity"
10+
{{validatable-control @isInvalid}}
11+
/>
12+
{{!template-lint-enable}}
513
{{#if @legend}}
614
<EuiFormFieldset @legend={{@legend}} @compressed={{@compressed}}>
715
{{#each @options key=valueKey as |option|}}

packages/validated-form/addon/components/validated-form/field-checkbox-group/index.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
aria-label={{@ariaLabel}}
2626
@disabled={{@disabled}}
2727
@compressed={{@compressed}}
28+
@isInvalid={{this.isInvalidAndTouched}}
2829
@options={{this.options}}
2930
@idToSelectedMap={{this.arrayToMap}}
3031
@legend={{@legend}}

site/app/components/docfy-demo.hbs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{{yield (hash Description=(component "docfy-demo/description" id=@id))}}
22

3-
<EuiSplitPanel::Outer
4-
class="docfy-demo guideSection euiSplitPanel"
5-
@hasBorder={{true}}
6-
@paddingSize="none"
7-
@hasShadow={{false}}
8-
@grow={{false}}
9-
...attributes
10-
>
11-
{{yield
12-
(hash
13-
Example=(component "docfy-demo/example" id=@id)
14-
Snippet=(component "docfy-demo/snippet" id=@id)
15-
Snippets=(component "docfy-demo/snippets" id=@id)
16-
)
17-
}}
18-
</EuiSplitPanel::Outer>
3+
<div class="docfy-demo">
4+
<EuiSplitPanel::Outer
5+
class="guideSection euiSplitPanel"
6+
@hasBorder={{true}}
7+
@paddingSize="none"
8+
@hasShadow={{false}}
9+
@grow={{false}}
10+
...attributes
11+
>
12+
{{yield
13+
(hash
14+
Example=(component "docfy-demo/example" id=@id)
15+
Snippet=(component "docfy-demo/snippet" id=@id)
16+
Snippets=(component "docfy-demo/snippets" id=@id)
17+
)
18+
}}
19+
</EuiSplitPanel::Outer>
20+
</div>
1921

2022
<EuiSpacer @size="l" />
2123
<EuiSpacer @size="l" />

site/app/styles/app.css

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ body.euiBody--headerIsFixed {
1616
}
1717

1818
.guideDemo__textLines {
19-
background-image: linear-gradient(rgba(0,119,204,0.1) 1px, transparent 1px);
19+
background-image: linear-gradient(
20+
rgba(0, 119, 204, 0.1) 1px,
21+
transparent 1px
22+
);
2023
background-size: 100% 12px;
2124
background-position-y: -1px;
2225
}
@@ -100,7 +103,20 @@ html {
100103
}
101104
}
102105

106+
.pageBodyShadow {
107+
box-shadow: rgb(0 0 0 / 8%) 0px 0.9px 4px, rgb(0 0 0 / 6%) 0px 2.6px 8px,
108+
rgb(0 0 0 / 5%) 0px 5.7px 12px, rgb(0 0 0 / 4%) 0px 15px 15px;
109+
}
103110
/* Elastic UI docs specific */
111+
112+
.docfy-demo__description {
113+
padding: 24px;
114+
}
115+
116+
.docfy-demo {
117+
padding-inline: 24px;
118+
}
119+
104120
.guideSectionTabs {
105121
padding: 4px 12px;
106122
}
@@ -122,7 +138,7 @@ html {
122138
}
123139
}
124140

125-
.guideSection+.guideSection {
141+
.guideSection + .guideSection {
126142
margin-top: 32px;
127143
}
128144

@@ -131,7 +147,7 @@ html {
131147
padding-top: 8px;
132148
padding-bottom: 8px;
133149
}
134-
p>p:last-child{
150+
p > p:last-child {
135151
margin: 0px;
136152
}
137153

@@ -142,7 +158,6 @@ p>p:last-child{
142158
}
143159

144160
a span.icon-link:hover {
145-
146161
}
147162
div.docfy-demo__description__header > h2 > a > span {
148163
/* content: '#'; */
@@ -152,8 +167,8 @@ button {
152167
font-family: Inter, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
153168
}
154169

155-
.guideSectionTabs__tab>* {
156-
font-weight: 500!important;
170+
.guideSectionTabs__tab > * {
171+
font-weight: 500 !important;
157172
}
158173

159174
.text-white {
@@ -162,7 +177,7 @@ button {
162177

163178
.flex-demo .euiFlexItem {
164179
padding: 16px;
165-
background: rgba(27,169,245,0.1);
180+
background: rgba(27, 169, 245, 0.1);
166181
}
167182

168183
.guideDemo__highlightSpacer .euiCode {
@@ -171,18 +186,18 @@ button {
171186
margin-bottom: 16px;
172187
}
173188
.guideDemo__highlightSpacer .euiSpacer {
174-
background: rgba(27,169,245,0.1);
189+
background: rgba(27, 169, 245, 0.1);
175190
}
176191

177-
.docfy-demo__description__content>* {
192+
.docfy-demo__description__content > * {
178193
margin-bottom: 24px;
179194
}
180195

181-
.horizontal-rule-demo>div {
182-
background: rgba(0,119,204,0.1);
196+
.horizontal-rule-demo > div {
197+
background: rgba(0, 119, 204, 0.1);
183198
padding: 0.1px;
184199
margin-bottom: 16px;
185200
}
186201
.h-full {
187-
height: 100%
202+
height: 100%;
188203
}

site/app/templates/application.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@
6363
</EuiHeaderSectionItem>
6464
</EuiHeaderSection>
6565
</EuiHeader>
66-
<EuiPageTemplate @paddingSize="none" @grow={{true}}>
66+
<EuiPageTemplate
67+
@paddingSize="none"
68+
@grow={{true}}
69+
@pageBodyProps={{hash className="pageBodyShadow"}}
70+
>
6771
<:pageSideBar>
6872
<SideNav
6973
@isClearable={{true}}

0 commit comments

Comments
 (0)