@webority/ui-react 0.128.0 → 0.130.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/README.md +1 -1
- package/dist/canvas-kit/kit.js +29757 -25503
- package/dist/canvas-kit/manifest.json +3343 -275
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccountSwitcher.js +1 -0
- package/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppAlert.js +1 -1
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppAuthLayout.js +1 -0
- package/dist/components/AppAutocomplete.js +1 -1
- package/dist/components/AppAvatar.js +1 -1
- package/dist/components/AppAvatarGroup.js +1 -1
- package/dist/components/AppBadge.js +1 -1
- package/dist/components/AppBanner.js +1 -1
- package/dist/components/AppButton.js +1 -1
- package/dist/components/AppCalendar.js +1 -1
- package/dist/components/AppCard.js +1 -1
- package/dist/components/AppCell.js +1 -0
- package/dist/components/AppChart.js +1 -1
- package/dist/components/AppChartCard.js +1 -1
- package/dist/components/AppCheckbox.js +1 -1
- package/dist/components/AppChip.js +1 -1
- package/dist/components/AppChoiceCard.js +1 -1
- package/dist/components/AppChoiceChip.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommandPalette.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppCompareTable.js +1 -1
- package/dist/components/AppConfirmDialog.js +1 -1
- package/dist/components/AppConfirmProvider.js +1 -1
- package/dist/components/AppConsentBanner.js +1 -1
- package/dist/components/AppContextMenu.js +1 -1
- package/dist/components/AppCopyButton.js +1 -1
- package/dist/components/AppCountrySelect.js +1 -1
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDescriptions.js +1 -1
- package/dist/components/AppDrawer.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppDueDate.js +1 -1
- package/dist/components/AppEmptyState.js +1 -1
- package/dist/components/AppErrorBoundary.js +1 -0
- package/dist/components/AppFileAttachment.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFileTiles.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppFloatingButton.js +1 -0
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInfoTip.js +1 -1
- package/dist/components/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKanban.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppLeadPopup.js +1 -0
- package/dist/components/AppLink.js +1 -1
- package/dist/components/AppMarkdown.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMeter.js +1 -1
- package/dist/components/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppMultiSelect.js +1 -1
- package/dist/components/AppNavList.js +1 -1
- package/dist/components/AppNotificationCenter.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOnboardingChecklist.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPageHeader.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.js +1 -1
- package/dist/components/AppProgress.js +1 -1
- package/dist/components/AppRadio.js +1 -1
- package/dist/components/AppRadioGroup.js +1 -1
- package/dist/components/AppRating.js +1 -1
- package/dist/components/AppRepeater.js +1 -1
- package/dist/components/AppResourceCard.js +1 -1
- package/dist/components/AppRichText.js +1 -1
- package/dist/components/AppRouteError.js +1 -1
- package/dist/components/AppScoreScale.js +1 -1
- package/dist/components/AppSearch.js +1 -1
- package/dist/components/AppSectionHero.js +1 -1
- package/dist/components/AppSectionLeadCapture.js +1 -1
- package/dist/components/AppSectionLogos.js +1 -1
- package/dist/components/AppSegmented.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppSortableList.js +1 -1
- package/dist/components/AppSparkline.js +1 -1
- package/dist/components/AppSplash.js +1 -1
- package/dist/components/AppSplitButton.js +1 -1
- package/dist/components/AppSplitView.js +1 -1
- package/dist/components/AppStatusBadge.js +1 -1
- package/dist/components/AppStepper.js +1 -1
- package/dist/components/AppSwitch.js +1 -1
- package/dist/components/AppTablePagination.js +1 -1
- package/dist/components/AppTableToolbar.js +1 -1
- package/dist/components/AppTabs.js +1 -1
- package/dist/components/AppTagInput.js +1 -1
- package/dist/components/AppTextarea.js +1 -1
- package/dist/components/AppTimePicker.js +1 -1
- package/dist/components/AppTimeline.js +1 -1
- package/dist/components/AppToast.js +1 -1
- package/dist/components/AppToolbar.js +1 -1
- package/dist/components/AppTooltip.js +1 -1
- package/dist/components/AppUpdateBar.js +1 -1
- package/dist/components/AppWhatsNew.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/components/AppWorkspaceSwitcher.js +1 -1
- package/dist/components/iconCatalogNames.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/components/useWuiControl.js +1 -1
- package/dist/guidance.json +273 -47
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/DiscardPrompt.js +1 -1
- package/dist/lib/FileItemRow.js +1 -1
- package/dist/lib/buttonClass.js +1 -0
- package/dist/lib/fieldState.js +1 -0
- package/dist/lib/fillLabel.js +1 -0
- package/dist/lib/labelWithHelp.js +1 -0
- package/dist/lib/linkTarget.js +1 -0
- package/dist/lib/sectionShell.js +1 -1
- package/dist/lib/vocabulary.js +1 -0
- package/dist/markdown-core/dist/links.js +1 -1
- package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
- package/dist/types/components/AppActionIcon.d.ts +3 -12
- package/dist/types/components/AppAsyncBlock.d.ts +24 -0
- package/dist/types/components/AppAuthLayout.d.ts +45 -0
- package/dist/types/components/AppAutocomplete.d.ts +23 -3
- package/dist/types/components/AppAvatar.d.ts +6 -0
- package/dist/types/components/AppAvatarGroup.d.ts +6 -0
- package/dist/types/components/AppBanner.d.ts +8 -2
- package/dist/types/components/AppButton.d.ts +9 -4
- package/dist/types/components/AppCalendar.d.ts +3 -1
- package/dist/types/components/AppCard.d.ts +16 -4
- package/dist/types/components/AppCell.d.ts +36 -0
- package/dist/types/components/AppChart.d.ts +14 -0
- package/dist/types/components/AppChartCard.d.ts +60 -0
- package/dist/types/components/AppCheckbox.d.ts +23 -1
- package/dist/types/components/AppChoiceCard.d.ts +21 -0
- package/dist/types/components/AppChoiceChip.d.ts +21 -0
- package/dist/types/components/AppColorField.d.ts +45 -6
- package/dist/types/components/AppCommandPalette.d.ts +6 -0
- package/dist/types/components/AppCommentThread.d.ts +102 -3
- package/dist/types/components/AppCompareTable.d.ts +24 -0
- package/dist/types/components/AppConfirmDialog.d.ts +10 -10
- package/dist/types/components/AppConfirmProvider.d.ts +5 -6
- package/dist/types/components/AppConsentBanner.d.ts +3 -3
- package/dist/types/components/AppContextMenu.d.ts +2 -2
- package/dist/types/components/AppCopyButton.d.ts +8 -2
- package/dist/types/components/AppCountrySelect.d.ts +6 -1
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +26 -2
- package/dist/types/components/AppDateRangePicker.d.ts +32 -2
- package/dist/types/components/AppDescriptions.d.ts +4 -1
- package/dist/types/components/AppDrawer.d.ts +6 -0
- package/dist/types/components/AppDropZone.d.ts +26 -2
- package/dist/types/components/AppDropdown.d.ts +7 -7
- package/dist/types/components/AppDueDate.d.ts +42 -0
- package/dist/types/components/AppEmptyState.d.ts +3 -3
- package/dist/types/components/AppErrorBoundary.d.ts +39 -0
- package/dist/types/components/AppFileAttachment.d.ts +54 -1
- package/dist/types/components/AppFilePicker.d.ts +80 -5
- package/dist/types/components/AppFileTiles.d.ts +6 -3
- package/dist/types/components/AppFilterBar.d.ts +73 -0
- package/dist/types/components/AppFloatingButton.d.ts +70 -0
- package/dist/types/components/AppImagePicker.d.ts +64 -4
- package/dist/types/components/AppInlineEdit.d.ts +6 -0
- package/dist/types/components/AppInput.d.ts +38 -3
- package/dist/types/components/AppKanban.d.ts +32 -0
- package/dist/types/components/AppLeadPopup.d.ts +122 -0
- package/dist/types/components/AppLink.d.ts +3 -0
- package/dist/types/components/AppMentionInput.d.ts +18 -1
- package/dist/types/components/AppMetricStrip.d.ts +2 -0
- package/dist/types/components/AppModal.d.ts +9 -3
- package/dist/types/components/AppMultiSelect.d.ts +20 -3
- package/dist/types/components/AppNotificationCenter.d.ts +2 -0
- package/dist/types/components/AppNumberInput.d.ts +25 -3
- package/dist/types/components/AppOnboardingChecklist.d.ts +3 -3
- package/dist/types/components/AppOtpInput.d.ts +31 -2
- package/dist/types/components/AppPhoneNumberInput.d.ts +25 -1
- package/dist/types/components/AppPopover.d.ts +5 -5
- package/dist/types/components/AppRadio.d.ts +23 -1
- package/dist/types/components/AppRadioGroup.d.ts +26 -2
- package/dist/types/components/AppRating.d.ts +42 -3
- package/dist/types/components/AppRepeater.d.ts +3 -3
- package/dist/types/components/AppResourceCard.d.ts +2 -2
- package/dist/types/components/AppRichText.d.ts +10 -3
- package/dist/types/components/AppRouteError.d.ts +54 -0
- package/dist/types/components/AppScoreScale.d.ts +9 -3
- package/dist/types/components/AppSearch.d.ts +17 -2
- package/dist/types/components/AppSectionLeadCapture.d.ts +50 -2
- package/dist/types/components/AppSectionLogos.d.ts +2 -0
- package/dist/types/components/AppSegmented.d.ts +27 -3
- package/dist/types/components/AppSelect.d.ts +23 -3
- package/dist/types/components/AppShell.d.ts +151 -4
- package/dist/types/components/AppSlider.d.ts +29 -1
- package/dist/types/components/AppSortableList.d.ts +5 -0
- package/dist/types/components/AppSparkline.d.ts +24 -0
- package/dist/types/components/AppSplash.d.ts +2 -2
- package/dist/types/components/AppSplitButton.d.ts +10 -4
- package/dist/types/components/AppSplitView.d.ts +68 -0
- package/dist/types/components/AppStepper.d.ts +6 -0
- package/dist/types/components/AppSwitch.d.ts +24 -2
- package/dist/types/components/AppTablePagination.d.ts +44 -2
- package/dist/types/components/AppTableToolbar.d.ts +30 -0
- package/dist/types/components/AppTagInput.d.ts +20 -3
- package/dist/types/components/AppTextarea.d.ts +21 -1
- package/dist/types/components/AppTimePicker.d.ts +19 -2
- package/dist/types/components/AppTimeline.d.ts +8 -0
- package/dist/types/components/AppToast.d.ts +6 -0
- package/dist/types/components/AppToolbar.d.ts +3 -3
- package/dist/types/components/AppTooltip.d.ts +7 -4
- package/dist/types/components/AppUpdateBar.d.ts +20 -2
- package/dist/types/components/AppWhatsNew.d.ts +2 -0
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +18 -0
- package/dist/types/components/iconGlyphs.g.d.ts +1 -0
- package/dist/types/components/iconVariants.g.d.ts +5 -0
- package/dist/types/components/useWuiControl.d.ts +3 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/lib/FileItemRow.d.ts +9 -2
- package/dist/types/lib/buttonClass.d.ts +9 -0
- package/dist/types/lib/fieldState.d.ts +3 -0
- package/dist/types/lib/fillLabel.d.ts +1 -0
- package/dist/types/lib/labelWithHelp.d.ts +10 -0
- package/dist/types/lib/linkTarget.d.ts +30 -0
- package/dist/types/lib/sectionShell.d.ts +0 -1
- package/dist/types/lib/vocabulary.d.ts +3 -0
- package/dist/ui-react.js +1 -1
- package/dist/web-core/dist/query/listQuery.js +1 -0
- package/package.json +8 -7
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webority-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.0",
|
|
4
4
|
"platform": "Web",
|
|
5
5
|
"kitModuleVersion": 2,
|
|
6
6
|
"rendererProtocolVersion": 13,
|
|
7
7
|
"library": {
|
|
8
8
|
"name": "@webority/ui-react",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.130.0"
|
|
10
10
|
},
|
|
11
11
|
"files": {
|
|
12
12
|
"manifest.json": {
|
|
13
|
-
"sha256": "
|
|
14
|
-
"bytes":
|
|
13
|
+
"sha256": "e9f4c449641506d81c3e9e8bb5c0bee17540e480e1b8fffed79c17bdbeed9ee1",
|
|
14
|
+
"bytes": 971863
|
|
15
15
|
},
|
|
16
16
|
"kit.js": {
|
|
17
|
-
"sha256": "
|
|
18
|
-
"bytes":
|
|
17
|
+
"sha256": "9b626b8b2448a98f959f358f92bcf213adbd17f175c3b8b41c32dadd283a8324",
|
|
18
|
+
"bytes": 11133702
|
|
19
19
|
},
|
|
20
20
|
"kit.css": {
|
|
21
21
|
"sha256": "13b14f71fb6ea024945f95cba617b4f1d49f44a65ba7c7ed05d2354805539ef6",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppAvatar.js";import n from"./AppIcon.js";import r from"./warnUnknownProps.js";import{Dropdown as i}from"react-bootstrap";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(t){let{marker:n,props:i}=e(`AppAccountSwitcher`,t),{accounts:s=[],currentId:l,onSelect:u,label:d=`Switch account`,linkComponent:f,...p}=i;if(r(`AppAccountSwitcher`,p),s.length===0)return null;let m=s.find(e=>e.id===l)??s[0];return/* @__PURE__ */ o(`div`,{className:`wui-account-switcher`,role:`group`,"aria-label":d,...n,children:[/* @__PURE__ */ a(`div`,{className:`wui-account-switcher-label`,children:d}),/* @__PURE__ */ a(`div`,{className:`wui-account-switcher-list`,children:s.map(e=>/* @__PURE__ */ a(c,{account:e,current:e.id===m.id,onSelect:u,linkComponent:f},e.id))})]})}function c({account:e,current:r,onSelect:s,linkComponent:c}){let{id:l,name:u,description:d,photo:f,badge:p,href:m}=e,h=m?c??`a`:`button`,g=m?c?{to:m}:{href:m}:{type:`button`,onClick:()=>s?.(e)};return/* @__PURE__ */ o(i.Item,{as:h,className:`wui-account-switcher-option${r?` is-active`:``}`,"data-account-id":l,"aria-current":r?`true`:void 0,...g,children:[/* @__PURE__ */ a(t,{name:u,src:f,size:`md`,tone:`auto`}),/* @__PURE__ */ o(`span`,{className:`wui-account-switcher-option-text`,children:[/* @__PURE__ */ a(`span`,{className:`wui-account-switcher-option-name`,children:u}),d?/* @__PURE__ */ a(`span`,{className:`wui-account-switcher-option-note`,children:d}):null]}),p?/* @__PURE__ */ a(`span`,{className:`wui-account-switcher-badge`,children:p}):null,r?/* @__PURE__ */ a(n,{name:`check`,size:16,className:`wui-account-switcher-tick`}):null]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import{shortcutAria as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./renderIconProp.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import o from"./withTooltip.js";import{useRef as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`comfortable`,`compact`];function
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import{shortcutAria as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./renderIconProp.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import o from"./withTooltip.js";import{useRef as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`comfortable`,`compact`],p=[`danger`,`neutral`];function m(m){let{marker:h,props:g}=n(`AppActionIcon`,m),{icon:_,iconVariant:v,label:y,tooltipPlacement:b=`auto`,shortcut:x,tone:S,density:C=`comfortable`,disabled:w=!1,size:T=20,onClick:E,className:D=``,as:O,href:k,accept:A,multiple:j=!1,onFiles:M,...N}=g,P=Number(T),F=Number.isFinite(P)&&P>0?P:20;T!==void 0&&!(Number.isFinite(P)&&P>0)&&e(`AppActionIcon: size must be a positive number of px.`),a(`AppActionIcon`,O===void 0?N:{...N,as:O}),i(`AppActionIcon`,`iconVariant`,v,d),i(`AppActionIcon`,`density`,C,f),i(`AppActionIcon`,`tone`,S,p);let I=typeof M==`function`;I&&(O!==void 0||k!==void 0)&&e(`AppActionIcon: file mode renders a button; href and as are ignored.`),!I&&(A!==void 0||j)&&e(`AppActionIcon: accept and multiple apply only in file mode (pass onFiles).`);let L=s(null),R=e=>{let t=[...e.target.files];e.target.value=``,t.length>0&&M(t)},z=[`u-action`,S===`danger`?`danger`:``,S===`neutral`?`neutral`:``,D].filter(Boolean).join(` `),{style:B,...V}=N,H={"--wui-action-size":`${F+(C===`compact`?8:16)}px`,...B},U=I?`button`:O??(k?`a`:`button`),W=U===`button`,G=/* @__PURE__ */ l(U,{type:W?`button`:void 0,href:W||w?void 0:k,className:z,style:H,"aria-label":y,"aria-keyshortcuts":t(x),disabled:W?w:void 0,"aria-disabled":!W&&w?`true`:void 0,role:!W&&w?`link`:void 0,tabIndex:!W&&w?-1:void 0,onClick:e=>{w?(e.preventDefault(),e.stopPropagation()):(E?.(e),I&&!e.defaultPrevented&&L.current?.click())},...h,...V,children:r(_,{size:F,variant:v})}),K=o(G,y,b,x);return I?/* @__PURE__ */ u(c,{children:[K,/* @__PURE__ */ l(`input`,{type:`file`,ref:L,className:`wui-action-icon-file`,hidden:!0,tabIndex:-1,"aria-hidden":`true`,accept:A,multiple:j,onChange:R,onClick:e=>e.stopPropagation()})]}):K}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TONES as e}from"../lib/vocabulary.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{Alert as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l={info:`info`,success:`check`,warning:`alert-triangle`,danger:`x`},u=e.filter(e=>e!==`primary`),d=[`sm`,`md`,`lg`],f=[`alert`,`status`,`none`],p=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function m(e,t,r,i,a,o){return i?/* @__PURE__ */ s(`span`,{className:`alert-icon alert-icon-image`,style:o>0?{width:o,height:o}:void 0,children:/* @__PURE__ */ s(`img`,{src:i,alt:a})}):e?typeof e==`string`?/* @__PURE__ */ s(`span`,{className:`alert-icon`,children:/* @__PURE__ */ s(n,{name:e,size:t,variant:r})}):/* @__PURE__ */ s(`span`,{className:`alert-icon`,children:e}):null}function h(e){let{marker:n,props:h}=t(`AppAlert`,e),{tone:g=`info`,children:_,title:v,icon:y,iconVariant:b,iconSize:x,image:S,imageAlt:C=``,imageSize:w,className:T=``,onClose:E,dismissible:D,bordered:O=!0,accent:k=!1,size:A=`md`,action:j,role:M=`alert`,...N}=h;i(`AppAlert`,N),r(`AppAlert`,`tone`,g,u),r(`AppAlert`,`size`,A,d),r(`AppAlert`,`role`,M,f),r(`AppAlert`,`iconVariant`,b,p);let P=y===void 0?l[g]:y===`none`?null:y,F=!!S||!!P,I=j!=null&&j!==!1,L=v?/* @__PURE__ */ s(`div`,{className:`alert-heading`,children:v}):null,R=F&&!!L&&!!_,z=x>0?x:A===`lg`?R?17:15:R?13:11,B=[F?`alert-has-icon`:``,I?`alert-has-action`:``,R?`alert-stack`:``,O?``:`alert-borderless`,k?`alert-accent`:``,A===`sm`?`alert-sm`:``,A===`lg`?`alert-lg`:``,T].filter(Boolean).join(` `);return/* @__PURE__ */ s(a,{className:B||void 0,onClose:E,dismissible:D??typeof E==`function`,transition:!1,role:M===`none`?void 0:M,...n,...N,variant:g,children:F||I?/* @__PURE__ */ c(o,{children:[F&&m(P,z,b,S,C,w),/* @__PURE__ */ c(`div`,{className:`alert-content`,children:[L,_]}),I&&/* @__PURE__ */ s(`div`,{className:`alert-action`,children:j})]}):/* @__PURE__ */ c(o,{children:[L,_]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppButton.js";import n from"./AppEmptyState.js";import r from"./AppProgress.js";import i from"./warnUnknownProps.js";import{jsx as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppAsyncBlock`,o),{loading:l=!1,error:u=null,empty:d=!1,children:f,onRetry:p,skeleton:m,className:h
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppButton.js";import n from"./AppEmptyState.js";import r from"./AppProgress.js";import i from"./warnUnknownProps.js";import{jsx as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppAsyncBlock`,o),{loading:l=!1,error:u=null,empty:d=!1,children:f,onRetry:p,skeleton:m,className:h=``,loadingLabel:g=`Loading`,errorTitle:_=`Something went wrong`,retryLabel:v=`Retry`,emptyTitle:y=`Nothing to show yet`,...b}=c;i(`AppAsyncBlock`,b);let x=`async-block${h?` ${h}`:``}`;return l?/* @__PURE__ */ a(`div`,{className:x,"data-state":`loading`,...s,...b,children:m??/* @__PURE__ */ a(r,{value:0,indeterminate:!0,size:`sm`,label:g})}):u?/* @__PURE__ */ a(`div`,{className:x,"data-state":`error`,...s,...b,children:/* @__PURE__ */ a(n,{icon:`alert-circle`,title:_,description:u,action:p?/* @__PURE__ */ a(t,{variant:`soft`,onClick:p,children:v}):null})}):d?/* @__PURE__ */ a(`div`,{className:x,"data-state":`empty`,...s,...b,children:/* @__PURE__ */ a(n,{icon:`inbox`,title:y})}):/* @__PURE__ */ a(`div`,{className:x,"data-state":`content`,...s,...b,children:f})}export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`centred`,`split`],o={sm:360,md:420,lg:520},s=e=>e!=null&&e!==!1;function c(c){let{marker:l,props:u}=e(`AppAuthLayout`,c),{logo:d,variant:f=`centred`,maxWidth:p=`md`,aside:m,footer:h,children:g,className:_=``,...v}=u;n(`AppAuthLayout`,v),t(`AppAuthLayout`,`variant`,f,a),t(`AppAuthLayout`,`maxWidth`,typeof p==`string`?p:null,Object.keys(o));let{style:y,...b}=v,x=typeof p==`number`&&p>0?p:o[p]??o.md,S=f===`split`&&s(m);return/* @__PURE__ */ i(`div`,{className:`wui-auth ${S?`wui-auth-split`:`wui-auth-centred`}${_?` ${_}`:``}`,style:{"--wui-auth-width":`${x}px`,...y},...l,...b,children:[/* @__PURE__ */ r(`div`,{className:`wui-auth-main`,children:/* @__PURE__ */ i(`div`,{className:`wui-auth-panel`,children:[s(d)&&/* @__PURE__ */ r(`div`,{className:`wui-auth-logo`,children:d}),/* @__PURE__ */ r(`div`,{className:`wui-auth-body`,children:g}),s(h)&&/* @__PURE__ */ r(`div`,{className:`wui-auth-footer`,children:h})]})}),S&&/* @__PURE__ */ r(`aside`,{className:`wui-auth-aside`,children:m})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useNodeLabels.js";import a,{optionsEqual as o}from"./useWuiControl.js";import s from"./warnInvalidValue.js";import
|
|
1
|
+
import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useNodeLabels.js";import a,{optionsEqual as o}from"./useWuiControl.js";import s from"./warnInvalidValue.js";import ee from"./warnUnknownProps.js";import{forwardRef as c,useEffect as l,useId as u,useLayoutEffect as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var h=[`sm`,`md`,`lg`],te=[],ne=(e,t)=>({...e,label:t}),g=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},_=c(function(c,_){let{marker:v,props:y}=t(`AppAutocomplete`,c),{value:b,defaultValue:x,onChange:S,options:C,valueLabel:w,valueAvatar:T,valueInitials:E,loadOptions:D,placeholder:re=`Search…`,minChars:O,debounce:k,disabled:ie=!1,readOnly:ae=!1,loading:A=!1,open:j,size:M,allowCustom:N=!1,name:P,id:F,label:I,error:L,helperText:R,required:z=!1,optional:B=!1,optionalLabel:V=`(optional)`,help:H,helpLabel:U=`More information`,fieldClassName:W=``,...G}=y;ee(`AppAutocomplete`,G),s(`AppAutocomplete`,`size`,M,h);let K=typeof D==`function`,q=u(),J=F||q,{setRef:oe,innerRef:Y}=a({ref:_,value:b??(x===void 0?``:void 0),defaultValue:x,on:{change:e=>S?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),X=C||te,{portal:se,toElementOptions:Z}=i(X),Q=f(!1),$=f(D);return d(()=>{$.current=D}),l(()=>{let e=Y.current;if(!e||K&&Q.current)return;let t=Z(g(X,b,w),ne);o(t,e.options)||(e.options=t)},[X,K,Y,Z,b,w]),l(()=>{let e=Y.current;if(!e||!K||!Q.current)return;let t=e.options,n=g(t,b,w);n!==t&&(e.options=n)},[b,w,K,Y]),l(()=>{let e=Y.current;if(!e||!K)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await $.current(r.detail.query,{signal:n?.signal});i===t&&(Q.current=!0,e.options=a||[])}catch{i===t&&(Q.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[K,Y]),d(()=>{Y.current?.toggleAttribute(`loading`,!!A)}),/* @__PURE__ */ m(`div`,{...v,className:`field${W?` ${W}`:``}`,children:[I&&/* @__PURE__ */ m(`label`,{className:`label`,htmlFor:J,children:[I,B&&!z&&/* @__PURE__ */ p(`span`,{className:`label-optional`,children:` ${V}`}),z&&/* @__PURE__ */ p(r,{}),H&&/* @__PURE__ */ p(n,{label:U,children:H})]}),/* @__PURE__ */ p(`wui-autocomplete`,{"aria-label":typeof I==`string`?I:void 0,"aria-describedby":L?`${J}-error`:R?`${J}-hint`:void 0,"aria-invalid":L?`true`:void 0,id:J,ref:oe,name:P,placeholder:re,remote:K?``:void 0,"min-chars":O==null?void 0:String(O),debounce:k==null?void 0:String(k),size:M===`md`?void 0:M||void 0,"allow-custom":N?``:void 0,disabled:ie?``:void 0,readonly:ae?``:void 0,open:j?``:void 0,required:z?``:void 0,"value-avatar":T||void 0,"value-initials":E||void 0,...G}),se,/* @__PURE__ */ p(e,{error:L,hint:R,errorId:`${J}-error`,hintId:`${J}-hint`})]})});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initialsOf as e}from"../lib/initials.js";import{
|
|
1
|
+
import{initialsOf as e}from"../lib/initials.js";import{TONES as t}from"../lib/vocabulary.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./renderIconProp.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import o from"./withTooltip.js";import{useEffect as ee,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`circle`,`rounded`,`square`],f=[...t,`auto`],p=[`none`,`online`,`offline`,`away`,`busy`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=/* @__PURE__ */ new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),g={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function _(t){return e(t)||`?`}function v(e){let t=e||``,n=0;for(let e=0;e<t.length;e+=1)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return n%360}function y(e){if(typeof e==`number`)return e;if(g[e]!=null)return g[e];let t=Number.parseInt(e,10);return Number.isNaN(t)?32:t}function b(e){let{marker:t,props:g}=n(`AppAvatar`,e),{name:b,src:x,size:S=`md`,shape:C=`circle`,tone:w=`primary`,status:T=`none`,ring:E=!1,label:D,icon:O,iconVariant:k,badge:A,href:j,onClick:M,linkComponent:N,tooltip:P,tooltipPlacement:F,className:I=``,photoLabel:L=`Profile photo`,...R}=g;a(`AppAvatar`,R),i(`AppAvatar`,`shape`,C,d),i(`AppAvatar`,`tone`,w,f),i(`AppAvatar`,`status`,T,p),i(`AppAvatar`,`iconVariant`,k,m);let{style:z,...B}=R,[V,H]=s(!1);ee(()=>{H(!1)},[x]);let U=typeof S==`string`&&h.has(S),W=U?null:typeof S==`number`||/^\d+$/.test(S)?`${S}px`:S,G=j!=null||M!=null,K=x!=null&&x!==``&&!V,q=[`avatar`,U&&S!==`md`?`avatar-${S}`:``,C===`circle`?``:`avatar-${C}`,w===`primary`?``:`avatar-${w}`,E?`avatar-ring`:``,G?`avatar-clickable`:``,I].filter(Boolean).join(` `),J={};W&&(J[`--avatar-size`]=W),w===`auto`&&(J[`--avatar-hue`]=v(b));let Y=Object.keys(J).length||z?{...J,...z}:void 0,X=/* @__PURE__ */ l(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:O!=null&&O!==!1&&O!==``?r(O,{size:Math.round(y(S)*.55),variant:k}):_(b)}),Z=/* @__PURE__ */ u(c,{children:[T!==`none`&&/* @__PURE__ */ l(`span`,{className:`avatar-status avatar-status-${T}`,"aria-hidden":`true`}),A!=null&&/* @__PURE__ */ l(`span`,{className:`avatar-badge`,children:A}),D!=null&&/* @__PURE__ */ l(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:D})]}),Q=/* @__PURE__ */ u(c,{children:[X,K&&/* @__PURE__ */ l(`img`,{className:`avatar-img`,src:x,alt:G?``:b||L,onError:()=>H(!0)}),Z]});if(j!=null){let e=N||`a`,n=N?{to:j}:{href:j};return o(/* @__PURE__ */ l(e,{className:q,style:Y,...t,...B,"aria-label":D||b,...n,onClick:M,children:Q}),P,F)}if(M!=null)return o(/* @__PURE__ */ l(`button`,{type:`button`,className:q,style:Y,...t,...B,"aria-label":D||b,onClick:M,children:Q}),P,F);if(K)return o(/* @__PURE__ */ l(`span`,{className:q,style:Y,...t,...B,children:Q}),P,F);let $=D?.trim()||b?.trim();return o($?/* @__PURE__ */ l(`span`,{className:q,style:Y,...t,...B,role:`img`,"aria-label":$,children:Q}):/* @__PURE__ */ l(`span`,{className:q,style:Y,...t,...B,"aria-hidden":`true`,children:Q}),P,F)}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/fillLabel.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`tight`,`normal`,`loose`],s={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function c(e){return e==null?null:typeof e==`number`?`${e}px`:s[e]==null?/^\d+$/.test(e)?`${e}px`:e:`${s[e]}px`}function l(s){let{marker:l,props:u}=t(`AppAvatarGroup`,s),{children:d,size:f,spacing:p=`normal`,overflow:m,moreLabel:h=`{count} more`,className:g=``,..._}=u;r(`AppAvatarGroup`,_),n(`AppAvatarGroup`,`spacing`,p,o);let{style:v,...y}=_,b=[`avatar-group`,p===`normal`?``:`avatar-group-${p}`,g].filter(Boolean).join(` `),x=c(f),S=x?{"--avatar-size":x,...v}:v,C=typeof m==`string`?Number.parseInt(m,10):m,w=typeof m==`string`&&!/^\d+$/.test(m)?m:`+${C}`;return/* @__PURE__ */ a(`div`,{className:b,style:S,...l,...y,children:[d,C>0&&/* @__PURE__ */ i(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":e(h,{count:C}),children:w})]})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TONES as e}from"../lib/vocabulary.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./withTooltip.js";import{Badge as a}from"react-bootstrap";import{jsx as o}from"react/jsx-runtime";function s(s){let{marker:c,props:l}=t(`AppBadge`,s),{children:u,tone:d,dot:f=!1,tooltip:p,tooltipPlacement:m,className:h=``,...g}=l;r(`AppBadge`,g),n(`AppBadge`,`tone`,d,e);let _=[d&&d!==`neutral`?`badge-${d}`:``,f?`badge-dot`:``,h].filter(Boolean).join(` `);return i(/* @__PURE__ */ o(a,{bg:!1,className:_||void 0,...c,...g,children:u}),p,m)}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./renderIconProp.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(l){let{marker:u,props:d}=e(`AppBanner`,l),{tone:f=`info`,icon:p,children:m,dismissible:h=!1,
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./renderIconProp.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(l){let{marker:u,props:d}=e(`AppBanner`,l),{tone:f=`info`,icon:p,children:m,dismissible:h=!1,onClose:g,action:_,className:v=``,dismissLabel:y=`Dismiss`,...b}=d;i(`AppBanner`,b),r(`AppBanner`,`tone`,f,c);let[x,S]=a(!0);if(!x)return null;let C=c.includes(f)?f:`info`,w=_!=null&&_!==!1,T=()=>{S(!1),g?.()};return/* @__PURE__ */ s(`div`,{className:`wui-banner wui-banner-${C}${w?` wui-banner-has-action`:``}${v?` ${v}`:``}`,role:`status`,...u,...b,children:[p&&/* @__PURE__ */ o(`span`,{className:`wui-banner-icon`,children:n(p,{size:18})}),/* @__PURE__ */ o(`div`,{className:`wui-banner-body`,children:m}),w&&/* @__PURE__ */ o(`div`,{className:`wui-banner-action`,children:_}),h&&/* @__PURE__ */ o(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":y,onClick:T,children:/* @__PURE__ */ o(t,{name:`x`,size:18})})]})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shortcutAria as
|
|
1
|
+
import{buttonClass as e}from"../lib/buttonClass.js";import{shortcutAria as t,shortcutChip as n}from"../lib/shortcutChip.js";import{FILL_VARIANTS as r,TONES as i}from"../lib/vocabulary.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./AppIcon.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import l from"./withTooltip.js";import{Button as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p={sm:14,md:16,lg:20},m=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],h=[`rounded`,`pill`,`sharp`],g=[`button`,`submit`,`reset`],_=/* @__PURE__ */ new Set([!0,!1,...Array.from({length:100},(e,t)=>t+1)]),v=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],y=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function b(e){return/* @__PURE__ */ f(`span`,{className:`wui-btn-roll`,children:[/* @__PURE__ */ d(`span`,{className:`wui-btn-roll__a`,children:e}),/* @__PURE__ */ d(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function x(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?/* @__PURE__ */ d(o,{name:e,size:p[t]??p.md,variant:r,className:n}):/* @__PURE__ */ d(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return/* @__PURE__ */ f(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function S(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?/* @__PURE__ */ d(o,{name:e,size:p[n]??p.md,variant:r,className:i}):/* @__PURE__ */ d(`span`,{className:`d-inline-flex ${i}`,children:e})}function C(e,t,n){return e?/* @__PURE__ */ d(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?/* @__PURE__ */ d(o,{name:e,size:p[t]??p.md,variant:n}):e}):null}function w(o){let{marker:w,props:T}=a(`AppButton`,o),{children:E,tone:D=`primary`,variant:O=`solid`,size:k=`md`,type:A=`button`,loading:j=!1,disabled:M=!1,block:N=!1,leftIcon:P=null,rightIcon:F=null,href:I,static:L=!1,tooltip:R,tooltipPlacement:z,shortcut:B,animation:V,pinRightIcon:H=!1,shape:U=`rounded`,iconVariant:W,className:G=``,onClick:K,vibrate:q,...J}=T;c(`AppButton`,J),s(`AppButton`,`vibrate`,q,_);let Y=q===!0?10:Number.isInteger(q)&&q>=1&&q<=100?q:0;V!==void 0&&s(`AppButton`,`animation`,V,m);let X=V===`roll`&&!L,Z=H&&F!=null&&F!==``&&!L&&!j;if(s(`AppButton`,`tone`,D,i),s(`AppButton`,`variant`,O,r),s(`AppButton`,`size`,k,Object.keys(p)),s(`AppButton`,`shape`,U,h),s(`AppButton`,`type`,A,g),W!==void 0&&s(`AppButton`,`iconVariant`,W,v),L){let t=[`btn`,e(D,O),k===`sm`?`btn-sm`:k===`lg`?`btn-lg`:``,N?`w-100`:``,y(U),`btn-static`,G].filter(Boolean).join(` `);return l(/* @__PURE__ */ f(`span`,{className:t,...w,...J,children:[S(P,`left`,k,W),E,S(F,`right`,k,W)]}),R,z)}let Q=[N?`w-100`:``,j?`is-loading`:``,e(D,O),V&&m.includes(V)?`btn-anim-${V}`:``,Z?`wui-btn-pin-end`:``,y(U),G].filter(Boolean).join(` `),$=(J.as===void 0||J.as===`button`)&&I===void 0&&J.to===void 0,ee=$?{}:{role:void 0,tabIndex:M||j?-1:void 0},te=R!=null&&R!==``,ne=Y?e=>{!M&&!j&&navigator.vibrate?.(Y),K?.(e)}:K;return l(/* @__PURE__ */ f(u,{type:$?A:void 0,href:I,variant:null,size:k===`md`?void 0:k,disabled:M||j,"aria-busy":j||void 0,"aria-keyshortcuts":t(B),"data-wui-vibrate":Y||void 0,className:Q||void 0,onClick:ne,...ee,...w,...J,children:[j&&/* @__PURE__ */ d(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!j&&S(P,`left`,k,W),X?b(E):E,!j&&(X?x(F,k,Z,W):Z?C(F,k,W):S(F,`right`,k,W)),!te&&n(B)]}),R,z,B)}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-calendar:event-click`,f=`wui-calendar:date-click`,p=`wui-calendar:range-change`,m=[`month`,`week`,`day`,`list`],h=`This calendar couldn't load. Try again in a moment.`,g=i(function(i,g){let{marker:_,props:v}=t(`AppCalendar`,i),{label:y,events:b,eventsUrl:x,view:S,date:C,emptyText:w,errorText:T,firstDay:E,
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-calendar:event-click`,f=`wui-calendar:date-click`,p=`wui-calendar:range-change`,m=[`month`,`week`,`day`,`list`],h=`This calendar couldn't load. Try again in a moment.`,g=i(function(i,g){let{marker:_,props:v}=t(`AppCalendar`,i),{label:y,events:b,eventsUrl:x,view:S,date:C,emptyText:w,errorText:T,firstDay:E,timeZone:D,onEventClick:O,onDateClick:k,onRangeChange:A,className:j=``,style:M,...N}=v;r(`AppCalendar`,N),n(`AppCalendar`,`view`,S,m);let P=c(null),F=c(``),I=c({onEventClick:O,onDateClick:k,onRangeChange:A}),[L,R]=l(!1),z=a(e=>{P.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);return o(()=>{I.current={onEventClick:O,onDateClick:k,onRangeChange:A}}),s(()=>{let e=P.current;if(!e)return;let t=b==null?``:JSON.stringify(b);t!==F.current&&(F.current=t,e.events=b??null)}),o(()=>{let e=P.current,t=[[d,e=>{I.current.onEventClick?.(e.detail)===!1&&e.preventDefault()}],[f,e=>I.current.onDateClick?.(e.detail)],[p,e=>I.current.onRangeChange?.(e.detail)]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),o(()=>{let t=!0;return import(`@webority/ui-elements/calendar`).catch(n=>{e(`[AppCalendar] the calendar failed to load:`,n?.message),t&&R(!0)}),()=>{t=!1}},[]),L?/* @__PURE__ */ u(`div`,{..._,className:j||void 0,style:M,role:`status`,children:/* @__PURE__ */ u(`p`,{className:`wui-calendar-status-text`,children:T||h})}):/* @__PURE__ */ u(`wui-calendar`,{ref:z,label:y||void 0,"events-url":x||void 0,view:S||void 0,date:C||void 0,"empty-text":w||void 0,"error-text":T||void 0,"first-day":E==null?void 0:String(E),"time-zone":D||void 0,className:j||void 0,style:M,..._,...N})});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{useState as i}from"react";import{Card as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{useState as i}from"react";import{Card as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`flat`,`elevated`,`outline`,`filled`,`accent`],u={elevated:`card-elevated`,outline:`card-outlined`,filled:`card-muted`,accent:`card-accent`},d=[`primary`,`success`,`warning`,`danger`,`info`],f=[`none`,`sm`,`md`,`lg`],ee=[`sans`,`serif`],p={xs:320,sm:420,md:560,lg:720};function m(m){let{marker:h,props:te}=e(`AppCard`,m),{title:g,subtitle:_,headerIcon:v,titleClassName:y=``,titleFont:b=`sans`,header:x,headerExtra:S,headerActions:C,footer:w,media:T,children:E,variant:D=`flat`,tone:O=`primary`,padding:k=`md`,maxWidth:A,className:ne=``,bodyClassName:re=``,headerClassName:j=``,body:M=!0,lifted:N=!1,flush:P=!1,divided:F=!1,href:I,onClick:L,linkComponent:R,onClose:z,dismissible:B,closeLabel:V=`Close`,...H}=te,[U,W]=i(!1);r(`AppCard`,H),n(`AppCard`,`variant`,D,l),n(`AppCard`,`tone`,O,d),n(`AppCard`,`padding`,k,f),n(`AppCard`,`titleFont`,b,ee);let{style:G,...K}=H,q=I!=null||L!=null,J=[u[D]??``,D===`accent`&&O&&O!==`primary`?`tone-${O}`:``,k&&k!==`md`?`card-pad-${k}`:``,P?`card-flush`:``,F?`card-divided`:``,N?`card-lifted`:``,A==null?``:`card-constrained`,q?`card-clickable`:``,ne].filter(Boolean).join(` `)||void 0,Y=A==null?void 0:p[A]==null?typeof A==`number`?`${A}px`:A:`${p[A]}px`,ie=Y?{"--card-max-width":Y,...G}:G,X={};I==null?L!=null&&(X={role:`button`,tabIndex:0,onClick:L,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),L(e))}}):(X=R?{as:R,to:I}:{as:`a`,href:I},L&&(X.onClick=L));let Z=B??typeof z==`function`,ae=Z?/* @__PURE__ */ s(`button`,{type:`button`,className:`card-close`,"aria-label":V,onClick:e=>{e.preventDefault(),e.stopPropagation(),W(!0),z?.()},onKeyDown:e=>e.stopPropagation(),children:/* @__PURE__ */ s(t,{name:`x`,size:16})}):null,Q=g!=null||_!=null||v!=null,oe=x!=null||Q||S!=null||C!=null||Z,$=v==null?null:typeof v==`string`?/* @__PURE__ */ s(t,{name:v,size:18}):v;return U?null:/* @__PURE__ */ c(a,{className:J,style:ie,...h,...K,...X,children:[T!=null&&/* @__PURE__ */ s(`div`,{className:`card-media`,children:T}),oe&&/* @__PURE__ */ c(a.Header,{className:j||void 0,children:[x??/* @__PURE__ */ c(o,{children:[Q&&/* @__PURE__ */ c(`div`,{className:`card-header-main`,children:[$!=null&&/* @__PURE__ */ s(`span`,{className:`card-header-icon`,children:$}),/* @__PURE__ */ c(`div`,{className:`card-header-titles`,children:[g!=null&&/* @__PURE__ */ s(`div`,{className:[`card-title`,y].filter(Boolean).join(` `),style:b===`serif`?{fontFamily:`var(--wui-font-display)`}:void 0,children:g}),_!=null&&/* @__PURE__ */ s(`div`,{className:`card-subtitle`,children:_})]})]}),S,C!=null&&/* @__PURE__ */ s(`div`,{className:`card-header-actions`,children:C})]}),ae]}),M?/* @__PURE__ */ s(a.Body,{className:re||void 0,children:E}):E,w!=null&&/* @__PURE__ */ s(`div`,{className:`card-footer`,children:w})]})}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=(...e)=>e.filter(Boolean).join(` `),a=e=>e==null||e===``;function o(o){let{marker:s,props:c}=e(`AppCell`,o),{primary:l,secondary:u,href:d,mono:f=!1,numeric:p=!1,className:m=``,...h}=c;t(`AppCell`,h);let g=a(l)?`-`:l;return/* @__PURE__ */ r(`div`,{className:i(`wui-cell`,p&&`wui-cell-numeric`,f&&`wui-cell-mono`,m),...s,...h,children:[d?/* @__PURE__ */ n(`a`,{className:`wui-cell-primary`,href:d,children:g}):/* @__PURE__ */ n(`span`,{className:`wui-cell-primary`,children:g}),a(u)?null:/* @__PURE__ */ n(`span`,{className:`wui-cell-secondary`,children:u})]})}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var ee=`wui-chart:select`,te=`wui-chart:legend-change`,ne=`wui-chart:ready`,re=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],d=[`none`,`stacked`,`percent`],f=[`ready`,`loading`,`empty`,`error`],p=[`auto`,`svg`,`canvas`],ie=[`chart`,`table`],m=`This chart couldn't load. Try again in a moment.`,h=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},g=!1;function _(){!g&&h()&&(g=!0,e("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var v=e=>e===``?void 0:e,y=e=>Array.isArray(e)?e.map(y):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,y(t)])),b=e=>({type:v(e.type),title:v(e.title),description:v(e.description),data:e.data,x:y(e.x),series:y(e.series),group:y(e.group),to:y(e.to),size:y(e.size),trend:e.trend,zoom:e.zoom,bands:y(e.bands),stack:v(e.stack),y:y(e.y),target:y(e.target),centerLabel:v(e.centerLabel),height:e.height>0?e.height:void 0,state:v(e.state),emptyText:v(e.emptyText),errorText:v(e.errorText),loadingText:v(e.loadingText),renderer:v(e.renderer),timeZone:v(e.timeZone)}),x=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),ae=e=>{try{return JSON.stringify(e)}catch{return null}},S=i(function(i,g){let{marker:v,props:y}=t(`AppChart`,i),{type:S,title:C,description:oe,data:se,x:ce,series:w,group:T,to:E,size:D,trend:O,zoom:k,bands:A,stack:j,y:M,target:N,centerLabel:P,height:F,state:I,loading:L,error:R,emptyText:le,errorText:z,loadingText:B,renderer:V,timeZone:H,view:U,onSelect:W,onLegendChange:G,onReady:K,className:q=``,style:J,...Y}=y;r(`AppChart`,Y),n(`AppChart`,`type`,S,re),n(`AppChart`,`stack`,j,d),n(`AppChart`,`state`,I,f),n(`AppChart`,`renderer`,V,p),n(`AppChart`,`view`,U,ie),C||_();let X=!!R;h()&&L&&X&&e("[@webority/ui-react] <AppChart> takes `loading` or `error`, not both; `error` is shown.");let ue=X?`error`:L?`loading`:I,de=X?R:z,Z=c(null),Q=c({props:null,signature:null}),$=c({onSelect:W,onLegendChange:G,onReady:K}),[fe,pe]=l(!1),me=a(e=>{Z.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);return o(()=>{$.current={onSelect:W,onLegendChange:G,onReady:K}}),s(()=>{let e=Z.current;if(!e)return;let t={type:S,title:C,description:oe,data:se,x:ce,series:w,group:T,to:E,size:D,trend:O,zoom:k,bands:A,stack:j,y:M,target:N,centerLabel:P,height:F,state:ue,emptyText:le,errorText:de,loadingText:B,renderer:V,timeZone:H};if(x(t,Q.current.props))return;Q.current.props=t;let n=b(t),r=ae(n);(r===null||r!==Q.current.signature)&&(Q.current.signature=r,e.spec=n)}),o(()=>{let e=Z.current,t=e=>t=>$.current[e]?.(t.detail),n=[[ee,t(`onSelect`)],[te,t(`onLegendChange`)],[ne,t(`onReady`)]];for(let[t,r]of n)e.addEventListener(t,r);return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}},[]),o(()=>{let t=!0;return import(`@webority/ui-elements/chart`).catch(n=>{e(`[AppChart] the chart failed to load:`,n?.message),t&&pe(!0)}),()=>{t=!1}},[]),fe?/* @__PURE__ */ u(`div`,{...v,className:q||void 0,style:J,role:`status`,children:/* @__PURE__ */ u(`p`,{className:`wui-chart-state-text`,children:z||m})}):/* @__PURE__ */ u(`wui-chart`,{ref:me,view:U||void 0,className:q||void 0,style:J,...v,...Y})});export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/fillLabel.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppButton.js";import i from"./AppCard.js";import a from"./AppDropdown.js";import o from"./AppIcon.js";import s from"./AppSegmented.js";import c from"./warnUnknownProps.js";import{useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{Dropdown as p}from"react-bootstrap";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";var _=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},v=!1;function y(){!v&&_()&&(v=!0,e("[@webority/ui-react] <AppChartCard> has no `title`, which is the card's heading and names its menu button."))}var b=e=>e.getAttribute(`view`)===`table`?`table`:`chart`;function x(e){let{marker:_,props:v}=n(`AppChartCard`,e),{title:x,subtitle:S,toolbar:C=!0,onRetry:w,footer:T,children:E,className:D=``,legendLabel:O=`Show legend`,legendTitle:k=`Show or hide the legend`,viewLabel:A=`View`,chartViewLabel:j=`Chart`,tableViewLabel:M=`Table`,moreActionsLabel:N=`More actions`,moreActionsForLabel:P=`More actions for {title}`,downloadPngLabel:F=`Download PNG`,downloadCsvLabel:I=`Download CSV`,retryLabel:L=`Try again`,...R}=v;c(`AppChartCard`,R),x||y();let z=d(null),B=d(null),[V,H]=f(`chart`),U=d(V);U.current=V;let[W,G]=f(!0),K=()=>z.current?.querySelector(`wui-chart`);l(()=>{let e=z.current,t=()=>{let t=e.querySelector(`wui-chart`);t&&(t===B.current?H(b(t)):(B.current=t,t.hasAttribute(`view`)?H(b(t)):U.current!==`chart`&&t.setAttribute(`view`,U.current)))};t();let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`view`]}),()=>n.disconnect()},[]);let q=e=>{H(e),K()?.setAttribute(`view`,e)},J=u(()=>[{value:`chart`,label:j,icon:`chart`},{value:`table`,label:M,icon:`grid`}],[j,M]),Y=/* @__PURE__ */ g(m,{children:[/* @__PURE__ */ h(`button`,{type:`button`,className:`topbar-icon-btn wui-chart-card-tool wui-chart-card-legend-tool`,"aria-pressed":W,"aria-label":O,title:k,onClick:()=>G(!W),children:/* @__PURE__ */ h(o,{name:`list`,size:16})}),/* @__PURE__ */ h(s,{size:`sm`,label:A,options:J,value:V,onChange:q}),/* @__PURE__ */ g(a,{icon:`more-horizontal`,label:x?t(P,{title:x}):N,children:[/* @__PURE__ */ g(p.Item,{as:`button`,type:`button`,onClick:()=>K()?.exportPng?.(),children:[/* @__PURE__ */ h(o,{name:`image`,size:16}),F]}),/* @__PURE__ */ g(p.Item,{as:`button`,type:`button`,onClick:()=>K()?.exportCsv?.(),children:[/* @__PURE__ */ h(o,{name:`download`,size:16}),I]})]})]}),X=[`wui-chart-card`,W?``:`wui-chart-card-legend-off`,D].filter(Boolean).join(` `);return/* @__PURE__ */ g(i,{title:x,subtitle:S,headerActions:C?Y:void 0,footer:T,className:X,..._,...R,children:[/* @__PURE__ */ h(`div`,{ref:z,children:E}),w&&/* @__PURE__ */ h(`div`,{className:`wui-chart-card-retry`,children:/* @__PURE__ */ h(r,{variant:`outline`,size:`sm`,onClick:w,children:L})})]})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/CheckField.js";import{
|
|
1
|
+
import e from"../lib/CheckField.js";import{FIELD_SIZES as t}from"../lib/fieldState.js";import n from"../lib/labelWithHelp.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=[`circle`],l=o(function(o,l){let{marker:u,props:d}=r(`AppCheckbox`,o),{label:f,id:p,name:m,error:h,helperText:g,shape:_,help:v,helpLabel:y=`More information`,readOnly:b=!1,loading:x=!1,size:S=`md`,className:C=``,...w}=d;a(`AppCheckbox`,w),i(`AppCheckbox`,`shape`,_,c),i(`AppCheckbox`,`size`,S,t);let T=_===`circle`?`form-check form-check-circle`:`form-check`;return/* @__PURE__ */ s(e,{rootProps:u,ref:l,label:n(f,v,y),id:p,name:m,error:h,hint:g,className:C,rest:w,inputType:`checkbox`,wrapperClass:T,readOnly:b,loading:x,size:S})});export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TONES as e}from"../lib/vocabulary.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`soft`,`outline`,`solid`],l=[`sm`,`md`];function u(u){let{marker:d,props:f}=t(`AppChip`,u),{label:p,children:m,tone:h=`neutral`,variant:g=`soft`,size:_=`md`,leadingIcon:v,avatar:y,onRemove:b,onClick:x,disabled:S=!1,removeLabel:C,className:w=``,...T}=f;i(`AppChip`,T),r(`AppChip`,`tone`,h,e),r(`AppChip`,`variant`,g,c),r(`AppChip`,`size`,_,l);let E=p??m,D={},O={};for(let[e,t]of Object.entries(T))x&&(e.startsWith(`aria-`)||e.startsWith(`data-`))?D[e]=t:O[e]=t;let k=[`chip`,h&&h!==`neutral`?h:``,g===`outline`?`chip-outline`:g===`solid`?`chip-solid`:``,_===`sm`?`chip-sm`:``,x?`chip-clickable`:``,b?`chip-removable`:``,S?`is-disabled`:``,w].filter(Boolean).join(` `),A=y?/* @__PURE__ */ o(`span`,{className:`chip-avatar`,children:typeof y==`string`?/* @__PURE__ */ o(`img`,{src:y,alt:``}):y}):v?/* @__PURE__ */ o(`span`,{className:`chip-ic`,children:/* @__PURE__ */ o(n,{name:v,size:_===`sm`?12:14})}):null,j=x?/* @__PURE__ */ s(`button`,{type:`button`,className:`chip-body`,...D,onClick:x,disabled:S,children:[A,/* @__PURE__ */ o(`span`,{className:`chip-label`,children:E})]}):/* @__PURE__ */ s(a,{children:[A,/* @__PURE__ */ o(`span`,{className:`chip-label`,children:E})]});return/* @__PURE__ */ s(`span`,{className:k,...d,...O,children:[j,b&&/* @__PURE__ */ o(`button`,{type:`button`,className:`chip-remove`,onClick:b,disabled:S,"aria-label":C||(typeof E==`string`?`Remove ${E}`:`Remove`),children:/* @__PURE__ */ o(n,{name:`x`,size:_===`sm`?12:14})})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{FIELD_BUSY_CLASS as e,blockWhenReadOnly as t}from"../lib/fieldState.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppInfoTip.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";var u={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},d={inline:``,stacked:` wui-struct-card-stacked`},f={filled:` wui-struct-card-filled`},p={sm:16,md:18,lg:22};function m(m){let{marker:h,props:g}=n(`AppChoiceCard`,m),{name:_,multiple:v=!1,value:y,checked:b,onChange:x,icon:S,iconNode:C,iconSize:w,image:T,imageAlt:E=``,children:D,title:O,description:k,help:A,helpLabel:j=`More information`,checkIcon:M=`check`,checkSize:N=18,hideCheck:P=!1,disabled:F=!1,readOnly:I=!1,loading:L=!1,size:R=`md`,layout:z=`inline`,selectedStyle:B,className:V=``,...H}=g;o(`AppChoiceCard`,H),a(`AppChoiceCard`,`size`,R,Object.keys(u)),a(`AppChoiceCard`,`layout`,z,Object.keys(d)),a(`AppChoiceCard`,`selectedStyle`,B,Object.keys(f));let U=u[R]??``,W=d[z]??``,G=f[B]??``,K=w??p[R]??p.md;return/* @__PURE__ */ l(`label`,{className:`struct-card${T?` struct-card-img-card`:``}${U}${W}${G}${P?` wui-struct-card-no-check`:``}${V?` ${V}`:``}${L?` ${e}`:``}`,"aria-disabled":F||void 0,"aria-busy":L||void 0,...h,...H,children:[/* @__PURE__ */ c(`input`,{type:v?`checkbox`:`radio`,name:_,value:y,className:`struct-card-input`,checked:b,onChange:x,onClick:t(I||L),"aria-readonly":I||void 0,disabled:F||L}),T?/* @__PURE__ */ c(`span`,{className:`struct-card-media`,children:/* @__PURE__ */ c(`img`,{className:`struct-card-img`,src:T,alt:E})}):C||S?/* @__PURE__ */ c(`span`,{className:`struct-card-ic`,children:C||/* @__PURE__ */ l(s,{children:[/* @__PURE__ */ c(`span`,{className:`wui-struct-card-glyph`,children:/* @__PURE__ */ c(r,{name:S,size:K})}),/* @__PURE__ */ c(`span`,{className:`wui-struct-card-glyph-on`,children:/* @__PURE__ */ c(r,{name:S,size:K,variant:`bold`})})]})}):null,/* @__PURE__ */ l(`span`,{className:`struct-card-body`,children:[D||/* @__PURE__ */ l(s,{children:[O&&/* @__PURE__ */ c(`span`,{className:`struct-card-title`,children:O}),k&&/* @__PURE__ */ c(`span`,{className:`struct-card-desc`,children:k})]}),A&&/* @__PURE__ */ c(i,{label:j,children:A})]}),!P&&/* @__PURE__ */ c(`span`,{className:`struct-card-check`,children:/* @__PURE__ */ c(r,{name:M,size:N})})]})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{FIELD_BUSY_CLASS as e,blockWhenReadOnly as t}from"../lib/fieldState.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppInfoTip.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`sm`,`md`,`lg`],u=[`soft`,`solid`];function d(d){let{marker:f,props:p}=n(`AppChoiceChip`,d),{multiple:m=!0,label:h,name:g,value:_,checked:v,onChange:y,children:b,count:x,help:S,helpLabel:C=`More information`,size:w=`md`,variant:T=`soft`,disabled:E=!1,readOnly:D=!1,loading:O=!1,className:k=``,...A}=p;return a(`AppChoiceChip`,A),i(`AppChoiceChip`,`size`,w,l),i(`AppChoiceChip`,`variant`,T,u),/* @__PURE__ */ c(o,{children:[/* @__PURE__ */ c(`label`,{className:`choice-chip${v?` checked`:``}${w===`sm`?` choice-chip-sm`:w===`lg`?` choice-chip-lg`:``}${T===`solid`?` wui-choice-chip-solid`:``}${k?` ${k}`:``}${O?` ${e}`:``}`,"aria-busy":O||void 0,...f,...A,children:[/* @__PURE__ */ s(`input`,{type:m?`checkbox`:`radio`,name:g,value:_,checked:v,disabled:E||O,"aria-readonly":D||void 0,onClick:t(D||O),onChange:y}),/* @__PURE__ */ s(`span`,{children:h??b}),x!=null&&/* @__PURE__ */ s(`span`,{className:`count`,children:x})]}),S&&/* @__PURE__ */ s(r,{label:C,children:S})]})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{
|
|
1
|
+
import e from"../lib/FieldMessage.js";import{FIELD_BUSY_CLASS as t}from"../lib/fieldState.js";import n from"../lib/fillLabel.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./warnInvalidValue.js";import s from"./warnUnknownProps.js";import{useId as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`];function p(p){let{marker:m,props:h}=r(`AppColorField`,p),{value:g,defaultValue:_,onChange:v,label:y,required:b=!1,optional:x=!1,error:S,helperText:C,help:w,helpLabel:T=`More information`,colourLabel:E=`Colour`,colourPickerLabel:D=`{label}, colour picker`,optionalLabel:O=`(optional)`,name:k,id:A,disabled:j=!1,readOnly:M=!1,loading:N=!1,size:P=`md`,className:F=``,fieldClassName:I=``,...L}=h;s(`AppColorField`,L),o(`AppColorField`,`size`,P,f);let[R,z]=l(_??`#000000`),B=g===void 0?R:g,V=e=>{z(e),v?.(e)},H=c(),U=A||H,W=S?`${U}-error`:C?`${U}-hint`:void 0,G=e=>/^#[0-9a-f]{6}$/i.test(e),K=P===`sm`?` color-field-sm`:P===`lg`?` color-field-lg`:``,q=P===`sm`?` input-sm`:P===`lg`?` input-lg`:``;return/* @__PURE__ */ d(`div`,{...m,className:`field${I?` ${I}`:``}`,children:[y&&/* @__PURE__ */ d(`label`,{className:`label`,htmlFor:U,children:[y,x&&!b&&/* @__PURE__ */ u(`span`,{className:`label-optional`,children:` ${O}`}),b&&/* @__PURE__ */ u(a,{}),w&&/* @__PURE__ */ u(i,{label:T,children:w})]}),/* @__PURE__ */ d(`div`,{className:`color-field${K}`,children:[/* @__PURE__ */ u(`input`,{type:`color`,className:`color-field-swatch`,value:G(B)?B:`#000000`,onChange:e=>V(e.target.value),disabled:j||M||N,"aria-label":n(D,{label:y||E}),tabIndex:-1}),/* @__PURE__ */ u(`input`,{type:`text`,className:`input color-field-hex${q}${S?` error`:``}${N?` ${t}`:``}${F?` ${F}`:``}`,id:U,name:k,value:B,onChange:e=>V(e.target.value),placeholder:`#4F46E5`,spellCheck:!1,maxLength:7,required:b,disabled:j,readOnly:M||N,"aria-busy":N||void 0,"aria-invalid":S?`true`:`false`,"aria-describedby":W,...L})]}),/* @__PURE__ */ u(e,{error:S,hint:C,errorId:`${U}-error`,hintId:`${U}-hint`})]})}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppModal.js";import a from"./AppSpinner.js";import o from"./renderIconProp.js";import s from"./warnUnknownProps.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var g=`lg`;function _(e){let{marker:t,props:r}=n(`AppCommandPalette`,e),{open:a,onClose:o,query:c=``,onQueryChange:l,placeholder:u=`Search…`,groups:f=[],path:p=[],onPathChange:h,rootLabel:_,backLabel:y=`Back`,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C=!1,emptyText:w=`No results`,footer:T,ariaLabel:E=`Search`,highlight:
|
|
1
|
+
import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppModal.js";import a from"./AppSpinner.js";import o from"./renderIconProp.js";import s from"./warnUnknownProps.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var g=`lg`;function _(e){let{marker:t,props:r}=n(`AppCommandPalette`,e),{open:a,onClose:o,query:c=``,onQueryChange:l,placeholder:u=`Search…`,groups:f=[],path:p=[],onPathChange:h,rootLabel:_,backLabel:y=`Back`,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C=!1,emptyText:w=`No results`,footer:T,ariaLabel:E=`Search`,resultsLabel:D=`Results`,highlight:O=!0,id:k,className:A=``,...j}=r;s(`AppCommandPalette`,j);let M=d(),N=k||M;return/* @__PURE__ */ m(i,{...t,open:a,onClose:o,hideHeader:!0,placement:`top`,size:g,ariaLabel:E,className:`wui-cmd-card${A?` ${A}`:``}`,children:/* @__PURE__ */ m(v,{baseId:N,query:c,onQueryChange:l,placeholder:u,groups:f,path:p,onPathChange:h,rootLabel:_,backLabel:y,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C,emptyText:w,footer:T,ariaLabel:E,resultsLabel:D,highlight:O,onClose:o,rest:j})})}function v({baseId:n,query:i,onQueryChange:s,placeholder:c,groups:l,path:d,onPathChange:g,rootLabel:_,backLabel:v,recentsKey:x,recentsLimit:S,recentsLabel:C,loading:w,emptyText:T,footer:E,ariaLabel:D,resultsLabel:O,highlight:k,onClose:A,rest:j}){let M=p(null),N=`${n}-list`,P=l.filter(e=>e.items?.length),F=!w&&i.trim()!==``&&P.length===0;return f(()=>{M.current?.refresh?.()}),u(()=>{let e=M.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);t&&(e.preventDefault(),t.page?(s?.(``),g?.([...d,{key:t.page.key,label:t.page.label}])):(t.onSelect?.(),A?.()))},n=e=>{e.preventDefault(),s?.(``),g?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,A,s,g]),/* @__PURE__ */ h(`wui-command-palette`,{ref:M,path:JSON.stringify(d),"root-label":_,"recents-key":x,"recents-limit":S,"recents-label":C,...j,children:[/* @__PURE__ */ h(`div`,{className:`wui-cmd-search`,children:[/* @__PURE__ */ m(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ m(r,{name:`search`,size:18})}),/* @__PURE__ */ m(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":N,"aria-autocomplete":`list`,"aria-label":D,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:i,onChange:e=>s?.(e.target.value)}),w&&/* @__PURE__ */ m(a,{size:`sm`,className:`wui-cmd-spinner`})]}),/* @__PURE__ */ h(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[/* @__PURE__ */ m(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":v,children:/* @__PURE__ */ m(r,{name:`chevron-left`,size:16})}),/* @__PURE__ */ m(`ol`,{className:`wui-cmd-trail`})]}),/* @__PURE__ */ h(`div`,{className:`wui-cmd-list`,role:`listbox`,id:N,"aria-label":O,"aria-busy":w?`true`:void 0,hidden:P.length===0,children:[/* @__PURE__ */ m(`div`,{className:`wui-cmd-recents`}),P.map(a=>{let s=`${n}-${b(a.key)}`;return/* @__PURE__ */ h(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[/* @__PURE__ */ m(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:a.label}),a.items.map(n=>{let c=`${s}-${b(n.key)}`,l=n.description==null?null:`${c}-desc`,u=n.meta==null?null:`${c}-meta`;return/* @__PURE__ */ h(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(a.key),"data-key":String(n.key),"data-opens":n.page?String(n.page.key):void 0,"aria-label":n.ariaLabel||(typeof n.label==`string`?n.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":n.disabled?`true`:void 0,"aria-keyshortcuts":e(n.shortcut),children:[n.icon!=null&&/* @__PURE__ */ m(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:o(n.icon,{size:18})}),/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-text`,children:[/* @__PURE__ */ m(`span`,{className:`wui-cmd-item-label`,children:k?y(n.label,i):n.label}),l&&/* @__PURE__ */ m(`span`,{className:`wui-cmd-item-desc`,id:l,children:n.description})]}),u&&/* @__PURE__ */ m(`span`,{className:`wui-cmd-item-meta`,id:u,children:n.meta}),t(n.shortcut),n.page&&/* @__PURE__ */ m(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ m(r,{name:`chevron-right`,size:16})})]},n.key)})]},a.key)})]}),/* @__PURE__ */ m(`div`,{className:`wui-cmd-empty`,role:`status`,children:F?T:null}),E!=null&&/* @__PURE__ */ m(`div`,{className:`wui-cmd-footer`,children:E})]})}function y(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?/* @__PURE__ */ m(`mark`,{className:`wui-cmd-mark`,children:e.text},t):/* @__PURE__ */ m(l,{children:e.text},t)})}function b(e){return String(e).replace(/\s+/g,`_`)}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initialsOf as
|
|
1
|
+
import e from"../lib/fillLabel.js";import{initialsOf as t}from"../lib/initials.js";import{linkTarget as n}from"../lib/linkTarget.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppAvatar.js";import a from"./AppBadge.js";import o from"./AppButton.js";import s from"./AppIcon.js";import c from"./warnInvalidValue.js";import l from"./warnUnknownProps.js";import{parseMentionValue as u}from"@webority/ui-elements/elements/mention-input";import{formatDate as d,formatFileSize as f,formatNumber as p,toInstant as m}from"@webority/ui-elements/helpers";import{Fragment as h,useEffect as g,useId as _,useRef as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{COMMENT_REACTIONS as x,COMMENT_TEXT as S}from"@webority/ui-elements/elements/comment-thread";var C=[`stacked`,`inline`],w=[`list`,`conversation`];function T(e){let{marker:t,props:n}=r(`AppCommentThread`,e),{comments:a=[],onPost:s,onReply:u,onEdit:d,onDelete:f,onReact:p,people:m,loadPeople:h,reactionChoices:T,allowReplies:D=!0,allowReactions:O=!0,composerPlaceholder:k,variant:A=`list`,composer:j=`stacked`,author:M,postLabel:N=S.post,composerRows:P,readOnly:F=!1,linkComponent:I,label:L=S.listName,internalLabel:R=`Internal note`,attachmentsLabel:z=`Attachments`,composerLabel:B=`Add a comment`,noCommentsText:V=`No comments yet.`,reactionsLabel:H=`Reactions`,repliesToLabel:U=`Replies to {name}`,editedLabel:W=`Edited`,deletedText:G=`This comment was deleted.`,replyLabel:K=`Reply`,editLabel:q=`Edit`,deleteLabel:ee=`Delete`,deleteConfirmText:te=`Delete this comment?`,cancelLabel:ne=`Cancel`,addReactionLabel:re=`Add a reaction`,chooseReactionLabel:ie=`Choose a reaction`,peopleLabel:ae=`People`,id:oe,className:se=``,...J}=n;l(`AppCommentThread`,J),c(`AppCommentThread`,`variant`,A,w),c(`AppCommentThread`,`composer`,j,C);let ce=_(),Y=oe||`comment-thread-${ce.replace(/[^a-zA-Z0-9_-]/g,``)}`,X=v(null),Z=typeof h==`function`,le=T?.length?T:x,Q=j===`inline`,ue=P??(Q?1:3),de={reactionsLabel:H,repliesToLabel:U,editedLabel:W,deletedText:G,replyLabel:K,editLabel:q,deleteLabel:ee,deleteConfirmText:te,cancelLabel:ne,addReactionLabel:re},$=v(null);return $.current={onPost:s,onReply:u,onEdit:d,onDelete:f,onReact:p,loadPeople:h},g(()=>{let e=X.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=$.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),g(()=>{let e=X.current;e&&!Z&&(e.people=m||[])},[m,Z]),g(()=>{let e=X.current;if(!e||!Z)return;let t=/* @__PURE__ */ new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await $.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[Z]),/* @__PURE__ */ b(`wui-comment-thread`,{ref:X,id:Y,class:[`wui-comment-thread`,A===`conversation`&&`wui-comment-thread--conversation`,se].filter(Boolean).join(` `),controlled:``,"read-only":F?``:void 0,remote:Z?``:void 0,"reaction-choices":T?.length?T.join(` `):void 0,"no-replies":D?void 0:``,"no-reactions":O?void 0:``,"composer-placeholder":k,...t,...J,children:[/* @__PURE__ */ y(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:a.length?/* @__PURE__ */ y(`ol`,{className:`wui-comment-list`,"aria-label":L,children:a.map(e=>/* @__PURE__ */ y(E,{comment:e,topLevel:!0,readOnly:F,allowReplies:D,allowReactions:O,linkComponent:I,internalLabel:R,attachmentsLabel:z,text:de},e.id))}):/* @__PURE__ */ y(`p`,{className:`wui-comment-empty`,children:V})}),!F&&O&&/* @__PURE__ */ y(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":ie,"data-wui-picker":``,hidden:!0,children:le.map(e=>/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!F&&/* @__PURE__ */ b(`div`,{className:Q?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[Q&&M?/* @__PURE__ */ y(i,{name:M,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,/* @__PURE__ */ y(`wui-mention-input`,{id:`${Y}-new`,class:`wui-mention-input`,label:B,"people-label":ae,placeholder:k??S.composerPlaceholder,rows:String(ue),remote:Z?``:void 0}),/* @__PURE__ */ y(`div`,{className:`wui-comment-form-actions`,children:/* @__PURE__ */ y(o,{variant:Q?`outline`:`solid`,size:`sm`,"data-wui-action":`post`,children:N})}),/* @__PURE__ */ y(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),/* @__PURE__ */ y(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function E({comment:r,topLevel:i=!1,readOnly:c,allowReplies:l,allowReactions:g,linkComponent:_,internalLabel:v,attachmentsLabel:x,text:S}){let{id:C,author:w,at:T,value:D,edited:O,mine:k,internal:A,attachments:j=[],deleted:M,canEdit:N,canDelete:P,reactions:F=[],replies:I=[]}=r,L=w?.name||``,R=m(T),z=!c&&!M&&N,B=!c&&!M&&P,V=i&&l,H=[`wui-comment`,A&&`wui-comment--internal`,k&&`wui-comment--mine`].filter(Boolean).join(` `);return/* @__PURE__ */ b(`li`,{className:H,"data-wui-comment":C,"data-value":D??``,"data-wui-deleted":M?``:void 0,children:[/* @__PURE__ */ b(`div`,{className:`wui-comment-row`,children:[/* @__PURE__ */ b(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[/* @__PURE__ */ y(`span`,{className:`avatar-face`,children:t(L)||`?`}),w?.src&&/* @__PURE__ */ y(`img`,{className:`avatar-img`,src:w.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),/* @__PURE__ */ b(`div`,{className:`wui-comment-main`,children:[/* @__PURE__ */ b(`div`,{className:`wui-comment-head`,children:[/* @__PURE__ */ y(`span`,{className:`wui-comment-author`,children:L}),/* @__PURE__ */ y(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(R)?new Date(R).toISOString():void 0,children:d(T,{pattern:`datetime`})}),O&&!M&&/* @__PURE__ */ y(`span`,{className:`wui-comment-edited`,children:S.editedLabel}),A&&/* @__PURE__ */ y(a,{className:`wui-comment-internal-badge`,children:v})]}),M?/* @__PURE__ */ y(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:S.deletedText}):/* @__PURE__ */ y(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:u(D).map((e,t)=>`text`in e?/* @__PURE__ */ y(h,{children:e.text},t):/* @__PURE__ */ b(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),!M&&j.length>0&&/* @__PURE__ */ y(`ul`,{className:`wui-comment-attachments`,"aria-label":x,children:j.map(e=>{let{Tag:t,linkProps:r}=n(_,{to:e.to,href:e.href,routeHref:!1});return/* @__PURE__ */ b(`li`,{children:[/* @__PURE__ */ b(t,{className:`wui-comment-attachment`,...r,...e.to?{}:{download:!0},children:[/* @__PURE__ */ y(s,{name:`paperclip`,size:14}),e.name]}),typeof e.sizeBytes==`number`&&/* @__PURE__ */ y(`span`,{className:`wui-comment-attachment-size`,children:f(e.sizeBytes)})]},e.to??e.href)})}),z&&/* @__PURE__ */ y(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),g&&!M&&(F.length>0||!c)&&/* @__PURE__ */ b(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":S.reactionsLabel,children:[F.map(e=>c?/* @__PURE__ */ b(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[/* @__PURE__ */ y(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ y(`span`,{className:`wui-reaction-count`,children:p(e.count,{decimals:0})})]},e.emoji):/* @__PURE__ */ b(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[/* @__PURE__ */ y(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ y(`span`,{className:`wui-reaction-count`,children:p(e.count,{decimals:0})})]},e.emoji)),!c&&/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":S.addReactionLabel,"aria-haspopup":`true`,"aria-expanded":`false`,children:/* @__PURE__ */ y(s,{name:`emoji-smile`,size:16})})]}),!c&&!M&&(V||z||B)&&/* @__PURE__ */ b(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[V&&/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:S.replyLabel}),z&&/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:S.editLabel}),B&&/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:S.deleteLabel})]}),B&&/* @__PURE__ */ b(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[/* @__PURE__ */ y(`span`,{className:`wui-comment-confirm-text`,children:S.deleteConfirmText}),/* @__PURE__ */ y(o,{tone:`danger`,size:`sm`,"data-wui-action":`confirm-delete`,children:S.deleteLabel}),/* @__PURE__ */ y(o,{variant:`ghost`,size:`sm`,"data-wui-action":`cancel-delete`,children:S.cancelLabel})]}),!c&&/* @__PURE__ */ y(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),i&&I.length>0&&/* @__PURE__ */ y(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":e(S.repliesToLabel,{name:L}),children:I.map(e=>/* @__PURE__ */ y(E,{comment:e,readOnly:c,allowReactions:g,linkComponent:_,internalLabel:v,attachmentsLabel:x,text:S},e.id))}),V&&!c&&!M&&/* @__PURE__ */ y(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{isValidElement as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`stack`,`scroll`],d=[`comfortable`,`relaxed`],f=[`start`,`center`],p={yes:{icon:`tick-circle
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{isValidElement as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`stack`,`scroll`],d=[`comfortable`,`relaxed`],f=[`start`,`center`],p={yes:{icon:`tick-circle`},no:{icon:`close-circle`},warn:{icon:`danger`},partial:{icon:`minus-circle`}};function m(e){return typeof e==`object`&&!!e&&!i(e)}function h(e){return e.scrollLeft+e.clientWidth<e.scrollWidth-1}function g(...e){return e.filter(Boolean).join(` `)||void 0}function _(e){return g(e.highlight&&`is-highlight`,e.align===`center`&&`wui-compare-center`,e.nowrap&&`wui-compare-nowrap`)}function v(e,r){if(e===!0)return/* @__PURE__ */ l(`span`,{className:`compare-yes`,children:[/* @__PURE__ */ c(t,{name:`check`,size:16}),/* @__PURE__ */ c(`span`,{className:`visually-hidden`,children:r.yesLabel})]});if(e===!1)return/* @__PURE__ */ l(`span`,{className:`compare-no`,children:[/* @__PURE__ */ c(`span`,{"aria-hidden":`true`,children:`-`}),/* @__PURE__ */ c(`span`,{className:`visually-hidden`,children:r.noLabel})]});if(m(e)&&`state`in e){let i=p[e.state],a={yes:r.yesLabel,no:r.noLabel,warn:r.warningLabel,partial:r.partialLabel};return n(`AppCompareTable`,`state`,e.state,Object.keys(p)),/* @__PURE__ */ l(`span`,{className:`wui-compare-state wui-compare-state-${e.state}`,children:[i&&/* @__PURE__ */ c(t,{name:i.icon,size:16,variant:`bulk`}),i&&/* @__PURE__ */ c(`span`,{className:`visually-hidden`,children:`${a[e.state]}: `}),e.text]})}return m(e)&&`code`in e?/* @__PURE__ */ c(`span`,{className:`wui-compare-code`,children:e.code}):e}function y(e,t,n){let r=[],i=null;return t.forEach((t,a)=>{t.group!=null&&t.group!==i&&r.push(/* @__PURE__ */ c(`tr`,{className:`wui-compare-group-row`,children:/* @__PURE__ */ c(`th`,{colSpan:e.length,scope:`rowgroup`,className:`wui-compare-group`,children:t.group})},`group:${t.group}:${t.key??t.label}`)),i=t.group??null,r.push(/* @__PURE__ */ l(`tr`,{children:[/* @__PURE__ */ c(`th`,{scope:`row`,children:t.label}),t.values.map((t,r)=>{let i=e[r+1];return/* @__PURE__ */ c(`td`,{className:_(i??{}),"data-label":i?.label,children:v(t,n)},i?.label??r)})]},t.key??`${t.label}-${a}`))}),r}function b(t){let{marker:i,props:p}=e(`AppCompareTable`,t),{columns:m,rows:v,caption:b,mobile:x=`stack`,stickyFirstColumn:S=!1,stickyHeader:C=!1,density:w=`comfortable`,yesLabel:T=`Yes`,noLabel:E=`No`,warningLabel:D=`Warning`,partialLabel:O=`Partial`,className:k=``,...A}=p,j={yesLabel:T,noLabel:E,warningLabel:D,partialLabel:O},M=o(null),[N,P]=s(!1);if(a(()=>{let e=()=>{let e=M.current;e&&P(h(e))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),!Array.isArray(m))throw Error(`<AppCompareTable> columns is required: pass the feature-name column, then one per option.`);if(!Array.isArray(v))throw Error(`<AppCompareTable> rows is required: pass one row per capability.`);r(`AppCompareTable`,A),n(`AppCompareTable`,`mobile`,x,u),n(`AppCompareTable`,`density`,w,d);for(let e of m)n(`AppCompareTable`,`align`,e.align,f);let F=x===`scroll`,I=/* @__PURE__ */ l(`table`,{className:g(F&&`wui-compare-scroll-table`,F&&S&&`wui-compare-sticky-first`),children:[b&&/* @__PURE__ */ c(`caption`,{className:`visually-hidden`,children:b}),/* @__PURE__ */ c(`thead`,{children:/* @__PURE__ */ c(`tr`,{children:m.map((e,t)=>/* @__PURE__ */ c(`th`,{scope:`col`,className:_(e),children:e.label},e.label?`col-${t}-${e.label}`:`col-${t}`))})}),/* @__PURE__ */ c(`tbody`,{children:y(m,v,j)})]});return/* @__PURE__ */ c(`div`,{className:g(`compare-table`,w===`relaxed`&&`wui-compare-relaxed`,C&&`wui-compare-sticky-head`,k),"data-mobile":x,...i,...A,children:F?/* @__PURE__ */ c(`div`,{className:`wui-compare-scroll`,ref:M,tabIndex:0,role:b?`region`:void 0,"aria-label":b||void 0,"data-more":N?`end`:void 0,onScroll:e=>P(h(e.currentTarget)),children:I}):I})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/fillLabel.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppButton.js";import r from"./AppIcon.js";import i from"./AppInput.js";import a from"./AppModal.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{useEffect as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`sm`,`md`,`lg`,`xl`],h=[`default`,`plain`],g=[`success`,`danger`,`warning`,`info`,`primary`];function _(_){let{marker:v,props:y}=t(`AppConfirmDialog`,_),{open:b,title:x,variant:S=`default`,description:C,confirmLabel:w=`Confirm`,cancelLabel:T=`Cancel`,typePhraseLabel:E=`Type {phrase} to confirm`,tone:D,image:O,icon:k,iconSize:A,confirmPhrase:j,onConfirm:M,onClose:N,loading:P=!1,staticBackdrop:F=!1,placement:I=`center`,size:L=`md`,className:R=``,children:z,...B}=y;c(`AppConfirmDialog`,B),s(`AppConfirmDialog`,`tone`,D,g),s(`AppConfirmDialog`,`size`,typeof L==`string`?L:null,m),s(`AppConfirmDialog`,`variant`,S,h);let[V,H]=u(``);if(l(()=>{b||H(``)},[b]),!b)return null;let U=!!j&&V.trim()!==j,[W,...G]=E.split(`{phrase}`),K=G.join(j),q=S===`plain`,J=q?`sm`:`md`,Y=q||O||k?null:o[D===`danger`?`delete`:D??`info`],X=A>0?{"--wui-confirm-icon-size":`${A}px`}:void 0,Z=()=>{P||N?.()};return/* @__PURE__ */ f(a,{...v,...B,open:b,hideHeader:!0,title:x,onClose:Z,staticBackdrop:F,placement:I,size:L,className:[`wui-confirm`,q&&`wui-confirm-plain`,R].filter(Boolean).join(` `),footer:/* @__PURE__ */ p(`div`,{className:`wui-confirm-actions`,children:[/* @__PURE__ */ f(n,{...q?{tone:`neutral`}:{variant:`soft`},size:J,disabled:P,onClick:Z,children:T}),/* @__PURE__ */ f(n,{tone:D===`danger`?`danger`:void 0,size:J,disabled:U,loading:P,onClick:M,children:w})]}),children:/* @__PURE__ */ p(`div`,{className:`wui-confirm-content`,children:[!q&&O?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(`img`,{src:O,alt:``,"aria-hidden":`true`})}):!q&&k?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:typeof k==`string`?/* @__PURE__ */ f(r,{name:k,size:80}):k}):Y&&/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(Y,{size:120})}),/* @__PURE__ */ f(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:x}),C&&/* @__PURE__ */ f(`p`,{className:`wui-confirm-msg`,children:C}),z!=null&&z!==!1&&/* @__PURE__ */ f(`div`,{className:`wui-confirm-body`,children:z}),j&&/* @__PURE__ */ f(i,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:/* @__PURE__ */ p(d,{children:[W,/* @__PURE__ */ f(`strong`,{children:j}),K]}),value:V,onChange:e=>H(e.target.value),"aria-label":e(E,{phrase:j}),disabled:P})]})})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./AppConfirmDialog.js";import{createContext as t,useCallback as n,useContext as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=t(null);function u(t){let{children:r}=t,[u,d]=o(null),[f,p]=o(!1),m=a(null),h=n((e={})=>new Promise(t=>{m.current?.(!1),m.current=t,d({...e,title:e.title||`Are you sure?`})}),[]),g=e=>{m.current?.(e),m.current=null,p(!1),d(null)};return i(()=>()=>m.current?.(!1),[]),/* @__PURE__ */ c(l.Provider,{value:h,children:[r,/* @__PURE__ */ s(e,{open:!!u,title:u?.title,
|
|
1
|
+
import e from"./AppConfirmDialog.js";import{createContext as t,useCallback as n,useContext as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=t(null);function u(t){let{children:r}=t,[u,d]=o(null),[f,p]=o(!1),m=a(null),h=n((e={})=>new Promise(t=>{m.current?.(!1),m.current=t,d({...e,title:e.title||`Are you sure?`})}),[]),g=e=>{m.current?.(e),m.current=null,p(!1),d(null)};return i(()=>()=>m.current?.(!1),[]),/* @__PURE__ */ c(l.Provider,{value:h,children:[r,/* @__PURE__ */ s(e,{open:!!u,title:u?.title,description:u?.description,confirmLabel:u?.confirmLabel,cancelLabel:u?.cancelLabel,tone:u?.tone,icon:u?.icon,confirmPhrase:u?.confirmPhrase,loading:f,onConfirm:async()=>{let e=u?.onRun;if(typeof e!=`function`)g(!0);else{p(!0);try{await e(),g(!0)}catch{p(!1)}}},onClose:()=>g(!1)})]})}function d(){let e=r(l);if(!e)throw Error(`useConfirm needs an <AppConfirmProvider> above it.`);return e}export{u as default,d as useConfirm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./useWuiControl.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{useEffect as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as o,saveConsent as s}from"@webority/analytics/site";var c=[`bottom-left`,`bottom-right`,`bar`],l=[`analytics`,`functional`,`marketing`];function u(u){let{marker:d,props:f}=e(`AppConsentBanner`,u),{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./useWuiControl.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{useEffect as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as o,saveConsent as s}from"@webority/analytics/site";var c=[`bottom-left`,`bottom-right`,`bar`],l=[`analytics`,`functional`,`marketing`];function u(u){let{marker:d,props:f}=e(`AppConsentBanner`,u),{title:p,description:m,policyHref:h,policyLabel:g,analyticsDescription:_,functionalDescription:v,marketingDescription:y,categories:b,position:x=`bottom-left`,standalone:S=!1,preview:C=!1,className:w=``,style:T,...E}=f;r(`AppConsentBanner`,E),n(`AppConsentBanner`,`position`,x,c);for(let e of b??[])n(`AppConsentBanner`,`categories`,e,l);let{setRef:D,innerRef:O}=t({on:{"wui-consent-save":e=>{C||(s(e.detail),O.current&&(O.current.preferences=o()))}}});return i(()=>{let e=O.current;if(!e)return;if(C){e.open();return}let t=o();e.preferences=t,t.decided||e.open()},[O,C]),/* @__PURE__ */ a(`wui-consent-banner`,{ref:D,position:x,heading:p||void 0,description:m||void 0,"policy-href":h||void 0,"policy-label":g||void 0,"analytics-description":_||void 0,"functional-description":v||void 0,"marketing-description":y||void 0,categories:b?.length?b.join(` `):void 0,standalone:S||void 0,preview:C||void 0,class:w||void 0,style:T,...d,...E})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./renderIconProp.js";import i from"./warnUnknownProps.js";import{useEffect as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function u(e){let{marker:t,props:r}=n(`AppContextMenu`,e),{items:u=[],target:d,trigger:p,children:m,ariaLabel:h=`Context menu`,disabled:g=!1,open:_,onOpen:v,onBeforeOpen:y,menuClassName:b=``,linkComponent:x,...S}=r;i(`AppContextMenu`,S);let C=s(null);return a(()=>{let e=C.current;if(!v)return;let t=e=>v(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[v]),a(()=>{let e=C.current;if(y)return e.addEventListener(`wui-context-menu:beforeopen`,y),()=>e.removeEventListener(`wui-context-menu:beforeopen`,y)},[y]),o(()=>{C.current.toggleAttribute(`open`,!!_)},[_]),/* @__PURE__ */ l(`wui-context-menu`,{ref:C,target:d,trigger:p,disabled:g,...t,...S,children:[m,/* @__PURE__ */ c(`div`,{className:`dropdown-menu wui-context-menu-panel${b?` ${b}`:``}`,role:`menu`,"aria-label":h,tabIndex:-1,children:f(u,x)})]})}var d=e=>`dropdown-item${e.danger
|
|
1
|
+
import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./renderIconProp.js";import i from"./warnUnknownProps.js";import{useEffect as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function u(e){let{marker:t,props:r}=n(`AppContextMenu`,e),{items:u=[],target:d,trigger:p,children:m,ariaLabel:h=`Context menu`,disabled:g=!1,open:_,onOpen:v,onBeforeOpen:y,menuClassName:b=``,linkComponent:x,...S}=r;i(`AppContextMenu`,S);let C=s(null);return a(()=>{let e=C.current;if(!v)return;let t=e=>v(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[v]),a(()=>{let e=C.current;if(y)return e.addEventListener(`wui-context-menu:beforeopen`,y),()=>e.removeEventListener(`wui-context-menu:beforeopen`,y)},[y]),o(()=>{C.current.toggleAttribute(`open`,!!_)},[_]),/* @__PURE__ */ l(`wui-context-menu`,{ref:C,target:d,trigger:p,disabled:g,...t,...S,children:[m,/* @__PURE__ */ c(`div`,{className:`dropdown-menu wui-context-menu-panel${b?` ${b}`:``}`,role:`menu`,"aria-label":h,tabIndex:-1,children:f(u,x)})]})}var d=e=>`dropdown-item${e.tone===`danger`?` danger`:``}${e.disabled?` disabled`:``}`;function f(n,i){return n.map(n=>{if(n.divider)return/* @__PURE__ */ c(`hr`,{className:`dropdown-divider`},n.key);if(n.items!=null){let e=n.searchPlaceholder||`Search`;return/* @__PURE__ */ l(`div`,{className:`wui-context-menu-sub`,role:`none`,"data-searchable":n.searchable?``:void 0,children:[/* @__PURE__ */ l(`button`,{type:`button`,className:d(n),role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,tabIndex:-1,"data-key":n.key,"aria-disabled":n.disabled?`true`:void 0,children:[r(n.icon,{size:16}),n.label,r(`chevron-right`,{size:14,className:`wui-context-menu-chevron`})]}),/* @__PURE__ */ l(`div`,{className:`dropdown-menu wui-context-menu-subpanel`,role:`menu`,"aria-label":n.label,tabIndex:-1,children:[n.searchable?/* @__PURE__ */ c(`input`,{type:`search`,className:`wui-context-menu-search`,autoComplete:`off`,placeholder:e,"aria-label":e}):null,f(n.items,i)]})]},n.key)}let a=!!n.to&&!n.disabled,o=a?i??`a`:`button`,s=a?i?{to:n.to}:{href:n.to}:{type:`button`};return/* @__PURE__ */ l(o,{...s,className:d(n),role:`menuitem`,tabIndex:-1,"data-key":n.key,"aria-checked":n.checked?`true`:void 0,"data-hint":n.hint||void 0,"aria-keyshortcuts":e(n.shortcut),"aria-disabled":n.disabled?`true`:void 0,onClick:n.disabled?void 0:n.onClick,children:[n.image?/* @__PURE__ */ c(`img`,{src:n.image,alt:``}):r(n.icon,{size:16}),n.label,t(n.shortcut)]},n.key)})}export{u as default};
|