@economic/taco 2.14.0 → 2.14.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/taco",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "Matt Daly <matthew.daly@visma.com>",
6
6
  "homepage": "https://github.com/e-conomic/taco#readme",
@@ -130,5 +130,5 @@
130
130
  "not ie < 11"
131
131
  ]
132
132
  },
133
- "gitHead": "ad107536386f81f44aae647a9764b7b0b6ad924c"
133
+ "gitHead": "f73d08e8f00894bb22e6c0c4cba6e9bf0c0431be"
134
134
  }
package/types.json CHANGED
@@ -17168,7 +17168,7 @@
17168
17168
  },
17169
17169
  {
17170
17170
  "id": 3110,
17171
- "name": "error",
17171
+ "name": "invalid",
17172
17172
  "kind": 32,
17173
17173
  "kindString": "Variable",
17174
17174
  "flags": {
@@ -17349,7 +17349,7 @@
17349
17349
  },
17350
17350
  {
17351
17351
  "id": 3117,
17352
- "name": "error",
17352
+ "name": "invalid",
17353
17353
  "kind": 32,
17354
17354
  "kindString": "Variable",
17355
17355
  "flags": {
@@ -17458,7 +17458,7 @@
17458
17458
  ],
17459
17459
  "name": "ForwardRefExoticComponent"
17460
17460
  },
17461
- "defaultValue": "React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const { disabled, children, error = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]',\n {\n 'text-grey-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {\n 'text-grey-700': !error && !warning,\n 'text-red-500': error,\n 'text-yellow-700': warning && !error,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <span className={messageClassName} role={error ? 'alert' : undefined}>\n {message}\n </span>\n )}\n </label>\n );\n})"
17461
+ "defaultValue": "React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]',\n {\n 'text-grey-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {\n 'text-grey-700': !invalid && !warning,\n 'text-red-500': invalid,\n 'text-yellow-700': warning && !invalid,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <span className={messageClassName} role={invalid ? 'alert' : undefined}>\n {message}\n </span>\n )}\n </label>\n );\n})"
17462
17462
  }
17463
17463
  ],
17464
17464
  "groups": [
@@ -518277,7 +518277,7 @@
518277
518277
  ],
518278
518278
  "name": "ForwardRefExoticComponent"
518279
518279
  },
518280
- "defaultValue": "React.forwardRef<HTMLInputElement, Select2SearchProps>(function ListboxSearch(props, ref) {\n const { ...otherProps } = props;\n const { listboxRef, searchQuery, setSearchQuery, setValidationError, validationError, setOpen } = useSelect2Context();\n\n const handleChange = event => {\n if (validationError) {\n setValidationError(undefined);\n }\n\n setSearchQuery(event.target.value);\n };\n\n const handleKeyDown = event => {\n // space is an aria selection key, so we have to remove it to allow spaces\n if (event.key === ' ') {\n return;\n }\n\n // Select2 should close dropdown and receive focus, when user press Tab while searching (UX requirement to support better keyboard navigation)\n if (event.key === 'Tab') {\n setOpen(false);\n return;\n }\n\n if (isAriaSelectionKey(event) || event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n // forward navigation events onto the underlying collection - we want arrow keys to work from inside the filter input\n listboxRef?.current?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n return;\n }\n };\n\n return (\n <Field\n className={cn('mx-1.5 mb-1.5 !min-h-fit ', { '!pb-0': !validationError })}\n error={!!validationError}\n message={validationError?.message}>\n <Input\n {...otherProps}\n aria-hidden\n autoFocus\n invalid={!!validationError}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n ref={ref}\n value={searchQuery}\n />\n </Field>\n );\n})"
518280
+ "defaultValue": "React.forwardRef<HTMLInputElement, Select2SearchProps>(function ListboxSearch(props, ref) {\n const { ...otherProps } = props;\n const { listboxRef, searchQuery, setSearchQuery, setValidationError, validationError, setOpen } = useSelect2Context();\n\n const handleChange = event => {\n if (validationError) {\n setValidationError(undefined);\n }\n\n setSearchQuery(event.target.value);\n };\n\n const handleKeyDown = event => {\n // space is an aria selection key, so we have to remove it to allow spaces\n if (event.key === ' ') {\n return;\n }\n\n // Select2 should close dropdown and receive focus, when user press Tab while searching (UX requirement to support better keyboard navigation)\n if (event.key === 'Tab') {\n setOpen(false);\n return;\n }\n\n if (isAriaSelectionKey(event) || event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n // forward navigation events onto the underlying collection - we want arrow keys to work from inside the filter input\n listboxRef?.current?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n return;\n }\n };\n\n return (\n <Field\n className={cn('mx-1.5 mb-1.5 !min-h-fit ', { '!pb-0': !validationError })}\n invalid={!!validationError}\n message={validationError?.message}>\n <Input\n {...otherProps}\n aria-hidden\n autoFocus\n invalid={!!validationError}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n ref={ref}\n value={searchQuery}\n />\n </Field>\n );\n})"
518281
518281
  }
518282
518282
  ],
518283
518283
  "groups": [