@abgov/jsonforms-components 1.41.1 → 1.41.2

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 (2) hide show
  1. package/index.esm.js +17 -2
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -5140,6 +5140,11 @@ const Anchor = styled.div(_t5$1 || (_t5$1 = _$5`
5140
5140
  text-decoration: underline;
5141
5141
  outline: none;
5142
5142
  cursor: pointer;
5143
+
5144
+ &:focus {
5145
+ outline: 2px solid #0070c4;
5146
+ background-color: #e6f7ff;
5147
+ }
5143
5148
  `));
5144
5149
  styled.div(_t6$1 || (_t6$1 = _$5`
5145
5150
  margin-left: var(--goa-space-m);
@@ -5733,8 +5738,15 @@ const FormStepper = props => {
5733
5738
  children: [jsx(ReviewItemTitle, {
5734
5739
  children: categoryLabel
5735
5740
  }), jsx(Anchor, {
5741
+ tabIndex: readOnly ? -1 : 0,
5736
5742
  onClick: () => setPage(index + 1),
5737
5743
  "data-testid": testId,
5744
+ onKeyDown: e => {
5745
+ if (!readOnly && (e.key === ' ' || e.key === 'Enter')) {
5746
+ e.preventDefault();
5747
+ setPage(index + 1);
5748
+ }
5749
+ },
5738
5750
  children: readOnly ? 'View' : 'Edit'
5739
5751
  })]
5740
5752
  }), jsx(GoAGrid, {
@@ -8106,7 +8118,7 @@ const AddressViews = ({
8106
8118
  data,
8107
8119
  isAlbertaAddress
8108
8120
  }) => {
8109
- var _a;
8121
+ var _a, _b, _c, _d;
8110
8122
  const provinces = [{
8111
8123
  value: 'AB',
8112
8124
  label: 'Alberta'
@@ -8152,6 +8164,7 @@ const AddressViews = ({
8152
8164
  minChildWidth: "0",
8153
8165
  gap: "s",
8154
8166
  children: [jsx(GoAFormItem, {
8167
+ error: ((_a = data === null || data === void 0 ? void 0 : data.addressLine1) === null || _a === void 0 ? void 0 : _a.length) === 0 ? 'addressLine1 is required' : '',
8155
8168
  label: `${isAlbertaAddress ? 'Alberta p' : 'P'}ostal address`,
8156
8169
  children: jsx("p", {
8157
8170
  children: data === null || data === void 0 ? void 0 : data.addressLine1
@@ -8166,11 +8179,13 @@ const AddressViews = ({
8166
8179
  minChildWidth: "0ch",
8167
8180
  gap: "s",
8168
8181
  children: [jsx(GoAFormItem, {
8182
+ error: ((_b = data === null || data === void 0 ? void 0 : data.municipality) === null || _b === void 0 ? void 0 : _b.length) === 0 ? 'city is required' : '',
8169
8183
  label: "City",
8170
8184
  children: jsx("p", {
8171
8185
  children: data === null || data === void 0 ? void 0 : data.city
8172
8186
  })
8173
8187
  }), jsx(GoAFormItem, {
8188
+ error: ((_c = data === null || data === void 0 ? void 0 : data.postalCode) === null || _c === void 0 ? void 0 : _c.length) === 0 ? 'postalCode is required' : '',
8174
8189
  label: "Postal Code",
8175
8190
  children: jsx("p", {
8176
8191
  children: data === null || data === void 0 ? void 0 : data.postalCode
@@ -8186,7 +8201,7 @@ const AddressViews = ({
8186
8201
  children: "Alberta"
8187
8202
  }), !isAlbertaAddress && jsx("div", {
8188
8203
  "data-testid": "address-form-province-view",
8189
- children: (_a = provinces.find(p => p.value === (data === null || data === void 0 ? void 0 : data.province))) === null || _a === void 0 ? void 0 : _a.label
8204
+ children: (_d = provinces.find(p => p.value === (data === null || data === void 0 ? void 0 : data.province))) === null || _d === void 0 ? void 0 : _d.label
8190
8205
  })]
8191
8206
  }), jsx(GoAFormItem, {
8192
8207
  label: "Country",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.41.1",
3
+ "version": "1.41.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",