bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +1 -1
- package/dist/ai/BbDatePickerInput.md +1 -1
- package/dist/ai/BbDialog.md +3 -2
- package/dist/ai/BbDropdown.md +23 -21
- package/dist/ai/BbDropdownButton.md +13 -11
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbSelect.md +153 -43
- package/dist/ai/BbSelectPopover.md +115 -9
- package/dist/ai/BbTable.md +1 -1
- package/dist/ai/BbTimePicker.md +1 -1
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +3 -2
- package/dist/ai/changelog.json +153 -7
- package/dist/ai/components.json +12 -12
- package/dist/ai/guides/agent-contract.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/v2-to-v3.md +48 -19
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +19 -17
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
- package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +44 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
- package/dist/ai/manifest/components/BbTable.tree.json +5 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +9 -2
- package/dist/ai/source/BbBadge.md +6 -2
- package/dist/ai/source/BbBreadcrumbs.md +5 -2
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +10 -6
- package/dist/ai/source/BbColorPalette.md +5 -2
- package/dist/ai/source/BbDatePickerInput.md +7 -2
- package/dist/ai/source/BbDropdown.md +91 -66
- package/dist/ai/source/BbDropdownButton.md +36 -19
- package/dist/ai/source/BbDropdownGroup.md +91 -66
- package/dist/ai/source/BbGallery.md +6 -5
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +130 -106
- package/dist/ai/source/BbSelectPopover.md +128 -21
- package/dist/ai/source/BbTable.md +42 -9
- package/dist/ai/source/BbTimePickerInput.md +6 -2
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +7 -2
- package/dist/ai/source/GroupedListBox.md +22 -3
- package/dist/ai/source/ListBox.md +7 -1
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
- package/dist/components/BbDropdown/types.d.ts +51 -53
- package/dist/components/BbDropdown/types.js +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
- package/dist/components/BbDropdownButton/types.d.ts +12 -10
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +101 -105
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +22 -13
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/llms-full.txt +477 -187
- package/dist/llms-medium.txt +25 -24
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +319 -306
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +73 -12
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -927,29 +927,31 @@ export type MappedItem = InternalItem & {
|
|
|
927
927
|
};
|
|
928
928
|
|
|
929
929
|
/**
|
|
930
|
-
* Passthrough parts of `BbDropdown`.
|
|
931
|
-
*
|
|
930
|
+
* Passthrough parts of `BbDropdown`. A group's
|
|
931
|
+
* items box and the dividers are not parts.
|
|
932
932
|
*
|
|
933
933
|
* Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`, `check`) and `submenu` (called with the entry that opens it) also accept `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the menu entry (an `Item`: its `label`, `value`, `description`, whatever else you put on it), every state a boolean beside it, on for it (`selected`, `disabled`, …), and the entry's `variant` as a string (`default` when it has none) — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the entry as it was. See the passthrough guide, _Per-item functions_.
|
|
934
934
|
*
|
|
935
|
-
* @part root - The floating element
|
|
936
|
-
* `class` on the component lands here. No node on the phone sheet
|
|
937
|
-
*
|
|
935
|
+
* @part root - The floating element, an invisible positioning wrapper; a
|
|
936
|
+
* `class` on the component lands here. No node on the phone sheet (style
|
|
937
|
+
* `panel` there).
|
|
938
938
|
* @part panel - The menu surface you see — the bordered flyout box on
|
|
939
939
|
* desktop, the sheet itself on a phone.
|
|
940
|
-
* @part sheet - The bottom sheet the
|
|
941
|
-
*
|
|
940
|
+
* @part sheet - The phone's bottom sheet (the `BbOffCanvas` root), never the
|
|
941
|
+
* desktop surface; applied after `panel`, so it wins a conflict.
|
|
942
942
|
* @part header - The menu's header band.
|
|
943
943
|
* @part footer - The menu's footer band.
|
|
944
944
|
* @part box - Every searchable group's search box (field and magnifier),
|
|
945
945
|
* as `box` on a field; desktop and phone.
|
|
946
|
-
* @part input -
|
|
947
|
-
*
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
946
|
+
* @part input - Every searchable group's search field, desktop and phone
|
|
947
|
+
* alike. Its magnifier glyph is chrome.
|
|
948
|
+
* @part list - The top-level entries' container between the bands (a flex
|
|
949
|
+
* column, 1px gap; on a phone, the sheet's). A submenu's list is not
|
|
950
|
+
* reached.
|
|
951
|
+
* @part groupLabel - Every group's label row (its `label` and icons; the
|
|
952
|
+
* row an `onClick` group activates). `#<id>:label` replaces its content.
|
|
953
|
+
* @part groupHeader - Every `groupBy` heading (sticky). `#group` /
|
|
954
|
+
* `#<id>:group` replace its content.
|
|
953
955
|
* @part item - One menu entry, submenus included — a broadcast resolved per
|
|
954
956
|
* entry. Also takes a per-item function, called with the entry.
|
|
955
957
|
* @part itemText - An entry's label (its `label`) — resolved with that
|
|
@@ -957,9 +959,9 @@ export type MappedItem = InternalItem & {
|
|
|
957
959
|
* per-item function.
|
|
958
960
|
* @part itemIcon - An entry's prepend / append icons — resolved with that
|
|
959
961
|
* entry's states. Also takes a per-item function.
|
|
960
|
-
* @part itemDescription - An entry's muted second line (its `description`)
|
|
961
|
-
*
|
|
962
|
-
*
|
|
962
|
+
* @part itemDescription - An entry's muted second line (its `description`),
|
|
963
|
+
* with the entry's states. A per-entry `#<value>` slot replaces it. Also
|
|
964
|
+
* takes a per-item function.
|
|
963
965
|
* @part check - A checked entry's tick, outside the row slots:
|
|
964
966
|
* `pt:check="hidden"` spares your own glyph. Also takes a per-item function.
|
|
965
967
|
* @part submenu - Every submenu's flyout box (desktop only). Also takes a
|
|
@@ -974,6 +976,8 @@ export type BbDropdownPtPart =
|
|
|
974
976
|
| 'box'
|
|
975
977
|
| 'input'
|
|
976
978
|
| 'list'
|
|
979
|
+
| 'groupLabel'
|
|
980
|
+
| 'groupHeader'
|
|
977
981
|
| 'item'
|
|
978
982
|
| 'itemText'
|
|
979
983
|
| 'itemIcon'
|
|
@@ -989,7 +993,9 @@ export type BbDropdownSurfacePtPart =
|
|
|
989
993
|
| 'footer'
|
|
990
994
|
| 'box'
|
|
991
995
|
| 'input'
|
|
992
|
-
| 'list'
|
|
996
|
+
| 'list'
|
|
997
|
+
| 'groupLabel'
|
|
998
|
+
| 'groupHeader';
|
|
993
999
|
/** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
|
|
994
1000
|
export type BbDropdownItemPtPart =
|
|
995
1001
|
| 'item'
|
|
@@ -1013,8 +1019,8 @@ export type BbDropdownItemFnPtPart =
|
|
|
1013
1019
|
* (the link states: while the entry's `activeClass` / `exactActiveClass` are).
|
|
1014
1020
|
*
|
|
1015
1021
|
* @state activeLink - Per node, on the entry parts: an entry whose link
|
|
1016
|
-
* (`to` / `href`)
|
|
1017
|
-
*
|
|
1022
|
+
* (`to` / `href`) is the current page or an ancestor (its `activeClass` is
|
|
1023
|
+
* on). The weakest state.
|
|
1018
1024
|
* @state exactActiveLink - Per node, on the entry parts: an entry whose link
|
|
1019
1025
|
* points at the current page itself — its `exactActiveClass` is on.
|
|
1020
1026
|
* @state selected - Per node, on the entry parts: a selectable group's
|
|
@@ -1053,6 +1059,8 @@ export const BB_DROPDOWN_PT = {
|
|
|
1053
1059
|
'box',
|
|
1054
1060
|
'input',
|
|
1055
1061
|
'list',
|
|
1062
|
+
'groupLabel',
|
|
1063
|
+
'groupHeader',
|
|
1056
1064
|
'item',
|
|
1057
1065
|
'itemText',
|
|
1058
1066
|
'itemIcon',
|
|
@@ -1141,26 +1149,24 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1141
1149
|
*/
|
|
1142
1150
|
activator?: ElementOrComponentRef;
|
|
1143
1151
|
/**
|
|
1144
|
-
* On mobile (below `config.mobileMaxWidth`),
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1147
|
-
* `all.adaptive`.
|
|
1152
|
+
* On mobile (below `config.mobileMaxWidth`), the menu is a bottom sheet
|
|
1153
|
+
* drilling into submenus a level at a time, not hover flyouts; slots and
|
|
1154
|
+
* selection unchanged. Unset: the global `all.adaptive`.
|
|
1148
1155
|
*
|
|
1149
1156
|
* @defaultValue `all.adaptive` (`true`)
|
|
1150
1157
|
*/
|
|
1151
1158
|
adaptive?: boolean;
|
|
1152
1159
|
/**
|
|
1153
|
-
* Whether a selection closes the menu. Unset: a
|
|
1154
|
-
*
|
|
1155
|
-
* open. `true`: every
|
|
1160
|
+
* Whether a selection closes the menu. Unset: a single-choice group's
|
|
1161
|
+
* change closes it (an untick too, any depth), a `multiple` group stays
|
|
1162
|
+
* open. `true`: every change closes it; `false`: none.
|
|
1156
1163
|
*
|
|
1157
1164
|
* @defaultValue unset (close after a single-choice change)
|
|
1158
1165
|
*/
|
|
1159
1166
|
closeOnSelect?: boolean;
|
|
1160
1167
|
/**
|
|
1161
|
-
* Compact density, the `BbSelect` ladder: flyout rows
|
|
1162
|
-
*
|
|
1163
|
-
* not change.
|
|
1168
|
+
* Compact density, the `BbSelect` ladder: flyout rows 28 → 24px, sheet rows
|
|
1169
|
+
* 44 → 36px (still a touch target). The label size stays.
|
|
1164
1170
|
*/
|
|
1165
1171
|
compact?: boolean;
|
|
1166
1172
|
/**
|
|
@@ -1176,8 +1182,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1176
1182
|
/**
|
|
1177
1183
|
* Keeps the panel inside this element beside its trigger (sideways under a
|
|
1178
1184
|
* menu); away from it only the viewport flips it. An element, component ref
|
|
1179
|
-
* or CSS selector (a `useTemplateRef`, not `$refs.x`).
|
|
1180
|
-
*
|
|
1185
|
+
* or CSS selector (a `useTemplateRef`, not `$refs.x`). In a `BbTable`: its
|
|
1186
|
+
* left and right edges.
|
|
1181
1187
|
*/
|
|
1182
1188
|
// Spelled out, not `ElementOrComponentRefOrSelector`: one type name
|
|
1183
1189
|
// fewer in the component's agent answer, which sits at its size cap.
|
|
@@ -1187,9 +1193,9 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1187
1193
|
*/
|
|
1188
1194
|
disabled?: boolean;
|
|
1189
1195
|
/**
|
|
1190
|
-
* Renders the
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1196
|
+
* Renders the panel (the phone sheet's too) at mount, not on the first
|
|
1197
|
+
* open, and keeps its rows after a close; otherwise rows mount on each open
|
|
1198
|
+
* and go after the close.
|
|
1193
1199
|
*/
|
|
1194
1200
|
eager?: boolean;
|
|
1195
1201
|
/**
|
|
@@ -1259,18 +1265,16 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1259
1265
|
*/
|
|
1260
1266
|
queryDebounceTime?: number;
|
|
1261
1267
|
/**
|
|
1262
|
-
* The open / close transition
|
|
1263
|
-
*
|
|
1264
|
-
*
|
|
1268
|
+
* The open / close transition (ms). Menus take the fast 150, not the
|
|
1269
|
+
* popovers' 250: a menu is picked from and gone, quicker than a panel you
|
|
1270
|
+
* read or edit.
|
|
1265
1271
|
*
|
|
1266
1272
|
* @defaultValue `150`
|
|
1267
1273
|
*/
|
|
1268
1274
|
transitionDuration?: number;
|
|
1269
1275
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
* - `'click'` — left-click / tap (default)
|
|
1273
|
-
* - `'contextMenu'` — right-click on desktop, long-press on mobile
|
|
1276
|
+
* What opens the menu, one or an array: `'click'` (left-click / tap) or
|
|
1277
|
+
* `'contextMenu'` (right-click; long-press on mobile).
|
|
1274
1278
|
*
|
|
1275
1279
|
* @defaultValue `'click'`
|
|
1276
1280
|
*/
|
|
@@ -1295,9 +1299,9 @@ export type BbDropdownEvents = {
|
|
|
1295
1299
|
/** Emitted once the menu has finished closing. */
|
|
1296
1300
|
(e: 'hidden'): void;
|
|
1297
1301
|
/**
|
|
1298
|
-
* The user selected a row in a selectable group, at the click
|
|
1299
|
-
* controlled companion's app then refuses
|
|
1300
|
-
*
|
|
1302
|
+
* The user selected a row in a selectable group, at the click, even when a
|
|
1303
|
+
* controlled companion's app then refuses it. Payload: the row's value
|
|
1304
|
+
* (`item-value` for pipeline groups, else `value`).
|
|
1301
1305
|
*/
|
|
1302
1306
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- the row's resolved value, whatever a fetched group's `item-value` returns: the dropdown is not generic, and `unknown` would reject a handler annotated `(id: number)`
|
|
1303
1307
|
(e: 'item:selected', value: any): void;
|
|
@@ -1475,9 +1479,9 @@ export type BbDropdownSlots = {
|
|
|
1475
1479
|
*/
|
|
1476
1480
|
loading?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1477
1481
|
/**
|
|
1478
|
-
* Replaces the
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
1482
|
+
* Replaces the placeholder row of a pipeline group that resolved to no
|
|
1483
|
+
* items, once per empty group. A failed load is not empty: it keeps its
|
|
1484
|
+
* own row (error icon, `failedText`).
|
|
1481
1485
|
*/
|
|
1482
1486
|
empty?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1483
1487
|
/**
|
|
@@ -1495,9 +1499,9 @@ export type BbDropdownSlots = {
|
|
|
1495
1499
|
*/
|
|
1496
1500
|
'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
|
|
1497
1501
|
/**
|
|
1498
|
-
* The trailing region of every row (and group
|
|
1499
|
-
* `append:icon` wherever it renders. A named slot wins;
|
|
1500
|
-
*
|
|
1502
|
+
* The trailing region of every row (and group label), replacing its
|
|
1503
|
+
* `append:icon` wherever it renders. A named slot wins; a submenu chevron
|
|
1504
|
+
* or a selected row's check takes its place.
|
|
1501
1505
|
*/
|
|
1502
1506
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
1503
1507
|
/**
|
|
@@ -1858,7 +1862,9 @@ export type BbDropdownGroupEvents = {
|
|
|
1858
1862
|
margin-top: -1.5px;
|
|
1859
1863
|
}
|
|
1860
1864
|
|
|
1861
|
-
.
|
|
1865
|
+
/* A group's label and a `groupBy` heading share the look, not the class. */
|
|
1866
|
+
.bb-dropdown__group-label,
|
|
1867
|
+
.bb-dropdown__group-header {
|
|
1862
1868
|
align-items: center;
|
|
1863
1869
|
/* Same token as BbSelectPopover's group headers (for parity), so
|
|
1864
1870
|
* the two menus can never drift. Muted, not faint: a title is read
|
|
@@ -1885,14 +1891,15 @@ export type BbDropdownGroupEvents = {
|
|
|
1885
1891
|
}
|
|
1886
1892
|
}
|
|
1887
1893
|
|
|
1888
|
-
.group-
|
|
1889
|
-
.group-
|
|
1894
|
+
.group-label__prepend-icon,
|
|
1895
|
+
.group-label__append-icon {
|
|
1890
1896
|
--size: 14px;
|
|
1891
1897
|
flex-shrink: 0;
|
|
1892
1898
|
font-size: 13px;
|
|
1893
1899
|
}
|
|
1894
1900
|
|
|
1895
|
-
.group-
|
|
1901
|
+
.group-label__content,
|
|
1902
|
+
.group-header__content {
|
|
1896
1903
|
flex: auto;
|
|
1897
1904
|
min-width: 0;
|
|
1898
1905
|
overflow: hidden;
|
|
@@ -1900,7 +1907,7 @@ export type BbDropdownGroupEvents = {
|
|
|
1900
1907
|
white-space: nowrap;
|
|
1901
1908
|
}
|
|
1902
1909
|
|
|
1903
|
-
&.bb-dropdown__group-
|
|
1910
|
+
&.bb-dropdown__group-label--variant-destructive {
|
|
1904
1911
|
color: var(--bb-danger);
|
|
1905
1912
|
}
|
|
1906
1913
|
}
|
|
@@ -1909,14 +1916,14 @@ export type BbDropdownGroupEvents = {
|
|
|
1909
1916
|
scrolled heading stays pinned while its rows pass under it, over the
|
|
1910
1917
|
list's own inset so no row peeks above it. A row focused from the
|
|
1911
1918
|
keyboard stops below it, never under it. */
|
|
1912
|
-
.bb-
|
|
1919
|
+
.bb-dropdown__group-header {
|
|
1913
1920
|
background-color: var(--bg);
|
|
1914
1921
|
position: sticky;
|
|
1915
1922
|
top: calc(-1 * var(--menu-inset));
|
|
1916
1923
|
z-index: 1;
|
|
1917
1924
|
}
|
|
1918
1925
|
|
|
1919
|
-
.bb-
|
|
1926
|
+
.bb-dropdown__group-section .bb-dropdown__item {
|
|
1920
1927
|
scroll-margin-top: 1.75rem;
|
|
1921
1928
|
}
|
|
1922
1929
|
|
|
@@ -2084,6 +2091,18 @@ export type BbDropdownGroupEvents = {
|
|
|
2084
2091
|
transition: stroke-dashoffset var(--bb-transition-medium)
|
|
2085
2092
|
var(--bb-ease);
|
|
2086
2093
|
}
|
|
2094
|
+
|
|
2095
|
+
/* An app's own check glyph (any set, stroked or filled) has no
|
|
2096
|
+
draw-in: it simply appears on the selected row. */
|
|
2097
|
+
&.item__check--own {
|
|
2098
|
+
visibility: hidden;
|
|
2099
|
+
|
|
2100
|
+
path {
|
|
2101
|
+
stroke-dasharray: none;
|
|
2102
|
+
stroke-dashoffset: 0;
|
|
2103
|
+
transition: none;
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2087
2106
|
}
|
|
2088
2107
|
|
|
2089
2108
|
&.bb-dropdown__item--selected {
|
|
@@ -2093,6 +2112,10 @@ export type BbDropdownGroupEvents = {
|
|
|
2093
2112
|
.item__check path {
|
|
2094
2113
|
stroke-dashoffset: 0;
|
|
2095
2114
|
}
|
|
2115
|
+
|
|
2116
|
+
.item__check--own {
|
|
2117
|
+
visibility: visible;
|
|
2118
|
+
}
|
|
2096
2119
|
}
|
|
2097
2120
|
|
|
2098
2121
|
&.bb-dropdown__item--variant-destructive {
|
|
@@ -2207,9 +2230,9 @@ export type BbDropdownGroupEvents = {
|
|
|
2207
2230
|
|
|
2208
2231
|
/* Flat multi-group sheets: space a following section after the previous
|
|
2209
2232
|
group's items/search. */
|
|
2210
|
-
.bb-dropdown__group-items + .bb-dropdown__group-
|
|
2211
|
-
.bb-dropdown__group-search + .bb-dropdown__group-
|
|
2212
|
-
.bb-dropdown__divider + .bb-dropdown__group-
|
|
2233
|
+
.bb-dropdown__group-items + .bb-dropdown__group-label,
|
|
2234
|
+
.bb-dropdown__group-search + .bb-dropdown__group-label,
|
|
2235
|
+
.bb-dropdown__divider + .bb-dropdown__group-label {
|
|
2213
2236
|
margin-top: 0.5rem;
|
|
2214
2237
|
}
|
|
2215
2238
|
|
|
@@ -2219,7 +2242,8 @@ export type BbDropdownGroupEvents = {
|
|
|
2219
2242
|
header, and repeating it under every group stacked like extra chrome.
|
|
2220
2243
|
Nested drills with `hideLabel` skip this entirely; the drill nav title is
|
|
2221
2244
|
already that label. */
|
|
2222
|
-
.bb-dropdown__group-
|
|
2245
|
+
.bb-dropdown__group-label,
|
|
2246
|
+
.bb-dropdown__group-header {
|
|
2223
2247
|
align-items: center;
|
|
2224
2248
|
border-bottom: 0;
|
|
2225
2249
|
color: var(--bb-text);
|
|
@@ -2234,7 +2258,8 @@ export type BbDropdownGroupEvents = {
|
|
|
2234
2258
|
same way City sits above its field. */
|
|
2235
2259
|
padding: 0.25rem 0 calc(var(--py, var(--bb-panel-p)) - 6px);
|
|
2236
2260
|
|
|
2237
|
-
.group-
|
|
2261
|
+
.group-label__content,
|
|
2262
|
+
.group-header__content {
|
|
2238
2263
|
flex: 1 1 auto;
|
|
2239
2264
|
line-height: normal;
|
|
2240
2265
|
overflow-x: clip;
|
|
@@ -2242,8 +2267,8 @@ export type BbDropdownGroupEvents = {
|
|
|
2242
2267
|
text-align: center;
|
|
2243
2268
|
}
|
|
2244
2269
|
|
|
2245
|
-
.group-
|
|
2246
|
-
.group-
|
|
2270
|
+
.group-label__prepend-icon,
|
|
2271
|
+
.group-label__append-icon {
|
|
2247
2272
|
--size: 1.25rem;
|
|
2248
2273
|
font-size: var(--size);
|
|
2249
2274
|
}
|
|
@@ -2261,7 +2286,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2261
2286
|
|
|
2262
2287
|
&.bb-offcanvas--no-header
|
|
2263
2288
|
.bb-dropdown__list
|
|
2264
|
-
> .bb-dropdown__group-
|
|
2289
|
+
> .bb-dropdown__group-label:first-child {
|
|
2265
2290
|
padding-top: 0;
|
|
2266
2291
|
}
|
|
2267
2292
|
|
|
@@ -247,8 +247,8 @@ import {
|
|
|
247
247
|
} from 'vue';
|
|
248
248
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
249
249
|
import CloseButton from '../CloseIcon/CloseButton.vue';
|
|
250
|
-
import
|
|
251
|
-
import
|
|
250
|
+
import chevronLeftBuiltin from '@/assets/svgs/chevron_left.svg?raw';
|
|
251
|
+
import chevronRightBuiltin from '@/assets/svgs/chevron_right.svg?raw';
|
|
252
252
|
import {
|
|
253
253
|
returnFocusToOpener,
|
|
254
254
|
rootElementOf,
|
|
@@ -283,6 +283,7 @@ import {
|
|
|
283
283
|
type BbGallerySlotProps,
|
|
284
284
|
type BbGallerySlots,
|
|
285
285
|
} from './types';
|
|
286
|
+
import { useInternalIcon } from '@/composables/useInternalIcon';
|
|
286
287
|
export type {
|
|
287
288
|
BbGalleryEvents,
|
|
288
289
|
BbGalleryHeaderSlotProps,
|
|
@@ -292,9 +293,7 @@ export type {
|
|
|
292
293
|
BbGallerySlots,
|
|
293
294
|
BbGalleryTitleSlotProps,
|
|
294
295
|
} from './types';
|
|
295
|
-
|
|
296
296
|
defineOptions({ inheritAttrs: false });
|
|
297
|
-
|
|
298
297
|
/**
|
|
299
298
|
* The photo in the viewer, `null` while it is closed. Bind it to open the
|
|
300
299
|
* viewer yourself; `v-bb-gallery` opens it without one.
|
|
@@ -302,9 +301,11 @@ defineOptions({ inheritAttrs: false });
|
|
|
302
301
|
* @defaultValue `null`
|
|
303
302
|
*/
|
|
304
303
|
const model = defineModel<number | null>({ default: null });
|
|
305
|
-
|
|
306
304
|
const props = defineProps<BbGalleryProps<T>>();
|
|
307
305
|
defineSlots<BbGallerySlots<T>>();
|
|
306
|
+
const chevronRight = useInternalIcon('next', chevronRightBuiltin);
|
|
307
|
+
const chevronLeft = useInternalIcon('prev', chevronLeftBuiltin);
|
|
308
|
+
|
|
308
309
|
const slots = useSlots();
|
|
309
310
|
|
|
310
311
|
const { t } = useLocale();
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}}</span>
|
|
26
26
|
<BbIcon
|
|
27
27
|
class="bb-pagination__icon"
|
|
28
|
-
:icon="
|
|
28
|
+
:icon="prevIcon"
|
|
29
29
|
size="16"
|
|
30
30
|
v-bind="passthrough.icon"
|
|
31
31
|
/>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}}</span>
|
|
69
69
|
<BbIcon
|
|
70
70
|
class="bb-pagination__icon"
|
|
71
|
-
:icon="
|
|
71
|
+
:icon="nextIcon"
|
|
72
72
|
size="16"
|
|
73
73
|
v-bind="passthrough.icon"
|
|
74
74
|
/>
|
|
@@ -82,7 +82,9 @@
|
|
|
82
82
|
|
|
83
83
|
<script setup lang="ts">
|
|
84
84
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
85
|
-
import
|
|
85
|
+
import chevronLeftSvg from '@/assets/svgs/chevron_left.svg?raw';
|
|
86
|
+
import chevronRightSvg from '@/assets/svgs/chevron_right.svg?raw';
|
|
87
|
+
import { useInternalIcon } from '@/composables/useInternalIcon';
|
|
86
88
|
import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
87
89
|
import BbBaseButton from '@/components/BbBaseButton/BbBaseButton.vue';
|
|
88
90
|
import {
|
|
@@ -118,8 +120,6 @@ import {
|
|
|
118
120
|
} from './types';
|
|
119
121
|
import { usePassthrough } from '@/composables/usePassthrough';
|
|
120
122
|
import { computeNextMaxSize } from './paginationFit';
|
|
121
|
-
export type { BbPaginationProps, BbPaginationEvents, BbPaginationSlots };
|
|
122
|
-
|
|
123
123
|
defineOptions({ inheritAttrs: false });
|
|
124
124
|
/**
|
|
125
125
|
* Used by v-model. The 1-based index of the current page — pagination starts
|
|
@@ -128,7 +128,6 @@ defineOptions({ inheritAttrs: false });
|
|
|
128
128
|
* @defaultValue `1`
|
|
129
129
|
*/
|
|
130
130
|
const model = defineModel<number>({ default: 1 });
|
|
131
|
-
|
|
132
131
|
const props = withDefaults(
|
|
133
132
|
defineProps<
|
|
134
133
|
BbPaginationProps &
|
|
@@ -141,8 +140,10 @@ const props = withDefaults(
|
|
|
141
140
|
queryKey: 'page',
|
|
142
141
|
}
|
|
143
142
|
);
|
|
144
|
-
|
|
145
143
|
defineSlots<BbPaginationSlots>();
|
|
144
|
+
const prevIcon = useInternalIcon('prev', chevronLeftSvg);
|
|
145
|
+
const nextIcon = useInternalIcon('next', chevronRightSvg);
|
|
146
|
+
export type { BbPaginationProps, BbPaginationEvents, BbPaginationSlots };
|
|
146
147
|
|
|
147
148
|
/**
|
|
148
149
|
* Passthrough. `item` is resolved per control, merged LAST onto each control's own attributes (its click handler included — T17).
|
|
@@ -997,27 +998,10 @@ export type BbPaginationSlots = {
|
|
|
997
998
|
padding: 0;
|
|
998
999
|
}
|
|
999
1000
|
|
|
1000
|
-
/*
|
|
1001
|
-
inline
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
.bb-pagination__icon {
|
|
1005
|
-
rotate: 90deg;
|
|
1006
|
-
|
|
1007
|
-
&:dir(rtl) {
|
|
1008
|
-
rotate: -90deg;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
&.bb-pagination__page--next {
|
|
1014
|
-
.bb-pagination__icon {
|
|
1015
|
-
rotate: -90deg;
|
|
1016
|
-
|
|
1017
|
-
&:dir(rtl) {
|
|
1018
|
-
rotate: 90deg;
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1001
|
+
/* Previous points toward the inline start, next toward the
|
|
1002
|
+
inline end: both chevrons mirror right to left. */
|
|
1003
|
+
.bb-pagination__icon:dir(rtl) {
|
|
1004
|
+
scale: -1 1;
|
|
1021
1005
|
}
|
|
1022
1006
|
|
|
1023
1007
|
svg {
|
|
@@ -138,7 +138,7 @@ import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
|
138
138
|
import { vAutofocus } from '@/utilities/misc/autofocus';
|
|
139
139
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
140
140
|
import CommonField from '../CommonField/CommonField.vue';
|
|
141
|
-
import
|
|
141
|
+
import starSvgBuiltin from '@/assets/svgs/star.svg?raw';
|
|
142
142
|
import {
|
|
143
143
|
aliasParts,
|
|
144
144
|
formControlPtActive,
|
|
@@ -166,8 +166,7 @@ import {
|
|
|
166
166
|
type BbRatingEvents,
|
|
167
167
|
type BbRatingSlots,
|
|
168
168
|
} from './types';
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
import { useInternalIcon } from '@/composables/useInternalIcon';
|
|
171
170
|
defineOptions({ inheritAttrs: false });
|
|
172
171
|
const declaredProps = withDefaults(
|
|
173
172
|
defineProps<
|
|
@@ -185,8 +184,9 @@ const declaredProps = withDefaults(
|
|
|
185
184
|
}
|
|
186
185
|
);
|
|
187
186
|
const declaredEmit = defineEmits<BbRatingEvents>();
|
|
188
|
-
|
|
189
187
|
const slots = defineSlots<BbRatingSlots>();
|
|
188
|
+
const starSvg = useInternalIcon('star', starSvgBuiltin);
|
|
189
|
+
export type { BbRatingProps, BbRatingEvents, BbRatingSlots };
|
|
190
190
|
|
|
191
191
|
const configDefaults = useConfigDefaults('BbRating', declaredProps, {
|
|
192
192
|
inputPosition: 'start',
|