@webority/ui-react 0.165.0 → 0.168.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.
Files changed (134) hide show
  1. package/dist/canvas-kit/kit.js +217 -215
  2. package/dist/canvas-kit/manifest.json +247 -28
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/dist/components/AppAsyncBlock.js +1 -1
  5. package/dist/components/AppAvatar.js +1 -1
  6. package/dist/components/AppAvatarGroup.js +1 -1
  7. package/dist/components/AppBanner.js +1 -1
  8. package/dist/components/AppBreadcrumbs.js +1 -1
  9. package/dist/components/AppButton.js +1 -1
  10. package/dist/components/AppCalendar.js +1 -1
  11. package/dist/components/AppCard.js +1 -1
  12. package/dist/components/AppCarousel.js +1 -1
  13. package/dist/components/AppCell.js +1 -1
  14. package/dist/components/AppChart.js +1 -1
  15. package/dist/components/AppChartCard.js +1 -1
  16. package/dist/components/AppCheckbox.js +1 -1
  17. package/dist/components/AppChip.js +1 -1
  18. package/dist/components/AppChipGroup.js +1 -1
  19. package/dist/components/AppChoiceCard.js +1 -1
  20. package/dist/components/AppChoiceChip.js +1 -1
  21. package/dist/components/AppColorField.js +1 -1
  22. package/dist/components/AppColumnMenu.js +1 -1
  23. package/dist/components/AppCommandPalette.js +1 -1
  24. package/dist/components/AppCommentThread.js +1 -1
  25. package/dist/components/AppCompareTable.js +1 -1
  26. package/dist/components/AppConfirmDialog.js +1 -1
  27. package/dist/components/AppConfirmProvider.js +1 -1
  28. package/dist/components/AppContextMenu.js +1 -1
  29. package/dist/components/AppCopyButton.js +1 -1
  30. package/dist/components/AppDataTable.js +1 -1
  31. package/dist/components/AppDatePicker.js +1 -1
  32. package/dist/components/AppDateRangePicker.js +1 -1
  33. package/dist/components/AppDescriptions.js +1 -1
  34. package/dist/components/AppDrawer.js +1 -1
  35. package/dist/components/AppDropZone.js +1 -1
  36. package/dist/components/AppDropdown.js +1 -1
  37. package/dist/components/AppDueDate.js +1 -1
  38. package/dist/components/AppEntryGrid.js +1 -1
  39. package/dist/components/AppErrorBoundary.js +1 -1
  40. package/dist/components/AppErrorSummary.js +1 -1
  41. package/dist/components/AppFileAttachment.js +1 -1
  42. package/dist/components/AppFilePicker.js +1 -1
  43. package/dist/components/AppFilterBar.js +1 -1
  44. package/dist/components/AppFloatingDock.js +1 -1
  45. package/dist/components/AppForm.js +1 -1
  46. package/dist/components/AppFormulaSteps.js +1 -1
  47. package/dist/components/AppHoverCard.js +1 -1
  48. package/dist/components/AppImagePicker.js +1 -1
  49. package/dist/components/AppInfoTip.js +1 -1
  50. package/dist/components/AppInlineEdit.js +1 -1
  51. package/dist/components/AppInput.js +1 -1
  52. package/dist/components/AppInputGroup.js +1 -1
  53. package/dist/components/AppKanban.js +1 -1
  54. package/dist/components/AppMentionInput.js +1 -1
  55. package/dist/components/AppModal.js +1 -1
  56. package/dist/components/AppNavigationMenu.js +1 -1
  57. package/dist/components/AppNotificationCenter.js +1 -1
  58. package/dist/components/AppNumberInput.js +1 -1
  59. package/dist/components/AppOnboardingChecklist.js +1 -1
  60. package/dist/components/AppOrgTree.js +1 -1
  61. package/dist/components/AppOtpInput.js +1 -1
  62. package/dist/components/AppPageHeader.js +1 -1
  63. package/dist/components/AppPhoneNumberInput.js +1 -1
  64. package/dist/components/AppPricingCard.js +1 -1
  65. package/dist/components/AppQrCode.js +1 -1
  66. package/dist/components/AppRadio.js +1 -1
  67. package/dist/components/AppRadioGroup.js +1 -1
  68. package/dist/components/AppRating.js +1 -1
  69. package/dist/components/AppRecordPager.js +1 -1
  70. package/dist/components/AppRelativeTime.js +1 -1
  71. package/dist/components/AppRepeater.js +1 -1
  72. package/dist/components/AppRichText.js +1 -1
  73. package/dist/components/AppRouteError.js +1 -1
  74. package/dist/components/AppRowActions.js +1 -1
  75. package/dist/components/AppScoreScale.js +1 -1
  76. package/dist/components/AppSearch.js +1 -1
  77. package/dist/components/AppSectionLeadCapture.js +1 -1
  78. package/dist/components/AppSegmented.js +1 -1
  79. package/dist/components/AppSelect.js +1 -1
  80. package/dist/components/AppShell.js +1 -1
  81. package/dist/components/AppShortcutLegend.js +1 -1
  82. package/dist/components/AppShowMore.js +1 -1
  83. package/dist/components/AppSlider.js +1 -1
  84. package/dist/components/AppSortableList.js +1 -1
  85. package/dist/components/AppSparkline.js +1 -1
  86. package/dist/components/AppSpinner.js +1 -1
  87. package/dist/components/AppSplash.js +1 -1
  88. package/dist/components/AppSplitButton.js +1 -1
  89. package/dist/components/AppSplitView.js +1 -1
  90. package/dist/components/AppStatusBadge.js +1 -1
  91. package/dist/components/AppStepper.js +1 -1
  92. package/dist/components/AppSwitch.js +1 -1
  93. package/dist/components/AppTablePagination.js +1 -1
  94. package/dist/components/AppTableToolbar.js +1 -1
  95. package/dist/components/AppTabs.js +1 -1
  96. package/dist/components/AppTextarea.js +1 -1
  97. package/dist/components/AppThemeToggle.js +1 -1
  98. package/dist/components/AppTimePicker.js +1 -1
  99. package/dist/components/AppTimeline.js +1 -1
  100. package/dist/components/AppToast.js +1 -1
  101. package/dist/components/AppUpdateBar.js +1 -1
  102. package/dist/components/AppWhatsNew.js +1 -1
  103. package/dist/components/AppWizard.js +1 -1
  104. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  105. package/dist/components/toast.js +1 -1
  106. package/dist/guidance.json +10 -5
  107. package/dist/lib/FileItemRow.js +1 -1
  108. package/dist/lib/emptyValue.js +1 -1
  109. package/dist/lib/fieldState.js +1 -1
  110. package/dist/lib/useWuiText.js +1 -0
  111. package/dist/types/components/AppColorField.d.ts +3 -3
  112. package/dist/types/components/AppDatePicker.d.ts +2 -1
  113. package/dist/types/components/AppDateRangePicker.d.ts +1 -1
  114. package/dist/types/components/AppDropdown.d.ts +6 -0
  115. package/dist/types/components/AppEntryGrid.d.ts +43 -1
  116. package/dist/types/components/AppFormulaSteps.d.ts +3 -3
  117. package/dist/types/components/AppInput.d.ts +4 -4
  118. package/dist/types/components/AppInputGroup.d.ts +1 -1
  119. package/dist/types/components/AppMentionInput.d.ts +2 -2
  120. package/dist/types/components/AppNumberInput.d.ts +9 -3
  121. package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
  122. package/dist/types/components/AppRowActions.d.ts +6 -0
  123. package/dist/types/components/AppSearch.d.ts +1 -1
  124. package/dist/types/components/AppSelect.d.ts +3 -2
  125. package/dist/types/components/AppTextarea.d.ts +2 -2
  126. package/dist/types/components/AppTimePicker.d.ts +1 -1
  127. package/dist/types/index.d.ts +2 -1
  128. package/dist/types/lib/emptyValue.d.ts +2 -2
  129. package/dist/types/lib/fieldState.d.ts +1 -0
  130. package/dist/types/lib/useWuiText.d.ts +3 -0
  131. package/dist/ui-react.js +1 -1
  132. package/package.json +9 -9
  133. package/dist/lib/unsavedText.js +0 -1
  134. package/dist/types/lib/unsavedText.d.ts +0 -5
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityWeb",
3
3
  "library": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.165.0"
