freemium-ui 2.1.0-alpha.2 → 2.1.0-alpha.4
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/README.md +2 -2
- package/buildspec.yml +22 -0
- package/lib/Accordion-CxJ6ztSZ.js +77 -0
- package/lib/Accordion.d.ts +3 -3
- package/lib/Accordion.js +1 -1
- package/lib/Alert-BPH8XYOU.js +42 -0
- package/lib/Alert.d.ts +3 -3
- package/lib/Alert.js +1 -1
- package/lib/AutoComplete-CdBtOUqN.js +1 -0
- package/lib/AutoComplete.d.ts +3 -3
- package/lib/AutoComplete.js +1 -1
- package/lib/BoxedRadio-C6ryVJ-a.js +106 -0
- package/lib/BoxedRadio.d.ts +3 -2
- package/lib/BoxedRadio.js +1 -1
- package/lib/Button-38TrTrqS.js +41 -0
- package/lib/Button.d.ts +1 -1
- package/lib/Button.js +1 -1
- package/lib/ButtonDropdown-D1xgUjUG.js +19 -0
- package/lib/ButtonDropdown.d.ts +3 -3
- package/lib/ButtonDropdown.js +1 -1
- package/lib/Calendar-tmPfKbba.js +40 -0
- package/lib/Calendar.d.ts +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Checkbox-U3_actBa.js +51 -0
- package/lib/Checkbox.d.ts +3 -3
- package/lib/Checkbox.js +1 -1
- package/lib/ChevronUp-D_QXlMGy.js +1 -0
- package/lib/Combination-DRFSmqCF.js +1 -0
- package/lib/Confirmation-BhQHgouL.js +60 -0
- package/lib/Confirmation.d.ts +3 -3
- package/lib/Confirmation.js +1 -1
- package/lib/Cross-CgQhiy9a.js +1 -0
- package/lib/CustomizeColumns-BsRW9qk_.js +280 -0
- package/lib/Drawer-DQ0GjtiZ.js +43 -0
- package/lib/Drawer.d.ts +3 -3
- package/lib/Drawer.js +1 -1
- package/lib/Dropdown-CpOK0ioT.js +1 -0
- package/lib/Dropdown.d.ts +2 -1
- package/lib/Dropdown.js +1 -1
- package/lib/ErrorText-CXW7fI-6.js +8 -0
- package/lib/Info-f8YJOuUB.js +1 -0
- package/lib/Input.js +1 -1
- package/lib/Loader-DG6kODGn.js +11 -0
- package/lib/Loader.d.ts +3 -3
- package/lib/Loader.js +1 -1
- package/lib/Menu-Ca_uMNaw.js +1 -0
- package/lib/Menu.d.ts +4 -4
- package/lib/Menu.js +1 -1
- package/lib/Modal-D06mc76N.js +28 -0
- package/lib/Modal.d.ts +3 -3
- package/lib/Modal.js +1 -1
- package/lib/MultiSelectDropdown-D9xmLJJi.js +22 -0
- package/lib/MultiSelectDropdown.d.ts +3 -3
- package/lib/MultiSelectDropdown.js +1 -1
- package/lib/Pickers.d.ts +8 -8
- package/lib/Pickers.js +1 -1
- package/lib/Popover-CLUM02h3.js +32 -0
- package/lib/Popover.d.ts +3 -3
- package/lib/Popover.js +1 -1
- package/lib/Radio.d.ts +3 -3
- package/lib/Radio.js +1 -1
- package/lib/RadioGroup-D7JRiUe2.js +48 -0
- package/lib/Reorder-CU3gxznN.js +18 -0
- package/lib/Reorder.d.ts +3 -3
- package/lib/Reorder.js +1 -1
- package/lib/SortDropdown-DnRo1b3N.js +1 -0
- package/lib/SortDropdown.d.ts +3 -3
- package/lib/SortDropdown.js +1 -1
- package/lib/Table-D7KHCXPF.js +1 -0
- package/lib/Table.d.ts +3 -3
- package/lib/Table.js +1 -1
- package/lib/Tabs-Bg_F04qX.js +35 -0
- package/lib/Tabs.d.ts +3 -3
- package/lib/Tabs.js +1 -1
- package/lib/Tag-DKiVRzO2.js +57 -0
- package/lib/Tag.d.ts +1 -1
- package/lib/Tag.js +1 -1
- package/lib/TextArea-CojwXjXn.js +117 -0
- package/lib/ThemeProvider-D_TuxYL2.js +6 -0
- package/lib/ThemeProvider.d.ts +1 -1
- package/lib/ThemeProvider.js +1 -1
- package/lib/TickIcon-D8ryFR8A.js +1 -0
- package/lib/TimePicker-ChjG0ldT.js +420 -0
- package/lib/Toast.d.ts +2 -1
- package/lib/Toast.js +1 -1
- package/lib/ToastProvider-CjuJZDwB.js +107 -0
- package/lib/Toggle-D2210zUX.js +69 -0
- package/lib/Toggle.d.ts +3 -3
- package/lib/Toggle.js +1 -1
- package/lib/Tooltip-B8SNaMr7.js +37 -0
- package/lib/Tooltip.d.ts +3 -3
- package/lib/Tooltip.js +1 -1
- package/lib/Typography-B6f3UubR.js +10 -0
- package/lib/Typography.d.ts +1 -1
- package/lib/Typography.js +1 -1
- package/lib/WorkspaceTable-DzWFlI1y.js +1 -0
- package/lib/WorkspaceTable.d.ts +3 -3
- package/lib/WorkspaceTable.js +1 -1
- package/lib/allPaths-BGLT3REd.js +1 -0
- package/lib/allPathsLoader-BG8m5249.js +1 -0
- package/lib/index-B3ttnEEs.js +105 -0
- package/lib/index-Bw1WW_qt.js +1 -0
- package/lib/{index-CE1du0xY.js → index-CoSaDZpU.js} +1 -1
- package/lib/index-DP7HoUNK.js +1 -0
- package/lib/{index-M1OtTK_a.js → index-DYTeP_YW.js} +1 -1
- package/lib/index.d.ts +37 -152
- package/lib/index.js +11 -1
- package/lib/keyframes-0CSXUjw0.js +218 -0
- package/lib/rollup.config.d.ts.map +1 -1
- package/lib/splitPathsBySizeLoader-DiQmEHEe.js +1 -0
- package/lib/styled-components.browser.esm-8fYqm7jD.js +1 -0
- package/lib/styles-Bt3yA8NC.js +244 -0
- package/lib/styles-C_4H_GA0.js +61 -0
- package/lib/use-toasts-BHAC_cxV.js +1 -0
- package/package.json +3 -13
- package/lib/Accordion-GfcA3ZgZ.js +0 -1
- package/lib/Alert-CGy153ht.js +0 -1
- package/lib/AutoComplete-b66h_NUS.js +0 -1
- package/lib/BoxedRadio-D85xdSfZ.js +0 -1
- package/lib/Button-C2GQK5Zh.js +0 -1
- package/lib/ButtonDropdown-C7hte6jt.js +0 -1
- package/lib/Calendar-DXLwGw8x.js +0 -1
- package/lib/Checkbox-CmvqP6CF.js +0 -1
- package/lib/ChevronUp-DRezNiXX.js +0 -1
- package/lib/Combination-BnXRbEZN.js +0 -1
- package/lib/Confirmation-DrgDPGEA.js +0 -1
- package/lib/Cross-DdS-LVsP.js +0 -1
- package/lib/CustomizeColumns-C4n2OJYM.js +0 -1
- package/lib/Drawer-Cmp0KQ1Q.js +0 -1
- package/lib/Dropdown-COa39M_7.js +0 -1
- package/lib/ErrorText-Dx5455lJ.js +0 -1
- package/lib/Info-B1WTvfBE.js +0 -1
- package/lib/Loader-4OVmuWEs.js +0 -1
- package/lib/Menu-D4-ZsZLq.js +0 -1
- package/lib/Modal-CSiFmKti.js +0 -1
- package/lib/MultiSelectDropdown-kQGphHeJ.js +0 -1
- package/lib/Popover-aB29KjFO.js +0 -1
- package/lib/QuillEditor.d.ts +0 -29
- package/lib/QuillEditor.js +0 -1
- package/lib/README.md +0 -87
- package/lib/RadioGroup-Bsa_3Ql9.js +0 -1
- package/lib/Reorder-0k-SbTSk.js +0 -1
- package/lib/SortDropdown-BZflsvUQ.js +0 -1
- package/lib/Table-Pye13AY-.js +0 -1
- package/lib/Tabs-Dbv9GKzK.js +0 -1
- package/lib/Tag-0QcI7IQK.js +0 -1
- package/lib/TextArea-DAiKr3Eo.js +0 -1
- package/lib/ThemeProvider-xbEFisIa.js +0 -1
- package/lib/TickIcon-Bf575C6Y.js +0 -1
- package/lib/TimePicker-CSjxqxLC.js +0 -1
- package/lib/ToastProvider-Crm67sLo.js +0 -1
- package/lib/Toggle-DHCe0fpc.js +0 -1
- package/lib/Tooltip-CMUfHK_x.js +0 -1
- package/lib/Typography-W1bHgokt.js +0 -1
- package/lib/WorkspaceTable-DxMfXQNC.js +0 -1
- package/lib/_commonjsHelpers-lGe4XDVY.js +0 -1
- package/lib/allPaths-Dx4FPkk6.js +0 -1
- package/lib/allPathsLoader-joEwOfzx.js +0 -1
- package/lib/index-1TMKcHYv.js +0 -1
- package/lib/index-C9JIXGfH.js +0 -1
- package/lib/index-DnaNxNje.js +0 -1
- package/lib/isTypedArray-CZN823zL.js +0 -1
- package/lib/keyframes-CyBRv3OJ.js +0 -1
- package/lib/package.json +0 -217
- package/lib/splitPathsBySizeLoader-1R-16f2n.js +0 -1
- package/lib/styled-components.browser.esm-89g2oVoD.js +0 -1
- package/lib/styles-DRQuy2Oc.js +0 -1
- package/lib/styles-Ga0MfVzP.js +0 -1
- package/lib/use-toasts-DsMERYYR.js +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{u as e,j as o}from"./styled-components.browser.esm-8fYqm7jD.js";const r=e.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
flex-direction: ${({theme:e})=>"rtl"===e.direction?"row-reverse":"row"};
|
|
5
|
+
gap: 10px;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
`,t=e.button`
|
|
9
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
10
|
+
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
11
|
+
font-weight: ${({theme:e})=>e.typography.primary.fontWeight};
|
|
12
|
+
color: ${({$isSelected:e,theme:o})=>e?o.colors.text.inverse:o.colors.text.primary};
|
|
13
|
+
background-color: ${({theme:e,$isSelected:o,disabled:r})=>o?r?e.colors.border.disabled:e.colors.common.accent:e.colors.fill.surface};
|
|
14
|
+
border: 1px solid
|
|
15
|
+
${({theme:e,disabled:o,$isSelected:r})=>o?e.components.button.secondary.disabledBorderColor:r?e.colors.border.active:e.colors.border.normal};
|
|
16
|
+
color: ${({disabled:e,theme:o})=>e?o.colors.fill.dark:""};
|
|
17
|
+
pointer-events: ${({disabled:e})=>e?"none":""};
|
|
18
|
+
min-width: 40px;
|
|
19
|
+
height: 40px;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
user-select: none;
|
|
25
|
+
transition:
|
|
26
|
+
background-color,
|
|
27
|
+
color 0.2s ease-in-out;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
&:hover,
|
|
30
|
+
&:focus {
|
|
31
|
+
border-color: ${({theme:e})=>e.colors.border.hover};
|
|
32
|
+
box-shadow: 0 0 0 3px
|
|
33
|
+
${({$isSelected:e,theme:o})=>e?o.colors.border.hover:""}40;
|
|
34
|
+
}
|
|
35
|
+
&[disabled] {
|
|
36
|
+
outline: unset;
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
border-color: ${({theme:e})=>e.components.button.secondary.disabledBorderColor};
|
|
39
|
+
}
|
|
40
|
+
`,s=({value:e={},items:s,onChange:n,idAccessor:d="id",nameAccessor:l="name",disabled:i})=>{const a=o=>{if(i)return;const r={...e};r[o]=!r[o],n?.(r)};return o.jsx(r,{role:"group",children:s.map(((r,s)=>o.jsx(t,{id:r?.[d],"aria-label":r?.[l],value:r?.[d],tabIndex:0,type:"button","aria-disabled":!!r?.disabled||i,disabled:!!r?.disabled||i,"aria-pressed":!!e?.[r?.[d]],$isSelected:!!e?.[r?.[d]],onKeyDown:e=>{console.log("onKeyDown",{event:e,key:e.key})," "!==e.key&&"Enter"!==e.key||(a(r?.[d]),e.preventDefault())},onClick:()=>a(r?.[d]),children:r?.[l]},s)))})};export{s as C};
|
package/lib/Calendar.d.ts
CHANGED
package/lib/Calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as
|
|
1
|
+
export{C as default}from"./Calendar-tmPfKbba.js";import"./styled-components.browser.esm-8fYqm7jD.js";import"react";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{u as e,a as t,j as o,e as r}from"./styled-components.browser.esm-8fYqm7jD.js";import{I as a,R as n}from"./index-B3ttnEEs.js";import{$ as i,a as s,_ as d}from"./index-CMYH5FSo.js";import c,{forwardRef as l,useState as m,useRef as h,useEffect as p,createElement as b}from"react";import{$ as u}from"./index-BCBGGtXO.js";import{a as x,$ as k}from"./index-D4pfkNFk.js";import{$ as f}from"./index-DZzFKxNs.js";import{$ as g}from"./index-Bj96NGNJ.js";import{$ as v}from"./index-BrmsftDQ.js";import{T as y}from"./TickIcon-D8ryFR8A.js";const w="Checkbox",[j,C]=u(w),[$,E]=j(w),q=l(((e,t)=>{const{__scopeCheckbox:o,name:r,checked:a,defaultChecked:n,required:c,disabled:l,value:u="on",onCheckedChange:f,...g}=e,[v,y]=m(null),w=i(t,(e=>y(e))),j=h(!1),C=!v||!!v.closest("form"),[E=!1,q]=x({prop:a,defaultProp:n,onChange:f}),D=h(E);return p((()=>{const e=null==v?void 0:v.form;if(e){const t=()=>q(D.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[v,q]),b($,{scope:o,state:E,disabled:l},b(s.button,d({type:"button",role:"checkbox","aria-checked":N(E)?"mixed":E,"aria-required":c,"data-state":_(E),"data-disabled":l?"":void 0,disabled:l,value:u},g,{ref:w,onKeyDown:k(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:k(e.onClick,(e=>{q((e=>!!N(e)||!e)),C&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())}))})),C&&b(I,{control:v,bubbles:!j.current,name:r,value:u,checked:E,required:c,disabled:l,style:{transform:"translateX(-100%)"}}))})),I=e=>{const{control:t,checked:o,bubbles:r=!0,...a}=e,n=h(null),i=f(o),s=g(t);return p((()=>{const e=n.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==o&&a){const t=new Event("click",{bubbles:r});e.indeterminate=N(o),a.call(e,!N(o)&&o),e.dispatchEvent(t)}}),[i,o,r]),b("input",d({type:"checkbox","aria-hidden":!0,defaultChecked:!N(o)&&o},a,{tabIndex:-1,ref:n,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function N(e){return"indeterminate"===e}function _(e){return N(e)?"indeterminate":e?"checked":"unchecked"}const D=q,L=e(l(((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...a}=e,n=E("CheckboxIndicator",o);return b(v,{present:r||N(n.state)||!0===n.state},b(s.span,d({"data-state":_(n.state),"data-disabled":n.disabled?"":void 0},a,{ref:t,style:{pointerEvents:"none",...e.style}})))})))`
|
|
2
|
+
display: grid;
|
|
3
|
+
place-content: center;
|
|
4
|
+
|
|
5
|
+
&[data-state='unchecked'] {
|
|
6
|
+
svg.toggle-on {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`,P=e.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
direction: ${({theme:e})=>e.direction};
|
|
14
|
+
`,R=e(D)`
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
width: 14px;
|
|
18
|
+
height: 14px;
|
|
19
|
+
border-radius: 2px;
|
|
20
|
+
display: grid;
|
|
21
|
+
place-content: center;
|
|
22
|
+
border: 1px solid;
|
|
23
|
+
outline-offset: 3px;
|
|
24
|
+
direction: ${({theme:e})=>e.direction};
|
|
25
|
+
box-shadow: 0px 1px 2px 0px ${({theme:e})=>e.colors.border.hover}05
|
|
26
|
+
inset;
|
|
27
|
+
&[data-disabled] {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
}
|
|
30
|
+
&[data-state='checked'],
|
|
31
|
+
&[data-state='indeterminate'] {
|
|
32
|
+
background-color: ${({theme:e})=>e.colors.common.accent};
|
|
33
|
+
border-color: ${({theme:e})=>e.colors.common.accent};
|
|
34
|
+
}
|
|
35
|
+
&[data-state='unchecked'] {
|
|
36
|
+
background-color: unset;
|
|
37
|
+
border-color: ${({theme:e})=>e.colors.border.hover};
|
|
38
|
+
}
|
|
39
|
+
&:not([data-disabled]) {
|
|
40
|
+
&:hover {
|
|
41
|
+
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.border.hover}30;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
${({theme:e})=>"dark"===e.mode&&t`
|
|
46
|
+
&[data-state='indeterminate'] {
|
|
47
|
+
background-color: ${({theme:e})=>e.colors.text.primary};
|
|
48
|
+
border-color: ${({theme:e})=>e.colors.text.primary};
|
|
49
|
+
}
|
|
50
|
+
`}
|
|
51
|
+
`,O=c.forwardRef(((e,t)=>o.jsx("svg",{width:"24",height:"7",viewBox:"0 0 24 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:o.jsx("rect",{y:"0.25",width:"24",height:"6",rx:"3",fill:e.fill||"currentcolor"})}))),T=({isRequired:e,isErrored:t,className:i,readOnly:s,label:d,...c})=>{const l=r();return o.jsxs(P,{children:[o.jsx(R,{className:("CheckboxRoot "+(i??"")).trim(),required:e,"aria-invalid":t,"aria-label":d||"Checkbox","aria-required":e,"aria-readonly":s,"aria-disabled":c.disabled,dir:l.direction,...c,children:o.jsx(L,{className:"CheckboxIndicator",children:"indeterminate"===c.checked?o.jsx(O,{className:"toggle-indeterminate",width:8,height:6,fill:"dark"===l.mode?l.colors.common.black:l.colors.common.white}):o.jsx(y,{className:"toggle-on",width:8,height:6,fill:"dark"===l.mode?l.colors.common.black:l.colors.common.white})})}),d&&o.jsxs(a,{className:"CheckboxLabel",htmlFor:c.id,children:[d,d&&e&&o.jsx(n,{children:"*"})]})]})};export{T as C};
|
package/lib/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
|
|
3
3
|
|
|
4
4
|
interface CheckboxProps extends CheckboxProps$1 {
|
|
@@ -23,6 +23,6 @@ interface CheckboxProps extends CheckboxProps$1 {
|
|
|
23
23
|
/**
|
|
24
24
|
* Checkbox displays a check box on the user interface and enables assigning a state (selected or deselected) to it. In the selected state, the check box displayed on the UI is highlighted and contains a check mark.
|
|
25
25
|
*/
|
|
26
|
-
declare const Checkbox: ({ isRequired, isErrored, className, readOnly, label, ...rest }: CheckboxProps) =>
|
|
26
|
+
declare const Checkbox: ({ isRequired, isErrored, className, readOnly, label, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
27
27
|
|
|
28
|
-
export {
|
|
28
|
+
export { type CheckboxProps, Checkbox as default };
|
package/lib/Checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as
|
|
1
|
+
export{C as default}from"./Checkbox-U3_actBa.js";import"./styled-components.browser.esm-8fYqm7jD.js";import"react";import"./index-B3ttnEEs.js";import"./index-CMYH5FSo.js";import"react-dom";import"./index-Bw1WW_qt.js";import"./keyframes-0CSXUjw0.js";import"./index-BCBGGtXO.js";import"./index-D4pfkNFk.js";import"./index-DZzFKxNs.js";import"./index-Bj96NGNJ.js";import"./index-BrmsftDQ.js";import"./TickIcon-D8ryFR8A.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./styled-components.browser.esm-8fYqm7jD.js";import r from"react";const s=r.forwardRef(((r,s)=>o.jsx("svg",{width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,ref:s,children:o.jsx("path",{d:"M0.696495 5.3465C0.882365 5.34499 1.06086 5.27359 1.19649 5.1465L3.99649 2.3365L6.79649 5.1465C7.07264 5.42264 7.52035 5.42264 7.79649 5.1465C8.07264 4.87035 8.07264 4.42264 7.79649 4.1465L4.49649 0.856495C4.36483 0.722118 4.18462 0.646393 3.99649 0.646393C3.80837 0.646393 3.62816 0.722118 3.49649 0.856495L0.206495 4.1465C0.00332102 4.34556 -0.0591904 4.64778 0.0483378 4.91112C0.155867 5.17445 0.412052 5.34654 0.696495 5.3465Z",fill:r.fill})})));export{s as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{useEffect as n,forwardRef as t,useState as r,useRef as o,useCallback as a,createElement as c}from"react";import{$ as i,a as u,_ as l}from"./index-CMYH5FSo.js";import{b as s}from"./index-BCBGGtXO.js";import{c as d,f,g as v}from"./styled-components.browser.esm-8fYqm7jD.js";let m=0;function p(){n((()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=t[0])&&void 0!==e?e:h()),document.body.insertAdjacentElement("beforeend",null!==(n=t[1])&&void 0!==n?n:h()),m++,()=>{1===m&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),m--}}),[])}function h(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const g="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",E={bubbles:!1,cancelable:!0},b=t(((e,t)=>{const{loop:d=!1,trapped:f=!1,onMountAutoFocus:v,onUnmountAutoFocus:m,...p}=e,[h,b]=r(null),S=s(v),L=s(m),x=o(null),A=i(t,(e=>b(e))),N=o({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n((()=>{if(f){function e(e){if(N.paused||!h)return;const n=e.target;h.contains(n)?x.current=n:k(x.current,{select:!0})}function n(e){if(N.paused||!h)return;const n=e.relatedTarget;null!==n&&(h.contains(n)||k(x.current,{select:!0}))}function t(e){if(document.activeElement===document.body)for(const n of e)n.removedNodes.length>0&&k(h)}document.addEventListener("focusin",e),document.addEventListener("focusout",n);const r=new MutationObserver(t);return h&&r.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),r.disconnect()}}}),[f,h,N.paused]),n((()=>{if(h){T.add(N);const e=document.activeElement;if(!h.contains(e)){const n=new CustomEvent(g,E);h.addEventListener(g,S),h.dispatchEvent(n),n.defaultPrevented||(function(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(k(r,{select:n}),document.activeElement!==t)return}(w(h).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&k(h))}return()=>{h.removeEventListener(g,S),setTimeout((()=>{const n=new CustomEvent(y,E);h.addEventListener(y,L),h.dispatchEvent(n),n.defaultPrevented||k(null!=e?e:document.body,{select:!0}),h.removeEventListener(y,L),T.remove(N)}),0)}}}),[h,S,L,N]);const M=a((e=>{if(!d&&!f)return;if(N.paused)return;const n=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&n){const t=e.currentTarget,[r,o]=function(e){const n=w(e);return[C(n,e),C(n.reverse(),e)]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),d&&k(o,{select:!0})):(e.preventDefault(),d&&k(r,{select:!0})):n===t&&e.preventDefault()}}),[d,f,N.paused]);return c(u.div,l({tabIndex:-1},p,{ref:A,onKeyDown:M}))}));function w(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type||0>e.tabIndex?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});for(;t.nextNode();)n.push(t.currentNode);return n}function C(e,n){for(const t of e)if(!S(t,{upTo:n}))return t}function S(e,{upTo:n}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function k(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&n&&e.select()}}const T=function(){let e=[];return{add(n){const t=e[0];n!==t&&(null==t||t.pause()),e=L(e,n),e.unshift(n)},remove(n){var t;e=L(e,n),null===(t=e[0])||void 0===t||t.resume()}}}();function L(e,n){const t=[...e],r=t.indexOf(n);return-1!==r&&t.splice(r,1),t}var x=new WeakMap,A=new WeakMap,N={},M=0,R=function(e){return e&&(e.host||R(e.parentNode))},W=function(e,n,t){void 0===t&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,n,t,r){var o=function(e,n){return n.map((function(n){if(e.contains(n))return n;var t=R(n);return t&&e.contains(t)?t:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return!!e}))}(n,Array.isArray(e)?e:[e]);N[t]||(N[t]=new WeakMap);var a=N[t],c=[],i=new Set,u=new Set(o),l=function(e){e&&!i.has(e)&&(i.add(e),l(e.parentNode))};o.forEach(l);var s=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))s(e);else{var n=e.getAttribute(r),o=null!==n&&"false"!==n,u=(x.get(e)||0)+1,l=(a.get(e)||0)+1;x.set(e,u),a.set(e,l),c.push(e),1===u&&o&&A.set(e,!0),1===l&&e.setAttribute(t,"true"),o||e.setAttribute(r,"true")}}))};return s(n),i.clear(),M++,function(){c.forEach((function(e){var n=x.get(e)-1,o=a.get(e)-1;x.set(e,n),a.set(e,o),n||(A.has(e)||e.removeAttribute(r),A.delete(e)),o||e.removeAttribute(t)})),--M||(x=new WeakMap,x=new WeakMap,A=new WeakMap,N={})}}(r,o,t,"aria-hidden")):function(){return null}},I="right-scroll-bar-position",P="width-before-scroll-bar";function _(e){return e}var F=function(n){var t=n.sideCar,r=f(n,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw Error("Sidecar medium not found");return e.createElement(o,d({},r))};F.isSideCarExport=!0;var B=function(e){void 0===e&&(e={});var n=function(e,n){void 0===n&&(n=_);var t=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:null},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),t={push:function(e){n.push(e),c()},filter:function(e){return n=n.filter(e),t}}}}}();return n.options=d({async:!0,ssr:!1},e),n}(),D=function(){},j=e.forwardRef((function(n,t){var o=e.useRef(null),a=e.useState({onScrollCapture:D,onWheelCapture:D,onTouchMoveCapture:D}),c=a[0],i=a[1],u=n.forwardProps,l=n.children,s=n.className,v=n.removeScrollBar,m=n.enabled,p=n.shards,h=n.sideCar,g=n.noIsolation,y=n.inert,E=n.allowPinchZoom,b=n.as,w=void 0===b?"div":b,C=f(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,k=function(e,n){return t=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(o=r((function(){return{value:null,callback:t,facade:{get current(){return o.value},set current(e){var n=o.value;n!==e&&(o.value=e,o.callback(e,n))}}}}))[0]).callback=t,o.facade;var t,o}([o,t]),T=d(d({},C),c);return e.createElement(e.Fragment,null,m&&e.createElement(S,{sideCar:B,removeScrollBar:v,shards:p,noIsolation:g,inert:y,setCallbacks:i,allowPinchZoom:!!E,lockRef:o}),u?e.cloneElement(e.Children.only(l),d(d({},T),{ref:k})):e.createElement(w,d({},T,{className:s,ref:k}),l))}));j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:P,zeroRight:I};var K=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){! --e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},X=function(){var n,t=(n=K(),function(t,r){e.useEffect((function(){return n.add(t),function(){n.remove()}}),[t&&r])});return function(e){return t(e.styles,e.dynamic),null}},Y={left:0,top:0,right:0,gap:0},O=function(e){return parseInt(e||"",10)||0},H=X(),Z=function(e,n,t,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden ".concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([n&&"position: relative ".concat(r,";"),"margin"===t&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===t&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(I," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(P," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(I," .").concat(I," {\n right: 0 ").concat(r,";\n }\n \n .").concat(P," .").concat(P," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},q=function(n){var t=n.noRelative,r=n.noImportant,o=n.gapMode,a=void 0===o?"margin":o,c=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingTop":"marginTop"],r=n["padding"===e?"paddingRight":"marginRight"];return[O(n["padding"===e?"paddingLeft":"marginLeft"]),O(t),O(r)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}}(a)}),[a]);return e.createElement(H,{styles:Z(c,!t,a,r?"":"!important")})},U=!1;if("undefined"!=typeof window)try{var z=Object.defineProperty({},"passive",{get:function(){return U=!0,!0}});window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(e){U=!1}var $,G=!!U&&{passive:!1},J=function(e,n){var t=window.getComputedStyle(e);return"hidden"!==t[n]&&!(t.overflowY===t.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===t[n])},Q=function(e,n){var t=n;do{if("undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host),V(e,t)){var r=ee(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},V=function(e,n){return"v"===e?function(e){return J(e,"overflowY")}(n):function(e){return J(e,"overflowX")}(n)},ee=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},ne=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},te=function(e){return[e.deltaX,e.deltaY]},re=function(e){return e&&"current"in e?e.current:e},oe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ae=0,ce=[],ie=($=function(n){var t=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ae++)[0],c=e.useState((function(){return X()}))[0],i=e.useRef(n);e.useEffect((function(){i.current=n}),[n]),e.useEffect((function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(a));var e=v([n.lockRef.current],(n.shards||[]).map(re),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[n.inert,n.lockRef.current,n.shards]);var u=e.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var t,a=ne(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],l="deltaY"in e?e.deltaY:c[1]-a[1],s=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=Q(d,s);if(!f)return!0;if(f?t=d:(t="v"===d?"h":"v",f=Q(d,s)),!f)return!1;if(!o.current&&"changedTouches"in e&&(u||l)&&(o.current=t),!t)return!0;var v=o.current||t;return function(e,n,t,r,o){var a=function(e,n){return"h"===e&&"rtl"===n?-1:1}(e,window.getComputedStyle(n).direction),c=a*r,i=t.target,u=n.contains(i),l=!1,s=c>0,d=0,f=0;do{var v=ee(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&V(e,i)&&(d+=p,f+=m),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(!s||0!==d&&true)&&(s||0!==f&&true)||(l=!0),l}(v,n,e,"h"===v?u:l)}),[]),l=e.useCallback((function(e){var n=e;if(ce.length&&ce[ce.length-1]===c){var r="deltaY"in n?te(n):ne(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(i.current.shards||[]).map(re).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?u(n,a[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=e.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),d=e.useCallback((function(e){r.current=ne(e),o.current=void 0}),[]),f=e.useCallback((function(e){s(e.type,te(e),e.target,u(e,n.lockRef.current))}),[]),m=e.useCallback((function(e){s(e.type,ne(e),e.target,u(e,n.lockRef.current))}),[]);e.useEffect((function(){return ce.push(c),n.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,G),document.addEventListener("touchmove",l,G),document.addEventListener("touchstart",d,G),function(){ce=ce.filter((function(e){return e!==c})),document.removeEventListener("wheel",l,G),document.removeEventListener("touchmove",l,G),document.removeEventListener("touchstart",d,G)}}),[]);var p=n.removeScrollBar;return e.createElement(e.Fragment,null,n.inert?e.createElement(c,{styles:oe(a)}):null,p?e.createElement(q,{gapMode:"margin"}):null)},B.useMedium($),F),ue=e.forwardRef((function(n,t){return e.createElement(j,d({},n,{ref:t,sideCar:ie}))}));ue.classNames=j.classNames;export{p as $,ue as R,b as a,W as h};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{u as e,a as t,e as o,j as r}from"./styled-components.browser.esm-8fYqm7jD.js";import{_ as i,$ as a,c as n}from"./index-CMYH5FSo.js";import{createElement as s,forwardRef as l,useRef as c}from"react";import{$ as p}from"./index-BCBGGtXO.js";import{$ as d,a as m,b as h,c as g,d as f,e as u,f as x,g as y,h as $}from"./index-DYTeP_YW.js";import{$ as b}from"./index-D4pfkNFk.js";import{f as D,g as j}from"./index-B3ttnEEs.js";import{c as A,d as _}from"./keyframes-0CSXUjw0.js";import{B as v}from"./Button-38TrTrqS.js";const[C,w]=p("AlertDialog",[d]),O=d(),k=l(((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=O(o);return s(g,i({},a,r,{ref:t}))})),S="AlertDialogContent",[B,F]=C(S),N=l(((e,t)=>{const{__scopeAlertDialog:o,children:r,...l}=e,p=O(o),d=c(null),m=a(t,d),h=c(null);return s(f,{contentName:S,titleName:T,docsSlug:"alert-dialog"},s(B,{scope:o,cancelRef:h},s(u,i({role:"alertdialog"},p,l,{ref:m,onOpenAutoFocus:b(l.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=h.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),s(n,null,r),!1)))})),T="AlertDialogTitle",z=l(((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=O(o);return s(x,i({},a,r,{ref:t}))})),H=l(((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=O(o);return s(y,i({},a,r,{ref:t}))})),I=k,M=N,R=l(((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=O(o);return s($,i({},a,r,{ref:t}))})),W=l(((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:n}=F("AlertDialogCancel",o),l=O(o),c=a(t,n);return s($,i({},l,r,{ref:c}))})),E=z,P=H,q=e((e=>{const{__scopeAlertDialog:t,...o}=e,r=O(t);return s(m,i({},r,o,{modal:!0}))}))``,G=e((e=>{const{__scopeAlertDialog:t,...o}=e,r=O(t);return s(h,i({},r,o))}))``,J=e(W)``,K=e(R)``,L=e(I)`
|
|
2
|
+
${D}
|
|
3
|
+
`,Q=e(M)`
|
|
4
|
+
${j}
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 50%;
|
|
7
|
+
transform: translate(-50%, 0);
|
|
8
|
+
min-width: 500px;
|
|
9
|
+
max-width: 540px;
|
|
10
|
+
max-height: 85vh;
|
|
11
|
+
border-bottom-right-radius: 8px;
|
|
12
|
+
border-bottom-left-radius: 8px;
|
|
13
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
14
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
15
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
16
|
+
&:focus {
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
&[data-state='open'] {
|
|
20
|
+
animation-name: ${A};
|
|
21
|
+
}
|
|
22
|
+
&[data-state='closed'] {
|
|
23
|
+
animation-name: ${_};
|
|
24
|
+
}
|
|
25
|
+
`,U=e(E)`
|
|
26
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
27
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
28
|
+
font-size: ${({theme:e})=>e.typography.heading4.fontSize};
|
|
29
|
+
line-height: ${({theme:e})=>e.typography.heading4.lineHeight};
|
|
30
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight["semi-bold"]};
|
|
31
|
+
direction: ${({theme:e})=>e.direction};
|
|
32
|
+
margin: 0;
|
|
33
|
+
letter-spacing: unset;
|
|
34
|
+
padding: 32px 32px
|
|
35
|
+
${({$hasdescription:e})=>e?"0px":"16px"} 32px;
|
|
36
|
+
`,V=e(P)`
|
|
37
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
38
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
39
|
+
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
40
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.regular};
|
|
41
|
+
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
42
|
+
direction: ${({theme:e})=>e.direction};
|
|
43
|
+
letter-spacing: 0px;
|
|
44
|
+
padding: 0 32px 0px 32px;
|
|
45
|
+
letter-spacing: unset;
|
|
46
|
+
margin: 10px 0px 24px !important;
|
|
47
|
+
`,X=e.div`
|
|
48
|
+
border-bottom-right-radius: 8px;
|
|
49
|
+
border-bottom-left-radius: 8px;
|
|
50
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border.light};
|
|
51
|
+
background-color: ${({theme:e})=>e.colors.fill.base};
|
|
52
|
+
display: flex;
|
|
53
|
+
padding: 16px;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
|
|
57
|
+
${({theme:e})=>"dark"===e.mode&&t`
|
|
58
|
+
border-top: 1px solid ${e.colors.fill.base};
|
|
59
|
+
`}
|
|
60
|
+
`,Y=({isOpen:e,title:t,description:i,onConfirm:a,onDismiss:n,cancelButtonText:s,children:l,cancelButtonDisabled:c,confirmButtonDisabled:p,confirmButtonText:d,clickOutToClose:m=!1,bodyStyles:h,contentStyles:g,footerStyles:f,width:u="520px"})=>{const x=o();return r.jsx(q,{open:e,onOpenChange:e=>{e||n?.("root")},children:r.jsxs(G,{children:[r.jsx(L,{forceMount:!0,style:h,className:"AlertDialogOverlay",onClick:e=>{m&&n?.("overlay",e)}}),r.jsxs(Q,{forceMount:!0,className:"AlertDialogContent",style:{...g,width:u},dir:x.direction,children:[t&&r.jsx(U,{$hasdescription:!!i,className:"AlertDialogTitle",children:t}),i&&r.jsx(V,{$hasChildren:!!l,className:"AlertDialogDescription",children:i}),l?r.jsx(r.Fragment,{children:l}):null,r.jsxs(X,{style:f,children:[s&&r.jsx(J,{asChild:!0,children:r.jsx(v,{variant:"secondary",autoFocus:!0,"aria-disabled":c,disabled:c,onClick:e=>{e.preventDefault(),n?.("button",e)},"aria-label":s,children:s})}),d&&r.jsx(K,{asChild:!0,children:r.jsx(v,{variant:"primary","aria-disabled":p,disabled:p,onClick:e=>{e.preventDefault(),a?.(e)},"aria-label":d,children:d})})]})]})]})})};export{Y as C};
|
package/lib/Confirmation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
interface ConfirmationProps {
|
|
5
5
|
/**
|
|
@@ -67,6 +67,6 @@ interface ConfirmationProps {
|
|
|
67
67
|
/**
|
|
68
68
|
* Confirmation component is used to show a confirmation dialog to the user. It is used to confirm an action before it is executed.
|
|
69
69
|
*/
|
|
70
|
-
declare const Confirmation: ({ isOpen, title, description, onConfirm, onDismiss, cancelButtonText, children, cancelButtonDisabled, confirmButtonDisabled, confirmButtonText, clickOutToClose, bodyStyles, contentStyles, footerStyles, width, }: ConfirmationProps) =>
|
|
70
|
+
declare const Confirmation: ({ isOpen, title, description, onConfirm, onDismiss, cancelButtonText, children, cancelButtonDisabled, confirmButtonDisabled, confirmButtonText, clickOutToClose, bodyStyles, contentStyles, footerStyles, width, }: ConfirmationProps) => react_jsx_runtime.JSX.Element;
|
|
71
71
|
|
|
72
|
-
export {
|
|
72
|
+
export { type ConfirmationProps, Confirmation as default };
|
package/lib/Confirmation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as
|
|
1
|
+
export{C as default}from"./Confirmation-BhQHgouL.js";import"./styled-components.browser.esm-8fYqm7jD.js";import"react";import"./index-CMYH5FSo.js";import"react-dom";import"./index-BCBGGtXO.js";import"./index-DYTeP_YW.js";import"./index-D4pfkNFk.js";import"./index-DE6Djr2P.js";import"./index-CGIN8I3H.js";import"./Combination-DRFSmqCF.js";import"./index-BrmsftDQ.js";import"./index-B3ttnEEs.js";import"./index-Bw1WW_qt.js";import"./keyframes-0CSXUjw0.js";import"./Button-38TrTrqS.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as C}from"./styled-components.browser.esm-8fYqm7jD.js";import o from"react";const r=o.forwardRef(((o,r)=>C.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:r,children:C.jsx("path",{d:"M5.29058 3.96971L7.72863 1.59934C8.09046 1.23484 8.09046 0.646977 7.72863 0.28247C7.55697 0.102105 7.31879 0 7.0697 0C6.8206 0 6.58242 0.102105 6.41076 0.28247L3.97271 2.65284L1.60055 0.295638C1.42889 0.115274 1.19071 0.0131687 0.941616 0.0131687C0.692525 0.0131687 0.454339 0.115274 0.282683 0.295638C0.102182 0.467165 0 0.705171 0 0.954075C0 1.20298 0.102182 1.44098 0.282683 1.61251L2.65484 3.96971L0.295861 6.4191C0.115361 6.59062 0.0131787 6.82863 0.0131787 7.07753C0.0131787 7.32644 0.115361 7.56444 0.295861 7.73597C0.468326 7.90482 0.700166 7.99938 0.941616 7.99934C1.18657 7.99736 1.4218 7.90334 1.60055 7.73597L3.97271 5.28659L6.42394 7.7228C6.59641 7.89165 6.82825 7.98621 7.0697 7.98618C7.31465 7.98419 7.54988 7.89017 7.72863 7.7228C8.09046 7.35829 8.09046 6.77044 7.72863 6.40593L5.29058 3.96971Z",fill:o.fill})})));export{r as C};
|