@webority/ui-react 0.128.0 → 0.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +28676 -24381
- package/dist/canvas-kit/manifest.json +3182 -163
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccountSwitcher.js +1 -0
- 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/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/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/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/AppDueDate.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/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKanban.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/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppMultiSelect.js +1 -1
- package/dist/components/AppNotificationCenter.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.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/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/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/AppSplitButton.js +1 -1
- package/dist/components/AppSplitView.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/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/AppUpdateBar.js +1 -1
- package/dist/components/AppWhatsNew.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 +235 -2
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/FileItemRow.js +1 -1
- 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/markdown-core/dist/links.js +1 -1
- package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
- 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 +22 -2
- 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 +6 -0
- package/dist/types/components/AppButton.d.ts +1 -0
- package/dist/types/components/AppCalendar.d.ts +3 -1
- package/dist/types/components/AppCard.d.ts +13 -1
- package/dist/types/components/AppCell.d.ts +36 -0
- package/dist/types/components/AppChart.d.ts +7 -0
- package/dist/types/components/AppChartCard.d.ts +60 -0
- package/dist/types/components/AppCheckbox.d.ts +22 -0
- 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 +43 -4
- 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 +6 -0
- package/dist/types/components/AppCountrySelect.d.ts +5 -0
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +24 -0
- package/dist/types/components/AppDateRangePicker.d.ts +31 -1
- 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 +24 -0
- package/dist/types/components/AppDueDate.d.ts +42 -0
- 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 +75 -0
- 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 +64 -0
- package/dist/types/components/AppImagePicker.d.ts +60 -0
- package/dist/types/components/AppInlineEdit.d.ts +6 -0
- package/dist/types/components/AppInput.d.ts +37 -2
- 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 +17 -0
- package/dist/types/components/AppMetricStrip.d.ts +2 -0
- package/dist/types/components/AppModal.d.ts +6 -0
- package/dist/types/components/AppMultiSelect.d.ts +18 -1
- package/dist/types/components/AppNotificationCenter.d.ts +2 -0
- package/dist/types/components/AppNumberInput.d.ts +24 -2
- package/dist/types/components/AppOtpInput.d.ts +29 -0
- package/dist/types/components/AppPhoneNumberInput.d.ts +24 -0
- package/dist/types/components/AppRadio.d.ts +22 -0
- package/dist/types/components/AppRadioGroup.d.ts +24 -0
- package/dist/types/components/AppRating.d.ts +39 -0
- package/dist/types/components/AppRichText.d.ts +7 -0
- package/dist/types/components/AppRouteError.d.ts +54 -0
- package/dist/types/components/AppScoreScale.d.ts +6 -0
- package/dist/types/components/AppSearch.d.ts +17 -2
- package/dist/types/components/AppSectionLeadCapture.d.ts +48 -0
- 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 +22 -2
- package/dist/types/components/AppShell.d.ts +147 -0
- package/dist/types/components/AppSlider.d.ts +28 -0
- package/dist/types/components/AppSortableList.d.ts +5 -0
- package/dist/types/components/AppSparkline.d.ts +24 -0
- 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 +22 -0
- 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 +18 -1
- package/dist/types/components/AppTextarea.d.ts +20 -0
- package/dist/types/components/AppTimePicker.d.ts +17 -0
- package/dist/types/components/AppTimeline.d.ts +8 -0
- package/dist/types/components/AppToast.d.ts +6 -0
- package/dist/types/components/AppUpdateBar.d.ts +18 -0
- 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/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/ui-react.js +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,
|
|
1
|
+
import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,defaultValue:l,onChange:u,readValue:d,writeValue:f,events:p=a,on:m}={}){let h=r(null),g=d??o,_=f??s,v=(p||a).join(`\0`),y=Object.keys(m??{}).join(`\0`),b=r(null);b.current===null&&(b.current={ref:i,value:c,defaultValue:l,onChange:u,read:g,write:_,eventKey:v,on:m}),n(()=>{b.current={ref:i,value:c,defaultValue:l,onChange:u,read:g,write:_,eventKey:v,on:m}});let x=r(null),S=e(()=>{let e=x.current;if(e){for(let t of e.names)e.el.removeEventListener(t,e.handler);for(let t of e.extraNames)e.el.removeEventListener(t,e.extraHandler);x.current=null}},[]),C=e(e=>{let t=b.current.eventKey?b.current.eventKey.split(`\0`):a,n=Object.keys(b.current.on??{}),r={el:e,names:t,extraNames:n,last:void 0};r.handler=()=>{let t=b.current.read(e);Object.is(t,r.last)||(r.last=t,b.current.onChange?.(t))},r.extraHandler=e=>b.current.on?.[e.type]?.(e);for(let n of t)e.addEventListener(n,r.handler);for(let t of n)e.addEventListener(t,r.extraHandler);x.current=r},[]),w=e(e=>{h.current=e;let t=b.current.ref;typeof t==`function`?t(e):t&&(t.current=e),S(),e&&(C(e),b.current.value===void 0?b.current.defaultValue!==void 0&&b.current.write(e,b.current.defaultValue):b.current.write(e,b.current.value))},[S,C]);return t(()=>{let e=h.current;if(!e||c===void 0)return;_(e,c);let t=x.current;t&&!Object.is(c,t.last)&&(t.last=void 0)},[c,_]),t(()=>{let e=h.current,t=x.current;e&&t&&(t.names.join(`\0`)!==(v||a.join(`\0`))||t.extraNames.join(`\0`)!==y)&&(S(),C(e))},[v,y,S,C]),{setRef:w,innerRef:h}}var a=[`change`];function o(e){return e.value}function s(e,t){let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)}function c(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];if(e===n)return!0;if(e==null||n==null||typeof e!=`object`||typeof n!=`object`)return Object.is(e,n);let i=Object.keys(e);return i.length===Object.keys(n).length&&i.every(t=>Object.is(e[t],n[t]))})}function l(e){return e.values}function u(e,t){let n=t||[],r=e.values||[];n.length===r.length&&n.every((e,t)=>e===r[t])||(e.values=n)}function d(e){return{start:e.start,end:e.end}}function f(e,t){if(t===void 0)return;let n=Number.parseFloat(t);Number.isFinite(n)&&e.value!==n&&(e.value=n)}export{i as default,c as optionsEqual,d as readRange,l as readValues,f as writeNumberValue,u as writeValues};
|
package/dist/guidance.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"format": "webority-guidance/1",
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "@webority/ui-react",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.129.0"
|
|
6
6
|
},
|
|
7
7
|
"components": [
|
|
8
8
|
{
|
|
@@ -76,6 +76,78 @@
|
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
"name": "AppAccountSwitcher",
|
|
81
|
+
"usage": {
|
|
82
|
+
"when": [
|
|
83
|
+
"A person signed in to more than one account, company or organisation, and needs to see which one is current.",
|
|
84
|
+
"The switcher sits in the user menu's section slot of AppShell."
|
|
85
|
+
],
|
|
86
|
+
"whenNot": [
|
|
87
|
+
{
|
|
88
|
+
"text": "You are switching the workspace or tenant in the chrome.",
|
|
89
|
+
"instead": "AppWorkspaceSwitcher"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"text": "You need a flat list of actions behind a trigger.",
|
|
93
|
+
"instead": "AppDropdown"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"text": "You are picking a value into a form field.",
|
|
97
|
+
"instead": "AppSelect"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"do": [
|
|
101
|
+
{
|
|
102
|
+
"note": "The current account is ticked, and each other account is one row to switch to.",
|
|
103
|
+
"example": [
|
|
104
|
+
{
|
|
105
|
+
"component": "AppAccountSwitcher",
|
|
106
|
+
"props": {
|
|
107
|
+
"accounts": [
|
|
108
|
+
{
|
|
109
|
+
"id": "acme",
|
|
110
|
+
"name": "Acme Corp",
|
|
111
|
+
"description": "Owner"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "globex",
|
|
115
|
+
"name": "Globex Ltd",
|
|
116
|
+
"badge": "Trial"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"currentId": "acme"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"dont": [
|
|
126
|
+
{
|
|
127
|
+
"note": "A list of one account. There is nothing to switch to, so the section does not earn its place.",
|
|
128
|
+
"example": [
|
|
129
|
+
{
|
|
130
|
+
"component": "AppAccountSwitcher",
|
|
131
|
+
"props": {
|
|
132
|
+
"accounts": [
|
|
133
|
+
{
|
|
134
|
+
"id": "acme",
|
|
135
|
+
"name": "Acme Corp"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"currentId": "acme"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"a11y": [
|
|
145
|
+
"The list is a group named by label.",
|
|
146
|
+
"The current account carries aria-current and a tick, so the state is not shown by colour alone.",
|
|
147
|
+
"A row with an href is a link; a row without one is a button."
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
79
151
|
{
|
|
80
152
|
"name": "AppActionIcon",
|
|
81
153
|
"usage": {
|
|
@@ -350,6 +422,36 @@
|
|
|
350
422
|
]
|
|
351
423
|
}
|
|
352
424
|
},
|
|
425
|
+
{
|
|
426
|
+
"name": "AppAuthLayout",
|
|
427
|
+
"usage": {
|
|
428
|
+
"when": [
|
|
429
|
+
"A sign-in, sign-up, forgot-password or verification page.",
|
|
430
|
+
"Any signed-out page that is one form on its own."
|
|
431
|
+
],
|
|
432
|
+
"whenNot": [
|
|
433
|
+
{
|
|
434
|
+
"text": "A short outcome after an action (confirmed, not found, no access).",
|
|
435
|
+
"instead": "AppResult"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"text": "The boot screen while the session loads.",
|
|
439
|
+
"instead": "AppSplash"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"text": "A form inside a signed-in page.",
|
|
443
|
+
"instead": "AppCard"
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"do": [],
|
|
447
|
+
"dont": [],
|
|
448
|
+
"a11y": [
|
|
449
|
+
"The layout draws no heading: put the one h1 of the page in the children.",
|
|
450
|
+
"The aside is an aside landmark and is hidden below the lg breakpoint, so nothing in it may be the only way to do something.",
|
|
451
|
+
"The logo is an image the caller labels with alt text; use an empty alt if the heading already names the product."
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
},
|
|
353
455
|
{
|
|
354
456
|
"name": "AppAutocomplete",
|
|
355
457
|
"usage": {
|
|
@@ -1251,6 +1353,31 @@
|
|
|
1251
1353
|
]
|
|
1252
1354
|
}
|
|
1253
1355
|
},
|
|
1356
|
+
{
|
|
1357
|
+
"name": "AppCell",
|
|
1358
|
+
"usage": {
|
|
1359
|
+
"when": [
|
|
1360
|
+
"A table cell with a main value and a quieter detail line under it.",
|
|
1361
|
+
"A figure column that should right-align with tabular digits."
|
|
1362
|
+
],
|
|
1363
|
+
"whenNot": [
|
|
1364
|
+
{
|
|
1365
|
+
"text": "A cell that is only one value.",
|
|
1366
|
+
"instead": "Plain cell text"
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"text": "An amount in rupees from paise.",
|
|
1370
|
+
"instead": "formatINR, or app-money in Razor"
|
|
1371
|
+
}
|
|
1372
|
+
],
|
|
1373
|
+
"do": [],
|
|
1374
|
+
"dont": [],
|
|
1375
|
+
"a11y": [
|
|
1376
|
+
"The link is a real anchor named by the primary text.",
|
|
1377
|
+
"Both lines are plain text and read in order."
|
|
1378
|
+
]
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1254
1381
|
{
|
|
1255
1382
|
"name": "AppChart",
|
|
1256
1383
|
"usage": {
|
|
@@ -3179,6 +3306,55 @@
|
|
|
3179
3306
|
]
|
|
3180
3307
|
}
|
|
3181
3308
|
},
|
|
3309
|
+
{
|
|
3310
|
+
"name": "AppErrorBoundary",
|
|
3311
|
+
"usage": {
|
|
3312
|
+
"when": [
|
|
3313
|
+
"One page or section may throw while the rest of the app still works.",
|
|
3314
|
+
"A failed section should offer Try again without a full page load."
|
|
3315
|
+
],
|
|
3316
|
+
"whenNot": [
|
|
3317
|
+
{
|
|
3318
|
+
"text": "The root of the app, where a stale build must reload the page once and the error is logged.",
|
|
3319
|
+
"instead": "ErrorBoundary from @webority/web-core"
|
|
3320
|
+
},
|
|
3321
|
+
{
|
|
3322
|
+
"text": "A router errorElement for a failed route or loader.",
|
|
3323
|
+
"instead": "AppRouteError"
|
|
3324
|
+
},
|
|
3325
|
+
{
|
|
3326
|
+
"text": "A section whose data request failed but nothing threw.",
|
|
3327
|
+
"instead": "AppAsyncBlock"
|
|
3328
|
+
}
|
|
3329
|
+
],
|
|
3330
|
+
"do": [
|
|
3331
|
+
{
|
|
3332
|
+
"note": "Pass resetKeys so moving to another page clears the error.",
|
|
3333
|
+
"example": [
|
|
3334
|
+
{
|
|
3335
|
+
"component": "AppErrorBoundary",
|
|
3336
|
+
"props": {}
|
|
3337
|
+
}
|
|
3338
|
+
]
|
|
3339
|
+
}
|
|
3340
|
+
],
|
|
3341
|
+
"dont": [
|
|
3342
|
+
{
|
|
3343
|
+
"note": "Do not print the caught error in the fallback; it can leak internal details.",
|
|
3344
|
+
"example": [
|
|
3345
|
+
{
|
|
3346
|
+
"component": "p",
|
|
3347
|
+
"children": "TypeError: Cannot read properties of undefined (reading 'map')"
|
|
3348
|
+
}
|
|
3349
|
+
]
|
|
3350
|
+
}
|
|
3351
|
+
],
|
|
3352
|
+
"a11y": [
|
|
3353
|
+
"The default screen has a real heading and native buttons and a link.",
|
|
3354
|
+
"The caught error is never shown, only a plain sentence."
|
|
3355
|
+
]
|
|
3356
|
+
}
|
|
3357
|
+
},
|
|
3182
3358
|
{
|
|
3183
3359
|
"name": "AppErrorSummary",
|
|
3184
3360
|
"usage": {
|
|
@@ -3459,6 +3635,30 @@
|
|
|
3459
3635
|
]
|
|
3460
3636
|
}
|
|
3461
3637
|
},
|
|
3638
|
+
{
|
|
3639
|
+
"name": "AppFloatingButton",
|
|
3640
|
+
"usage": {
|
|
3641
|
+
"when": [
|
|
3642
|
+
"A persistent corner action on a page, such as chat, help or report an issue."
|
|
3643
|
+
],
|
|
3644
|
+
"whenNot": [
|
|
3645
|
+
{
|
|
3646
|
+
"text": "A toolbar action beside other icon actions.",
|
|
3647
|
+
"instead": "AppActionIcon."
|
|
3648
|
+
},
|
|
3649
|
+
{
|
|
3650
|
+
"text": "A labelled primary action that needs visible text.",
|
|
3651
|
+
"instead": "AppButton."
|
|
3652
|
+
}
|
|
3653
|
+
],
|
|
3654
|
+
"do": [],
|
|
3655
|
+
"dont": [],
|
|
3656
|
+
"a11y": [
|
|
3657
|
+
"The label is the accessible name and the tooltip.",
|
|
3658
|
+
"aria-haspopup and aria-expanded pass through to the button."
|
|
3659
|
+
]
|
|
3660
|
+
}
|
|
3661
|
+
},
|
|
3462
3662
|
{
|
|
3463
3663
|
"name": "AppFloatingDock",
|
|
3464
3664
|
"usage": {
|
|
@@ -4225,6 +4425,35 @@
|
|
|
4225
4425
|
]
|
|
4226
4426
|
}
|
|
4227
4427
|
},
|
|
4428
|
+
{
|
|
4429
|
+
"name": "AppLeadPopup",
|
|
4430
|
+
"usage": {
|
|
4431
|
+
"when": [
|
|
4432
|
+
"A public page asks a visitor for their details in a modal, opened by an exit, a delay, a scroll or a page count.",
|
|
4433
|
+
"A campaign page needs a short lead form that is not a section of the page."
|
|
4434
|
+
],
|
|
4435
|
+
"whenNot": [
|
|
4436
|
+
{
|
|
4437
|
+
"text": "The lead form is a section of the page's content.",
|
|
4438
|
+
"instead": "AppSectionLeadCapture"
|
|
4439
|
+
},
|
|
4440
|
+
{
|
|
4441
|
+
"text": "The popup is a yes or no question, not a form.",
|
|
4442
|
+
"instead": "AppConfirmDialog"
|
|
4443
|
+
},
|
|
4444
|
+
{
|
|
4445
|
+
"text": "The page is inside the signed-in app.",
|
|
4446
|
+
"instead": "AppModal"
|
|
4447
|
+
}
|
|
4448
|
+
],
|
|
4449
|
+
"do": [],
|
|
4450
|
+
"dont": [],
|
|
4451
|
+
"a11y": [
|
|
4452
|
+
"The dialog is modal with a heading as its accessible name; Escape and the close button both dismiss it.",
|
|
4453
|
+
"Each field has a visible label and an error message linked by aria-describedby; the first invalid field takes focus."
|
|
4454
|
+
]
|
|
4455
|
+
}
|
|
4456
|
+
},
|
|
4228
4457
|
{
|
|
4229
4458
|
"name": "AppLightbox",
|
|
4230
4459
|
"usage": {
|
|
@@ -6281,7 +6510,7 @@
|
|
|
6281
6510
|
"usage": {
|
|
6282
6511
|
"when": [
|
|
6283
6512
|
"A route failed to render, or its loader threw.",
|
|
6284
|
-
"The root error boundary caught an error and
|
|
6513
|
+
"The root error boundary, or AppErrorBoundary, caught an error and needs a fallback screen.",
|
|
6285
6514
|
"No route matches the address."
|
|
6286
6515
|
],
|
|
6287
6516
|
"whenNot": [
|
|
@@ -6289,6 +6518,10 @@
|
|
|
6289
6518
|
"text": "One section of a working page failed to load its data.",
|
|
6290
6519
|
"instead": "AppAsyncBlock"
|
|
6291
6520
|
},
|
|
6521
|
+
{
|
|
6522
|
+
"text": "A page or section may throw and should recover in place, without a router or a full reload.",
|
|
6523
|
+
"instead": "AppErrorBoundary"
|
|
6524
|
+
},
|
|
6292
6525
|
{
|
|
6293
6526
|
"text": "A finished action needs a success or failure screen.",
|
|
6294
6527
|
"instead": "AppResult"
|
package/dist/lib/CheckField.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./FieldMessage.js";import{forwardRef as
|
|
1
|
+
import e from"./FieldMessage.js";import{FIELD_BUSY_CLASS as t}from"./fieldState.js";import{forwardRef as n,useId as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=()=>{},s=n(function({label:n,id:s,name:c,error:l,hint:u,className:d=``,rest:f={},inputType:p,wrapperClass:m,rootProps:h,readOnly:g=!1,loading:_=!1,size:v=`md`},y){let b=r(),x=s||b,S=l?`${x}-error`:void 0,C=u?`${x}-hint`:void 0,w=v===`sm`?` form-check-sm`:v===`lg`?` form-check-lg`:``,{onClick:T,...E}=f;return(g||_)&&E.checked!==void 0&&E.onChange===void 0&&(E.onChange=o),/* @__PURE__ */ a(`div`,{className:`${m}${w}${d?` ${d}`:``}`,...h,children:[/* @__PURE__ */ i(`input`,{type:p,className:_?`form-check-input ${t}`:`form-check-input`,id:x,name:c,ref:y,"aria-invalid":l?`true`:`false`,"aria-describedby":S||C,"aria-readonly":g||void 0,"aria-busy":_||void 0,onClick:e=>{g||_?e.preventDefault():T?.(e)},...E}),n!=null&&/* @__PURE__ */ i(`label`,{className:`form-check-label`,htmlFor:x,children:n}),/* @__PURE__ */ i(e,{error:l,hint:u,errorId:S,hintId:C})]})});export{s as default};
|
package/dist/lib/FileItemRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../components/AppIcon.js";import t from"../components/AppProgress.js";import{linkOf as n,nameOf as r,sizeLabelOf as i,uploadErrorOf as a,uploadProgressOf as o,useItemUrl as s}from"./fileItem.js";import{jsx as
|
|
1
|
+
import e from"../components/AppIcon.js";import t from"../components/AppProgress.js";import{linkOf as n,nameOf as r,sizeLabelOf as i,uploadErrorOf as a,uploadProgressOf as o,useItemUrl as s}from"./fileItem.js";import c from"./fillLabel.js";import{linkTarget as l}from"./linkTarget.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({item:f,isImage:p,onRemove:m,linkComponent:h,noun:g=`attachment`,removeFileLabel:_=`Remove {name}`,readOnly:v=!1}){let y=s(f,p),b=r(f),x=i(f),S=o(f),C=a(f),w=n(f),{Tag:T,linkProps:E}=l(h,{to:f?.to,href:w,routeHref:!1});return/* @__PURE__ */ d(`div`,{className:C?`attach-item wui-attach-failed`:`attach-item`,children:[/* @__PURE__ */ u(`span`,{className:`attach-item-media`,children:y?/* @__PURE__ */ u(`img`,{src:y,alt:b}):/* @__PURE__ */ u(e,{name:`file-text`,size:18})}),/* @__PURE__ */ d(`span`,{className:`attach-item-info`,children:[/* @__PURE__ */ u(`span`,{className:`attach-name`,children:w||f?.to?/* @__PURE__ */ u(T,{...E,children:b}):b}),x&&/* @__PURE__ */ u(`span`,{className:`attach-size`,children:x}),S!==null&&/* @__PURE__ */ u(t,{value:S,size:`sm`,label:`Uploading ${b}`,className:`wui-attach-progress`}),C&&/* @__PURE__ */ u(`div`,{className:`wui-attach-error`,children:C})]}),!v&&/* @__PURE__ */ u(`button`,{type:`button`,className:`attach-item-remove`,"aria-label":c(_,{name:b||g}),onClick:m,children:/* @__PURE__ */ u(e,{name:`x`,size:16})})]})}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[`sm`,`md`,`lg`],t=`wui-field-busy`;function n(e){return e?e=>e.preventDefault():void 0}export{t as FIELD_BUSY_CLASS,e as FIELD_SIZES,n as blockWhenReadOnly};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return String(e).replace(/[{]([A-Za-z0-9_]+)[}]/g,(e,n)=>n in t?String(t[n]):e)}export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../components/AppInfoTip.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";function i(i,a,o){return i==null||!a?i:/* @__PURE__ */ r(t,{children:[i,/* @__PURE__ */ n(e,{label:o,children:a})]})}export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=/^[a-z][a-z0-9+.-]*:/i;function t(t){return typeof t==`string`&&t!==``&&!t.startsWith(`#`)&&!t.startsWith(`//`)&&!e.test(t)}function n(e,{href:n,to:r,external:i=!1,routeHref:a=!0}={}){return r?e&&!i?{Tag:e,linkProps:{to:r}}:{Tag:`a`,linkProps:{href:r}}:a&&e&&!i&&t(n)?{Tag:e,linkProps:{to:n}}:{Tag:`a`,linkProps:{href:n}}}export{t as isInAppHref,n as linkTarget};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=/^[a-z][a-z0-9+.-]*:[a-z0-9_-]+\/[a-z0-9_.~-]+$/i,t=/^https?:/i,n=/^(mailto|tel):/i
|
|
1
|
+
var e=/^[a-z][a-z0-9+.-]*:[a-z0-9_-]+\/[a-z0-9_.~-]+$/i,t=/^https?:/i,n=/^(mailto|tel):/i,r=/^(?:\/(?![/\\])|#|\?|\.{1,2}\/)/;function i(i,o,s,c){if(s&&e.test(i)){let e=s(i);if(e!=null)return{kind:`app`,target:e}}return o===`app`?null:r.test(i)?{kind:`page`,href:i}:t.test(i)?{kind:c&&a(i,c)?`page`:`web`,href:i}:n.test(i)?{kind:`contact`,href:i}:null}function a(e,t){if(e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let n=e[t.length];return n===void 0||n===`/`||n===`?`||n===`#`}function o(e){return typeof e!=`string`||!e.startsWith(`/`)||e[1]===`/`||e[1]===`\\`?null:e}export{i as linkTarget,o as webRoute};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accounts a person can switch to, drawn as a labelled list for the user menu slot
|
|
3
|
+
* (`userMenu.section` of `AppShell`). The current account is marked, not chosen again.
|
|
4
|
+
*
|
|
5
|
+
* Selection is a CALLBACK, never navigation, the same as `AppWorkspaceSwitcher`: a row with no
|
|
6
|
+
* `href` calls `onSelect(account)`. A row with `href` navigates through `linkComponent` when one
|
|
7
|
+
* is supplied, otherwise a plain anchor, and the library never imports a router.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: the exported component must stay the FIRST destructured function in this file,
|
|
10
|
+
* because the parity check reads the first signature it finds as the component's public props.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props
|
|
13
|
+
* @param {{ id: string, name: string, description?: string, photo?: string, badge?: string, href?: string }[]} [props.accounts]
|
|
14
|
+
* @param {string} [props.currentId] Falls back to the first account when it matches none.
|
|
15
|
+
* @param {(account: object) => void} [props.onSelect] Fired for a row with no href. No navigation.
|
|
16
|
+
* @param {string} [props.label] Heading above the list, default "Switch account".
|
|
17
|
+
* @param {import('react').ElementType} [props.linkComponent] Renders href rows with `to`, like AppWorkspaceSwitcher.
|
|
18
|
+
*/
|
|
19
|
+
export default function AppAccountSwitcher(props: {
|
|
20
|
+
/**
|
|
21
|
+
* The accounts a person can switch to. A row with an href navigates; a row without one calls onSelect(account) on React and does no navigation. The current account is marked with a tick and aria-current.
|
|
22
|
+
* @default []
|
|
23
|
+
*/
|
|
24
|
+
accounts?: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
photo?: string;
|
|
29
|
+
badge?: string;
|
|
30
|
+
href?: string;
|
|
31
|
+
}[];
|
|
32
|
+
/** The id of the current account. It sets the tick and aria-current, and falls back to the first account when it matches none. */
|
|
33
|
+
currentId?: string;
|
|
34
|
+
onSelect?: (account: object) => void;
|
|
35
|
+
/**
|
|
36
|
+
* The heading above the list. It is also the group's accessible name.
|
|
37
|
+
* @default "Switch account"
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
linkComponent?: import('react').ElementType;
|
|
41
|
+
}): import("react").JSX.Element | null;
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
* @param {() => void} [props.onRetry] Shown as a Retry button on the error state when set.
|
|
18
18
|
* @param {import('react').ReactNode} [props.skeleton]
|
|
19
19
|
* @param {string} [props.className]
|
|
20
|
+
* @param {string} [props.loadingLabel] Default "Loading".
|
|
21
|
+
* @param {string} [props.errorTitle] Default "Something went wrong".
|
|
22
|
+
* @param {string} [props.retryLabel] Default "Retry".
|
|
23
|
+
* @param {string} [props.emptyTitle] Default "Nothing to show yet".
|
|
20
24
|
*/
|
|
21
25
|
export default function AppAsyncBlock(props: {
|
|
22
26
|
/**
|
|
@@ -40,4 +44,24 @@ export default function AppAsyncBlock(props: {
|
|
|
40
44
|
* @default ""
|
|
41
45
|
*/
|
|
42
46
|
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Replaces the built-in English text, for other languages.
|
|
49
|
+
* @default "Loading"
|
|
50
|
+
*/
|
|
51
|
+
loadingLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Replaces the built-in English text, for other languages.
|
|
54
|
+
* @default "Something went wrong"
|
|
55
|
+
*/
|
|
56
|
+
errorTitle?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Replaces the built-in English text, for other languages.
|
|
59
|
+
* @default "Retry"
|
|
60
|
+
*/
|
|
61
|
+
retryLabel?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Replaces the built-in English text, for other languages.
|
|
64
|
+
* @default "Nothing to show yet"
|
|
65
|
+
*/
|
|
66
|
+
emptyTitle?: string;
|
|
43
67
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page layout for sign-in, sign-up and reset pages: a centred panel holding the
|
|
3
|
+
* form, or a split page with the form beside an aside. The children are the form.
|
|
4
|
+
*
|
|
5
|
+
* Razor counterpart: `<app-auth-layout>` with `<app-auth-logo>`, `<app-auth-aside>` and
|
|
6
|
+
* `<app-auth-footer>` as child tags.
|
|
7
|
+
*
|
|
8
|
+
* The layout draws no heading, so put the single h1 of the page in the children.
|
|
9
|
+
*
|
|
10
|
+
* `aside` is drawn only for `variant="split"`, and only from the lg breakpoint up; below
|
|
11
|
+
* it the form is alone.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} props
|
|
14
|
+
* @param {import('react').ReactNode} [props.logo] Shown above the form.
|
|
15
|
+
* @param {'centred'|'split'} [props.variant] Centred panel, or the form beside an aside. Default "centred".
|
|
16
|
+
* @param {'sm'|'md'|'lg'|number} [props.maxWidth] Panel width: sm 360px, md 420px, lg 520px, or an exact px number. Default "md".
|
|
17
|
+
* @param {import('react').ReactNode} [props.aside] Drawn beside the form when variant is "split".
|
|
18
|
+
* @param {import('react').ReactNode} [props.footer] Shown under the form.
|
|
19
|
+
* @param {import('react').ReactNode} [props.children] The form or page content.
|
|
20
|
+
* @param {string} [props.className] Extra classes on the root.
|
|
21
|
+
*/
|
|
22
|
+
export default function AppAuthLayout(props: {
|
|
23
|
+
/** The brand mark above the form, usually an img with width and height. */
|
|
24
|
+
logo?: import('react').ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* The form alone in the middle, or the form beside an aside panel.
|
|
27
|
+
* @default "centred"
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'centred' | 'split';
|
|
30
|
+
/**
|
|
31
|
+
* The widest size of the form column: a preset or an exact width in px. The presets are 360, 420 and 520 px.
|
|
32
|
+
* @default "md"
|
|
33
|
+
*/
|
|
34
|
+
maxWidth?: 'sm' | 'md' | 'lg' | number;
|
|
35
|
+
/** The panel beside the form. It is drawn only for variant split, and only from the lg breakpoint up. */
|
|
36
|
+
aside?: import('react').ReactNode;
|
|
37
|
+
/** Small print or a link under the form. */
|
|
38
|
+
footer?: import('react').ReactNode;
|
|
39
|
+
children?: import('react').ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Extra classes on the root.
|
|
42
|
+
* @default ""
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
@@ -2,6 +2,8 @@ import "@webority/ui-elements/elements/autocomplete";
|
|
|
2
2
|
declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
/** The value of the selected option. */
|
|
4
4
|
value?: string;
|
|
5
|
+
/** The starting value of an uncontrolled field. */
|
|
6
|
+
defaultValue?: string;
|
|
5
7
|
onChange?: (value: string, meta?: {
|
|
6
8
|
isCustom: boolean;
|
|
7
9
|
}) => void;
|
|
@@ -38,10 +40,23 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
|
38
40
|
* @default false
|
|
39
41
|
*/
|
|
40
42
|
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Shows the value but blocks editing. The value still posts.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Shows a busy state and blocks input while data loads.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
loading?: boolean;
|
|
41
53
|
/** Shows the list open, for a design preview or a controlled caller. */
|
|
42
54
|
open?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Control size: sm, md or lg (32, 36 or 44px). md is the default.
|
|
57
|
+
* @default "md"
|
|
58
|
+
*/
|
|
59
|
+
size?: 'sm' | 'md' | 'lg';
|
|
45
60
|
/**
|
|
46
61
|
* Offers the typed text as its own row when it matches no option, so a new value can be added.
|
|
47
62
|
* @default false
|
|
@@ -67,6 +82,11 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
|
67
82
|
* @default false
|
|
68
83
|
*/
|
|
69
84
|
optional?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Replaces the built-in English text, for other languages.
|
|
87
|
+
* @default "(optional)"
|
|
88
|
+
*/
|
|
89
|
+
optionalLabel?: string;
|
|
70
90
|
/** Help content shown in an info tip beside the label. */
|
|
71
91
|
help?: import('react').ReactNode;
|
|
72
92
|
/**
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* @param {string} [props.tooltip]
|
|
20
20
|
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement]
|
|
21
21
|
* @param {string} [props.className]
|
|
22
|
+
* @param {string} [props.photoLabel] Default "Profile photo". Replaces the built-in English text, for other languages.
|
|
22
23
|
*/
|
|
23
24
|
export default function AppAvatar(props: {
|
|
24
25
|
/** The person's name. Used for the initials fallback and the image alt text. */
|
|
@@ -77,4 +78,9 @@ export default function AppAvatar(props: {
|
|
|
77
78
|
* @default ""
|
|
78
79
|
*/
|
|
79
80
|
className?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Replaces the built-in English text, for other languages.
|
|
83
|
+
* @default "Profile photo"
|
|
84
|
+
*/
|
|
85
|
+
photoLabel?: string;
|
|
80
86
|
}): any;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size]
|
|
12
12
|
* @param {"tight"|"normal"|"loose"} [props.spacing]
|
|
13
13
|
* @param {number|string} [props.overflow]
|
|
14
|
+
* @param {string} [props.moreLabel] Default "{count} more".
|
|
14
15
|
* @param {string} [props.className]
|
|
15
16
|
*/
|
|
16
17
|
export default function AppAvatarGroup(props: {
|
|
@@ -24,6 +25,11 @@ export default function AppAvatarGroup(props: {
|
|
|
24
25
|
spacing?: "tight" | "normal" | "loose";
|
|
25
26
|
/** The hidden count, shown as a +N chip after the avatars. Zero or unset shows no chip. */
|
|
26
27
|
overflow?: number | string;
|
|
28
|
+
/**
|
|
29
|
+
* Replaces the built-in English text, for other languages. The {count} token is the hidden count.
|
|
30
|
+
* @default "{count} more"
|
|
31
|
+
*/
|
|
32
|
+
moreLabel?: string;
|
|
27
33
|
/**
|
|
28
34
|
* Extra classes on the group.
|
|
29
35
|
* @default ""
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @param {() => void} [props.onDismiss] Called after the banner is dismissed.
|
|
13
13
|
* @param {import('react').ReactNode} [props.action] A button or link at the banner's right edge.
|
|
14
14
|
* @param {string} [props.className]
|
|
15
|
+
* @param {string} [props.dismissLabel] Default "Dismiss".
|
|
15
16
|
*/
|
|
16
17
|
export default function AppBanner(props: {
|
|
17
18
|
/**
|
|
@@ -35,4 +36,9 @@ export default function AppBanner(props: {
|
|
|
35
36
|
* @default ""
|
|
36
37
|
*/
|
|
37
38
|
className?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Replaces the built-in English text, for other languages.
|
|
41
|
+
* @default "Dismiss"
|
|
42
|
+
*/
|
|
43
|
+
dismissLabel?: string;
|
|
38
44
|
}): import("react").JSX.Element | null;
|
|
@@ -23,12 +23,14 @@ declare const AppCalendar: import("react").ForwardRefExoticComponent<{
|
|
|
23
23
|
eventsUrl?: string;
|
|
24
24
|
/** The view to show. Without it a calendar opens on the month, or on the list when it is narrower than a phone. */
|
|
25
25
|
view?: 'month' | 'week' | 'day' | 'list';
|
|
26
|
-
/** The
|
|
26
|
+
/** The day (`YYYY-MM-DD`, in the time zone of the calendar) to show; today when omitted. Changing it moves the calendar. */
|
|
27
27
|
date?: string;
|
|
28
28
|
/** What a list with no events says. */
|
|
29
29
|
emptyText?: string;
|
|
30
30
|
/** First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it follows the theme's `--wui-first-day` token, which is 1 (Monday) unless the product sets it. */
|
|
31
31
|
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
32
|
+
/** IANA time zone the calendar shows, for example Asia/Kolkata or America/New_York. Events with an offset or a Z are moved into it; events with no offset are read as already in it. Unset, it is India Standard Time (Asia/Kolkata). */
|
|
33
|
+
timeZone?: string;
|
|
32
34
|
/** What is said when `eventsUrl` could not be loaded, and when the calendar's code could not. */
|
|
33
35
|
errorText?: string;
|
|
34
36
|
onEventClick?: (event: object) => (void | false);
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
* @param {string} [props.headerClassName]
|
|
27
27
|
* @param {boolean} [props.body]
|
|
28
28
|
* @param {boolean} [props.lifted]
|
|
29
|
+
* @param {boolean} [props.flush]
|
|
30
|
+
* @param {boolean} [props.divided]
|
|
29
31
|
* @param {string} [props.href]
|
|
30
32
|
* @param {(e) => void} [props.onClick] Makes the whole card a button (when no href).
|
|
31
33
|
* @param {import('react').ElementType} [props.linkComponent] Router link; receives `to` instead of `href`.
|
|
@@ -94,7 +96,7 @@ export default function AppCard(props: {
|
|
|
94
96
|
*/
|
|
95
97
|
headerClassName?: string;
|
|
96
98
|
/**
|
|
97
|
-
* Wrap children in `.card-body`. False
|
|
99
|
+
* Wrap children in `.card-body`. False when the content brings its own padding.
|
|
98
100
|
* @default true
|
|
99
101
|
*/
|
|
100
102
|
body?: boolean;
|
|
@@ -103,6 +105,16 @@ export default function AppCard(props: {
|
|
|
103
105
|
* @default false
|
|
104
106
|
*/
|
|
105
107
|
lifted?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Clips the content to the card's rounded corners and removes the body padding, for a table or image that runs edge to edge. The header and footer keep their padding. Anything that pokes outside the card, such as an inline menu, is clipped.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
flush?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Draws a thin rule under the header. Needs a header (title, subtitle, headerIcon, headerActions or header). The rule colour is the --wui-card-divider-color token.
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
divided?: boolean;
|
|
106
118
|
/** Makes the whole card a link. */
|
|
107
119
|
href?: string;
|
|
108
120
|
onClick?: (e: any) => void;
|