@indico-data/design-system 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/lib/index.css +216 -4
  2. package/lib/index.d.ts +41 -2
  3. package/lib/index.esm.css +216 -4
  4. package/lib/index.esm.js +19 -3
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +20 -2
  7. package/lib/index.js.map +1 -1
  8. package/lib/src/components/forms/input/Input.d.ts +2 -1
  9. package/lib/src/components/forms/passwordInput/PasswordInput.d.ts +16 -0
  10. package/lib/src/components/forms/passwordInput/PasswordInput.stories.d.ts +11 -0
  11. package/lib/src/components/forms/passwordInput/__tests__/PasswordInput.test.d.ts +1 -0
  12. package/lib/src/components/forms/passwordInput/index.d.ts +1 -0
  13. package/lib/src/components/forms/textarea/Textarea.d.ts +22 -0
  14. package/lib/src/components/forms/textarea/Textarea.stories.d.ts +11 -0
  15. package/lib/src/components/forms/textarea/__tests__/Textarea.test.d.ts +1 -0
  16. package/lib/src/components/forms/textarea/index.d.ts +1 -0
  17. package/lib/src/components/index.d.ts +2 -0
  18. package/lib/src/index.d.ts +2 -0
  19. package/package.json +1 -1
  20. package/src/components/forms/checkbox/styles/Checkbox.scss +1 -1
  21. package/src/components/forms/input/Input.stories.tsx +70 -69
  22. package/src/components/forms/input/Input.tsx +3 -1
  23. package/src/components/forms/input/styles/Input.scss +11 -3
  24. package/src/components/forms/passwordInput/PasswordInput.mdx +28 -0
  25. package/src/components/forms/passwordInput/PasswordInput.stories.tsx +269 -0
  26. package/src/components/forms/passwordInput/PasswordInput.tsx +82 -0
  27. package/src/components/forms/passwordInput/__tests__/PasswordInput.test.tsx +129 -0
  28. package/src/components/forms/passwordInput/index.ts +1 -0
  29. package/src/components/forms/passwordInput/styles/PasswordInput.scss +120 -0
  30. package/src/components/forms/textarea/Textarea.mdx +19 -0
  31. package/src/components/forms/textarea/Textarea.stories.tsx +363 -0
  32. package/src/components/forms/textarea/Textarea.tsx +85 -0
  33. package/src/components/forms/textarea/__tests__/Textarea.test.tsx +103 -0
  34. package/src/components/forms/textarea/index.ts +1 -0
  35. package/src/components/forms/textarea/styles/Textarea.scss +102 -0
  36. package/src/components/index.ts +2 -0
  37. package/src/index.ts +2 -0
  38. package/src/styles/index.scss +2 -0
package/lib/index.css CHANGED
@@ -870,6 +870,10 @@
870
870
  --pf-input-text-color: var(--pf-gray-color);
871
871
  --pf-input-placeholder-text-color: var(--pf-gray-color-300);
872
872
  --pf-input-help-text-color: var(--pf-gray-color-400);
873
+ --pf-input-disabled-background-color: var(--pf-gray-color-100);
874
+ --pf-input-border-color: var(--pf-gray-color);
875
+ --pf-input-disabled-color: var(--pf-gray-color-400);
876
+ --pf-input-border-color: var(--pf-gray-color);
873
877
  --pf-input-rounded: var(--pf-rounded);
874
878
  }
875
879
 
@@ -879,6 +883,9 @@
879
883
  --pf-input-text-color: var(--pf-gray-color-100);
880
884
  --pf-input-placeholder-text-color: var(--pf-gray-color);
881
885
  --pf-input-help-text-color: var(--pf-gray-color-200);
886
+ --pf-input-disabled-background-color: var(--pf-primary-color-200);
887
+ --pf-input-disabled-border-color: var(--pf-gray-color-300);
888
+ --pf-input-disabled-color: var(--pf-gray-color-400);
882
889
  }
883
890
 
884
891
  .input {
@@ -913,9 +920,9 @@
913
920
  border-color: var(--pf-info-color);
914
921
  }
915
922
  .input:disabled {
916
- background-color: var(--pf-gray-color-100);
917
- border-color: var(--pf-gray-color-300);
918
- color: var(--pf-gray-color-400);
923
+ background-color: var(--pf-input-disabled-background-color);
924
+ border-color: var(--pf-input-disabled-border-color);
925
+ color: var(--pf-input-disabled-color);
919
926
  }
