wjec-one 4.0.6 → 4.0.8

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.
@@ -46,7 +46,7 @@ module.exports = {
46
46
  testEnvironment: 'jsdom',
47
47
  testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
48
48
  transform: {
49
- '^.+\\.tsx?$|wjec-one': 'ts-jest'
49
+ '^.+\\.tsx?$|wjec-one': ['ts-jest', { isolatedModules: true }]
50
50
  },
51
51
  transformIgnorePatterns: ['/node_modules/(?!(wjec-one/*)/)'],
52
52
  reporters: [
package/index.d.ts CHANGED
@@ -521,11 +521,6 @@ type InputProps$1 = {
521
521
  * Determines whether the Input field is subject to user interaction
522
522
  */
523
523
  disabled?: InputHTMLAttributes<HTMLInputElement>['disabled'];
524
- /**
525
- * Determines which area of the relevant CSS grid template the components are assigned to
526
- * @deprecated gridArea has been deprecated because WJEC One components are intended to be layout agnostic
527
- */
528
- gridArea?: string;
529
524
  /**
530
525
  * An SVG component that will be rendered to the left of the Input's content. Usually used to denote the purpose of the input field (for example, an envelope icon for "email address")
531
526
  */
@@ -534,11 +529,6 @@ type InputProps$1 = {
534
529
  * A hint at the type of data expected, so that certain browsers/devices can display the relevant virtual keyboard
535
530
  */
536
531
  inputMode?: InputHTMLAttributes<HTMLInputElement>['inputMode'];
537
- /**
538
- * Determines whether the Input should be rendered in an error state
539
- * @deprecated This prop has been deprecated due to the introduction of the new `status` prop, and is equivalent to `status='error'`
540
- */
541
- invalid?: boolean;
542
532
  /**
543
533
  * The text that will be displayed as the Input's label
544
534
  */
@@ -568,13 +558,6 @@ type InputProps$1 = {
568
558
  * @returns void
569
559
  */
570
560
  onFocus?: () => void;
571
- /**
572
- * A handler that will be invoked when a selection is chosen from the provided `suggestions` list. Provides the select value as the only argument
573
- * @param value A string equal to the value that was selected
574
- * @returns void
575
- * @deprecated This prop has been deprecated because its functionality relies on non-standard implementation and will no longer be invoked. The previous behavior can be replicated by manually matching the `onChange()` value against the provided `suggestions` in the parent component
576
- */
577
- onPickSuggestion?: (value: string) => void;
578
561
  /**
579
562
  * The text that will be displayed as the Input's placeholder when no value is present
580
563
  */
@@ -609,16 +592,6 @@ type InputProps$1 = {
609
592
  * A list of autocomplete suggestions that will be provided when the user interacts with the Input
610
593
  */
611
594
  suggestions?: string[];
612
- /**
613
- * The text that will be displayed if the Input does not satisfy the requirements determined by `required` and/or `validationPattern`
614
- * @deprecated This prop has been deprecated due to the introduction of the new `statusMessage` prop, which functions similarly but is more semantically related to the associated `status` prop
615
- */
616
- validationMessage?: string;
617
- /**
618
- * A string containing a regular expression pattern that will be used to determine the validity of the Input
619
- * @deprecated This prop has been deprecated due to the introduction of the new `status` prop. Validation should now be performed by the parent component, and the appropriate `status` and `statusMessage` values should be explicitly provided
620
- */
621
- validationPattern?: string;
622
595
  /**
623
596
  * A string that will be used as the value of the Input
624
597
  * @default ""
@@ -1169,14 +1142,42 @@ type VerificationCodeInputProps = {
1169
1142
  declare const VerificationCodeInput: WjecOneComponent<VerificationCodeInputProps>;
1170
1143
 
1171
1144
  type Props$6 = {
1145
+ /**
1146
+ * Determines the amount of time in ms before the Information Card closes automatically
1147
+ */
1148
+ /**
1149
+ * Determines the color of the Information Card's border
1150
+ * @default ColorPalette.border
1151
+ */
1172
1152
  borderColor?: CSSProperties['color'];
1153
+ /**
1154
+ * An SVG icon that will be displayed alongside the Information Card's title
1155
+ * @default <InfoCircle />
1156
+ */
1173
1157
  icon?: (props: SVGProps<SVGSVGElement>) => SVGComponent;
1158
+ /**
1159
+ * Determines the color of the Information Card's icon
1160
+ * @default ColorPalette.border
1161
+ */
1174
1162
  iconColor?: CSSProperties['color'];
1175
1163
  id?: string;
1164
+ /** A function that will be executed when the Information Card is closed */
1165
+ onClose?: () => void;
1166
+ /**
1167
+ * Determines whether the Information Card is rendered in an open state
1168
+ * @default true
1169
+ */
1170
+ open?: boolean;
1176
1171
  padding?: CSSProperties['padding'];
1172
+ showCloseIcon?: boolean;
1173
+ /** The title to be displayed at the top of the Information Card */
1177
1174
  title?: string;
1175
+ /**
1176
+ * Determines the color of the Information Card's title
1177
+ * @default ColorPalette.font
1178
+ */
1178
1179
  titleColor?: CSSProperties['color'];
1179
- } & Pick<AriaProperties, 'ariaDescription'>;
1180
+ } & Pick<AriaProperties, 'ariaDescription' | 'ariaCloseLabel'>;
1180
1181
  declare const InformationCard: FC<PropsWithChildren<Props$6>>;
1181
1182
 
1182
1183
  type ErrorCardProps = React$1.ComponentProps<typeof InformationCard>;