@webority/ui-react 0.129.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 +8529 -8570
- package/dist/canvas-kit/manifest.json +290 -241
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppAlert.js +1 -1
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppAutocomplete.js +1 -1
- package/dist/components/AppAvatar.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/AppCard.js +1 -1
- package/dist/components/AppChart.js +1 -1
- package/dist/components/AppCheckbox.js +1 -1
- package/dist/components/AppChip.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommentThread.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/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppEmptyState.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppFloatingButton.js +1 -1
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInfoTip.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppLeadPopup.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/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/AppSectionHero.js +1 -1
- package/dist/components/AppSectionLeadCapture.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/AppSplash.js +1 -1
- package/dist/components/AppSplitButton.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/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/AppToolbar.js +1 -1
- package/dist/components/AppTooltip.js +1 -1
- package/dist/components/AppUpdateBar.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/guidance.json +39 -46
- package/dist/lib/DiscardPrompt.js +1 -1
- package/dist/lib/buttonClass.js +1 -0
- package/dist/lib/sectionShell.js +1 -1
- package/dist/lib/vocabulary.js +1 -0
- package/dist/types/components/AppActionIcon.d.ts +3 -12
- package/dist/types/components/AppAutocomplete.d.ts +1 -1
- package/dist/types/components/AppBanner.d.ts +2 -2
- package/dist/types/components/AppButton.d.ts +9 -5
- package/dist/types/components/AppCard.d.ts +3 -3
- package/dist/types/components/AppChart.d.ts +7 -0
- package/dist/types/components/AppCheckbox.d.ts +1 -1
- package/dist/types/components/AppColorField.d.ts +2 -2
- package/dist/types/components/AppConfirmDialog.d.ts +6 -12
- 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 +1 -1
- package/dist/types/components/AppDatePicker.d.ts +2 -2
- package/dist/types/components/AppDateRangePicker.d.ts +1 -1
- package/dist/types/components/AppDropZone.d.ts +2 -2
- package/dist/types/components/AppDropdown.d.ts +7 -7
- package/dist/types/components/AppEmptyState.d.ts +3 -3
- package/dist/types/components/AppFilePicker.d.ts +5 -5
- package/dist/types/components/AppFloatingButton.d.ts +10 -4
- package/dist/types/components/AppImagePicker.d.ts +4 -4
- package/dist/types/components/AppInput.d.ts +1 -1
- package/dist/types/components/AppLeadPopup.d.ts +1 -1
- package/dist/types/components/AppMentionInput.d.ts +1 -1
- package/dist/types/components/AppModal.d.ts +3 -3
- package/dist/types/components/AppMultiSelect.d.ts +2 -2
- package/dist/types/components/AppNumberInput.d.ts +1 -1
- package/dist/types/components/AppOnboardingChecklist.d.ts +3 -3
- package/dist/types/components/AppOtpInput.d.ts +2 -2
- package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
- package/dist/types/components/AppPopover.d.ts +5 -5
- package/dist/types/components/AppRadio.d.ts +1 -1
- package/dist/types/components/AppRadioGroup.d.ts +2 -2
- package/dist/types/components/AppRating.d.ts +3 -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 +3 -3
- package/dist/types/components/AppScoreScale.d.ts +3 -3
- package/dist/types/components/AppSectionLeadCapture.d.ts +2 -2
- package/dist/types/components/AppSelect.d.ts +1 -1
- package/dist/types/components/AppShell.d.ts +4 -4
- package/dist/types/components/AppSlider.d.ts +1 -1
- package/dist/types/components/AppSplash.d.ts +2 -2
- package/dist/types/components/AppSplitButton.d.ts +10 -4
- package/dist/types/components/AppSwitch.d.ts +2 -2
- package/dist/types/components/AppTagInput.d.ts +2 -2
- package/dist/types/components/AppTextarea.d.ts +1 -1
- package/dist/types/components/AppTimePicker.d.ts +2 -2
- 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 +4 -4
- package/dist/types/lib/buttonClass.d.ts +9 -0
- package/dist/types/lib/sectionShell.d.ts +0 -1
- package/dist/types/lib/vocabulary.d.ts +3 -0
- package/dist/web-core/dist/query/listQuery.js +1 -0
- package/package.json +7 -6
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.130.0"
|
|
6
6
|
},
|
|
7
7
|
"components": [
|
|
8
8
|
{
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"props": {
|
|
238
238
|
"icon": "trash-2",
|
|
239
239
|
"label": "Delete",
|
|
240
|
-
"
|
|
240
|
+
"tone": "danger"
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
]
|
|
@@ -530,7 +530,7 @@
|
|
|
530
530
|
}
|
|
531
531
|
],
|
|
532
532
|
"placeholder": "Type a city…",
|
|
533
|
-
"
|
|
533
|
+
"helperText": "Client-side filter over a static list."
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
]
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
"name": "city-remote",
|
|
601
601
|
"placeholder": "Type to search…",
|
|
602
602
|
"minChars": 1,
|
|
603
|
-
"
|
|
603
|
+
"helperText": "Debounced search with a loading spinner."
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
]
|
|
@@ -1015,14 +1015,14 @@
|
|
|
1015
1015
|
{
|
|
1016
1016
|
"component": "AppButton",
|
|
1017
1017
|
"props": {
|
|
1018
|
-
"
|
|
1018
|
+
"tone": "primary"
|
|
1019
1019
|
},
|
|
1020
1020
|
"children": "Publish"
|
|
1021
1021
|
},
|
|
1022
1022
|
{
|
|
1023
1023
|
"component": "AppButton",
|
|
1024
1024
|
"props": {
|
|
1025
|
-
"variant": "
|
|
1025
|
+
"variant": "soft"
|
|
1026
1026
|
},
|
|
1027
1027
|
"children": "Save draft"
|
|
1028
1028
|
}
|
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
{
|
|
1035
1035
|
"component": "AppButton",
|
|
1036
1036
|
"props": {
|
|
1037
|
-
"
|
|
1037
|
+
"tone": "danger"
|
|
1038
1038
|
},
|
|
1039
1039
|
"children": "Delete project"
|
|
1040
1040
|
}
|
|
@@ -1066,14 +1066,14 @@
|
|
|
1066
1066
|
{
|
|
1067
1067
|
"component": "AppButton",
|
|
1068
1068
|
"props": {
|
|
1069
|
-
"
|
|
1069
|
+
"tone": "primary"
|
|
1070
1070
|
},
|
|
1071
1071
|
"children": "Publish"
|
|
1072
1072
|
},
|
|
1073
1073
|
{
|
|
1074
1074
|
"component": "AppButton",
|
|
1075
1075
|
"props": {
|
|
1076
|
-
"
|
|
1076
|
+
"tone": "primary"
|
|
1077
1077
|
},
|
|
1078
1078
|
"children": "Save draft"
|
|
1079
1079
|
}
|
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
{
|
|
1086
1086
|
"component": "AppButton",
|
|
1087
1087
|
"props": {
|
|
1088
|
-
"
|
|
1088
|
+
"tone": "primary"
|
|
1089
1089
|
},
|
|
1090
1090
|
"children": "Submit"
|
|
1091
1091
|
}
|
|
@@ -2062,7 +2062,7 @@
|
|
|
2062
2062
|
"props": {
|
|
2063
2063
|
"label": "Accent colour",
|
|
2064
2064
|
"value": "#4F46E5",
|
|
2065
|
-
"
|
|
2065
|
+
"helperText": "Used for buttons and links."
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
2068
|
]
|
|
@@ -2368,12 +2368,12 @@
|
|
|
2368
2368
|
],
|
|
2369
2369
|
"do": [
|
|
2370
2370
|
{
|
|
2371
|
-
"note": "danger + a verb-labelled button (\"Delete\") makes the weight and the outcome of the action clear.",
|
|
2371
|
+
"note": "The danger tone + a verb-labelled button (\"Delete\") makes the weight and the outcome of the action clear.",
|
|
2372
2372
|
"example": [
|
|
2373
2373
|
{
|
|
2374
2374
|
"component": "AppButton",
|
|
2375
2375
|
"props": {
|
|
2376
|
-
"
|
|
2376
|
+
"tone": "danger"
|
|
2377
2377
|
},
|
|
2378
2378
|
"children": "Delete project"
|
|
2379
2379
|
}
|
|
@@ -2385,7 +2385,7 @@
|
|
|
2385
2385
|
{
|
|
2386
2386
|
"component": "AppButton",
|
|
2387
2387
|
"props": {
|
|
2388
|
-
"
|
|
2388
|
+
"tone": "danger"
|
|
2389
2389
|
},
|
|
2390
2390
|
"children": "Delete workspace"
|
|
2391
2391
|
}
|
|
@@ -2398,9 +2398,6 @@
|
|
|
2398
2398
|
"example": [
|
|
2399
2399
|
{
|
|
2400
2400
|
"component": "AppButton",
|
|
2401
|
-
"props": {
|
|
2402
|
-
"variant": "primary"
|
|
2403
|
-
},
|
|
2404
2401
|
"children": "OK"
|
|
2405
2402
|
}
|
|
2406
2403
|
]
|
|
@@ -2421,7 +2418,7 @@
|
|
|
2421
2418
|
"A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
|
|
2422
2419
|
"The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
|
|
2423
2420
|
"While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog.",
|
|
2424
|
-
"Children draw left-aligned between the
|
|
2421
|
+
"Children draw left-aligned between the description and the confirm-phrase field, so a field placed there keeps its own label."
|
|
2425
2422
|
]
|
|
2426
2423
|
}
|
|
2427
2424
|
},
|
|
@@ -2447,7 +2444,7 @@
|
|
|
2447
2444
|
"do": [],
|
|
2448
2445
|
"dont": [],
|
|
2449
2446
|
"a11y": [
|
|
2450
|
-
"The panel is a dialog named by its
|
|
2447
|
+
"The panel is a dialog named by its title.",
|
|
2451
2448
|
"There is no close button by design, so the only way out is a choice: Accept all, Reject all, or Save preferences in settings mode.",
|
|
2452
2449
|
"Escape does not dismiss it, for the same reason as the missing close button."
|
|
2453
2450
|
]
|
|
@@ -3069,7 +3066,7 @@
|
|
|
3069
3066
|
"key": "delete",
|
|
3070
3067
|
"label": "Delete",
|
|
3071
3068
|
"icon": "trash-2",
|
|
3072
|
-
"
|
|
3069
|
+
"tone": "danger"
|
|
3073
3070
|
}
|
|
3074
3071
|
]
|
|
3075
3072
|
}
|
|
@@ -3245,11 +3242,10 @@
|
|
|
3245
3242
|
"props": {
|
|
3246
3243
|
"icon": "users",
|
|
3247
3244
|
"title": "No team members yet",
|
|
3248
|
-
"
|
|
3245
|
+
"description": "Invite a colleague to collaborate on this project.",
|
|
3249
3246
|
"action": {
|
|
3250
3247
|
"component": "AppButton",
|
|
3251
3248
|
"props": {
|
|
3252
|
-
"variant": "primary",
|
|
3253
3249
|
"leftIcon": "plus"
|
|
3254
3250
|
},
|
|
3255
3251
|
"children": "Invite member"
|
|
@@ -3266,7 +3262,7 @@
|
|
|
3266
3262
|
"props": {
|
|
3267
3263
|
"icon": "search",
|
|
3268
3264
|
"title": "No results for “risk”",
|
|
3269
|
-
"
|
|
3265
|
+
"description": "Try a broader keyword or clear the filters."
|
|
3270
3266
|
}
|
|
3271
3267
|
}
|
|
3272
3268
|
]
|
|
@@ -3293,7 +3289,7 @@
|
|
|
3293
3289
|
"props": {
|
|
3294
3290
|
"icon": "search",
|
|
3295
3291
|
"title": "No results",
|
|
3296
|
-
"
|
|
3292
|
+
"description": "No results found. No results found. No results found."
|
|
3297
3293
|
}
|
|
3298
3294
|
}
|
|
3299
3295
|
]
|
|
@@ -3973,7 +3969,7 @@
|
|
|
3973
3969
|
"kind": "avatar",
|
|
3974
3970
|
"fallback": "NS",
|
|
3975
3971
|
"label": "Profile photo",
|
|
3976
|
-
"
|
|
3972
|
+
"helperText": "Your face, looking at the camera."
|
|
3977
3973
|
}
|
|
3978
3974
|
}
|
|
3979
3975
|
]
|
|
@@ -4737,7 +4733,7 @@
|
|
|
4737
4733
|
{
|
|
4738
4734
|
"component": "AppButton",
|
|
4739
4735
|
"props": {
|
|
4740
|
-
"variant": "
|
|
4736
|
+
"variant": "soft"
|
|
4741
4737
|
},
|
|
4742
4738
|
"children": "Cancel"
|
|
4743
4739
|
},
|
|
@@ -4870,7 +4866,7 @@
|
|
|
4870
4866
|
"earthing"
|
|
4871
4867
|
],
|
|
4872
4868
|
"placeholder": "Add skills…",
|
|
4873
|
-
"
|
|
4869
|
+
"helperText": "2 selected"
|
|
4874
4870
|
}
|
|
4875
4871
|
}
|
|
4876
4872
|
]
|
|
@@ -5139,7 +5135,7 @@
|
|
|
5139
5135
|
"a11y": [
|
|
5140
5136
|
"The steppers are labelled Decrease and Increase and stay out of the tab order; keyboard users step with ArrowUp and ArrowDown on the input.",
|
|
5141
5137
|
"ArrowUp and ArrowDown step the value by step, within min and max.",
|
|
5142
|
-
"aria-invalid is set from error, and aria-describedby points at the error or the
|
|
5138
|
+
"aria-invalid is set from error, and aria-describedby points at the error or the helper text."
|
|
5143
5139
|
]
|
|
5144
5140
|
}
|
|
5145
5141
|
},
|
|
@@ -5266,8 +5262,8 @@
|
|
|
5266
5262
|
"One input, with the segment boxes drawn underneath, so a screen reader announces one labelled field instead of six unlabelled boxes.",
|
|
5267
5263
|
"OS autofill delivers the whole code to the one field, so an SMS code is never split across boxes.",
|
|
5268
5264
|
"A string label is the accessible name of the control, because a label element cannot point at the custom element.",
|
|
5269
|
-
"An error marks the field invalid and is linked to it as the description, which takes precedence over the
|
|
5270
|
-
"
|
|
5265
|
+
"An error marks the field invalid and is linked to it as the description, which takes precedence over the helper text.",
|
|
5266
|
+
"Helper text is linked to the field as its description when no error is shown."
|
|
5271
5267
|
]
|
|
5272
5268
|
}
|
|
5273
5269
|
},
|
|
@@ -5551,7 +5547,7 @@
|
|
|
5551
5547
|
"trigger": {
|
|
5552
5548
|
"component": "AppButton",
|
|
5553
5549
|
"props": {
|
|
5554
|
-
"variant": "
|
|
5550
|
+
"variant": "soft",
|
|
5555
5551
|
"size": "sm"
|
|
5556
5552
|
},
|
|
5557
5553
|
"children": "Edit"
|
|
@@ -5588,7 +5584,6 @@
|
|
|
5588
5584
|
{
|
|
5589
5585
|
"component": "AppButton",
|
|
5590
5586
|
"props": {
|
|
5591
|
-
"variant": "primary",
|
|
5592
5587
|
"size": "sm"
|
|
5593
5588
|
},
|
|
5594
5589
|
"children": "Save"
|
|
@@ -5652,7 +5647,6 @@
|
|
|
5652
5647
|
"cta": {
|
|
5653
5648
|
"component": "AppButton",
|
|
5654
5649
|
"props": {
|
|
5655
|
-
"variant": "primary",
|
|
5656
5650
|
"block": true
|
|
5657
5651
|
},
|
|
5658
5652
|
"children": "Choose Pro"
|
|
@@ -5679,7 +5673,6 @@
|
|
|
5679
5673
|
"cta": {
|
|
5680
5674
|
"component": "AppButton",
|
|
5681
5675
|
"props": {
|
|
5682
|
-
"variant": "primary",
|
|
5683
5676
|
"block": true
|
|
5684
5677
|
},
|
|
5685
5678
|
"children": "Click here"
|
|
@@ -6360,7 +6353,7 @@
|
|
|
6360
6353
|
"props": {
|
|
6361
6354
|
"icon": "download",
|
|
6362
6355
|
"title": "Zone survey template",
|
|
6363
|
-
"
|
|
6356
|
+
"description": "XLSX: fill on site, import here",
|
|
6364
6357
|
"href": "#t"
|
|
6365
6358
|
}
|
|
6366
6359
|
}
|
|
@@ -6376,7 +6369,7 @@
|
|
|
6376
6369
|
"props": {
|
|
6377
6370
|
"icon": "circle",
|
|
6378
6371
|
"title": "Click here",
|
|
6379
|
-
"
|
|
6372
|
+
"description": "Click here to learn more",
|
|
6380
6373
|
"href": "#t"
|
|
6381
6374
|
}
|
|
6382
6375
|
}
|
|
@@ -6453,7 +6446,7 @@
|
|
|
6453
6446
|
"props": {
|
|
6454
6447
|
"label": "Terms",
|
|
6455
6448
|
"name": "terms-good",
|
|
6456
|
-
"
|
|
6449
|
+
"helperText": "Shown on the quote."
|
|
6457
6450
|
}
|
|
6458
6451
|
}
|
|
6459
6452
|
]
|
|
@@ -6475,7 +6468,7 @@
|
|
|
6475
6468
|
],
|
|
6476
6469
|
"a11y": [
|
|
6477
6470
|
"The editor is a group named by ariaLabel, or by the label when it is a string.",
|
|
6478
|
-
"The label is tied to the editor by id.
|
|
6471
|
+
"The label is tied to the editor by id. Helper text or an error is linked through aria-describedby, and an error also sets aria-invalid.",
|
|
6479
6472
|
"Required, disabled and read-only are passed to the editor as attributes, and a failed editor load shows a status message."
|
|
6480
6473
|
]
|
|
6481
6474
|
}
|
|
@@ -8277,7 +8270,7 @@
|
|
|
8277
8270
|
"a11y": [
|
|
8278
8271
|
"The control is a native checkbox input, so Space toggles it and it posts with a form.",
|
|
8279
8272
|
"label draws a real label tied to the input by id, using a generated id when none is given.",
|
|
8280
|
-
"An error sets aria-invalid to true and is linked to the input with aria-describedby;
|
|
8273
|
+
"An error sets aria-invalid to true and is linked to the input with aria-describedby; helper text is linked the same way while no error shows."
|
|
8281
8274
|
]
|
|
8282
8275
|
}
|
|
8283
8276
|
},
|
|
@@ -8501,7 +8494,7 @@
|
|
|
8501
8494
|
"component": "AppButton",
|
|
8502
8495
|
"props": {
|
|
8503
8496
|
"size": "sm",
|
|
8504
|
-
"
|
|
8497
|
+
"tone": "danger",
|
|
8505
8498
|
"leftIcon": "trash-2"
|
|
8506
8499
|
},
|
|
8507
8500
|
"children": "Delete"
|
|
@@ -8833,13 +8826,13 @@
|
|
|
8833
8826
|
],
|
|
8834
8827
|
"do": [
|
|
8835
8828
|
{
|
|
8836
|
-
"note": "
|
|
8829
|
+
"note": "Helper text that names the commit keys (Enter and comma) tells the user how to add a tag without trial and error.",
|
|
8837
8830
|
"example": [
|
|
8838
8831
|
{
|
|
8839
8832
|
"component": "AppTagInput",
|
|
8840
8833
|
"props": {
|
|
8841
8834
|
"label": "Keywords",
|
|
8842
|
-
"
|
|
8835
|
+
"helperText": "Press Enter or comma to add a tag",
|
|
8843
8836
|
"values": [
|
|
8844
8837
|
"react",
|
|
8845
8838
|
"javascript"
|
|
@@ -8863,7 +8856,7 @@
|
|
|
8863
8856
|
],
|
|
8864
8857
|
"dont": [
|
|
8865
8858
|
{
|
|
8866
|
-
"note": "No
|
|
8859
|
+
"note": "No helper text at all: a first-time user may not discover that Enter or comma commits a tag.",
|
|
8867
8860
|
"example": [
|
|
8868
8861
|
{
|
|
8869
8862
|
"component": "AppTagInput",
|
|
@@ -8901,7 +8894,7 @@
|
|
|
8901
8894
|
],
|
|
8902
8895
|
"a11y": [
|
|
8903
8896
|
"The label is tied to the field with a for and id pair, and a generated id is used when none is given.",
|
|
8904
|
-
"An error sets aria-invalid and points aria-describedby at the error text; with no error it points at the
|
|
8897
|
+
"An error sets aria-invalid and points aria-describedby at the error text; with no error it points at the helper text.",
|
|
8905
8898
|
"When there is no ariaLabel, a string label becomes the input's accessible name.",
|
|
8906
8899
|
"The info tip beside the label is named by helpLabel."
|
|
8907
8900
|
]
|
|
@@ -8938,7 +8931,7 @@
|
|
|
8938
8931
|
"props": {
|
|
8939
8932
|
"label": "Scope of work",
|
|
8940
8933
|
"name": "scope",
|
|
8941
|
-
"
|
|
8934
|
+
"helperText": "What the assessment covers."
|
|
8942
8935
|
}
|
|
8943
8936
|
}
|
|
8944
8937
|
]
|
|
@@ -9073,7 +9066,7 @@
|
|
|
9073
9066
|
"dont": [],
|
|
9074
9067
|
"a11y": [
|
|
9075
9068
|
"The trigger is named by ariaLabel, or by a text label when there is none.",
|
|
9076
|
-
"An error sets aria-invalid and points aria-describedby at the error text, or at the
|
|
9069
|
+
"An error sets aria-invalid and points aria-describedby at the error text, or at the helper text when there is no error.",
|
|
9077
9070
|
"The field carries the required attribute as well as the visible required mark.",
|
|
9078
9071
|
"The info tip beside the label is named by helpLabel."
|
|
9079
9072
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../components/AppButton.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({text:r,confirmRef:i,onDiscard:a,onKeep:o}){return/* @__PURE__ */ n(`div`,{className:`wui-drawer-discard`,role:`alert`,children:[/* @__PURE__ */ t(`span`,{className:`wui-drawer-discard-text`,children:r}),/* @__PURE__ */ t(e,{
|
|
1
|
+
import e from"../components/AppButton.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({text:r,confirmRef:i,onDiscard:a,onKeep:o}){return/* @__PURE__ */ n(`div`,{className:`wui-drawer-discard`,role:`alert`,children:[/* @__PURE__ */ t(`span`,{className:`wui-drawer-discard-text`,children:r}),/* @__PURE__ */ t(e,{tone:`danger`,size:`sm`,"data-wui-discard-confirm":``,ref:i,onClick:a,children:`Discard`}),/* @__PURE__ */ t(e,{variant:`soft`,size:`sm`,"data-wui-discard-keep":``,onClick:o,children:`Keep editing`})]})}export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FILL_VARIANTS as e,TONES as t}from"./vocabulary.js";var n={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function r(r,i){let a=t.includes(r)?r:`primary`;return n[e.includes(i)?i:`solid`](a)}export{r as buttonClass};
|
package/dist/lib/sectionShell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{TONES as e}from"./vocabulary.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var r=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],i=[`start`,`center`],a=[`default`,`muted`],o=[`display`,`body`];function s(e,t){return r.includes(e)?e:t}function c(e){return r[Math.min(r.indexOf(e)+1,5)]}function l({className:e,src:n,alt:r,width:i,height:a}){return/* @__PURE__ */ t(`img`,{className:e,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function u({component:r,kind:i,title:a,as:o,eyebrow:s,subtitle:c,align:l,variant:u,eyebrowTone:d,titleFont:f,inset:p,actions:m,extraClass:h,className:g,rest:_,children:v}){if(a==null||a===``)throw Error(`${r} needs a title: every section opens with its heading.`);let y=o,b=_.id?`${_.id}-title`:void 0,x=e.includes(d),{style:S,...C}=_,w=p==null&&S===void 0?void 0:{"--wui-section-inset":p==null?void 0:`${p}px`,...S},T=[`wui-section`,`wui-section-${i}`,l===`center`?`wui-section-center`:``,u===`muted`?`wui-section-muted`:``,h,g].filter(Boolean).join(` `);return/* @__PURE__ */ t(`section`,{className:T,style:w,"aria-labelledby":b,...C,children:/* @__PURE__ */ n(`div`,{className:`wui-section-inner`,children:[/* @__PURE__ */ n(`div`,{className:`wui-section-head`,children:[s!=null&&s!==``&&/* @__PURE__ */ t(`div`,{className:x?`wui-section-eyebrow wui-section-eyebrow-pill wui-section-eyebrow-${d}`:`wui-section-eyebrow`,children:s}),/* @__PURE__ */ t(y,{className:f===`body`?`wui-section-title wui-section-title-body`:`wui-section-title`,id:b,children:a}),c!=null&&c!==``&&/* @__PURE__ */ t(`p`,{className:`wui-section-subtitle`,children:c}),m!=null&&m!==!1&&/* @__PURE__ */ t(`div`,{className:`wui-section-actions`,children:m})]}),v]})})}export{i as SECTION_ALIGNS,r as SECTION_HEADINGS,o as SECTION_TITLE_FONTS,a as SECTION_VARIANTS,l as SectionImage,u as default,c as itemHeading,s as sectionHeading};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[`primary`,`success`,`warning`,`danger`,`info`,`neutral`],t=[`solid`,`soft`,`outline`,`ghost`,`link`,`glass`];export{t as FILL_VARIANTS,e as TONES};
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* @param {string} props.label
|
|
16
16
|
* @param {'auto'|'top'|'bottom'|'start'|'end'} [props.tooltipPlacement]
|
|
17
17
|
* @param {string} [props.shortcut]
|
|
18
|
-
* @param {
|
|
18
|
+
* @param {"danger"|"neutral"} [props.tone]
|
|
19
19
|
* @param {"comfortable"|"compact"} [props.density]
|
|
20
|
-
* @param {boolean} [props.neutral]
|
|
21
20
|
* @param {boolean} [props.disabled]
|
|
22
21
|
* @param {number} [props.size]
|
|
23
22
|
* @param {() => void} [props.onClick]
|
|
@@ -45,21 +44,13 @@ export default function AppActionIcon(props: {
|
|
|
45
44
|
tooltipPlacement?: 'auto' | 'top' | 'bottom' | 'start' | 'end';
|
|
46
45
|
/** The key that runs this action, such as J or E. It is drawn as a key chip in the tooltip. */
|
|
47
46
|
shortcut?: string;
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
danger?: boolean;
|
|
47
|
+
/** danger draws a destructive tint. neutral mutes the ink and the hover surface, for an action on a card or a quiet surface. */
|
|
48
|
+
tone?: "danger" | "neutral";
|
|
53
49
|
/**
|
|
54
50
|
* How much room surrounds the glyph: comfortable keeps an 8px ring, compact 4px (a 16px glyph in a 24px disc).
|
|
55
51
|
* @default "comfortable"
|
|
56
52
|
*/
|
|
57
53
|
density?: "comfortable" | "compact";
|
|
58
|
-
/**
|
|
59
|
-
* Muted ink with a muted surface on hover, for an action on a card or a quiet surface. Not with danger.
|
|
60
|
-
* @default false
|
|
61
|
-
*/
|
|
62
|
-
neutral?: boolean;
|
|
63
54
|
/**
|
|
64
55
|
* Turns the action off.
|
|
65
56
|
* @default false
|
|
@@ -71,7 +71,7 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
|
71
71
|
/** An error message shown under the field. */
|
|
72
72
|
error?: string;
|
|
73
73
|
/** A hint shown under the field when there is no error. */
|
|
74
|
-
|
|
74
|
+
helperText?: string;
|
|
75
75
|
/**
|
|
76
76
|
* Marks the field as required, with the mark on the label.
|
|
77
77
|
* @default false
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param {string|import('react').ReactNode} [props.icon]
|
|
10
10
|
* @param {import('react').ReactNode} props.children The message; may include an inline action link.
|
|
11
11
|
* @param {boolean} [props.dismissible]
|
|
12
|
-
* @param {() => void} [props.
|
|
12
|
+
* @param {() => void} [props.onClose] 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
15
|
* @param {string} [props.dismissLabel] Default "Dismiss".
|
|
@@ -28,7 +28,7 @@ export default function AppBanner(props: {
|
|
|
28
28
|
* @default false
|
|
29
29
|
*/
|
|
30
30
|
dismissible?: boolean;
|
|
31
|
-
|
|
31
|
+
onClose?: () => void;
|
|
32
32
|
/** A button or link at the banner's right edge; it wraps below the message on a phone. */
|
|
33
33
|
action?: import('react').ReactNode;
|
|
34
34
|
/**
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export declare const BUTTON_VARIANTS: string[];
|
|
2
|
-
export declare function buttonVariantClass(variant: any): string;
|
|
3
1
|
/**
|
|
4
2
|
* A button, or a button-styled link with href, in the kit's variants and sizes.
|
|
5
3
|
*
|
|
6
4
|
* @param {object} props
|
|
7
5
|
* @param {import('react').ReactNode} props.children The label.
|
|
8
|
-
* @param {"primary"|"
|
|
6
|
+
* @param {"primary"|"success"|"warning"|"danger"|"info"|"neutral"} [props.tone]
|
|
7
|
+
* @param {"solid"|"soft"|"outline"|"ghost"|"link"|"glass"} [props.variant]
|
|
9
8
|
* @param {"sm"|"md"|"lg"} [props.size]
|
|
10
9
|
* @param {"button"|"submit"|"reset"} [props.type]
|
|
11
10
|
* @param {boolean} [props.loading]
|
|
@@ -29,10 +28,15 @@ export declare function buttonVariantClass(variant: any): string;
|
|
|
29
28
|
export default function AppButton(props: {
|
|
30
29
|
children: import('react').ReactNode;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
31
|
+
* Semantic colour.
|
|
33
32
|
* @default "primary"
|
|
34
33
|
*/
|
|
35
|
-
|
|
34
|
+
tone?: "primary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
35
|
+
/**
|
|
36
|
+
* Emphasis level: solid fill, soft tint, outline, ghost, link text, or glass.
|
|
37
|
+
* @default "solid"
|
|
38
|
+
*/
|
|
39
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | "link" | "glass";
|
|
36
40
|
/**
|
|
37
41
|
* Control size.
|
|
38
42
|
* @default "md"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @param {import('react').ReactNode} [props.footer]
|
|
18
18
|
* @param {import('react').ReactNode} [props.media]
|
|
19
19
|
* @param {import('react').ReactNode} props.children
|
|
20
|
-
* @param {"
|
|
20
|
+
* @param {"flat"|"elevated"|"outline"|"filled"|"accent"} [props.variant]
|
|
21
21
|
* @param {"primary"|"success"|"warning"|"danger"|"info"} [props.tone]
|
|
22
22
|
* @param {"none"|"sm"|"md"|"lg"} [props.padding]
|
|
23
23
|
* @param {"xs"|"sm"|"md"|"lg"|number|string} [props.maxWidth]
|
|
@@ -65,9 +65,9 @@ export default function AppCard(props: {
|
|
|
65
65
|
children: import('react').ReactNode;
|
|
66
66
|
/**
|
|
67
67
|
* The visual treatment of the card.
|
|
68
|
-
* @default "
|
|
68
|
+
* @default "flat"
|
|
69
69
|
*/
|
|
70
|
-
variant?: "
|
|
70
|
+
variant?: "flat" | "elevated" | "outline" | "filled" | "accent";
|
|
71
71
|
/**
|
|
72
72
|
* Colours the `accent` stripe.
|
|
73
73
|
* @default "primary"
|
|
@@ -74,6 +74,13 @@ declare const AppChart: import("react").ForwardRefExoticComponent<{
|
|
|
74
74
|
* @default "ready"
|
|
75
75
|
*/
|
|
76
76
|
state?: 'ready' | 'loading' | 'empty' | 'error';
|
|
77
|
+
/**
|
|
78
|
+
* The chart is loading: the same as state `loading`. Wins over `state`.
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
loading?: boolean;
|
|
82
|
+
/** The curated message to show when the chart failed: the same as state `error` with this text. Wins over `loading` and `state`, and replaces `errorText`. */
|
|
83
|
+
error?: string;
|
|
77
84
|
/** Replaces the default empty message. */
|
|
78
85
|
emptyText?: string;
|
|
79
86
|
/** Replaces the default error message. Say what the person can do. */
|
|
@@ -30,7 +30,7 @@ declare const AppCheckbox: import("react").ForwardRefExoticComponent<{
|
|
|
30
30
|
/** Error message, rendered below the control. Replaces the hint. */
|
|
31
31
|
error?: string;
|
|
32
32
|
/** Helper text below the control. Hidden while an error is shown. */
|
|
33
|
-
|
|
33
|
+
helperText?: string;
|
|
34
34
|
/** Content for the info-tip after the label. Shown only when a label is set. */
|
|
35
35
|
help?: import('react').ReactNode;
|
|
36
36
|
/**
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @param {boolean} [props.required]
|
|
18
18
|
* @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
|
|
19
19
|
* @param {string} [props.error]
|
|
20
|
-
* @param {string} [props.
|
|
20
|
+
* @param {string} [props.helperText]
|
|
21
21
|
* @param {import('react').ReactNode} [props.help]
|
|
22
22
|
* @param {string} [props.helpLabel]
|
|
23
23
|
* @param {string} [props.colourLabel] Default "Colour".
|
|
@@ -53,7 +53,7 @@ export default function AppColorField(props: {
|
|
|
53
53
|
/** Error message shown under the field. */
|
|
54
54
|
error?: string;
|
|
55
55
|
/** Helper text shown under the field. */
|
|
56
|
-
|
|
56
|
+
helperText?: string;
|
|
57
57
|
/** The content of the info-tip beside the label, opened by a button. */
|
|
58
58
|
help?: import('react').ReactNode;
|
|
59
59
|
/**
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* @param {boolean} props.open
|
|
6
6
|
* @param {string} props.title
|
|
7
7
|
* @param {'default'|'plain'} [props.variant] default keeps the illustration and equal-width actions; plain drops the illustration, starts the text at the edge and sizes the actions small, right-aligned.
|
|
8
|
-
* @param {import('react').ReactNode} [props.
|
|
9
|
-
* @param {import('react').ReactNode} [props.children] Extra content drawn between the
|
|
8
|
+
* @param {import('react').ReactNode} [props.description]
|
|
9
|
+
* @param {import('react').ReactNode} [props.children] Extra content drawn between the description and the confirm-phrase field, such as a reason select or a note box.
|
|
10
10
|
* @param {string} [props.confirmLabel]
|
|
11
11
|
* @param {string} [props.cancelLabel]
|
|
12
12
|
* @param {string} [props.typePhraseLabel] Default "Type {phrase} to confirm". Replaces the built-in English text, for other languages; {phrase} is filled with the confirm phrase.
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {"success"|"error"|"warning"|"info"|"delete"|"primary"} [props.tone]
|
|
13
|
+
* @param {"danger"|"success"|"warning"|"info"|"primary"} [props.tone] "danger" styles the confirm button as destructive and draws the delete glyph.
|
|
15
14
|
* @param {string} [props.image]
|
|
16
15
|
* @param {string | import('react').ReactNode} [props.icon] Overrides the tone's glyph; a string is an icon name.
|
|
17
16
|
* @param {number} [props.iconSize]
|
|
@@ -35,7 +34,7 @@ export default function AppConfirmDialog(props: {
|
|
|
35
34
|
*/
|
|
36
35
|
variant?: 'default' | 'plain';
|
|
37
36
|
/** The text that explains what the user is confirming. */
|
|
38
|
-
|
|
37
|
+
description?: import('react').ReactNode;
|
|
39
38
|
children?: import('react').ReactNode;
|
|
40
39
|
/**
|
|
41
40
|
* The confirm button's text.
|
|
@@ -52,13 +51,8 @@ export default function AppConfirmDialog(props: {
|
|
|
52
51
|
* @default "Type {phrase} to confirm"
|
|
53
52
|
*/
|
|
54
53
|
typePhraseLabel?: string;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
* @default false
|
|
58
|
-
*/
|
|
59
|
-
danger?: boolean;
|
|
60
|
-
/** The status icon. Unset, it is delete when danger is set and info otherwise. */
|
|
61
|
-
tone?: "success" | "error" | "warning" | "info" | "delete" | "primary";
|
|
54
|
+
/** The status icon, and the confirm button's colour when danger: the danger tone styles Confirm as destructive and draws the delete icon. Unset, the icon is info. */
|
|
55
|
+
tone?: "danger" | "success" | "warning" | "info" | "primary";
|
|
62
56
|
/** URL of a custom illustration that replaces the tone artwork. Any source size is fine: the theme boxes it to the same footprint. It is decorative, so the title and message carry the meaning. */
|
|
63
57
|
image?: string;
|
|
64
58
|
/** Replaces the tone's glyph. A string is an icon name; a node is drawn as given. An image still wins over it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mount once near the root. A descendant calls `useConfirm()` and awaits the result:
|
|
3
|
-
* `const confirm = useConfirm(); if (!(await confirm({ title: "Delete?",
|
|
3
|
+
* `const confirm = useConfirm(); if (!(await confirm({ title: "Delete?", tone: "danger" }))) return;`
|
|
4
4
|
* The promise resolves true on confirm, and false on Cancel, Escape, the backdrop or unmount.
|
|
5
5
|
*
|
|
6
6
|
* @param {{ children: import('react').ReactNode }} props
|
|
@@ -9,18 +9,17 @@ export default function AppConfirmProvider(props: {
|
|
|
9
9
|
children: import('react').ReactNode;
|
|
10
10
|
}): import("react").JSX.Element;
|
|
11
11
|
/**
|
|
12
|
-
* @returns {(options: { title: import('react').ReactNode,
|
|
13
|
-
* confirmLabel?: string, cancelLabel?: string,
|
|
12
|
+
* @returns {(options: { title: import('react').ReactNode, description?: import('react').ReactNode,
|
|
13
|
+
* confirmLabel?: string, cancelLabel?: string, tone?: "danger" | "success" | "warning" | "info" | "primary",
|
|
14
14
|
* icon?: string | import('react').ReactNode, confirmPhrase?: string,
|
|
15
15
|
* onRun?: () => Promise<void> }) => Promise<boolean>}
|
|
16
16
|
*/
|
|
17
17
|
export declare function useConfirm(): (options: {
|
|
18
18
|
title: import('react').ReactNode;
|
|
19
|
-
|
|
19
|
+
description?: import('react').ReactNode;
|
|
20
20
|
confirmLabel?: string;
|
|
21
21
|
cancelLabel?: string;
|
|
22
|
-
|
|
23
|
-
tone?: string;
|
|
22
|
+
tone?: "danger" | "success" | "warning" | "info" | "primary";
|
|
24
23
|
icon?: string | import('react').ReactNode;
|
|
25
24
|
confirmPhrase?: string;
|
|
26
25
|
onRun?: () => Promise<void>;
|
|
@@ -23,7 +23,7 @@ import "@webority/ui-elements/elements/consent-banner";
|
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* @param {object} props
|
|
26
|
-
* @param {string} [props.
|
|
26
|
+
* @param {string} [props.title]
|
|
27
27
|
* @param {string} [props.description]
|
|
28
28
|
* @param {string} [props.policyHref]
|
|
29
29
|
* @param {string} [props.policyLabel]
|
|
@@ -39,10 +39,10 @@ import "@webority/ui-elements/elements/consent-banner";
|
|
|
39
39
|
*/
|
|
40
40
|
export default function AppConsentBanner(props: {
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Title, and the dialog's accessible name.
|
|
43
43
|
* @default "Cookies on this site"
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
title?: string;
|
|
46
46
|
/** The explanation above the buttons. */
|
|
47
47
|
description?: string;
|
|
48
48
|
/** Link to the cookie policy; no link when omitted. */
|