11< script type ="module ">
22 import '@patternfly/elements/pf-icon/pf-icon.js' ;
33 import '@patternfly/elements/pf-helper-text/pf-helper-text.js' ;
4- PfIcon . addIconSet ( 'fas' , ( set , icon ) => {
54
5+ // ייתכן שאין צורך בטעינה הזו אם נשתמש רק בסמלים הדיפולטיביים
6+ // אבל נשאיר אותה אם נצטרך סמלי FontAwesome ספציפיים בעתיד.
7+ PfIcon . addIconSet ( 'fas' , ( set , icon ) => {
68 return new URL ( `@fortawesome/fontawesome-free/svgs/solid/${ icon } .svg` , import . meta. url ) ;
79 } ) ;
810</ script >
911
10- < pf-helper-text status =" warning " >
11- This is a warning helper text
12+ < pf-helper-text >
13+ This is default helper text
1214</ pf-helper-text >
1315
14- < pf-helper-text status ="error " icon ="exclamation-triangle " icon-set ="fas ">
15- This is an error helper text with icon
16+ < pf-helper-text status ="indeterminate " icon ="minus " icon-set ="fas ">
17+ This is indeterminate helper text
1618</ pf-helper-text >
1719
18- < pf-helper-text status ="success ">
19- < svg slot ="icon " width ="16 " height ="16 " viewBox ="0 0 16 16 " fill ="green " xmlns ="http://www.w3.org/2000/svg ">
20- < path d ="M6 10.8L3.2 8 2 9.2l4 4 8-8-1.2-1.2L6 10.8z "/>
21- </ svg >
22- This is a success helper text with slotted icon
20+ < pf-helper-text status ="warning " icon ="exclamation-triangle " icon-set ="fas ">
21+ This is warning helper text
2322</ pf-helper-text >
2423
25- < pf-helper-text status ="indeterminate ">
26- This is an indeterminate helper text
24+ < pf-helper-text status ="success " icon =" check-circle " icon-set =" fas ">
25+ This is success helper text
2726</ pf-helper-text >
2827
29- < pf-helper-text icon ="arrow " icon-set ="patternfly ">
30- Custom Icon
28+ < pf-helper-text status =" error " icon ="exclamation-circle " icon-set ="fas ">
29+ This is error helper text
3130</ pf-helper-text >
3231
3332
34-
3533< style >
34+ /* נשארים עם סגנונות בסיסיים, אך משנים את צבעי הסטטוסים להתאמה מדויקת לדמו המבוקש */
3635pf-helper-text {
3736 display : block;
3837 margin : 1rem 0 ;
3938 font-family : var (--pf-global--FontFamily--sans-serif , Arial, sans-serif);
4039}
4140
42- pf-helper-text .helper-container {
43- display : flex;
44- align-items : center;
45- gap : 0.5rem ;
41+ /* סגנון כללי לטקסט הדיפולטיבי */
42+ pf-helper-text : not ([status ]) {
43+ color : var (--pf-global--Color--100 , # 151515 ); /* צבע טקסט רגיל */
4644}
4745
48- pf-helper-text . icon-container {
49- display : inline-flex;
50- align-items : center;
46+ /* סגנון Indeterminate (שורה 2: קו אפור) */
47+ pf-helper-text [ status = "indeterminate" ] {
48+ color : var ( --pf-global--Color--200 , # 6a6e73 ); /* צבע אפור כהה יותר */
5149}
5250
51+ /* סגנון Warning (שורה 3: סמל צהוב) */
5352pf-helper-text [status = "warning" ] {
54- color : var (--pf-global--warning-color , # f0ab00 );
53+ color : var (--pf-global--warning-color--100 , # f0ab00 ); /* צהוב */
5554}
5655
57- pf-helper-text [status = "error" ] {
58- color : var (--pf-global--danger-color , # c9190b );
56+ /* סגנון Success (שורה 4: סמל ירוק) */
57+ pf-helper-text [status = "success" ] {
58+ color : var (--pf-global--success-color--100 , # 3e8635 ); /* ירוק */
5959}
6060
61- pf-helper-text [status = "success" ] {
62- color : var (--pf-global--success-color , # 3e8635 );
61+ /* סגנון Error (שורה 5: סמל אדום) */
62+ pf-helper-text [status = "error" ] {
63+ color : var (--pf-global--danger-color--100 , # c9190b ); /* אדום */
6364}
6465
65- pf-helper-text [status = "indeterminate" ] {
66- color : var (--pf-global--info-color , # 06c );
66+ /* ודא שצבע הסמל משתנה יחד עם צבע הטקסט */
67+ pf-helper-text [slot = "icon" ],
68+ pf-icon {
69+ fill : currentColor; /* צובע את הסמל בצבע הטקסט של ה-pf-helper-text */
6770}
68- </ style >
71+ </ style >
0 commit comments