@kvdbil/components 17.2.2 → 17.3.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/cjs/components/Accordion/index.js +3 -3
- package/cjs/components/Breadcrumbs/index.js +2 -2
- package/cjs/components/CheckBox/index.js +20 -17
- package/cjs/components/EditRow/index.js +2 -2
- package/cjs/components/Modal/index.js +17 -21
- package/cjs/components/RadioButton/index.js +4 -4
- package/cjs/components/Stepper/index.js +6 -6
- package/cjs/components/StepperAccordion/index.js +17 -17
- package/cjs/components/TextArea/index.js +8 -8
- package/cjs/components/Textfield/index.js +11 -11
- package/cjs/hooks/useNameAndId.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/shared/helpers.js +1 -1
- package/cjs/utils/utils.js +4 -0
- package/esm/components/Accordion/index.js +9 -9
- package/esm/components/Breadcrumbs/index.js +2 -2
- package/esm/components/CheckBox/index.js +21 -18
- package/esm/components/EditRow/index.js +1 -1
- package/esm/components/Modal/index.js +14 -18
- package/esm/components/RadioButton/index.js +19 -19
- package/esm/components/Stepper/index.js +6 -6
- package/esm/components/StepperAccordion/index.js +15 -15
- package/esm/components/TextArea/index.js +14 -14
- package/esm/components/Textfield/index.js +11 -11
- package/esm/hooks/useNameAndId.js +1 -0
- package/esm/index.js +1 -1
- package/esm/shared/helpers.js +1 -1
- package/esm/utils/utils.js +4 -0
- package/package.json +1 -1
- package/package.json.tmp +1 -1
- package/types/components/CheckBox/index.d.ts +1 -1
- package/types/components/RadioButton/index.d.ts +1 -1
- package/types/components/TextArea/index.d.ts +1 -1
- package/types/components/Textfield/index.d.ts +1 -1
- package/types/hooks/useNameAndId.d.ts +4 -0
- package/types/index.d.ts +2 -0
- package/types/shared/helpers.d.ts +1 -1
package/cjs/utils/utils.js
CHANGED
|
@@ -6,4 +6,8 @@
|
|
|
6
6
|
font-family: inherit;
|
|
7
7
|
outline: none;
|
|
8
8
|
padding: 0;
|
|
9
|
+
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
outline: revert;
|
|
12
|
+
}
|
|
9
13
|
`,r=e=>({darker:e.colors.grayscaleNeutral.dark1,dark:e.colors.grayscaleNeutral.dark1,mainAlt:e.colors.grayscaleToned.dark1,main:e.colors.grayscaleToned.dark1,light:e.colors.grayscaleToned.light1,lighter:e.colors.grayscaleToned.light2,lighter2:e.colors.grayscaleToned.light3,lighter3:e.colors.grayscaleToned.light4}),t=["darker","dark","mainAlt","main","light","lighter","lighter2","lighter3"];exports.getDarkerShade=e=>{const r=t.indexOf(e);return r>0?t[r-1]:e},exports.getLighterShade=e=>{const r=t.indexOf(e);return r>=0&&r<t.length-1?t[r+1]:e},exports.getLuminosity=e=>{let r=0,t=0,a=0;return 4===e.length?(r=parseInt("0x"+e[1]+e[1]),t=parseInt("0x"+e[2]+e[2]),a=parseInt("0x"+e[3]+e[3])):7===e.length&&(r=parseInt("0x"+e[1]+e[2]),t=parseInt("0x"+e[3]+e[4]),a=parseInt("0x"+e[5]+e[6])),(Math.max(Number(r/255),Number(t/255),Number(a/255))+Math.min(Number(r/255),Number(t/255),Number(a/255)))/2*100},exports.hexToRGB=(e,r=1)=>`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${r})`,exports.neutralColorSwap=r,exports.resetButtonStyle=e,exports.resolveColorWithNeutral=(e,t)=>"neutral"===t?r(e):e.colors[t];
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as d}from"react/jsx-runtime";import{useState as $}from"react";import r from"styled-components";import{UnmountClosed as u}from"react-collapse";import{mq as x}from"../../shared/media-queries.js";import b from"../../icons/components/ArrowDownIcon.js";import{useNameAndId as w}from"../../hooks/useNameAndId.js";import"../../shared/helpers.js";const k=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
.ReactCollapse--collapse {
|
|
5
5
|
transition: height 300ms;
|
|
6
6
|
}
|
|
7
|
-
`,O=
|
|
7
|
+
`,O=r.ul`
|
|
8
8
|
margin: 0;
|
|
9
9
|
padding: 0;
|
|
10
10
|
list-style: none;
|
|
11
|
-
`,
|
|
11
|
+
`,v=r.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
margin: 0.5rem 0;
|
|
17
|
-
`,
|
|
17
|
+
`,B=r.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
align-items: center;
|
|
@@ -22,30 +22,30 @@ import{jsx as r,jsxs as c}from"react/jsx-runtime";import{useState as u,useRef as
|
|
|
22
22
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
23
23
|
transition: 200ms ease-in-out;
|
|
24
24
|
transform: ${({isOpen:e})=>`rotate(${e?"180deg":"0deg"})`};
|
|
25
|
-
`,
|
|
25
|
+
`,I=r.li`
|
|
26
26
|
border-top: ${({theme:e})=>`1px solid ${e.colors.grayscaleToned.light2}`};
|
|
27
27
|
padding: ${({isOpen:e})=>e?"0.5rem 0 1rem 0":"0.5rem 0"};
|
|
28
28
|
|
|
29
29
|
&:last-child {
|
|
30
30
|
border-bottom: ${({theme:e})=>`1px solid ${e.colors.grayscaleToned.light2}`};
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,N=r.span`
|
|
33
33
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
34
34
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
35
35
|
font-size: 0.9375rem;
|
|
36
36
|
font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
|
|
37
|
-
`,
|
|
37
|
+
`,T=r.div`
|
|
38
38
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
39
39
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
40
40
|
font-size: 0.9375rem;
|
|
41
41
|
font-weight: ${({theme:e})=>e.typography.fontBaseRegularWeight};
|
|
42
42
|
line-height: 1.3;
|
|
43
43
|
transition: 200ms ease-in-out;
|
|
44
|
-
${
|
|
44
|
+
${x("tablet")} {
|
|
45
45
|
padding: 0;
|
|
46
46
|
}
|
|
47
47
|
& > * {
|
|
48
48
|
margin-top: 0;
|
|
49
49
|
margin-bottom: 0;
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`,c=({items:e,...p})=>{const[h,f]=$({}),{id:a}=w("accordion"),s=o=>{f(t=>({...t,[o]:!t[o]}))},g=o=>()=>{s(o)},y=o=>t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),s(o))};return i(k,{...p,children:i(O,{className:"accordionList",children:e.map((o,t)=>{const n=!!h[t],l=`${a}-${t}-header`,m=`${a}-${t}-content`;return d(I,{isOpen:n,className:"accordionItem",children:[d(v,{id:l,onClick:g(t),onKeyDown:y(t),className:"accordionItemTitle",role:"button",tabIndex:0,"aria-expanded":n,"aria-controls":m,children:[i(N,{as:"span",children:o.title}),i(B,{isOpen:n,children:i(b,{})})]}),i(u,{isOpened:n,children:i(T,{id:m,"aria-labelledby":l,role:"region",className:"wysiwyg",dangerouslySetInnerHTML:{__html:o.text}})},t)]},o.title)})})})};export{c as Accordion,c as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import m from"styled-components";import p from"./BreadcrumbsItem.js";import l from"../../icons/components/NextIcon.js";import{useNameAndId as d}from"../../hooks/useNameAndId.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";import"react";import"../../shared/helpers.js";const s=m.ol`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
padding: 0;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
`,
|
|
7
|
+
`,c=({links:a,separator:e=r(l,{}),onlyLastTruncated:i=!1})=>{const{id:o}=d("breadcrumb");return r("nav",{"aria-label":"Breadcrumb",id:o,children:r(s,{children:a.map((n,t)=>r(p,{link:n,separator:e,isLast:t===a.length-1,onlyLastTruncated:i},`${o}-${t}`))})})};export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as u,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled-components";import f from"../../icons/components/CheckmarkIcon.js";import i from"../../theme.js";import{BodyText as $}from"../../typography/BodyText/index.js";import{BackgroundStyles as k}from"../IconButton.js";import{useNameAndId as v}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";import"../../utils/utils.js";import"react";import"../../shared/helpers.js";const y=r`
|
|
2
2
|
width: 24px;
|
|
3
3
|
height: 24px;
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import{jsxs as m,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
|
|
|
6
6
|
width: 15px;
|
|
7
7
|
height: 15px;
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,z=r`
|
|
10
10
|
width: 32px;
|
|
11
11
|
height: 32px;
|
|
12
12
|
|
|
@@ -14,10 +14,10 @@ import{jsxs as m,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
|
|
|
14
14
|
width: 22px;
|
|
15
15
|
height: 22px;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,b={regular:y,large:z},D=r`
|
|
18
18
|
cursor: default;
|
|
19
19
|
border: 2px solid ${i.colors.grayscaleToned.light2};
|
|
20
|
-
`,
|
|
20
|
+
`,S=(e,o)=>r`
|
|
21
21
|
svg {
|
|
22
22
|
opacity: 1;
|
|
23
23
|
}
|
|
@@ -27,17 +27,17 @@ import{jsxs as m,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
|
|
|
27
27
|
|
|
28
28
|
background: ${i.colors[e][o]};
|
|
29
29
|
border: 2px solid ${i.colors[e][o]};
|
|
30
|
-
`,
|
|
30
|
+
`,w=r`
|
|
31
31
|
background: ${i.colors.grayscaleToned.light2};
|
|
32
32
|
z-index: 1;
|
|
33
|
-
`,
|
|
33
|
+
`,C=r`
|
|
34
34
|
border: 2px solid ${i.colors.error.dark};
|
|
35
|
-
`,
|
|
35
|
+
`,T=a.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: flex-start;
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
position: relative;
|
|
40
|
-
`,
|
|
40
|
+
`,j=a.input.attrs({type:"checkbox"})`
|
|
41
41
|
position: absolute;
|
|
42
42
|
appearance: none;
|
|
43
43
|
width: 100%;
|
|
@@ -47,14 +47,17 @@ import{jsxs as m,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
|
|
|
47
47
|
outline: none;
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
z-index: 1;
|
|
50
|
-
${e=>
|
|
50
|
+
${e=>b[e.boxSize]};
|
|
51
51
|
|
|
52
52
|
&:hover,
|
|
53
53
|
&:focus {
|
|
54
54
|
transition: background-color 400ms;
|
|
55
|
-
${
|
|
55
|
+
${k}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
&:focus-visible {
|
|
58
|
+
outline: revert;
|
|
59
|
+
}
|
|
60
|
+
`,B=a.span`
|
|
58
61
|
box-sizing: border-box;
|
|
59
62
|
cursor: pointer;
|
|
60
63
|
display: flex;
|
|
@@ -65,21 +68,21 @@ import{jsxs as m,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
|
|
|
65
68
|
|
|
66
69
|
border: 2px solid ${i.colors.grayscaleToned.dark5};
|
|
67
70
|
|
|
68
|
-
${e=>
|
|
71
|
+
${e=>b[e.size]};
|
|
69
72
|
|
|
70
73
|
svg {
|
|
71
74
|
opacity: 0;
|
|
72
75
|
color: ${({theme:e})=>e.colors.common.white};
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
${e=>e.isChecked&&
|
|
76
|
-
${e=>e.isDisabled&&
|
|
77
|
-
${e=>e.hasError&&
|
|
78
|
-
${e=>e.isChecked&&e.isDisabled&&
|
|
79
|
-
`,
|
|
78
|
+
${e=>e.isChecked&&S(e.$color,e.$colorShade)};
|
|
79
|
+
${e=>e.isDisabled&&D};
|
|
80
|
+
${e=>e.hasError&&C};
|
|
81
|
+
${e=>e.isChecked&&e.isDisabled&&w};
|
|
82
|
+
`,E=a($)`
|
|
80
83
|
flex: 1;
|
|
81
84
|
cursor: ${({isDisabled:e})=>e?"default":"pointer"};
|
|
82
85
|
user-select: none;
|
|
83
86
|
color: ${({theme:e,isDisabled:o})=>o?e.colors.text.disabled:e.colors.text.dark};
|
|
84
87
|
margin-left: 0.5rem;
|
|
85
|
-
`,
|
|
88
|
+
`,m=({name:e,isDisabled:o=!1,size:d="regular",checked:l=!1,color:c="secondary",colorShade:n="mainAlt",hasError:h=!1,label:t,...g})=>{const{name:p,id:x}=v("check-box",e);return u(T,{children:[s(j,{...g,type:"checkbox",checked:l,"data-validate":"checked",name:p,id:x,$color:c,$colorShade:n,disabled:o,isDisabled:o,boxSize:d,"aria-label":t?void 0:p,"aria-checked":l,"aria-invalid":h||void 0}),s(B,{size:d,$color:c,$colorShade:n,isChecked:l,isDisabled:o,hasError:h,children:s(f,{})}),t&&s(E,{as:"label",htmlFor:x,isDisabled:o,children:t})]})};export{m as CheckBox,m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as m,Fragment as Q,jsx as t}from"react/jsx-runtime";import{useState as s,useEffect as R}from"react";import i from"styled-components";import v from"../../theme.js";import{BodyLink as U,BodyText as V}from"../../typography/BodyText/index.js";import{Button as f}from"../Button/index.js";import{Chip as W}from"../Chip/index.js";import{TextField as X}from"../Textfield/index.js";import"../../shared/media-queries.js";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";import"../../icons/components/CloseIcon.js";import"../Chip/styles.js";import"../FieldLabel.js";import"../../shared/helpers.js";const Y=i.div`
|
|
1
|
+
import{jsxs as m,Fragment as Q,jsx as t}from"react/jsx-runtime";import{useState as s,useEffect as R}from"react";import i from"styled-components";import v from"../../theme.js";import{BodyLink as U,BodyText as V}from"../../typography/BodyText/index.js";import{Button as f}from"../Button/index.js";import{Chip as W}from"../Chip/index.js";import{TextField as X}from"../Textfield/index.js";import"../../shared/media-queries.js";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";import"../../icons/components/CloseIcon.js";import"../Chip/styles.js";import"../FieldLabel.js";import"../../hooks/useNameAndId.js";import"../../shared/helpers.js";const Y=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
border-bottom: 1px solid ${v.colors.grayscaleToned.light5};
|
|
4
4
|
`,Z=i.form`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as n,Fragment as b}from"react/jsx-runtime";import{useEffect as g}from"react";import{createPortal as y}from"react-dom";import{CSSTransition as v}from"react-transition-group";import e,{css as k,createGlobalStyle as d}from"styled-components";import T from"../../icons/components/CloseIcon.js";import{resetButtonStyle as E}from"../../utils/utils.js";import{FocusTrap as C}from"../FocusTrap.js";const s=k`
|
|
2
2
|
.backgroundTransition-enter {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
@@ -24,16 +24,20 @@ import{jsx as t,jsxs as r,Fragment as w}from"react/jsx-runtime";import{useEffect
|
|
|
24
24
|
top: 0;
|
|
25
25
|
left: 0;
|
|
26
26
|
z-index: 200;
|
|
27
|
+
`,j=e.div`
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
27
33
|
`,P=e.div`
|
|
28
34
|
z-index: -1;
|
|
29
35
|
position: absolute;
|
|
30
36
|
width: 100%;
|
|
31
37
|
height: 100%;
|
|
32
38
|
background-color: rgba(34, 34, 34, 0.3);
|
|
33
|
-
|
|
39
|
+
`,z=e.div`
|
|
34
40
|
position: relative;
|
|
35
|
-
max-width: 512px;
|
|
36
|
-
max-height: 90vh;
|
|
37
41
|
overflow-y: auto;
|
|
38
42
|
|
|
39
43
|
padding: 1rem;
|
|
@@ -45,17 +49,9 @@ import{jsx as t,jsxs as r,Fragment as w}from"react/jsx-runtime";import{useEffect
|
|
|
45
49
|
0px 11px 15px rgba(0, 0, 0, 0.15);
|
|
46
50
|
|
|
47
51
|
margin: 1rem;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
margin-right: 1rem;
|
|
52
|
-
|
|
53
|
-
@media (min-width: 500px) {
|
|
54
|
-
margin-left: auto;
|
|
55
|
-
margin-right: auto;
|
|
56
|
-
min-width: 355px;
|
|
57
|
-
}
|
|
58
|
-
`,j=e.button`
|
|
52
|
+
width: 80vw;
|
|
53
|
+
max-width: 512px;
|
|
54
|
+
`,F=e.button`
|
|
59
55
|
${E}
|
|
60
56
|
display: flex;
|
|
61
57
|
justify-self: flex-end;
|
|
@@ -71,7 +67,7 @@ import{jsx as t,jsxs as r,Fragment as w}from"react/jsx-runtime";import{useEffect
|
|
|
71
67
|
svg {
|
|
72
68
|
font-size: 1.5rem;
|
|
73
69
|
}
|
|
74
|
-
`,
|
|
70
|
+
`,O=d`
|
|
75
71
|
body {
|
|
76
72
|
overflow: hidden;
|
|
77
73
|
|
|
@@ -79,6 +75,6 @@ import{jsx as t,jsxs as r,Fragment as w}from"react/jsx-runtime";import{useEffect
|
|
|
79
75
|
padding-right: 15px !important;
|
|
80
76
|
`}
|
|
81
77
|
}
|
|
82
|
-
`,
|
|
78
|
+
`,L=d`
|
|
83
79
|
${s}
|
|
84
|
-
`,
|
|
80
|
+
`,c=({children:l,isOpen:o,contentStyles:p,withPortal:u=!1,withCloseIcon:m=!0,onClose:i,focusTrapProps:f={},...w})=>{g(()=>{const a=x=>{x.key==="Escape"&&o&&i()};return o&&window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[i,o]);const h=!!(typeof window<"u"&&window.document&&window.document.createElement),r=t(v,{in:o,mountOnEnter:!0,unmountOnExit:!0,timeout:400,classNames:"backgroundTransition",children:n(b,{children:[t(L,{}),n(S,{...w,children:[t(P,{"data-testid":"background",onClick:i}),t(C,{pause:!o,...f,children:t(j,{children:n(z,{style:p,role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[m&&t(F,{onClick:i,"data-testid":"close",type:"button","aria-label":"Close dialog",children:t(T,{})}),l]})})}),t(O,{})]})]})});return u&&h?y(r,document.body):r};export{c as Modal,c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as m,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled-components";import e from"../../theme.js";import{BodyText as x}from"../../typography/BodyText/index.js";import{BackgroundStyles as f}from"../IconButton.js";import{useNameAndId as k}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";import"../../utils/utils.js";import"react";import"../../shared/helpers.js";const y=a`
|
|
2
2
|
.circle {
|
|
3
3
|
&--outer {
|
|
4
4
|
height: 24px;
|
|
@@ -11,7 +11,7 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled
|
|
|
11
11
|
transform: scale(0.6);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,D=a`
|
|
15
15
|
.circle {
|
|
16
16
|
&--outer {
|
|
17
17
|
height: 32px;
|
|
@@ -24,7 +24,7 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled
|
|
|
24
24
|
transform: scale(0.6);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,u={regular:y,large:D},z=a`
|
|
28
28
|
cursor: default;
|
|
29
29
|
|
|
30
30
|
.circle {
|
|
@@ -36,14 +36,14 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled
|
|
|
36
36
|
border: 2px solid ${e.colors.grayscaleToned.light2};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,v=a`
|
|
40
40
|
.circle {
|
|
41
41
|
&--inner {
|
|
42
42
|
opacity: 1;
|
|
43
43
|
background-color: ${e.colors.grayscaleToned.light2};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`,S=(r,o,s)=>a`
|
|
47
47
|
.circle {
|
|
48
48
|
&--inner {
|
|
49
49
|
opacity: 1;
|
|
@@ -52,48 +52,48 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled
|
|
|
52
52
|
|
|
53
53
|
&--outer {
|
|
54
54
|
border: 2px solid
|
|
55
|
-
${
|
|
55
|
+
${s?e.colors.error.dark:e.colors[r][o]};
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,E=i.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: flex-start;
|
|
61
61
|
box-sizing: border-box;
|
|
62
|
-
`,
|
|
62
|
+
`,N=i.span`
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
display: flex;
|
|
65
65
|
position: relative;
|
|
66
66
|
align-items: center;
|
|
67
67
|
justify-content: center;
|
|
68
68
|
|
|
69
|
-
${r=>
|
|
69
|
+
${r=>u[r.size]};
|
|
70
70
|
|
|
71
|
-
${r=>!r.isDisabled&&r.isChecked&&
|
|
72
|
-
${r=>r.isDisabled&&
|
|
71
|
+
${r=>!r.isDisabled&&r.isChecked&&S(r.$color,r.$colorShade,r.$hasError)};
|
|
72
|
+
${r=>r.isDisabled&&z};
|
|
73
73
|
|
|
74
|
-
${r=>r.isChecked&&r.isDisabled&&
|
|
74
|
+
${r=>r.isChecked&&r.isDisabled&&v};
|
|
75
75
|
|
|
76
76
|
&:hover,
|
|
77
77
|
&:focus {
|
|
78
78
|
border-radius: 50%;
|
|
79
79
|
transition: background-color 400ms;
|
|
80
|
-
${
|
|
80
|
+
${f}
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`,T=i.input`
|
|
83
83
|
position: absolute;
|
|
84
84
|
opacity: 0;
|
|
85
85
|
margin: 0;
|
|
86
86
|
${r=>!r.isDisabled&&"cursor: pointer;"}
|
|
87
87
|
z-index: 1;
|
|
88
|
-
${r=>
|
|
89
|
-
`,
|
|
88
|
+
${r=>u[r.$size]};
|
|
89
|
+
`,w=i.span`
|
|
90
90
|
display: flex;
|
|
91
91
|
box-sizing: border-box;
|
|
92
92
|
border-radius: 50%;
|
|
93
93
|
|
|
94
94
|
border: 2px solid
|
|
95
95
|
${r=>r.$hasError?e.colors.error.dark:e.colors.grayscaleToned.dark5};
|
|
96
|
-
`,
|
|
96
|
+
`,B=i.span`
|
|
97
97
|
box-sizing: border-box;
|
|
98
98
|
opacity: 0;
|
|
99
99
|
margin: auto;
|
|
@@ -102,9 +102,9 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled
|
|
|
102
102
|
position: absolute;
|
|
103
103
|
top: 0;
|
|
104
104
|
left: 0;
|
|
105
|
-
`,
|
|
105
|
+
`,C=i(x)`
|
|
106
106
|
cursor: ${({isDisabled:r})=>r?"default":"pointer"};
|
|
107
107
|
user-select: none;
|
|
108
108
|
color: ${({theme:r,isDisabled:o})=>o?r.colors.text.disabled:r.colors.text.dark};
|
|
109
109
|
margin-left: 0.5rem;
|
|
110
|
-
`,
|
|
110
|
+
`,g=({name:r,size:o="regular",checked:s=!1,isDisabled:l=!1,color:n="secondary",colorShade:h="mainAlt",label:t,hasError:d,...$})=>{const{name:b,id:p}=k("radio-button",r);return m(E,{children:[m(N,{size:o,$color:n,$colorShade:h,isChecked:s,isDisabled:l,$hasError:d,children:[c(T,{"data-validate":"checked",checked:s,type:"radio",name:b,id:p,disabled:l,"aria-label":t?void 0:b,"aria-checked":s,"aria-invalid":d||void 0,className:"circle circle--outer",$size:o,isDisabled:l,$color:n,$colorShade:h,...$}),c(w,{className:"circle circle--outer",$hasError:d,children:c(B,{className:"circle circle--inner"})})]}),t&&c(C,{as:"label",htmlFor:p,isDisabled:l,children:t})]})};export{g as RadioButton,g as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{jsx as a,jsxs as
|
|
1
|
+
import{jsx as a,jsxs as x}from"react/jsx-runtime";import t from"styled-components";import{TinyTitleRegular as f}from"../../typography/Heading/index.js";import H from"../../icons/components/CheckmarkIcon.js";import{useNameAndId as b}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";import"react";import"../../shared/helpers.js";const S=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${({isHorizontal:e})=>e?"row":"column"};
|
|
4
4
|
min-height: 4rem;
|
|
5
5
|
margin: 0 auto;
|
|
6
|
-
`,
|
|
6
|
+
`,v=t.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: ${({isHorizontal:e})=>e?"column":"row"};
|
|
9
9
|
column-gap: 0.75rem;
|
|
@@ -42,7 +42,7 @@ import{jsx as a,jsxs as f}from"react/jsx-runtime";import{useRef as x}from"react"
|
|
|
42
42
|
height: ${({isHorizontal:e,$size:i})=>e?"2px":`calc(50% - ${i/2}rem)`};
|
|
43
43
|
background: ${({theme:e,$color:i,$colorShade:o})=>e.colors[i][o]};
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,w=t.div``,y=t.div`
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
48
|
justify-content: center;
|
|
@@ -55,9 +55,9 @@ import{jsx as a,jsxs as f}from"react/jsx-runtime";import{useRef as x}from"react"
|
|
|
55
55
|
${({theme:e,isFilled:i,$color:o,$colorShade:c})=>i&&`
|
|
56
56
|
background-color: ${e.colors[o][c]};
|
|
57
57
|
`}
|
|
58
|
-
`,
|
|
58
|
+
`,k=t(f)`
|
|
59
59
|
font-size: ${({size:e})=>`${e/2}rem`};
|
|
60
60
|
line-height: 1;
|
|
61
|
-
`,
|
|
61
|
+
`,j=t(H)`
|
|
62
62
|
font-size: ${({size:e})=>`calc(${e/2}rem + 6px)`};
|
|
63
|
-
`,
|
|
63
|
+
`,A=({children:e,orientation:i="vertical",variant:o="solid",color:c="primary",colorShade:p="mainAlt",size:n=2,activeStep:l,ariaLabels:s={},...m})=>{const h=e.length,d=i==="horizontal",{id:z}=b("stepper");return a(S,{isHorizontal:d,...m,role:"list","aria-Label":s?.list??"Step progress",children:e.map((u,r)=>{const $=l&&r<l,g=$||o==="solid";return x(v,{$color:c,$colorShade:p,$size:n,stepsNumber:h,isHorizontal:d,role:"listitem","aria-disabled":$?"true":void 0,"aria-current":l===r?"step":void 0,"aria-Label":(l===void 0?`${s?.step??"Step %s"}`:(l===r&&`${s?.stepCurrent??"Current step, step %s"}`,$&&`${s?.stepDone??"Completed step, step %s"}`,`${s?.stepUpcoming??"Upcoming step, step %s"}`)).replaceAll("%s",String(r+1)),children:[a(w,{children:a(y,{$color:c,$colorShade:p,isFilled:g,size:n,role:"img",children:$?a(j,{size:n,"aria-hidden":"true"}):a(k,{as:"span",size:n,"aria-hidden":"true",children:r+1})})}),u]},`${z}-${r}`)})})};export{A as Stepper};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{jsxs as u,jsx as t}from"react/jsx-runtime";import{useState as z,
|
|
1
|
+
import{jsxs as u,jsx as t}from"react/jsx-runtime";import{useState as z,useCallback as I,useEffect as K}from"react";import s,{css as n}from"styled-components";import l from"../../theme.js";import{Title as A}from"../../typography/Heading/index.js";import{fadedColor as d}from"../../shared/helpers.js";import{Collapse as B}from"react-collapse";import F from"../../icons/components/CheckmarkIcon.js";import O from"../../icons/components/ShowMoreIcon.js";import{useNameAndId as T}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";const c="200ms",L=s.div`
|
|
2
2
|
.ReactCollapse--collapse {
|
|
3
3
|
transition: height ${c} ease-in-out;
|
|
4
4
|
}
|
|
5
|
-
`,N=
|
|
5
|
+
`,N=n`
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
|
-
`,
|
|
7
|
+
`,R=s.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
height: 4rem;
|
|
11
11
|
|
|
12
12
|
color: ${e=>e.$isDisabled?l.colors.text.disabled:l.colors.text.dark};
|
|
13
|
-
`,
|
|
13
|
+
`,_=s(A)`
|
|
14
14
|
margin: 0;
|
|
15
|
-
`,
|
|
15
|
+
`,q=s(O)`
|
|
16
16
|
font-size: 2rem;
|
|
17
17
|
margin-left: auto;
|
|
18
18
|
|
|
@@ -20,18 +20,18 @@ import{jsxs as u,jsx as t}from"react/jsx-runtime";import{useState as z,useRef as
|
|
|
20
20
|
transform: rotate(0deg);
|
|
21
21
|
transform-origin: center;
|
|
22
22
|
${e=>e.isExpanded&&N};
|
|
23
|
-
`,
|
|
23
|
+
`,G=(e,r)=>n`
|
|
24
24
|
color: white;
|
|
25
|
-
background-color: ${l.colors[e][
|
|
26
|
-
`,
|
|
25
|
+
background-color: ${l.colors[e][r]};
|
|
26
|
+
`,H=(e,r,o)=>n`
|
|
27
27
|
fill: white;
|
|
28
|
-
border: 2px solid ${d(l.colors[
|
|
28
|
+
border: 2px solid ${d(l.colors[r][o],.2)};
|
|
29
29
|
|
|
30
30
|
${e&&`
|
|
31
|
-
border: 2px solid ${d(l.colors[
|
|
32
|
-
background-color: ${d(l.colors[
|
|
31
|
+
border: 2px solid ${d(l.colors[r][o],0)};
|
|
32
|
+
background-color: ${d(l.colors[r][o],.5)};
|
|
33
33
|
`}
|
|
34
|
-
`,J=
|
|
34
|
+
`,J=s.div`
|
|
35
35
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
@@ -61,6 +61,6 @@ import{jsxs as u,jsx as t}from"react/jsx-runtime";import{useState as z,useRef as
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
transition: background-color ${c};
|
|
64
|
-
${e=>e.isComplete&&
|
|
65
|
-
${e=>e.isDisabled&&
|
|
66
|
-
`,x=({step:e,isExpanded:
|
|
64
|
+
${e=>e.isComplete&&G(e.$color,e.$colorShade)};
|
|
65
|
+
${e=>e.isDisabled&&H(e.isComplete,e.$color,e.$colorShade)};
|
|
66
|
+
`,x=({step:e,isExpanded:r,isDisabled:o,isComplete:m,onClick:y,color:C,colorShade:k,title:v,children:D,closedChildren:p,...S})=>{const[a,f]=z(r||!1),{id:h}=T("stepper"),$=I(()=>{o||f(i=>!i)},[o]);K(()=>{f(r||!1)},[o,r]);const w=e||e===0,E=i=>{o||(y||$)(i)},j=i=>{(i.key==="Enter"||i.key===" ")&&!o&&(i.preventDefault(),$())},g=`${h}-header`,b=`${h}-content`;return u(L,{children:[u(R,{...S,id:g,onClick:E,onKeyDown:j,$isDisabled:o||!1,role:"button",tabIndex:0,"aria-expanded":a,"aria-controls":b,children:[w&&t(J,{isComplete:m||!1,isDisabled:o||!1,$color:C||"primary",$colorShade:k||"main",children:m?t(F,{}):t("span",{children:e})}),t(_,{children:v}),t(q,{isExpanded:a})]}),t(B,{isOpened:a,children:t("div",{id:b,role:"region","aria-labelledby":g,children:D})}),p&&p]})};export{x as StepperAccordion,x as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{jsxs as h,jsx as i,Fragment as
|
|
1
|
+
import{jsxs as h,jsx as i,Fragment as B}from"react/jsx-runtime";import{useState as E}from"react";import l,{css as $}from"styled-components";import r from"../../theme.js";import{Label as j}from"../FieldLabel.js";import{BodyTextStyle as N,CaptionStyle as S}from"../../typography/BodyText/index.js";import{useNameAndId as w}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";import"../../shared/helpers.js";const A=$`
|
|
2
2
|
border: 1px solid ${r.colors.grayscaleToned.light1};
|
|
3
3
|
color: ${r.colors.grayscaleToned.dark1};
|
|
4
4
|
fill: ${r.colors.grayscaleToned.light1};
|
|
5
|
-
`,
|
|
5
|
+
`,I=$`
|
|
6
6
|
border: 1px solid ${r.colors.error.dark};
|
|
7
|
-
`,
|
|
7
|
+
`,C=$`
|
|
8
8
|
color: ${r.colors.text.dark};
|
|
9
9
|
border: 1px solid ${r.colors.text.dark};
|
|
10
10
|
fill: ${r.colors.text.dark};
|
|
11
|
-
`,
|
|
11
|
+
`,L=l.div`
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 0;
|
|
14
14
|
display: inline-block;
|
|
15
|
-
`,
|
|
15
|
+
`,D=l.div`
|
|
16
16
|
display: inline-black;
|
|
17
17
|
|
|
18
18
|
color: ${r.colors.grayscaleToned.light1};
|
|
@@ -24,11 +24,11 @@ import{jsxs as h,jsx as i,Fragment as z}from"react/jsx-runtime";import{useState
|
|
|
24
24
|
|
|
25
25
|
padding: 0.7rem 0.75rem;
|
|
26
26
|
|
|
27
|
-
${({hasError:e,isFocused:a})=>!e&&a&&
|
|
28
|
-
${({disabled:e})=>e&&
|
|
29
|
-
${({hasError:e})=>e&&
|
|
27
|
+
${({hasError:e,isFocused:a})=>!e&&a&&C}
|
|
28
|
+
${({disabled:e})=>e&&A}
|
|
29
|
+
${({hasError:e})=>e&&I}
|
|
30
30
|
${({centered:e})=>e&&"text-align: center;"}
|
|
31
|
-
`,
|
|
31
|
+
`,H=l.textarea`
|
|
32
32
|
${N}
|
|
33
33
|
|
|
34
34
|
width: 100%;
|
|
@@ -38,17 +38,17 @@ import{jsxs as h,jsx as i,Fragment as z}from"react/jsx-runtime";import{useState
|
|
|
38
38
|
background-color: transparent;
|
|
39
39
|
|
|
40
40
|
${({resize:e})=>!e&&"resize: none;"}
|
|
41
|
-
`,I=l.div`
|
|
42
|
-
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
43
41
|
`,P=l.div`
|
|
42
|
+
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
43
|
+
`,V=l.div`
|
|
44
44
|
${S}
|
|
45
45
|
margin-top: 0.25rem;
|
|
46
46
|
|
|
47
47
|
${({centered:e})=>e&&"width: 100%; text-align: center;"}
|
|
48
|
-
`,
|
|
48
|
+
`,W=l.span`
|
|
49
49
|
display: block;
|
|
50
50
|
color: ${({theme:e})=>e.colors.text.disabled};
|
|
51
|
-
`,
|
|
51
|
+
`,q=l.span`
|
|
52
52
|
display: block;
|
|
53
53
|
color: ${({theme:e})=>e.colors.error.dark};
|
|
54
|
-
`,u=({placeholder:e="",isDisabled:a=!1,centered:m=!1,hasError:
|
|
54
|
+
`,u=({placeholder:e="",isDisabled:a=!1,centered:m=!1,hasError:b=!1,className:y,helperText:t,label:d="",resize:k=!0,name:v,errors:s,...n})=>{const[p,g]=E(!1),T=!!n.value,{name:x,id:o}=w("textarea",v),F=s?.map((f,c)=>`${o}-error-${c}`)??[],z=[t?`${o}-helper`:null,...F].filter(Boolean).join(" ");return h(L,{className:y,children:[h(D,{isFocused:p,disabled:a,centered:m,hasError:b,hasPlaceholder:!!e,children:[i(H,{...n,id:o,name:x,"aria-label":d?void 0:x,"aria-describedby":z||void 0,"aria-invalid":!!s?.length,resize:k,onFocus:()=>g(!0),onBlur:()=>g(!1),disabled:a,tabIndex:a?-1:0,theme:r,placeholder:d&&!p?"":e}),n.suffix&&i(P,{children:n.suffix})]}),d&&i(j,{htmlFor:o,isFocused:p,centered:m,hasError:b,hasValue:T,disabled:a,theme:r,children:h(B,{children:[d,i("span",{})]})}),(t||s)&&h(V,{centered:m,children:[t&&i(W,{id:`${o}-helper`,children:t}),s&&s.map((f,c)=>i(q,{id:`${o}-error-${c}`,role:"alert","aria-live":"assertive",children:f},`${o}-error-${c}`))]})]})};export{u as TextArea,u as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{jsxs as c,jsx as t,Fragment as
|
|
1
|
+
import{jsxs as c,jsx as t,Fragment as z}from"react/jsx-runtime";import{useState as I}from"react";import o,{css as $}from"styled-components";import{Label as R}from"../FieldLabel.js";import{BodyTextStyle as V,CaptionStyle as q}from"../../typography/BodyText/index.js";import{useNameAndId as C}from"../../hooks/useNameAndId.js";import"../../shared/media-queries.js";import"../../shared/helpers.js";const D=$`
|
|
2
2
|
border: 1px solid ${({theme:e})=>e.colors.grayscaleToned.light2};
|
|
3
3
|
color: ${({theme:e})=>e.colors.text.disabled};
|
|
4
4
|
fill: ${({theme:e})=>e.colors.text.disabled};
|
|
5
|
-
`,D=$`
|
|
6
|
-
border: 2px solid ${({theme:e})=>e.colors.error.dark};
|
|
7
5
|
`,G=$`
|
|
6
|
+
border: 2px solid ${({theme:e})=>e.colors.error.dark};
|
|
7
|
+
`,H=$`
|
|
8
8
|
border: 2px solid ${({theme:e})=>e.colors.grayscaleToned.dark5};
|
|
9
9
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
10
10
|
fill: ${({theme:e})=>e.colors.text.dark};
|
|
11
|
-
`,
|
|
11
|
+
`,L=o.div`
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 0;
|
|
14
14
|
display: block;
|
|
15
|
-
`,
|
|
15
|
+
`,M=o.div`
|
|
16
16
|
display: flex;
|
|
17
17
|
text-align: center;
|
|
18
18
|
align-items: center;
|
|
@@ -26,11 +26,11 @@ import{jsxs as c,jsx as t,Fragment as A}from"react/jsx-runtime";import{useState
|
|
|
26
26
|
|
|
27
27
|
padding: 0.75rem 0.6rem;
|
|
28
28
|
|
|
29
|
-
${({hasError:e,isFocused:a})=>!e&&a&&
|
|
30
|
-
${({disabled:e})=>e&&
|
|
31
|
-
${({hasError:e})=>e&&
|
|
29
|
+
${({hasError:e,isFocused:a})=>!e&&a&&H}
|
|
30
|
+
${({disabled:e})=>e&&D}
|
|
31
|
+
${({hasError:e})=>e&&G}
|
|
32
32
|
${({centered:e})=>e&&"text-align: center;"}
|
|
33
|
-
`,
|
|
33
|
+
`,O=o.input`
|
|
34
34
|
${V}
|
|
35
35
|
width: 100%;
|
|
36
36
|
cursor: text;
|
|
@@ -42,7 +42,7 @@ import{jsxs as c,jsx as t,Fragment as A}from"react/jsx-runtime";import{useState
|
|
|
42
42
|
color: ${({theme:e})=>e.colors.text.disabled};
|
|
43
43
|
fill: ${({theme:e})=>e.colors.text.disabled};
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,P=o.span`
|
|
46
46
|
display: flex;
|
|
47
47
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
48
48
|
font-size: 1.25rem;
|
|
@@ -63,4 +63,4 @@ import{jsxs as c,jsx as t,Fragment as A}from"react/jsx-runtime";import{useState
|
|
|
63
63
|
`,K=o.span`
|
|
64
64
|
display: block;
|
|
65
65
|
color: ${({theme:e})=>e.colors.error.dark};
|
|
66
|
-
`,
|
|
66
|
+
`,g=({placeholder:e="",isDisabled:a=!1,centered:m=!1,hasError:h=!1,className:y,helperText:s,label:d="",onBlur:k=()=>null,onFocus:v=()=>null,forwardRef:F,suffix:f,name:B,errors:i,isAutoFocused:T=!1,...u})=>{const[p,x]=I(!1),w=!!u.value,b=i&&Array.isArray(i)&&i?.length>0,{name:E,id:r}=C("text-input",B),j=i?.map((l,n)=>`${r}-error-${n}`)??[],A=[s?`${r}-helper`:null,...j].filter(Boolean).join(" "),N=l=>{x(!0),v(l)},S=l=>{x(!1),k(l)};return c(L,{className:y,children:[c(M,{isFocused:p,disabled:a,centered:m,hasError:h,hasPlaceholder:!!e,children:[t(O,{...u,id:r,name:E,"aria-labelledby":d?`${r}-label`:void 0,"aria-describedby":A||void 0,"aria-invalid":b||h,ref:F,onFocus:N,onBlur:S,disabled:a,placeholder:d&&!p?"":e,autoFocus:T}),f&&t(P,{children:f})]}),d&&t(R,{id:`${r}-label`,htmlFor:r,isFocused:p,centered:m,hasError:h,hasValue:w,disabled:a,children:c(z,{children:[d,t("span",{})]})}),(s||b)&&c(_,{centered:m,children:[s&&t(J,{id:`${r}-helper`,children:s}),b&&i.map((l,n)=>t(K,{id:`${r}-error-${n}`,role:"alert","aria-live":"assertive",children:l},`${r}-error-${n}`))]})]})};export{g as TextField,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as r}from"react";import{generateNameHash as t}from"../shared/helpers.js";const u=(n,o)=>{const e=r(o??t(n)),m=r(`${e.current}-${t()}`);return{name:e.current,id:m.current}};export{u as useNameAndId};
|