@purpurds/field-error-text 6.3.1 → 6.4.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.
package/dist/LICENSE.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime");function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var c;function g(){return c||(c=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=u(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)s.call(r,i)&&r[i]&&(t=u(t,this&&this[i]||i));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(p)),p.exports}var y=g();const h=x(y),w={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},
|
|
5
|
+
*/var c;function g(){return c||(c=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=u(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)s.call(r,i)&&r[i]&&(t=u(t,this&&this[i]||i));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(p)),p.exports}var y=g();const h=x(y),w={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},j=h.bind(w),f="purpur-icon",b="md",S=e=>e.filter(s=>Object.keys(s).length>=1).map(s=>`${s.name}="${s.value}"`).join(" "),O=({content:e="",title:s}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},s?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=s?`<title>${s}</title>`:"";return`<svg ${S(n)}>${o}${e}</svg>`},q=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),_=({["data-testid"]:e,svg:s,allyTitle:n,className:o,size:u=b,...r})=>{const t=O({content:q(s.svg),title:n}),i=j(o,f,`${f}--${u}`);return a.jsx("span",{"aria-label":n,className:i,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};_.displayName="Icon";const $={name:"error-filled",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',keywords:["error-filled"],category:"status"};function N(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l={exports:{}};/*!
|
|
6
6
|
Copyright (c) 2018 Jed Watson.
|
|
7
7
|
Licensed under the MIT License (MIT), see
|
|
8
8
|
http://jedwatson.github.io/classnames
|
|
9
|
-
*/var d;function C(){return d||(d=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=u(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)s.call(r,i)&&r[i]&&(t=u(t,i));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(
|
|
9
|
+
*/var d;function C(){return d||(d=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=u(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)s.call(r,i)&&r[i]&&(t=u(t,i));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(l)),l.exports}var M=C();const P=N(M),v={"purpur-field-error-text":"_purpur-field-error-text_1lj7e_1","purpur-field-error-text__icon":"_purpur-field-error-text__icon_1lj7e_11"},m="purpur-field-error-text",T=({["data-testid"]:e,children:s,className:n,relevant:o="additions text",...u})=>a.jsxs("div",{className:P([n,v[m]]),"data-testid":e,"aria-live":"assertive","aria-relevant":o,...u,children:[a.jsx(_,{svg:$,size:"xs",className:v[`${m}__icon`]}),s]});exports.FieldErrorText=T;
|
|
10
10
|
//# sourceMappingURL=field-error-text.cjs.js.map
|
|
@@ -42,7 +42,7 @@ function y() {
|
|
|
42
42
|
}(l)), l.exports;
|
|
43
43
|
}
|
|
44
44
|
var h = y();
|
|
45
|
-
const w = /* @__PURE__ */ g(h),
|
|
45
|
+
const w = /* @__PURE__ */ g(h), j = {
|
|
46
46
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
47
47
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
48
48
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -50,7 +50,7 @@ const w = /* @__PURE__ */ g(h), b = {
|
|
|
50
50
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
51
51
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
52
52
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
53
|
-
},
|
|
53
|
+
}, b = w.bind(j), c = "purpur-icon", S = "md", O = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), $ = ({ content: e = "", title: s } = {}) => {
|
|
54
54
|
const n = [
|
|
55
55
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
56
56
|
{ name: "fill", value: "currentColor" },
|
|
@@ -63,13 +63,13 @@ const w = /* @__PURE__ */ g(h), b = {
|
|
|
63
63
|
svg: s,
|
|
64
64
|
allyTitle: n,
|
|
65
65
|
className: i,
|
|
66
|
-
size: u =
|
|
66
|
+
size: u = S,
|
|
67
67
|
...r
|
|
68
68
|
}) => {
|
|
69
69
|
const t = $({
|
|
70
70
|
content: q(s.svg),
|
|
71
71
|
title: n
|
|
72
|
-
}), o =
|
|
72
|
+
}), o = b(i, c, `${c}--${u}`);
|
|
73
73
|
return /* @__PURE__ */ v(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
@@ -132,8 +132,8 @@ function A() {
|
|
|
132
132
|
}
|
|
133
133
|
var M = A();
|
|
134
134
|
const P = /* @__PURE__ */ C(M), d = {
|
|
135
|
-
"purpur-field-error-text": "_purpur-field-error-
|
|
136
|
-
"purpur-field-error-text__icon": "_purpur-field-error-
|
|
135
|
+
"purpur-field-error-text": "_purpur-field-error-text_1lj7e_1",
|
|
136
|
+
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1lj7e_11"
|
|
137
137
|
}, m = "purpur-field-error-text", T = ({
|
|
138
138
|
["data-testid"]: e,
|
|
139
139
|
children: s,
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._purpur-field-error-
|
|
1
|
+
._purpur-field-error-text_1lj7e_1{font-family:var(--purpur-typography-family-default);font-weight:var(--purpur-typography-weight-normal);font-size:var(--purpur-typography-scale-100);line-height:var(--purpur-typography-line-height-loose);color:var(--purpur-color-text-status-error-strong);display:flex;flex-direction:row;gap:var(--purpur-spacing-50)}._purpur-field-error-text__icon_1lj7e_11{flex-shrink:0;margin-top:var(--purpur-spacing-25);color:var(--purpur-color-text-status-error-medium)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/field-error-text",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/field-error-text.cjs.js",
|
|
6
6
|
"types": "./dist/field-error-text.d.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"source": "src/field-error-text.tsx",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"classnames": "~2.5.0",
|
|
19
|
-
"@purpurds/icon": "6.
|
|
20
|
-
"@purpurds/tokens": "6.
|
|
21
|
-
"@purpurds/paragraph": "6.
|
|
19
|
+
"@purpurds/icon": "6.4.0",
|
|
20
|
+
"@purpurds/tokens": "6.4.0",
|
|
21
|
+
"@purpurds/paragraph": "6.4.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@rushstack/eslint-patch": "~1.10.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@telia/react-rig": "~3.2.0",
|
|
29
29
|
"@testing-library/dom": "~10.4.0",
|
|
30
30
|
"@testing-library/jest-dom": "~6.4.0",
|
|
31
|
-
"@testing-library/react": "~
|
|
31
|
+
"@testing-library/react": "~16.2.0",
|
|
32
32
|
"@types/node": "20.12.12",
|
|
33
33
|
"@types/react-dom": "^19.0.4",
|
|
34
34
|
"@types/react": "^19.0.10",
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: row;
|
|
8
8
|
gap: var(--purpur-spacing-50);
|
|
9
|
-
align-items: center;
|
|
10
9
|
|
|
11
10
|
&__icon {
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
margin-top: var(--purpur-spacing-25);
|
|
12
13
|
color: var(--purpur-color-text-status-error-medium);
|
|
13
|
-
line-height: var(--purpur-typography-line-height-tight);
|
|
14
14
|
}
|
|
15
15
|
}
|