5
+ "version": "0.168.0"
6
6
  },
7
7
  "rendererProtocolVersion": 14,
8
8
  "platform": "Web",
@@ -5188,10 +5188,11 @@
5188
5188
  "enum": [
5189
5189
  "lg",
5190
5190
  "md",
5191
- "sm"
5191
+ "sm",
5192
+ "xl"
5192
5193
  ],
5193
5194
  "required": false,
5194
- "description": "Control size. sm and lg resize the swatch and the hex box together.",
5195
+ "description": "Control size. sm, lg and xl resize the swatch and the hex box together.",
5195
5196
  "default": "md"
5196
5197
  },
5197
5198
  {
@@ -8034,6 +8035,12 @@
8034
8035
  "marker": "AppDatePicker",
8035
8036
  "acceptsChildren": false,
8036
8037
  "props": [
8038
+ {
8039
+ "name": "aria-invalid",
8040
+ "type": "any",
8041
+ "required": false,
8042
+ "description": "Marks the control invalid (aria-invalid) without an error message. A given value wins over the one an error sets, and it draws no field wrapper or message in the bare form."
8043
+ },
8037
8044
  {
8038
8045
  "name": "ariaLabel",
8039
8046
  "type": "string",
@@ -8191,7 +8198,8 @@
8191
8198
  "enum": [
8192
8199
  "lg",
8193
8200
  "md",
8194
- "sm"
8201
+ "sm",
8202
+ "xl"
8195
8203
  ],
8196
8204
  "required": false,
8197
8205
  "description": "Control height tier, matching AppInput."
@@ -8289,7 +8297,7 @@
8289
8297
  ],
8290
8298
  "a11y": [
8291
8299
  "The field label names the control through aria-label when it is a string, and ariaLabel overrides it.",
8292
- "Helper text or error text is linked to the control with aria-describedby, and an error sets aria-invalid.",
8300
+ "Helper text or error text is linked to the control with aria-describedby, and an error sets aria-invalid. A caller's aria-invalid takes its place.",
8293
8301
  "Required and disabled are set as native attributes on the control."
8294
8302
  ]
8295
8303
  }
@@ -8473,7 +8481,8 @@
8473
8481
  "enum": [
8474
8482
  "lg",
8475
8483
  "md",
8476
- "sm"
8484
+ "sm",
8485
+ "xl"
8477
8486
  ],
8478
8487
  "required": false,
8479
8488
  "description": "Control height tier, matching AppInput."
@@ -9223,6 +9232,12 @@
9223
9232
  "name": "items",
9224
9233
  "type": "array",
9225
9234
  "itemFields": [
9235
+ {
9236
+ "name": "data",
9237
+ "type": "object",
9238
+ "required": false,
9239
+ "description": "data-* attributes written on the control (the icon button or button and the menu row)."
9240
+ },
9226
9241
  {
9227
9242
  "name": "description",
9228
9243
  "type": "string",
@@ -9295,12 +9310,28 @@
9295
9310
  "required": false,
9296
9311
  "description": "Content of the row: text, or text with an icon. A searchable menu needs text."
9297
9312
  },
9313
+ {
9314
+ "name": "rel",
9315
+ "type": "string",
9316
+ "required": false,
9317
+ "description": "The link's rel. Needs href or to."
9318
+ },
9298
9319
  {
9299
9320
  "name": "shortcut",
9300
9321
  "type": "string",
9301
9322
  "required": false,
9302
9323
  "description": "The key that runs the item, such as E, drawn as a key chip at the end of the row. The page binds the key itself."
9303
9324
  },
9325
+ {
9326
+ "name": "target",
9327
+ "type": "enum",
9328
+ "enum": [
9329
+ "_blank",
9330
+ "_self"
9331
+ ],
9332
+ "required": false,
9333
+ "description": "Where an href or to opens. Needs href or to."
9334
+ },
9304
9335
  {
9305
9336
  "name": "to",
9306
9337
  "type": "string",
@@ -9928,6 +9959,12 @@
9928
9959
  "name": "columns",
9929
9960
  "type": "array",
9930
9961
  "itemFields": [
9962
+ {
9963
+ "name": "group",
9964
+ "type": "string",
9965
+ "required": false,
9966
+ "description": "Adjacent columns with the same group share one heading drawn above them."
9967
+ },
9931
9968
  {
9932
9969
  "name": "help",
9933
9970
  "type": "node",
@@ -9957,6 +9994,22 @@
9957
9994
  "required": true,
9958
9995
  "description": "The column heading."
9959
9996
  },
9997
+ {
9998
+ "name": "pin",
9999
+ "type": "enum",
10000
+ "enum": [
10001
+ "start"
10002
+ ],
10003
+ "required": false,
10004
+ "description": "start keeps the column in view when the grid scrolls sideways. Only the first column can be pinned."
10005
+ },
10006
+ {
10007
+ "name": "sortable",
10008
+ "type": "boolean",
10009
+ "required": false,
10010
+ "description": "Makes the heading a sort control that calls onSort; the page sorts the rows.",
10011
+ "default": false
10012
+ },
9960
10013
  {
9961
10014
  "name": "width",
9962
10015
  "type": "stringOrNumber",
@@ -9995,6 +10048,12 @@
9995
10048
  "description": "The keyboard legend for Escape.",
9996
10049
  "default": "Discard changes"
9997
10050
  },
10051
+ {
10052
+ "name": "emptyContent",
10053
+ "type": "node",
10054
+ "required": false,
10055
+ "description": "Replaces the emptyLabel sentence when there are no rows, for a title, text and an action. Giving both is refused."
10056
+ },
9998
10057
  {
9999
10058
  "name": "emptyLabel",
10000
10059
  "type": "string",
@@ -10013,7 +10072,7 @@
10013
10072
  "name": "hint",
10014
10073
  "type": "boolean",
10015
10074
  "required": false,
10016
- "description": "Shows the keyboard legend under the grid.",
10075
+ "description": "Shows the keyboard legend under the grid. The Enter and Ctrl+S entries show only with onCommitRow.",
10017
10076
  "default": true
10018
10077
  },
10019
10078
  {
@@ -10023,6 +10082,13 @@
10023
10082
  "description": "The accessible name of the table.",
10024
10083
  "default": "Entry lines"
10025
10084
  },
10085
+ {
10086
+ "name": "loading",
10087
+ "type": "boolean",
10088
+ "required": false,
10089
+ "description": "Draws placeholder rows instead of the lines while they load.",
10090
+ "default": false
10091
+ },
10026
10092
  {
10027
10093
  "name": "moveLabel",
10028
10094
  "type": "string",
@@ -10030,6 +10096,67 @@
10030
10096
  "description": "The keyboard legend for Ctrl and the arrow keys.",
10031
10097
  "default": "Move between lines"
10032
10098
  },
10099
+ {
10100
+ "name": "pagination",
10101
+ "type": "object",
10102
+ "fields": [
10103
+ {
10104
+ "name": "mode",
10105
+ "type": "enum",
10106
+ "enum": [
10107
+ "numbered",
10108
+ "prev-next"
10109
+ ],
10110
+ "required": false,
10111
+ "description": "numbered shows page buttons; prev-next shows only the previous and next buttons."
10112
+ },
10113
+ {
10114
+ "name": "page",
10115
+ "type": "number",
10116
+ "required": true,
10117
+ "description": "The current page, counted from one."
10118
+ },
10119
+ {
10120
+ "name": "pageSize",
10121
+ "type": "number",
10122
+ "required": true,
10123
+ "description": "The number of lines on a page."
10124
+ },
10125
+ {
10126
+ "name": "pageSizes",
10127
+ "type": "array",
10128
+ "required": false,
10129
+ "description": "The page sizes the size menu offers."
10130
+ },
10131
+ {
10132
+ "name": "summary",
10133
+ "type": "boolean",
10134
+ "required": false,
10135
+ "description": "Draws \"Showing x to y of z\" at the start of the footer."
10136
+ },
10137
+ {
10138
+ "name": "total",
10139
+ "type": "number",
10140
+ "required": true,
10141
+ "description": "The number of lines across all pages."
10142
+ },
10143
+ {
10144
+ "name": "totalPages",
10145
+ "type": "number",
10146
+ "required": false,
10147
+ "description": "The number of pages; wins over the count worked out from total."
10148
+ }
10149
+ ],
10150
+ "required": false,
10151
+ "description": "The pager state, as AppDataTable takes it; draws the pager inside the grid frame under the table."
10152
+ },
10153
+ {
10154
+ "name": "removeLineLabel",
10155
+ "type": "string",
10156
+ "required": false,
10157
+ "description": "The keyboard legend for Ctrl and Delete; shown only with onRemoveRow.",
10158
+ "default": "Remove line"
10159
+ },
10033
10160
  {
10034
10161
  "name": "rows",
10035
10162
  "type": "array",
@@ -10050,6 +10177,39 @@
10050
10177
  "description": "The status word for a line being saved.",
10051
10178
  "default": "Saving"
10052
10179
  },
10180
+ {
10181
+ "name": "skeletonRows",
10182
+ "type": "number",
10183
+ "required": false,
10184
+ "description": "How many placeholder rows loading draws; a whole number of 1 or more.",
10185
+ "default": 3
10186
+ },
10187
+ {
10188
+ "name": "sort",
10189
+ "type": "object",
10190
+ "fields": [
10191
+ {
10192
+ "name": "dir",
10193
+ "type": "enum",
10194
+ "enum": [
10195
+ "asc",
10196
+ "desc"
10197
+ ],
10198
+ "required": true,
10199
+ "description": "The sort direction."
10200
+ },
10201
+ {
10202
+ "name": "key",
10203
+ "type": "string",
10204
+ "required": true,
10205
+ "nullable": true,
10206
+ "description": "The sorted column's key; null means no column is sorted."
10207
+ }
10208
+ ],
10209
+ "required": false,
10210
+ "nullable": true,
10211
+ "description": "The sorted column's key and direction; that column's heading announces it."
10212
+ },
10053
10213
  {
10054
10214
  "name": "statusLabel",
10055
10215
  "type": "string",
@@ -10064,7 +10224,7 @@
10064
10224
  "usage": {
10065
10225
  "when": [
10066
10226
  "A person enters or corrects several lines of figures in one table, one line at a time.",
10067
- "Each line is saved on its own, and the person moves through the lines with the keyboard."
10227
+ "Enter and Ctrl+S commit the line; the page decides whether a commit saves at once or with the grid."
10068
10228
  ],
10069
10229
  "whenNot": [
10070
10230
  {
@@ -10163,6 +10323,11 @@
10163
10323
  "does": "Moves the active line up or down.",
10164
10324
  "notes": "Does nothing at the first or last line."
10165
10325
  },
10326
+ {
10327
+ "key": "Ctrl+Delete",
10328
+ "does": "Removes the line; the page deletes it.",
10329
+ "notes": "Only with onRemoveRow; Meta+Backspace does the same on a Mac."
10330
+ },
10166
10331
  {
10167
10332
  "key": "Tab and Shift+Tab",
10168
10333
  "does": "Move between the fields of a line in page order.",
@@ -12002,9 +12167,9 @@
12002
12167
  },
12003
12168
  {
12004
12169
  "name": "working",
12005
- "type": "string",
12170
+ "type": "node",
12006
12171
  "required": false,
12007
- "description": "The working in words and numbers, shown under the label."
12172
+ "description": "The working in words and numbers, shown under the label. A node, so a link can sit in it."
12008
12173
  }
12009
12174
  ],
12010
12175
  "required": false,
@@ -13430,10 +13595,11 @@
13430
13595
  "enum": [
13431
13596
  "lg",
13432
13597
  "md",
13433
- "sm"
13598
+ "sm",
13599
+ "xl"
13434
13600
  ],
13435
13601
  "required": false,
13436
- "description": "The control size: sm, md and lg are 32, 36 and 44px. Md is the default.",
13602
+ "description": "The control size: sm, md, lg and xl are 35, 40, 45 and 50px. Md is the default.",
13437
13603
  "default": "md"
13438
13604
  },
13439
13605
  {
@@ -13465,10 +13631,11 @@
13465
13631
  "name": "variant",
13466
13632
  "type": "enum",
13467
13633
  "enum": [
13468
- "bare"
13634
+ "bare",
13635
+ "underline"
13469
13636
  ],
13470
13637
  "required": false,
13471
- "description": "A borderless look with no border or background, for inline editing."
13638
+ "description": "Bare drops the border and the fill, for inline editing. Underline keeps only a line under the field, which takes the same hover and focus colours as the boxed field."
13472
13639
  }
13473
13640
  ],
13474
13641
  "itemsTakeAction": [],
@@ -13642,7 +13809,8 @@
13642
13809
  "enum": [
13643
13810
  "lg",
13644
13811
  "md",
13645
- "sm"
13812
+ "sm",
13813
+ "xl"
13646
13814
  ],
13647
13815
  "required": false,
13648
13816
  "description": "Height of text add-ons; set the same size on the field and on button add-ons.",
@@ -15004,10 +15172,11 @@
15004
15172
  "enum": [
15005
15173
  "lg",
15006
15174
  "md",
15007
- "sm"
15175
+ "sm",
15176
+ "xl"
15008
15177
  ],
15009
15178
  "required": false,
15010
- "description": "The control size: sm, md or lg.",
15179
+ "description": "The control size: sm, md, lg or xl.",
15011
15180
  "default": "md"
15012
15181
  },
15013
15182
  {
@@ -15968,6 +16137,13 @@
15968
16137
  "description": "Extra classes on the input.",
15969
16138
  "default": ""
15970
16139
  },
16140
+ {
16141
+ "name": "controlOnly",
16142
+ "type": "boolean",
16143
+ "required": false,
16144
+ "description": "Draws only the control: no field wrapper, label row or message line. Name it with aria-label, aria-labelledby or a label the page draws, because the component draws none.",
16145
+ "default": false
16146
+ },
15971
16147
  {
15972
16148
  "name": "decreaseLabel",
15973
16149
  "type": "string",
@@ -16123,10 +16299,11 @@
16123
16299
  "enum": [
16124
16300
  "lg",
16125
16301
  "md",
16126
- "sm"
16302
+ "sm",
16303
+ "xl"
16127
16304
  ],
16128
16305
  "required": false,
16129
- "description": "Control size: sm, md or lg (32, 36 or 44px). md is the default.",
16306
+ "description": "Control size: sm, md, lg or xl (35, 40, 45 or 50px). md is the default.",
16130
16307
  "default": "md"
16131
16308
  },
16132
16309
  {
@@ -16177,7 +16354,7 @@
16177
16354
  "dont": [],
16178
16355
  "a11y": [
16179
16356
  "The steppers are labelled Decrease and Increase and stay out of the tab order; keyboard users step with ArrowUp and ArrowDown on the input.",
16180
- "ArrowUp and ArrowDown step the value by step, within min and max.",
16357
+ "ArrowUp and ArrowDown step the value by step, within min and max; with Ctrl, Meta or Alt held they are left to the page.",
16181
16358
  "aria-invalid is set from error, and aria-describedby points at the error or the helper text."
16182
16359
  ]
16183
16360
  }
@@ -17203,7 +17380,8 @@
17203
17380
  "enum": [
17204
17381
  "lg",
17205
17382
  "md",
17206
- "sm"
17383
+ "sm",
17384
+ "xl"
17207
17385
  ],
17208
17386
  "required": false,
17209
17387
  "description": "The control height.",
@@ -19624,6 +19802,12 @@
19624
19802
  "name": "items",
19625
19803
  "type": "array",
19626
19804
  "itemFields": [
19805
+ {
19806
+ "name": "data",
19807
+ "type": "object",
19808
+ "required": false,
19809
+ "description": "data-* attributes written on the control (the icon button or button and the menu row)."
19810
+ },
19627
19811
  {
19628
19812
  "name": "disabled",
19629
19813
  "type": "boolean",
@@ -19680,12 +19864,28 @@
19680
19864
  "required": false,
19681
19865
  "description": "Keeps the action in the menu at every width. Not with showLabel."
19682
19866
  },
19867
+ {
19868
+ "name": "rel",
19869
+ "type": "string",
19870
+ "required": false,
19871
+ "description": "The link's rel. Needs href or to."
19872
+ },
19683
19873
  {
19684
19874
  "name": "showLabel",
19685
19875
  "type": "boolean",
19686
19876
  "required": false,
19687
19877
  "description": "From sm up, draws the action as a small labelled button instead of an icon button."
19688
19878
  },
19879
+ {
19880
+ "name": "target",
19881
+ "type": "enum",
19882
+ "enum": [
19883
+ "_blank",
19884
+ "_self"
19885
+ ],
19886
+ "required": false,
19887
+ "description": "Where an href or to opens. Needs href or to."
19888
+ },
19689
19889
  {
19690
19890
  "name": "to",
19691
19891
  "type": "string",
@@ -19998,7 +20198,8 @@
19998
20198
  "enum": [
19999
20199
  "lg",
20000
20200
  "md",
20001
- "sm"
20201
+ "sm",
20202
+ "xl"
20002
20203
  ],
20003
20204
  "required": false,
20004
20205
  "description": "Control size around the default."
@@ -21510,6 +21711,12 @@
21510
21711
  "description": "Tag mode: keep a repeated entry. By default an entry equal to one already chosen, ignoring case, is refused.",
21511
21712
  "default": false
21512
21713
  },
21714
+ {
21715
+ "name": "aria-invalid",
21716
+ "type": "any",
21717
+ "required": false,
21718
+ "description": "Marks the control invalid (aria-invalid) without a field error. A given value wins over the one an error sets, and it draws no field wrapper or message in the bare form."
21719
+ },
21513
21720
  {
21514
21721
  "name": "className",
21515
21722
  "type": "string",
@@ -21906,10 +22113,11 @@
21906
22113
  "enum": [
21907
22114
  "lg",
21908
22115
  "md",
21909
- "sm"
22116
+ "sm",
22117
+ "xl"
21910
22118
  ],
21911
22119
  "required": false,
21912
- "description": "Control size: sm, md or lg (32, 36 or 44px). md is the default.",
22120
+ "description": "Control size: sm, md, lg or xl (35, 40, 45 or 50px). md is the default.",
21913
22121
  "default": "md"
21914
22122
  },
21915
22123
  {
@@ -22240,7 +22448,7 @@
22240
22448
  ],
22241
22449
  "a11y": [
22242
22450
  "The visible label is the control's accessible name; a select with no visible label takes aria-label or aria-labelledby from the caller.",
22243
- "An error sets aria-invalid on the control and is linked by aria-describedby, as is the helper text when there is no error.",
22451
+ "An error sets aria-invalid on the control and is linked by aria-describedby, as is the helper text when there is no error. A caller's aria-invalid takes its place.",
22244
22452
  "required and disabled are passed to the control, and required also draws a required mark in the label."
22245
22453
  ]
22246
22454
  }
@@ -26947,10 +27155,11 @@
26947
27155
  "enum": [
26948
27156
  "lg",
26949
27157
  "md",
26950
- "sm"
27158
+ "sm",
27159
+ "xl"
26951
27160
  ],
26952
27161
  "required": false,
26953
- "description": "The control size: sm, md or lg.",
27162
+ "description": "The control size: sm, md, lg or xl.",
26954
27163
  "default": "md"
26955
27164
  },
26956
27165
  {
@@ -27378,7 +27587,8 @@
27378
27587
  "enum": [
27379
27588
  "lg",
27380
27589
  "md",
27381
- "sm"
27590
+ "sm",
27591
+ "xl"
27382
27592
  ],
27383
27593
  "required": false,
27384
27594
  "description": "The control height tier, matching AppInput; leave unset for the default height."
@@ -29507,6 +29717,8 @@
29507
29717
  "xxs"
29508
29718
  ],
29509
29719
  "radius": [
29720
+ "2xl",
29721
+ "3xl",
29510
29722
  "lg",
29511
29723
  "md",
29512
29724
  "none",
@@ -30226,6 +30438,8 @@
30226
30438
  "xxs": 2
30227
30439
  },
30228
30440
  "radius": {
30441
+ "2xl": 18,
30442
+ "3xl": 20,
30229
30443
  "lg": 14,
30230
30444
  "md": 10,
30231
30445
  "none": 0,
@@ -32026,6 +32240,11 @@
32026
32240
  "version": "0.165.0",
32027
32241
  "components": [],
32028
32242
  "values": {}
32243
+ },
32244
+ {
32245
+ "version": "0.167.0",
32246
+ "components": [],
32247
+ "values": {}
32029
32248
  }
32030
32249
  ]
32031
32250
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.165.0",
3
+ "version": "0.168.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 14,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.165.0"
9
+ "version": "0.168.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "2f537f16e2cbb1d06d5ec51f85e70b1d1eba5029563865e82d7f3b106eb669d3",
14
- "bytes": 1042782
13
+ "sha256": "fc151613ca8315e4ad151378292e8ab9957a9f7b8e436352151c6504cffecf98",
14
+ "bytes": 1050487
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "bf46fab10ca47396c9d1c2af0ca9593e40f26863377ef94623cc81e384b842ff",
18
- "bytes": 9843469
17
+ "sha256": "f1da7c81e64ecb488ebf9505ca25e51cbc30610e1c74de740d1f24cf948f15df",
18
+ "bytes": 9909904
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "13b14f71fb6ea024945f95cba617b4f1d49f44a65ba7c7ed05d2354805539ef6",
@@ -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"./assertValidValue.js";import a from"./warnUnknownProps.js";import{jsx as o}from"react/jsx-runtime";function s(s){let{marker:c,props:l}=e(`AppAsyncBlock`,s),{state:u,children:d,empty:f,skeleton:p,className:m=``,loadingLabel:h=`Loading`,errorTitle:g=`That didn't load`,retryLabel:_=`Try again`,emptyTitle:v=`Nothing here yet`,...y}=l;a(`AppAsyncBlock`,y),i(`AppAsyncBlock`,`state.status`,u.status,[`idle`,`loading`,`error`,`empty`,`data`]);let b=`async-block${m?` ${m}`:``}`,x;switch(u.status){case`idle`:return null;case`loading`:x=p??/* @__PURE__ */ o(r,{value:0,indeterminate:!0,size:`sm`,label:h});break;case`error`:x=/* @__PURE__ */ o(n,{icon:`alert-circle`,title:g,description:u.error.message,action:/* @__PURE__ */ o(t,{variant:`soft`,onClick:()=>u.retry(),children:_})});break;case`empty`:x=f??/* @__PURE__ */ o(n,{icon:`inbox`,title:v});break;case`data`:x=d(u.data)}return/* @__PURE__ */ o(`div`,{className:b,"data-state":u.status,...c,...y,children:x})}export{s as default};
1
+ import e from"../lib/useWuiText.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppButton.js";import r from"./AppEmptyState.js";import i from"./AppProgress.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{jsx as s}from"react/jsx-runtime";import{ASYNC_BLOCK_TEXT as c}from"@webority/ui-elements/text";function l(l){let{marker:u,props:d}=t(`AppAsyncBlock`,l),f=e(`asyncBlock`,c),{state:p,children:m,empty:h,skeleton:g,className:_=``,loadingLabel:v=f.loadingLabel,errorTitle:y=f.errorTitle,retryLabel:b=f.retryLabel,emptyTitle:x=f.emptyTitle,...S}=d;o(`AppAsyncBlock`,S),a(`AppAsyncBlock`,`state.status`,p.status,[`idle`,`loading`,`error`,`empty`,`data`]);let C=`async-block${_?` ${_}`:``}`,w;switch(p.status){case`idle`:return null;case`loading`:w=g??/* @__PURE__ */ s(i,{value:0,indeterminate:!0,size:`sm`,label:v});break;case`error`:w=/* @__PURE__ */ s(r,{icon:`alert-circle`,title:y,description:p.error.message,action:/* @__PURE__ */ s(n,{variant:`soft`,onClick:()=>p.retry(),children:b})});break;case`empty`:w=h??/* @__PURE__ */ s(r,{icon:`inbox`,title:x});break;case`data`:w=m(p.data)}return/* @__PURE__ */ s(`div`,{className:C,"data-state":p.status,...u,...S,children:w})}export{l as default};
@@ -1 +1 @@
1
- import{initialsOf as e}from"../lib/initials.js";import{linkTarget as t}from"../lib/linkTarget.js";import{TargetLink as n}from"../lib/TargetLink.js";import{TONES as r}from"../lib/vocabulary.js";import{splitMarkerProps as i}from"../lib/wuiMarker.js";import a from"./assertValidValue.js";import o from"./renderIconProp.js";import s from"./warnUnknownProps.js";import c from"./withTooltip.js";import{useState as ee}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`circle`,`rounded`,`square`],p=[...r,`auto`],m=[`none`,`online`,`offline`,`away`,`busy`],h=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],g=/* @__PURE__ */ new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),_={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function v(t){return e(t)||`?`}function y(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 b(e){if(typeof e==`number`)return e;let t=_[e];if(t!=null)return t;let n=Number.parseInt(e,10);return Number.isNaN(n)?32:n}function x(e){let{marker:r,props:_}=i(`AppAvatar`,e),{name:x,src:S,size:C=`md`,shape:w=`circle`,tone:T=`primary`,status:E=`none`,ring:D=!1,label:O,icon:k,iconVariant:A,badge:j,href:M,onClick:N,linkComponent:P,tooltip:F,tooltipPlacement:I,className:L=``,photoLabel:R=`Profile photo`,...z}=_;s(`AppAvatar`,z),a(`AppAvatar`,`shape`,w,f),a(`AppAvatar`,`tone`,T,p),a(`AppAvatar`,`status`,E,m),a(`AppAvatar`,`iconVariant`,A,h);let{style:B,...V}=z,[H,U]=ee(null),W=H!=null&&H===S,G=typeof C==`string`&&g.has(C),K=G?null:typeof C==`number`||/^\d+$/.test(C)?`${C}px`:C,q=M!=null||N!=null,J=S!=null&&S!==``&&!W,Y=[`avatar`,G&&C!==`md`?`avatar-${C}`:``,w===`circle`?``:`avatar-${w}`,T===`primary`?``:`avatar-${T}`,D?`avatar-ring`:``,q?`avatar-clickable`:``,L].filter(Boolean).join(` `),X={};K&&(X[`--avatar-size`]=K),T===`auto`&&(X[`--avatar-hue`]=y(x));let Z=Object.keys(X).length||B?{...X,...B}:void 0,te=/* @__PURE__ */ u(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:k!=null&&k!==!1&&k!==``?o(k,{size:Math.round(b(C)*.55),variant:A}):v(x)}),ne=/* @__PURE__ */ d(l,{children:[E!==`none`&&/* @__PURE__ */ u(`span`,{className:`avatar-status avatar-status-${E}`,"aria-hidden":`true`}),j!=null&&/* @__PURE__ */ u(`span`,{className:`avatar-badge`,children:j}),O!=null&&/* @__PURE__ */ u(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:O})]}),Q=/* @__PURE__ */ d(l,{children:[te,J&&/* @__PURE__ */ u(`img`,{className:`avatar-img`,src:S,alt:q?``:x||R,onError:()=>U(S)}),ne]});if(M!=null){let e=t(P,{href:M});return c(/* @__PURE__ */ u(n,{link:e,className:Y,style:Z,...r,...V,"aria-label":O||x,onClick:N,children:Q}),F,I)}if(N!=null)return c(/* @__PURE__ */ u(`button`,{type:`button`,className:Y,style:Z,...r,...V,"aria-label":O||x,onClick:N,children:Q}),F,I);if(J)return c(/* @__PURE__ */ u(`span`,{className:Y,style:Z,...r,...V,children:Q}),F,I);let $=O?.trim()||x?.trim();return c($?/* @__PURE__ */ u(`span`,{className:Y,style:Z,...r,...V,role:`img`,"aria-label":$,children:Q}):/* @__PURE__ */ u(`span`,{className:Y,style:Z,...r,...V,"aria-hidden":`true`,children:Q}),F,I)}export{x as default};
1
+ import{initialsOf as e}from"../lib/initials.js";import{linkTarget as t}from"../lib/linkTarget.js";import{TargetLink as n}from"../lib/TargetLink.js";import r from"../lib/useWuiText.js";import{TONES as i}from"../lib/vocabulary.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./assertValidValue.js";import s from"./renderIconProp.js";import c from"./warnUnknownProps.js";import l from"./withTooltip.js";import{useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{AVATAR_TEXT as m}from"@webority/ui-elements/text";var ee=[`circle`,`rounded`,`square`],h=[...i,`auto`],g=[`none`,`online`,`offline`,`away`,`busy`],_=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],te=/* @__PURE__ */ new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),v={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function ne(t){return e(t)||`?`}function re(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;let t=v[e];if(t!=null)return t;let n=Number.parseInt(e,10);return Number.isNaN(n)?32:n}function b(e){let{marker:i,props:v}=a(`AppAvatar`,e),b=r(`avatar`,m),{name:x,src:S,size:C=`md`,shape:w=`circle`,tone:T=`primary`,status:E=`none`,ring:D=!1,label:O,icon:k,iconVariant:A,badge:j,href:M,onClick:N,linkComponent:P,tooltip:F,tooltipPlacement:I,className:L=``,photoLabel:R=b.photoLabel,...z}=v;c(`AppAvatar`,z),o(`AppAvatar`,`shape`,w,ee),o(`AppAvatar`,`tone`,T,h),o(`AppAvatar`,`status`,E,g),o(`AppAvatar`,`iconVariant`,A,_);let{style:B,...V}=z,[H,U]=u(null),W=H!=null&&H===S,G=typeof C==`string`&&te.has(C),K=G?null:typeof C==`number`||/^\d+$/.test(C)?`${C}px`:C,q=M!=null||N!=null,J=S!=null&&S!==``&&!W,Y=[`avatar`,G&&C!==`md`?`avatar-${C}`:``,w===`circle`?``:`avatar-${w}`,T===`primary`?``:`avatar-${T}`,D?`avatar-ring`:``,q?`avatar-clickable`:``,L].filter(Boolean).join(` `),X={};K&&(X[`--avatar-size`]=K),T===`auto`&&(X[`--avatar-hue`]=re(x));let Z=Object.keys(X).length||B?{...X,...B}:void 0,ie=/* @__PURE__ */ f(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:k!=null&&k!==!1&&k!==``?s(k,{size:Math.round(y(C)*.55),variant:A}):ne(x)}),ae=/* @__PURE__ */ p(d,{children:[E!==`none`&&/* @__PURE__ */ f(`span`,{className:`avatar-status avatar-status-${E}`,"aria-hidden":`true`}),j!=null&&/* @__PURE__ */ f(`span`,{className:`avatar-badge`,children:j}),O!=null&&/* @__PURE__ */ f(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:O})]}),Q=/* @__PURE__ */ p(d,{children:[ie,J&&/* @__PURE__ */ f(`img`,{className:`avatar-img`,src:S,alt:q?``:x||R,onError:()=>U(S)}),ae]});if(M!=null){let e=t(P,{href:M});return l(/* @__PURE__ */ f(n,{link:e,className:Y,style:Z,...i,...V,"aria-label":O||x,onClick:N,children:Q}),F,I)}if(N!=null)return l(/* @__PURE__ */ f(`button`,{type:`button`,className:Y,style:Z,...i,...V,"aria-label":O||x,onClick:N,children:Q}),F,I);if(J)return l(/* @__PURE__ */ f(`span`,{className:Y,style:Z,...i,...V,children:Q}),F,I);let $=O?.trim()||x?.trim();return l($?/* @__PURE__ */ f(`span`,{className:Y,style:Z,...i,...V,role:`img`,"aria-label":$,children:Q}):/* @__PURE__ */ f(`span`,{className:Y,style:Z,...i,...V,"aria-hidden":`true`,children:Q}),F,I)}export{b as default};
@@ -1 +1 @@
1
- import e from"../lib/fillLabel.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.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){if(e==null)return null;if(typeof e==`number`)return`${e}px`;let t=s[e];return t==null?/^\d+$/.test(e)?`${e}px`:e:`${t}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?{...x?{"--avatar-size":x}:{},...v}:v,C=typeof m==`string`?Number.parseInt(m,10):m??0,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
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./assertValidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{fillText as a}from"@webority/ui-elements/text";var o=[`tight`,`normal`,`loose`],s={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function c(e){if(e==null)return null;if(typeof e==`number`)return`${e}px`;let t=s[e];return t==null?/^\d+$/.test(e)?`${e}px`:e:`${t}px`}function l(s){let{marker:l,props:u}=e(`AppAvatarGroup`,s),{children:d,size:f,spacing:p=`normal`,overflow:m,moreLabel:h=`{count} more`,className:g=``,..._}=u;n(`AppAvatarGroup`,_),t(`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?{...x?{"--avatar-size":x}:{},...v}:v,C=typeof m==`string`?Number.parseInt(m,10):m??0,w=typeof m==`string`&&!/^\d+$/.test(m)?m:`+${C}`;return/* @__PURE__ */ i(`div`,{className:b,style:S,...l,...y,children:[d,C>0&&/* @__PURE__ */ r(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":a(h,{count:C}),children:w})]})}export{l as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./assertValidValue.js";import r from"./renderIconProp.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),n(`AppBanner`,`tone`,f,c);let[x,S]=a(!0);if(!x)return null;let C=_!=null&&_!==!1,w=()=>{S(!1),g?.()};return/* @__PURE__ */ s(`div`,{className:`wui-banner wui-banner-${f}${C?` wui-banner-has-action`:``}${v?` ${v}`:``}`,role:`status`,...u,...b,children:[p&&/* @__PURE__ */ o(`span`,{className:`wui-banner-icon`,children:r(p,{size:18})}),/* @__PURE__ */ o(`div`,{className:`wui-banner-body`,children:m}),C&&/* @__PURE__ */ o(`div`,{className:`wui-banner-action`,children:_}),h&&/* @__PURE__ */ o(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":y,onClick:w,children:/* @__PURE__ */ o(t,{name:`x`,size:18})})]})}export{l as default};
1
+ import e from"../lib/useWuiText.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./assertValidValue.js";import i from"./renderIconProp.js";import a from"./warnUnknownProps.js";import{useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{BANNER_TEXT as l}from"@webority/ui-elements/text";var u=[`info`,`success`,`warning`,`danger`,`neutral`];function d(d){let{marker:f,props:p}=t(`AppBanner`,d),m=e(`banner`,l),{tone:h=`info`,icon:g,children:_,dismissible:v=!1,onClose:y,action:b,className:x=``,dismissLabel:S=m.dismissLabel,...C}=p;a(`AppBanner`,C),r(`AppBanner`,`tone`,h,u);let[w,T]=o(!0);if(!w)return null;let E=b!=null&&b!==!1,D=()=>{T(!1),y?.()};return/* @__PURE__ */ c(`div`,{className:`wui-banner wui-banner-${h}${E?` wui-banner-has-action`:``}${x?` ${x}`:``}`,role:`status`,...f,...C,children:[g&&/* @__PURE__ */ s(`span`,{className:`wui-banner-icon`,children:i(g,{size:18})}),/* @__PURE__ */ s(`div`,{className:`wui-banner-body`,children:_}),E&&/* @__PURE__ */ s(`div`,{className:`wui-banner-action`,children:b}),v&&/* @__PURE__ */ s(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":S,onClick:D,children:/* @__PURE__ */ s(n,{name:`x`,size:18})})]})}export{d as default};
@@ -1 +1 @@
1
- import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppDropdown.js";import i from"./renderIconProp.js";import a from"./warnUnknownProps.js";import{createContext as o,useContext as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{Breadcrumb as u}from"react-bootstrap";var d=o(!1);function f(o){let{marker:f,props:p}=n(`AppBreadcrumbs`,o),{items:m=[],linkComponent:h,className:g=``,maxItems:_,moreLabel:v=`Show hidden levels`,wrap:y=!0,...b}=p;a(`AppBreadcrumbs`,b);let x=s(d);if(_!==void 0&&(!Number.isInteger(_)||_<1))throw RangeError(`AppBreadcrumbs: maxItems must be a whole number of 1 or more.`);let S=_!==void 0&&m.length>_?m.length-_:0,C=m.slice(0,S).map((e,t)=>{if(typeof e.label!=`string`)throw RangeError(`AppBreadcrumbs: with maxItems, every hidden crumb's label must be a string.`);let n=e.key??`${e.label}-${t}`;return e.to?{key:n,label:e.label,icon:e.icon,to:e.to}:e.href?{key:n,label:e.label,icon:e.icon,href:e.href}:{key:n,header:e.label}}),w=[S>0?`wui-breadcrumb-collapse`:``,y?``:`wui-breadcrumb-nowrap`].filter(Boolean).join(` `);return/* @__PURE__ */ l(u,{className:g||void 0,...w?{listProps:{className:w}}:{},...f,...b,children:[S>0?/* @__PURE__ */ c(`li`,{className:`breadcrumb-item wui-breadcrumb-more`,children:/* @__PURE__ */ c(r,{icon:`more-horizontal`,iconSize:14,label:v,align:`start`,toggleClassName:`wui-breadcrumb-more-toggle`,linkComponent:h,items:C})}):null,m.map((n,r)=>{let a=!x&&r===m.length-1,o=n.icon?i(n.icon,{size:14}):null,s={};if(!a){let r=n.to||n.href;s=n.to&&h?{linkAs:t,linkProps:{link:e(h,{to:n.to})}}:r?{href:r}:{linkAs:`span`}}return/* @__PURE__ */ l(u.Item,{active:a,className:r<S?`wui-breadcrumb-collapsible`:void 0,...s,children:[o,n.label]},n.key??`${n.label}-${r}`)})]})}export{d as BreadcrumbTrailContext,f as default};
1
+ import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import n from"../lib/useWuiText.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppDropdown.js";import a from"./renderIconProp.js";import o from"./warnUnknownProps.js";import{createContext as s,useContext as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{BREADCRUMBS_TEXT as d}from"@webority/ui-elements/text";import{Breadcrumb as f}from"react-bootstrap";var p=s(!1);function m(s){let{marker:m,props:h}=r(`AppBreadcrumbs`,s),g=n(`breadcrumbs`,d),{items:_=[],linkComponent:v,className:y=``,maxItems:b,moreLabel:x=g.moreLabel,wrap:S=!0,...C}=h;o(`AppBreadcrumbs`,C);let w=c(p);if(b!==void 0&&(!Number.isInteger(b)||b<1))throw RangeError(`AppBreadcrumbs: maxItems must be a whole number of 1 or more.`);let T=b!==void 0&&_.length>b?_.length-b:0,E=_.slice(0,T).map((e,t)=>{if(typeof e.label!=`string`)throw RangeError(`AppBreadcrumbs: with maxItems, every hidden crumb's label must be a string.`);let n=e.key??`${e.label}-${t}`;return e.to?{key:n,label:e.label,icon:e.icon,to:e.to}:e.href?{key:n,label:e.label,icon:e.icon,href:e.href}:{key:n,header:e.label}}),D=[T>0?`wui-breadcrumb-collapse`:``,S?``:`wui-breadcrumb-nowrap`].filter(Boolean).join(` `);return/* @__PURE__ */ u(f,{className:y||void 0,...D?{listProps:{className:D}}:{},...m,...C,children:[T>0?/* @__PURE__ */ l(`li`,{className:`breadcrumb-item wui-breadcrumb-more`,children:/* @__PURE__ */ l(i,{icon:`more-horizontal`,iconSize:14,label:x,align:`start`,toggleClassName:`wui-breadcrumb-more-toggle`,linkComponent:v,items:E})}):null,_.map((n,r)=>{let i=!w&&r===_.length-1,o=n.icon?a(n.icon,{size:14}):null,s={};if(!i){let r=n.to||n.href;s=n.to&&v?{linkAs:t,linkProps:{link:e(v,{to:n.to})}}:r?{href:r}:{linkAs:`span`}}return/* @__PURE__ */ u(f.Item,{active:i,className:r<T?`wui-breadcrumb-collapsible`:void 0,...s,children:[o,n.label]},n.key??`${n.label}-${r}`)})]})}export{p as BreadcrumbTrailContext,m as default};