Skip to content

Commit ee37c99

Browse files
Muskan GuptaMuskan Gupta
authored andcommitted
Updating error and success states for components
1 parent 785d694 commit ee37c99

File tree

19 files changed

+342
-186
lines changed

19 files changed

+342
-186
lines changed

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/actions/reset/v2/reset/_cq_styleConfig/.content.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@
120120
jcr:primaryType="nt:unstructured"
121121
jcr:title="Hover"
122122
cssSelector=".reset .cmp-adaptiveform-button__widget:hover"/>
123+
<error
124+
jcr:primaryType="nt:unstructured"
125+
jcr:title="Error"
126+
cssSelector=".reset .cmp-adaptiveform-button[data-cmp-valid='false']"/>
127+
<success
128+
jcr:primaryType="nt:unstructured"
129+
jcr:title="Success"
130+
cssSelector=".reset .cmp-adaptiveform-button[data-cmp-valid='true']"/>
123131
</states>
124132
</button>
125133
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/actions/submit/v2/submit/_cq_styleConfig/.content.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@
120120
jcr:primaryType="nt:unstructured"
121121
jcr:title="Hover"
122122
cssSelector=".submit .cmp-adaptiveform-button__widget:hover"/>
123+
<error
124+
jcr:primaryType="nt:unstructured"
125+
jcr:title="Error"
126+
cssSelector=".submit .cmp-adaptiveform-button[data-cmp-valid='false']"/>
127+
<success
128+
jcr:primaryType="nt:unstructured"
129+
jcr:title="Success"
130+
cssSelector=".submit .cmp-adaptiveform-button[data-cmp-valid='true']"/>
123131
</states>
124132
</button>
125133
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/_cq_styleConfig/.content.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,87 @@
77
jcr:primaryType="nt:unstructured"
88
jcr:title="Field"
99
id="af2_base"
10-
cssSelector=".base"
10+
cssSelector=".cmp-adaptiveform-container .base"
1111
longTitle="Field"
1212
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
1313
<items jcr:primaryType="nt:unstructured">
1414
<widgetAndText
1515
jcr:primaryType="nt:unstructured"
1616
jcr:title="Widget and Text"
1717
id="af2_basewidgetandtext"
18-
cssSelector="input,select,textarea"
18+
cssSelector=".cmp-adaptiveform-container input,select,textarea"
1919
longTitle="Field Widget and Text"
2020
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
2121
<states jcr:primaryType="nt:unstructured">
2222
<focus
2323
jcr:primaryType="nt:unstructured"
2424
jcr:title="Focus"
25-
cssSelector="input:focus,select:focus,textarea:focus"/>
25+
cssSelector=".cmp-adaptiveform-container input:focus,select:focus,textarea:focus"/>
2626
<disabled
2727
jcr:primaryType="nt:unstructured"
2828
jcr:title="Disabled"
29-
cssSelector="input:disabled,select:disabled,textarea:disabled"/>
29+
cssSelector=".cmp-adaptiveform-container input:disabled,select:disabled,textarea:disabled"/>
3030
<hover
3131
jcr:primaryType="nt:unstructured"
3232
jcr:title="Hover"
33-
cssSelector="input:hover,select:hover,textarea:hover"/>
33+
cssSelector=".cmp-adaptiveform-container input:hover,select:hover,textarea:hover"/>
3434
<mandatory
3535
jcr:primaryType="nt:unstructured"
3636
jcr:title="Mandatory"
37-
cssSelector="input:required,select:required,textarea:required"/>
37+
cssSelector=".cmp-adaptiveform-container input:required,select:required,textarea:required"/>
3838
</states>
3939
</widgetAndText>
4040
<fieldLabel
4141
jcr:primaryType="nt:unstructured"
4242
jcr:title="Label"
4343
id="af2_baselabel"
44-
cssSelector="label"
44+
cssSelector=".cmp-adaptiveform-container label"
4545
longTitle="Field Label"
4646
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
4747
<states jcr:primaryType="nt:unstructured">
4848
<focus
4949
jcr:primaryType="nt:unstructured"
5050
jcr:title="Focus"
51-
cssSelector="label:focus"/>
51+
cssSelector=".cmp-adaptiveform-container label:focus"/>
5252
<hover
5353
jcr:primaryType="nt:unstructured"
5454
jcr:title="Hover"
55-
cssSelector="label:hover"/>
55+
cssSelector=".cmp-adaptiveform-container label:hover"/>
5656
<disabled
5757
jcr:primaryType="nt:unstructured"
5858
jcr:title="Disabled"
59-
cssSelector="label:disabled"/>
59+
cssSelector=".cmp-adaptiveform-container label:disabled"/>
6060
<mandatory
6161
jcr:primaryType="nt:unstructured"
6262
jcr:title="Mandatory"
63-
cssSelector="label:required"/>
63+
cssSelector=".cmp-adaptiveform-container label:required"/>
6464
</states>
6565
</fieldLabel>
6666
<errorMessage
6767
jcr:primaryType="nt:unstructured"
6868
jcr:title="Error Message"
6969
id="af2_baseerrormessage"
70-
cssSelector="[class$='__errormessage']"
70+
cssSelector=".cmp-adaptiveform-container [class$='__errormessage']"
7171
longTitle="Field Error Message"
7272
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common"/>
7373
</items>
7474
<states jcr:primaryType="nt:unstructured">
7575
<focus
7676
jcr:primaryType="nt:unstructured"
7777
jcr:title="Focus"
78-
cssSelector=".base:focus"/>
78+
cssSelector=".cmp-adaptiveform-container .base:focus"/>
7979
<hover
8080
jcr:primaryType="nt:unstructured"
8181
jcr:title="Hover"
82-
cssSelector=".base:hover"/>
82+
cssSelector=".cmp-adaptiveform-container .base:hover"/>
8383
<disabled
8484
jcr:primaryType="nt:unstructured"
8585
jcr:title="Disabled"
86-
cssSelector=".base:disabled"/>
86+
cssSelector=".cmp-adaptiveform-container .base:disabled"/>
8787
<mandatory
8888
jcr:primaryType="nt:unstructured"
8989
jcr:title="Mandatory"
90-
cssSelector=".base:required"/>
90+
cssSelector=".cmp-adaptiveform-container .base:required"/>
9191
</states>
9292
</field>
9393
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v2/button/_cq_styleConfig/.content.xml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
2121
<states jcr:primaryType="nt:unstructured">
2222
<focus
23-
jcr:primaryType="nt:unstructured"
24-
jcr:title="Focus"
25-
cssSelector=".cmp-adaptiveform-button__text:focus"/>
23+
jcr:primaryType="nt:unstructured"
24+
jcr:title="Focus"
25+
cssSelector=".cmp-adaptiveform-button__text:focus"/>
2626
<active
27-
jcr:primaryType="nt:unstructured"
28-
jcr:title="Down"
29-
cssSelector=".cmp-adaptiveform-button__text:active"/>
27+
jcr:primaryType="nt:unstructured"
28+
jcr:title="Down"
29+
cssSelector=".cmp-adaptiveform-button__text:active"/>
3030
<disabled
31-
jcr:primaryType="nt:unstructured"
32-
jcr:title="Disabled"
33-
cssSelector=".cmp-adaptiveform-button__text:disabled"/>
31+
jcr:primaryType="nt:unstructured"
32+
jcr:title="Disabled"
33+
cssSelector=".cmp-adaptiveform-button__text:disabled"/>
3434
<hover
35-
jcr:primaryType="nt:unstructured"
36-
jcr:title="Hover"
37-
cssSelector=".cmp-adaptiveform-button__text:hover"/>
35+
jcr:primaryType="nt:unstructured"
36+
jcr:title="Hover"
37+
cssSelector=".cmp-adaptiveform-button__text:hover"/>
3838
</states>
3939
</buttonText>
4040
<buttonDescriptionShort
@@ -103,21 +103,29 @@
103103
</items>
104104
<states jcr:primaryType="nt:unstructured">
105105
<focus
106-
jcr:primaryType="nt:unstructured"
107-
jcr:title="Focus"
108-
cssSelector=".cmp-adaptiveform-button__widget:focus"/>
106+
jcr:primaryType="nt:unstructured"
107+
jcr:title="Focus"
108+
cssSelector=".cmp-adaptiveform-button__widget:focus"/>
109109
<active
110-
jcr:primaryType="nt:unstructured"
111-
jcr:title="Down"
112-
cssSelector=".cmp-adaptiveform-button__widget:active"/>
110+
jcr:primaryType="nt:unstructured"
111+
jcr:title="Down"
112+
cssSelector=".cmp-adaptiveform-button__widget:active"/>
113113
<disabled
114-
jcr:primaryType="nt:unstructured"
115-
jcr:title="Disabled"
116-
cssSelector=".cmp-adaptiveform-button__widget:disabled"/>
114+
jcr:primaryType="nt:unstructured"
115+
jcr:title="Disabled"
116+
cssSelector=".cmp-adaptiveform-button__widget:disabled"/>
117117
<hover
118-
jcr:primaryType="nt:unstructured"
119-
jcr:title="Hover"
120-
cssSelector=".cmp-adaptiveform-button__widget:hover"/>
118+
jcr:primaryType="nt:unstructured"
119+
jcr:title="Hover"
120+
cssSelector=".cmp-adaptiveform-button__widget:hover"/>
121+
<error
122+
jcr:primaryType="nt:unstructured"
123+
jcr:title="Error"
124+
cssSelector=".cmp-adaptiveform-button[data-cmp-valid='false']"/>
125+
<success
126+
jcr:primaryType="nt:unstructured"
127+
jcr:title="Success"
128+
cssSelector=".cmp-adaptiveform-button[data-cmp-valid='true']"/>
121129
</states>
122130
</button>
123131
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/_cq_styleConfig/.content.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,25 @@
173173
</items>
174174
<states jcr:primaryType="nt:unstructured">
175175
<hover
176-
jcr:primaryType="nt:unstructured"
177-
jcr:title="Hover"
178-
cssSelector=".cmp-adaptiveform-checkbox:hover"/>
176+
jcr:primaryType="nt:unstructured"
177+
jcr:title="Hover"
178+
cssSelector=".cmp-adaptiveform-checkbox:hover"/>
179179
<focus
180-
jcr:primaryType="nt:unstructured"
181-
jcr:title="Focus"
182-
cssSelector=".cmp-adaptiveform-checkbox:focus"/>
180+
jcr:primaryType="nt:unstructured"
181+
jcr:title="Focus"
182+
cssSelector=".cmp-adaptiveform-checkbox:focus"/>
183183
<disabled
184-
jcr:primaryType="nt:unstructured"
185-
jcr:title="Disabled"
186-
cssSelector=".cmp-adaptiveform-checkbox:disabled"/>
184+
jcr:primaryType="nt:unstructured"
185+
jcr:title="Disabled"
186+
cssSelector=".cmp-adaptiveform-checkbox[data-cmp-enabled='false']"/>
187+
<error
188+
jcr:primaryType="nt:unstructured"
189+
jcr:title="Error"
190+
cssSelector=".cmp-adaptiveform-checkbox[data-cmp-valid='false']"/>
191+
<success
192+
jcr:primaryType="nt:unstructured"
193+
jcr:title="Success"
194+
cssSelector=".cmp-adaptiveform-checkbox[data-cmp-valid='true']"/>
187195
</states>
188196
</widgetAndText>
189197
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/_cq_styleConfig/.content.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,21 +483,29 @@
483483
</items>
484484
<states jcr:primaryType="nt:unstructured">
485485
<disabled
486-
jcr:primaryType="nt:unstructured"
487-
jcr:title="Disabled"
488-
cssSelector=".cmp-adaptiveform-checkboxgroup__widget .cmp-adaptiveform-checkboxgroup__option__widget:disabled"/>
486+
jcr:primaryType="nt:unstructured"
487+
jcr:title="Disabled"
488+
cssSelector=".cmp-adaptiveform-checkboxgroup__widget .cmp-adaptiveform-checkboxgroup__option__widget:disabled"/>
489489
<hover
490-
jcr:primaryType="nt:unstructured"
491-
jcr:title="Hover"
492-
cssSelector=".cmp-adaptiveform-checkboxgroup__widget:hover"/>
490+
jcr:primaryType="nt:unstructured"
491+
jcr:title="Hover"
492+
cssSelector=".cmp-adaptiveform-checkboxgroup__widget:hover"/>
493493
<focus
494-
jcr:primaryType="nt:unstructured"
495-
jcr:title="Focus"
496-
cssSelector=".cmp-adaptiveform-checkboxgroup__widget:focus"/>
494+
jcr:primaryType="nt:unstructured"
495+
jcr:title="Focus"
496+
cssSelector=".cmp-adaptiveform-checkboxgroup__widget:focus"/>
497497
<mandatory
498498
jcr:primaryType="nt:unstructured"
499499
jcr:title="Mandatory"
500500
cssSelector=".cmp-adaptiveform-checkboxgroup[data-cmp-required='true']"/>
501+
<error
502+
jcr:primaryType="nt:unstructured"
503+
jcr:title="Error"
504+
cssSelector=".cmp-adaptiveform-checkboxgroup[data-cmp-valid='false']"/>
505+
<success
506+
jcr:primaryType="nt:unstructured"
507+
jcr:title="Success"
508+
cssSelector=".cmp-adaptiveform-checkboxgroup[data-cmp-valid='true']"/>
501509
</states>
502510
</widgetAndText>
503511
</items>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/_cq_styleConfig/.content.xml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,29 @@
148148
</items>
149149
<states jcr:primaryType="nt:unstructured">
150150
<focus
151-
jcr:primaryType="nt:unstructured"
152-
jcr:title="Focus"
153-
cssSelector=".cmp-adaptiveform-datepicker:focus"/>
151+
jcr:primaryType="nt:unstructured"
152+
jcr:title="Focus"
153+
cssSelector=".cmp-adaptiveform-datepicker:focus"/>
154154
<disabled
155-
jcr:primaryType="nt:unstructured"
156-
jcr:title="Disabled"
157-
cssSelector=".cmp-adaptiveform-datepicker:disabled"/>
155+
jcr:primaryType="nt:unstructured"
156+
jcr:title="Disabled"
157+
cssSelector=".cmp-adaptiveform-datepicker[data-cmp-enabled='false']"/>
158158
<hover
159-
jcr:primaryType="nt:unstructured"
160-
jcr:title="Hover"
161-
cssSelector=".cmp-adaptiveform-datepicker:hover"/>
159+
jcr:primaryType="nt:unstructured"
160+
jcr:title="Hover"
161+
cssSelector=".cmp-adaptiveform-datepicker:hover"/>
162162
<mandatory
163-
jcr:primaryType="nt:unstructured"
164-
jcr:title="Mandatory"
165-
cssSelector=".cmp-adaptiveform-datepicker:required"/>
163+
jcr:primaryType="nt:unstructured"
164+
jcr:title="Mandatory"
165+
cssSelector=".cmp-adaptiveform-datepicker[data-cmp-required='true']"/>
166+
<error
167+
jcr:primaryType="nt:unstructured"
168+
jcr:title="Error"
169+
cssSelector=".cmp-adaptiveform-datepicker[data-cmp-valid='false']"/>
170+
<success
171+
jcr:primaryType="nt:unstructured"
172+
jcr:title="Success"
173+
cssSelector=".cmp-adaptiveform-datepicker[data-cmp-valid='true']"/>
166174
</states>
167175
</widgetAndText>
168176
</items>

0 commit comments

Comments
 (0)