920
927
  .input--has-icon {
921
928
  padding-left: var(--pf-padding-7);
@@ -949,6 +956,7 @@
949
956
  top: var(--pf-margin-3);
950
957
  right: var(--pf-margin-2);
951
958
  color: var(--pf-input-text-color);
959
+ cursor: pointer;
952
960
  }
953
961
  .form-control .is-visually-hidden {
954
962
  position: absolute;
@@ -1064,7 +1072,7 @@
1064
1072
  }
1065
1073
 
1066
1074
  :root [data-theme=dark] {
1067
- --pf-checkbox-background-color: transparent;
1075
+ --pf-checkbox-background-color: var(--pf-primary-color-200);
1068
1076
  --pf-checkbox-check-color: var(--pf-white-color);
1069
1077
  --pf-checkbox-border-color: var(--pf-white-color);
1070
1078
  --pf-checkbox-disabled-color: var(--pf-gray-color-300);
@@ -1143,6 +1151,210 @@
1143
1151
  background: var(--pf-checkbox-disabled-color);
1144
1152
  }
1145
1153
 
1154
+ :root,
1155
+ :root [data-theme=light],
1156
+ :root [data-theme=dark] {
1157
+ --pf-textarea-background-color: var(--pf-white-color);
1158
+ --pf-textarea-border-color: var(--pf-gray-color);
1159
+ --pf-textarea-text-color: var(--pf-gray-color);
1160
+ --pf-textarea-placeholder-text-color: var(--pf-gray-color-300);
1161
+ --pf-textarea-help-text-color: var(--pf-gray-color-400);
1162
+ --pf-textarea-disabled-background-color: var(--pf-gray-color-100);
1163
+ --pf-textarea-border-color: var(--pf-gray-color);
1164
+ --pf-textarea-disabled-color: var(--pf-gray-color-400);
1165
+ --pf-textarea-rounded: var(--pf-rounded);
1166
+ }
1167
+
1168
+ :root [data-theme=dark] {
1169
+ --pf-textarea-background-color: var(--pf-primary-color);
1170
+ --pf-textarea-border-color: var(--pf-gray-color-100);
1171
+ --pf-textarea-text-color: var(--pf-gray-color-100);
1172
+ --pf-textarea-placeholder-text-color: var(--pf-gray-color);
1173
+ --pf-textarea-help-text-color: var(--pf-gray-color-200);
1174
+ --pf-textarea-disabled-background-color: var(--pf-primary-color-200);
1175
+ --pf-textarea-disabled-border-color: var(--pf-gray-color-300);
1176
+ --pf-textarea-disabled-color: var(--pf-gray-color-400);
1177
+ }
1178
+
1179
+ .textarea {
1180
+ background-color: var(--pf-textarea-background-color);
1181
+ border: 1px solid var(--pf-textarea-border-color);
1182
+ border-radius: var(--pf-textarea-rounded);
1183
+ color: var(--pf-textarea-text-color);
1184
+ padding: 10px;
1185
+ width: 100%;
1186
+ box-sizing: border-box;
1187
+ }
1188
+ .textarea::-moz-placeholder {
1189
+ color: var(--pf-textarea-placeholder-text-color);
1190
+ }
1191
+ .textarea::placeholder {
1192
+ color: var(--pf-textarea-placeholder-text-color);
1193
+ }
1194
+ .textarea:focus {
1195
+ border-color: var(--pf-primary-color);
1196
+ }
1197
+ .textarea.error {
1198
+ border-color: var(--pf-error-color);
1199
+ }
1200
+ .textarea.success {
1201
+ border-color: var(--pf-success-color);
1202
+ }
1203
+ .textarea.warning {
1204
+ border-color: var(--pf-warning-color);
1205
+ }
1206
+ .textarea.info {
1207
+ border-color: var(--pf-info-color);
1208
+ }
1209
+ .textarea:disabled {
1210
+ background-color: var(--pf-textarea-disabled-background-color);
1211
+ border-color: var(--pf-textarea-disabled-border-color);
1212
+ color: var(--pf-textarea-disabled-color);
1213
+ }
1214
+ .textarea--has-icon {
1215
+ padding-left: var(--pf-padding-7);
1216
+ }
1217
+
1218
+ .form-control .error-list {
1219
+ list-style: none;
1220
+ padding: 0;
1221
+ margin: 0;
1222
+ margin-top: var(--pf-margin-2);
1223
+ margin-bottom: var(--pf-margin-2);
1224
+ color: var(--pf-error-color);
1225
+ }
1226
+ .form-control .help-text {
1227
+ margin-top: var(--pf-margin-2);
1228
+ margin-bottom: var(--pf-margin-2);
1229
+ color: var(--pf-textarea-help-text-color);
1230
+ font-size: var(--pf-font-size-subtitle2);
1231
+ }
1232
+ .form-control .is-visually-hidden {
1233
+ position: absolute;
1234
+ width: 1px;
1235
+ height: 1px;
1236
+ padding: 0;
1237
+ margin: -1px;
1238
+ overflow: hidden;
1239
+ clip: rect(0, 0, 0, 0);
1240
+ white-space: nowrap;
1241
+ border: 0;
1242
+ }
1243
+ .form-control .form-label {
1244
+ margin-bottom: var(--pf-margin-2);
1245
+ }
1246
+
1247
+ :root,
1248
+ :root [data-theme=light],
1249
+ :root [data-theme=dark] {
1250
+ --pf-password-input-background-color: var(--pf-white-color);
1251
+ --pf-password-input-border-color: var(--pf-gray-color);
1252
+ --pf-password-input-text-color: var(--pf-gray-color);
1253
+ --pf-password-input-placeholder-text-color: var(--pf-gray-color-300);
1254
+ --pf-password-input-help-text-color: var(--pf-gray-color-400);
1255
+ --pf-password-input-disabled-background-color: var(--pf-gray-color-100);
1256
+ --pf-password-input-border-color: var(--pf-gray-color);
1257
+ --pf-password-input-disabled-color: var(--pf-gray-color-400);
1258
+ --pf-password-input-border-color: var(--pf-gray-color);
1259
+ --pf-password-input-rounded: var(--pf-rounded);
1260
+ }
1261
+
1262
+ :root [data-theme=dark] {
1263
+ --pf-password-input-background-color: var(--pf-primary-color);
1264
+ --pf-password-input-border-color: var(--pf-gray-color-100);
1265
+ --pf-password-input-text-color: var(--pf-gray-color-100);
1266
+ --pf-password-input-placeholder-text-color: var(--pf-gray-color);
1267
+ --pf-password-input-help-text-color: var(--pf-gray-color-200);
1268
+ --pf-password-input-disabled-background-color: var(--pf-primary-color-200);
1269
+ --pf-password-input-disabled-border-color: var(--pf-gray-color-300);
1270
+ --pf-password-input-disabled-color: var(--pf-gray-color-400);
1271
+ }
1272
+
1273
+ .password-input {
1274
+ background-color: var(--pf-password-input-background-color);
1275
+ border: 1px solid var(--pf-password-input-border-color);
1276
+ border-radius: var(--pf-password-input-rounded);
1277
+ color: var(--pf-password-input-text-color);
1278
+ padding: 10px;
1279
+ width: 100%;
1280
+ box-sizing: border-box;
1281
+ height: 36px;
1282
+ }
1283
+ .password-input::-moz-placeholder {
1284
+ color: var(--pf-password-input-placeholder-text-color);
1285
+ }
1286
+ .password-input::placeholder {
1287
+ color: var(--pf-password-input-placeholder-text-color);
1288
+ }
1289
+ .password-input:focus {
1290
+ border-color: var(--pf-primary-color);
1291
+ }
1292
+ .password-input.error {
1293
+ border-color: var(--pf-error-color);
1294
+ }
1295
+ .password-input.success {
1296
+ border-color: var(--pf-success-color);
1297
+ }
1298
+ .password-input.warning {
1299
+ border-color: var(--pf-warning-color);
1300
+ }
1301
+ .password-input.info {
1302
+ border-color: var(--pf-info-color);
1303
+ }
1304
+ .password-input:disabled {
1305
+ background-color: var(--pf-password-input-disabled-background-color);
1306
+ border-color: var(--pf-password-input-disabled-border-color);
1307
+ color: var(--pf-password-input-disabled-color);
1308
+ }
1309
+ .password-input--has-icon {
1310
+ padding-left: var(--pf-padding-7);
1311
+ }
1312
+
1313
+ .form-control .error-list {
1314
+ list-style: none;
1315
+ padding: 0;
1316
+ margin: 0;
1317
+ margin-top: var(--pf-margin-2);
1318
+ margin-bottom: var(--pf-margin-2);
1319
+ color: var(--pf-error-color);
1320
+ }
1321
+ .form-control .help-text {
1322
+ margin-top: var(--pf-margin-2);
1323
+ margin-bottom: var(--pf-margin-2);
1324
+ color: var(--pf-password-input-help-text-color);
1325
+ font-size: var(--pf-font-size-subtitle2);
1326
+ }
1327
+ .form-control .password-input-wrapper {
1328
+ position: relative;
1329
+ }
1330
+ .form-control .password-input-wrapper .embedded-icon {
1331
+ position: absolute;
1332
+ top: 10px;
1333
+ left: var(--pf-margin-2);
1334
+ color: var(--pf-password-input-text-color);
1335
+ }
1336
+ .form-control .password-input-wrapper .toggle-show-password-icon {
1337
+ position: absolute;
1338
+ top: var(--pf-margin-3);
1339
+ right: var(--pf-margin-2);
1340
+ color: var(--pf-password-input-text-color);
1341
+ cursor: pointer;
1342
+ }
1343
+ .form-control .is-visually-hidden {
1344
+ position: absolute;
1345
+ width: 1px;
1346
+ height: 1px;
1347
+ padding: 0;
1348
+ margin: -1px;
1349
+ overflow: hidden;
1350
+ clip: rect(0, 0, 0, 0);
1351
+ white-space: nowrap;
1352
+ border: 0;
1353
+ }
1354
+ .form-control .form-label {
1355
+ margin-bottom: var(--pf-margin-2);
1356
+ }
1357
+
1146
1358
  :root,
1147
1359
  :root [data-theme=light],
1148
1360
  :root [data-theme=dark] {
package/lib/index.d.ts CHANGED
@@ -936,8 +936,9 @@ interface InputProps {
936
936
  hasHiddenLabel?: boolean;
937
937
  iconName?: IconName$1;
938
938
  isClearable?: boolean;
939
+ className?: string;
939
940
  }
940
- declare const Input: ({ ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, iconName, hasHiddenLabel, isClearable, ...rest }: InputProps) => react_jsx_runtime.JSX.Element;
941
+ declare const Input: ({ ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, iconName, hasHiddenLabel, isClearable, className, ...rest }: InputProps) => react_jsx_runtime.JSX.Element;
941
942
 
942
943
  interface RadioProps {
943
944
  ref?: React$1.LegacyRef<HTMLInputElement>;
@@ -974,4 +975,42 @@ interface ToggleProps {
974
975
  }
975
976
  declare const Toggle: ({ ref, id, label, name, value, onChange, isDisabled, isChecked, ...rest }: ToggleProps) => react_jsx_runtime.JSX.Element;
976
977
 
977
- export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, GlobalStyles, Icon, IconButton, Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio$2 as Radio, RadioGroup$1 as RadioGroup, Radio as RadioInput, RandomLoadingMessage, Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, typography as TYPOGRAPHY, Table, TextInput, TextTruncate, Toggle$1 as Toggle, Toggle as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
978
+ interface TextareaProps {
979
+ ref?: React$1.LegacyRef<HTMLTextAreaElement>;
980
+ label: string;
981
+ name: string;
982
+ placeholder: string;
983
+ value: string;
984
+ onChange: (e: React$1.ChangeEvent<HTMLTextAreaElement>) => void;
985
+ isRequired?: boolean;
986
+ isDisabled?: boolean;
987
+ errorList?: string[];
988
+ helpText?: string;
989
+ hasHiddenLabel?: boolean;
990
+ rows?: number;
991
+ cols?: number;
992
+ readonly?: boolean;
993
+ wrap?: 'hard' | 'soft';
994
+ form?: string;
995
+ maxLength?: number;
996
+ autofocus?: boolean;
997
+ }
998
+ declare const Textarea: ({ ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
999
+
1000
+ interface PasswordInputProps {
1001
+ ref?: React$1.LegacyRef<HTMLInputElement>;
1002
+ label: string;
1003
+ name: string;
1004
+ placeholder: string;
1005
+ value: string;
1006
+ onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
1007
+ isRequired?: boolean;
1008
+ isDisabled?: boolean;
1009
+ errorList?: string[];
1010
+ helpText?: string;
1011
+ hasHiddenLabel?: boolean;
1012
+ hasShowPassword?: boolean;
1013
+ }
1014
+ declare const PasswordInput: ({ label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, hasHiddenLabel, hasShowPassword, ...rest }: PasswordInputProps) => react_jsx_runtime.JSX.Element;
1015
+
1016
+ export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, GlobalStyles, Icon, IconButton, Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PasswordInput, PercentageRing, Radio$2 as Radio, RadioGroup$1 as RadioGroup, Radio as RadioInput, RandomLoadingMessage, Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, typography as TYPOGRAPHY, Table, TextInput, TextTruncate, Textarea, Toggle$1 as Toggle, Toggle as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
package/lib/index.esm.css CHANGED
@@ -870,6 +870,10 @@
870
870
  --pf-input-text-color: var(--pf-gray-color);
871
871
  --pf-input-placeholder-text-color: var(--pf-gray-color-300);
872
872
  --pf-input-help-text-color: var(--pf-gray-color-400);
873
+ --pf-input-disabled-background-color: var(--pf-gray-color-100);
874
+ --pf-input-border-color: var(--pf-gray-color);
875
+ --pf-input-disabled-color: var(--pf-gray-color-400);
876
+ --pf-input-border-color: var(--pf-gray-color);
873
877
  --pf-input-rounded: var(--pf-rounded);
874
878
  }
875
879
 
@@ -879,6 +883,9 @@
879
883
  --pf-input-text-color: var(--pf-gray-color-100);
880
884
  --pf-input-placeholder-text-color: var(--pf-gray-color);
881
885
  --pf-input-help-text-color: var(--pf-gray-color-200);
886
+ --pf-input-disabled-background-color: var(--pf-primary-color-200);
887
+ --pf-input-disabled-border-color: var(--pf-gray-color-300);
888
+ --pf-input-disabled-color: var(--pf-gray-color-400);
882
889
  }
883
890
 
884
891
  .input {
@@ -913,9 +920,9 @@
913
920
  border-color: var(--pf-info-color);
914
921
  }
915
922
  .input:disabled {
916
- background-color: var(--pf-gray-color-100);
917
- border-color: var(--pf-gray-color-300);
918
- color: var(--pf-gray-color-400);
923
+ background-color: var(--pf-input-disabled-background-color);
924
+ border-color: var(--pf-input-disabled-border-color);
925
+ color: var(--pf-input-disabled-color);
919
926
  }
920
927
  .input--has-icon {
921
928
  padding-left: var(--pf-padding-7);
@@ -949,6 +956,7 @@
949
956
  top: var(--pf-margin-3);
950
957
  right: var(--pf-margin-2);
951
958
  color: var(--pf-input-text-color);
959
+ cursor: pointer;
952
960
  }
953
961
  .form-control .is-visually-hidden {
954
962
  position: absolute;
@@ -1064,7 +1072,7 @@
1064
1072
  }
1065
1073
 
1066
1074
  :root [data-theme=dark] {
1067
- --pf-checkbox-background-color: transparent;
1075
+ --pf-checkbox-background-color: var(--pf-primary-color-200);
1068
1076
  --pf-checkbox-check-color: var(--pf-white-color);
1069
1077
  --pf-checkbox-border-color: var(--pf-white-color);
1070
1078
  --pf-checkbox-disabled-color: var(--pf-gray-color-300);
@@ -1143,6 +1151,210 @@
1143
1151
  background: var(--pf-checkbox-disabled-color);
1144
1152
  }
1145
1153
 
1154
+ :root,
1155
+ :root [data-theme=light],
1156
+ :root [data-theme=dark] {
1157
+ --pf-textarea-background-color: var(--pf-white-color);
1158
+ --pf-textarea-border-color: var(--pf-gray-color);
1159
+ --pf-textarea-text-color: var(--pf-gray-color);
1160
+ --pf-textarea-placeholder-text-color: var(--pf-gray-color-300);
1161
+ --pf-textarea-help-text-color: var(--pf-gray-color-400);
1162
+ --pf-textarea-disabled-background-color: var(--pf-gray-color-100);
1163
+ --pf-textarea-border-color: var(--pf-gray-color);
1164
+ --pf-textarea-disabled-color: var(--pf-gray-color-400);
1165
+ --pf-textarea-rounded: var(--pf-rounded);
1166
+ }
1167
+
1168
+ :root [data-theme=dark] {
1169
+ --pf-textarea-background-color: var(--pf-primary-color);
1170
+ --pf-textarea-border-color: var(--pf-gray-color-100);
1171
+ --pf-textarea-text-color: var(--pf-gray-color-100);
1172
+ --pf-textarea-placeholder-text-color: var(--pf-gray-color);
1173
+ --pf-textarea-help-text-color: var(--pf-gray-color-200);
1174
+ --pf-textarea-disabled-background-color: var(--pf-primary-color-200);
1175
+ --pf-textarea-disabled-border-color: var(--pf-gray-color-300);
1176
+ --pf-textarea-disabled-color: var(--pf-gray-color-400);
1177
+ }
1178
+
1179
+ .textarea {
1180
+ background-color: var(--pf-textarea-background-color);
1181
+ border: 1px solid var(--pf-textarea-border-color);
1182
+ border-radius: var(--pf-textarea-rounded);
1183
+ color: var(--pf-textarea-text-color);
1184
+ padding: 10px;
1185
+ width: 100%;
1186
+ box-sizing: border-box;
1187
+ }
1188
+ .textarea::-moz-placeholder {
1189
+ color: var(--pf-textarea-placeholder-text-color);
1190
+ }
1191
+ .textarea::placeholder {
1192
+ color: var(--pf-textarea-placeholder-text-color);
1193
+ }
1194
+ .textarea:focus {
1195
+ border-color: var(--pf-primary-color);
1196
+ }
1197
+ .textarea.error {
1198
+ border-color: var(--pf-error-color);
1199
+ }
1200
+ .textarea.success {
1201
+ border-color: var(--pf-success-color);
1202
+ }
1203
+ .textarea.warning {
1204
+ border-color: var(--pf-warning-color);
1205
+ }
1206
+ .textarea.info {
1207
+ border-color: var(--pf-info-color);
1208
+ }
1209
+ .textarea:disabled {
1210
+ background-color: var(--pf-textarea-disabled-background-color);
1211
+ border-color: var(--pf-textarea-disabled-border-color);
1212
+ color: var(--pf-textarea-disabled-color);
1213
+ }
1214
+ .textarea--has-icon {
1215
+ padding-left: var(--pf-padding-7);
1216
+ }
1217
+
1218
+ .form-control .error-list {
1219
+ list-style: none;
1220
+ padding: 0;
1221
+ margin: 0;
1222
+ margin-top: var(--pf-margin-2);
1223
+ margin-bottom: var(--pf-margin-2);
1224
+ color: var(--pf-error-color);
1225
+ }
1226
+ .form-control .help-text {
1227
+ margin-top: var(--pf-margin-2);
1228
+ margin-bottom: var(--pf-margin-2);
1229
+ color: var(--pf-textarea-help-text-color);
1230
+ font-size: var(--pf-font-size-subtitle2);
1231
+ }
1232
+ .form-control .is-visually-hidden {
1233
+ position: absolute;
1234
+ width: 1px;
1235
+ height: 1px;
1236
+ padding: 0;
1237
+ margin: -1px;
1238
+ overflow: hidden;
1239
+ clip: rect(0, 0, 0, 0);
1240
+ white-space: nowrap;
1241
+ border: 0;
1242
+ }
1243
+ .form-control .form-label {
1244
+ margin-bottom: var(--pf-margin-2);
1245
+ }
1246
+
1247
+ :root,
1248
+ :root [data-theme=light],
1249
+ :root [data-theme=dark] {
1250
+ --pf-password-input-background-color: var(--pf-white-color);
1251
+ --pf-password-input-border-color: var(--pf-gray-color);
1252
+ --pf-password-input-text-color: var(--pf-gray-color);
1253
+ --pf-password-input-placeholder-text-color: var(--pf-gray-color-300);
1254
+ --pf-password-input-help-text-color: var(--pf-gray-color-400);
1255
+ --pf-password-input-disabled-background-color: var(--pf-gray-color-100);
1256
+ --pf-password-input-border-color: var(--pf-gray-color);
1257
+ --pf-password-input-disabled-color: var(--pf-gray-color-400);
1258
+ --pf-password-input-border-color: var(--pf-gray-color);
1259
+ --pf-password-input-rounded: var(--pf-rounded);
1260
+ }
1261
+
1262
+ :root [data-theme=dark] {
1263
+ --pf-password-input-background-color: var(--pf-primary-color);
1264
+ --pf-password-input-border-color: var(--pf-gray-color-100);
1265
+ --pf-password-input-text-color: var(--pf-gray-color-100);
1266
+ --pf-password-input-placeholder-text-color: var(--pf-gray-color);
1267
+ --pf-password-input-help-text-color: var(--pf-gray-color-200);
1268
+ --pf-password-input-disabled-background-color: var(--pf-primary-color-200);
1269
+ --pf-password-input-disabled-border-color: var(--pf-gray-color-300);
1270
+ --pf-password-input-disabled-color: var(--pf-gray-color-400);
1271
+ }
1272
+
1273
+ .password-input {
1274
+ background-color: var(--pf-password-input-background-color);
1275
+ border: 1px solid var(--pf-password-input-border-color);
1276
+ border-radius: var(--pf-password-input-rounded);
1277
+ color: var(--pf-password-input-text-color);
1278
+ padding: 10px;
1279
+ width: 100%;
1280
+ box-sizing: border-box;
1281
+ height: 36px;
1282
+ }
1283
+ .password-input::-moz-placeholder {
1284
+ color: var(--pf-password-input-placeholder-text-color);
1285
+ }
1286
+ .password-input::placeholder {
1287
+ color: var(--pf-password-input-placeholder-text-color);
1288
+ }
1289
+ .password-input:focus {
1290
+ border-color: var(--pf-primary-color);
1291
+ }
1292
+ .password-input.error {
1293
+ border-color: var(--pf-error-color);
1294
+ }
1295
+ .password-input.success {
1296
+ border-color: var(--pf-success-color);
1297
+ }
1298
+ .password-input.warning {
1299
+ border-color: var(--pf-warning-color);
1300
+ }
1301
+ .password-input.info {
1302
+ border-color: var(--pf-info-color);
1303
+ }
1304
+ .password-input:disabled {
1305
+ background-color: var(--pf-password-input-disabled-background-color);
1306
+ border-color: var(--pf-password-input-disabled-border-color);
1307
+ color: var(--pf-password-input-disabled-color);
1308
+ }
1309
+ .password-input--has-icon {
1310
+ padding-left: var(--pf-padding-7);
1311
+ }
1312
+
1313
+ .form-control .error-list {
1314
+ list-style: none;
1315
+ padding: 0;
1316
+ margin: 0;
1317
+ margin-top: var(--pf-margin-2);
1318
+ margin-bottom: var(--pf-margin-2);
1319
+ color: var(--pf-error-color);
1320
+ }
1321
+ .form-control .help-text {
1322
+ margin-top: var(--pf-margin-2);
1323
+ margin-bottom: var(--pf-margin-2);
1324
+ color: var(--pf-password-input-help-text-color);
1325
+ font-size: var(--pf-font-size-subtitle2);
1326
+ }
1327
+ .form-control .password-input-wrapper {
1328
+ position: relative;
1329
+ }
1330
+ .form-control .password-input-wrapper .embedded-icon {
1331
+ position: absolute;
1332
+ top: 10px;
1333
+ left: var(--pf-margin-2);
1334
+ color: var(--pf-password-input-text-color);
1335
+ }
1336
+ .form-control .password-input-wrapper .toggle-show-password-icon {
1337
+ position: absolute;
1338
+ top: var(--pf-margin-3);
1339
+ right: var(--pf-margin-2);
1340
+ color: var(--pf-password-input-text-color);
1341
+ cursor: pointer;
1342
+ }
1343
+ .form-control .is-visually-hidden {
1344
+ position: absolute;
1345
+ width: 1px;
1346
+ height: 1px;
1347
+ padding: 0;
1348
+ margin: -1px;
1349
+ overflow: hidden;
1350
+ clip: rect(0, 0, 0, 0);
1351
+ white-space: nowrap;
1352
+ border: 0;
1353
+ }
1354
+ .form-control .form-label {
1355
+ margin-bottom: var(--pf-margin-2);
1356
+ }
1357
+
1146
1358
  :root,
1147
1359
  :root [data-theme=light],
1148
1360
  :root [data-theme=dark] {
package/lib/index.esm.js CHANGED
@@ -18641,12 +18641,12 @@ const ErrorList = ({ errorList, name }) => {
18641
18641
  };
18642
18642
 
18643
18643
  const Input = (_a) => {
18644
- var { ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, iconName, hasHiddenLabel, isClearable } = _a, rest = __rest$1(_a, ["ref", "label", "name", "placeholder", "value", "onChange", "isRequired", "isDisabled", "errorList", "helpText", "iconName", "hasHiddenLabel", "isClearable"]);
18644
+ var { ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, iconName, hasHiddenLabel, isClearable, className = '' } = _a, rest = __rest$1(_a, ["ref", "label", "name", "placeholder", "value", "onChange", "isRequired", "isDisabled", "errorList", "helpText", "iconName", "hasHiddenLabel", "isClearable", "className"]);
18645
18645
  const hasErrors = errorList && errorList.length > 0;
18646
18646
  const handleClear = () => {
18647
18647
  onChange({ target: { value: '' } });
18648
18648
  };
18649
- return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, required: isRequired, placeholder: placeholder, value: value, onChange: onChange, className: `input ${hasErrors ? 'error' : ''} ${iconName ? 'input--has-icon' : ''}`, "aria-invalid": hasErrors, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)), isClearable && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(ErrorList, { errorList: errorList, name: name }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18649
+ return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, required: isRequired, placeholder: placeholder, value: value, onChange: onChange, className: `input ${hasErrors ? 'error' : ''} ${iconName ? 'input--has-icon' : ''} ${className}`, "aria-invalid": hasErrors, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)), isClearable && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(ErrorList, { errorList: errorList, name: name }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18650
18650
  };
18651
18651
 
18652
18652
  const Radio$2 = (_a) => {
@@ -18664,6 +18664,22 @@ const Toggle$1 = (_a) => {
18664
18664
  return (jsx("div", { className: "form-control", children: jsxs("div", { className: "toggle-wrapper", children: [jsx("input", Object.assign({ "data-testid": `form-toggle-input-${name}`, className: "toggle-input", type: "checkbox", id: id, checked: isChecked, name: name, value: value, disabled: isDisabled, ref: ref, onChange: onChange, tabIndex: 0, "aria-describedby": id, "aria-label": label }, rest)), jsx("label", { htmlFor: id, className: "switch" }), jsx("label", { className: 'toggle-label', htmlFor: id, children: label })] }) }));
18665
18665
  };
18666
18666
 
18667
+ const Textarea = (_a) => {
18668
+ var { ref, label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus } = _a, rest = __rest$1(_a, ["ref", "label", "name", "placeholder", "value", "onChange", "isRequired", "isDisabled", "errorList", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus"]);
18669
+ const hasErrors = errorList && errorList.length > 0;
18670
+ return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsx("div", { className: "textarea-wrapper", children: jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, value: value, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, required: isRequired, placeholder: placeholder, onChange: onChange, className: `textarea ${hasErrors ? 'error' : ''}`, "aria-invalid": hasErrors, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)) }), hasErrors && jsx(ErrorList, { errorList: errorList, name: name }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18671
+ };
18672
+
18673
+ const PasswordInput = (_a) => {
18674
+ var { label, name, placeholder, value, onChange, isRequired, isDisabled, errorList, helpText, hasHiddenLabel, hasShowPassword = true } = _a, rest = __rest$1(_a, ["label", "name", "placeholder", "value", "onChange", "isRequired", "isDisabled", "errorList", "helpText", "hasHiddenLabel", "hasShowPassword"]);
18675
+ const hasErrors = errorList && errorList.length > 0;
18676
+ const [showPassword, setShowPassword] = useState(false);
18677
+ const handleShowPassword = () => {
18678
+ setShowPassword((prevShowPassword) => !prevShowPassword);
18679
+ };
18680
+ return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsxs("div", { className: "password-input-wrapper", children: [jsx(Icon, { name: "lock", "data-testid": `${name}-embedded-icon`, className: "embedded-icon" }), jsx("input", Object.assign({ "data-testid": `form-password-input-${name}`, name: name, type: showPassword ? 'text' : 'password', disabled: isDisabled, required: isRequired, placeholder: placeholder, value: value, onChange: onChange, className: `password-input ${hasErrors ? 'error' : ''} password-input--has-icon`, "aria-invalid": hasErrors, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)), hasShowPassword && (jsx(Icon, { name: showPassword ? 'fa-eye-slash' : 'eye', "data-testid": `${name}-${showPassword ? 'hide' : 'show'}-password-icon`, size: "md", onClick: handleShowPassword, className: "toggle-show-password-icon" }))] }), hasErrors && jsx(ErrorList, { errorList: errorList, name: name }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18681
+ };
18682
+
18667
18683
  const StyledAccordion = styled.details `
18668
18684
  summary {
18669
18685
  display: inherit;
@@ -41485,5 +41501,5 @@ const Tooltip = (props) => {
41485
41501
  openOnClick: props.clickToShow, id: props.for, delayShow: props.delayShow, delayHide: props.delayHide, children: props.children })] }));
41486
41502
  };
41487
41503
 
41488
- export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button$2 as Button, allColors as COLORS, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, GlobalStyles, Icon, IconButton, Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio, RadioGroup, Radio$2 as RadioInput, RandomLoadingMessage, Row$1 as Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, typography as TYPOGRAPHY, Table$1 as Table, TextInput, TextTruncate, Toggle, Toggle$1 as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
41504
+ export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button$2 as Button, allColors as COLORS, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, GlobalStyles, Icon, IconButton, Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PasswordInput, PercentageRing, Radio, RadioGroup, Radio$2 as RadioInput, RandomLoadingMessage, Row$1 as Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, typography as TYPOGRAPHY, Table$1 as Table, TextInput, TextTruncate, Textarea, Toggle, Toggle$1 as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
41489
41505
  //# sourceMappingURL=index.esm.js.map