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
|
@@ -2728,29 +2728,31 @@ export type MappedItem = InternalItem & {
|
|
|
2728
2728
|
};
|
|
2729
2729
|
|
|
2730
2730
|
/**
|
|
2731
|
-
* Passthrough parts of `BbDropdown`.
|
|
2732
|
-
*
|
|
2731
|
+
* Passthrough parts of `BbDropdown`. A group's
|
|
2732
|
+
* items box and the dividers are not parts.
|
|
2733
2733
|
*
|
|
2734
2734
|
* 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_.
|
|
2735
2735
|
*
|
|
2736
|
-
* @part root - The floating element
|
|
2737
|
-
* `class` on the component lands here. No node on the phone sheet
|
|
2738
|
-
*
|
|
2736
|
+
* @part root - The floating element, an invisible positioning wrapper; a
|
|
2737
|
+
* `class` on the component lands here. No node on the phone sheet (style
|
|
2738
|
+
* `panel` there).
|
|
2739
2739
|
* @part panel - The menu surface you see — the bordered flyout box on
|
|
2740
2740
|
* desktop, the sheet itself on a phone.
|
|
2741
|
-
* @part sheet - The bottom sheet the
|
|
2742
|
-
*
|
|
2741
|
+
* @part sheet - The phone's bottom sheet (the `BbOffCanvas` root), never the
|
|
2742
|
+
* desktop surface; applied after `panel`, so it wins a conflict.
|
|
2743
2743
|
* @part header - The menu's header band.
|
|
2744
2744
|
* @part footer - The menu's footer band.
|
|
2745
2745
|
* @part box - Every searchable group's search box (field and magnifier),
|
|
2746
2746
|
* as `box` on a field; desktop and phone.
|
|
2747
|
-
* @part input -
|
|
2748
|
-
*
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
2747
|
+
* @part input - Every searchable group's search field, desktop and phone
|
|
2748
|
+
* alike. Its magnifier glyph is chrome.
|
|
2749
|
+
* @part list - The top-level entries' container between the bands (a flex
|
|
2750
|
+
* column, 1px gap; on a phone, the sheet's). A submenu's list is not
|
|
2751
|
+
* reached.
|
|
2752
|
+
* @part groupLabel - Every group's label row (its `label` and icons; the
|
|
2753
|
+
* row an `onClick` group activates). `#<id>:label` replaces its content.
|
|
2754
|
+
* @part groupHeader - Every `groupBy` heading (sticky). `#group` /
|
|
2755
|
+
* `#<id>:group` replace its content.
|
|
2754
2756
|
* @part item - One menu entry, submenus included — a broadcast resolved per
|
|
2755
2757
|
* entry. Also takes a per-item function, called with the entry.
|
|
2756
2758
|
* @part itemText - An entry's label (its `label`) — resolved with that
|
|
@@ -2758,9 +2760,9 @@ export type MappedItem = InternalItem & {
|
|
|
2758
2760
|
* per-item function.
|
|
2759
2761
|
* @part itemIcon - An entry's prepend / append icons — resolved with that
|
|
2760
2762
|
* entry's states. Also takes a per-item function.
|
|
2761
|
-
* @part itemDescription - An entry's muted second line (its `description`)
|
|
2762
|
-
*
|
|
2763
|
-
*
|
|
2763
|
+
* @part itemDescription - An entry's muted second line (its `description`),
|
|
2764
|
+
* with the entry's states. A per-entry `#<value>` slot replaces it. Also
|
|
2765
|
+
* takes a per-item function.
|
|
2764
2766
|
* @part check - A checked entry's tick, outside the row slots:
|
|
2765
2767
|
* `pt:check="hidden"` spares your own glyph. Also takes a per-item function.
|
|
2766
2768
|
* @part submenu - Every submenu's flyout box (desktop only). Also takes a
|
|
@@ -2775,6 +2777,8 @@ export type BbDropdownPtPart =
|
|
|
2775
2777
|
| 'box'
|
|
2776
2778
|
| 'input'
|
|
2777
2779
|
| 'list'
|
|
2780
|
+
| 'groupLabel'
|
|
2781
|
+
| 'groupHeader'
|
|
2778
2782
|
| 'item'
|
|
2779
2783
|
| 'itemText'
|
|
2780
2784
|
| 'itemIcon'
|
|
@@ -2790,7 +2794,9 @@ export type BbDropdownSurfacePtPart =
|
|
|
2790
2794
|
| 'footer'
|
|
2791
2795
|
| 'box'
|
|
2792
2796
|
| 'input'
|
|
2793
|
-
| 'list'
|
|
2797
|
+
| 'list'
|
|
2798
|
+
| 'groupLabel'
|
|
2799
|
+
| 'groupHeader';
|
|
2794
2800
|
/** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
|
|
2795
2801
|
export type BbDropdownItemPtPart =
|
|
2796
2802
|
| 'item'
|
|
@@ -2814,8 +2820,8 @@ export type BbDropdownItemFnPtPart =
|
|
|
2814
2820
|
* (the link states: while the entry's `activeClass` / `exactActiveClass` are).
|
|
2815
2821
|
*
|
|
2816
2822
|
* @state activeLink - Per node, on the entry parts: an entry whose link
|
|
2817
|
-
* (`to` / `href`)
|
|
2818
|
-
*
|
|
2823
|
+
* (`to` / `href`) is the current page or an ancestor (its `activeClass` is
|
|
2824
|
+
* on). The weakest state.
|
|
2819
2825
|
* @state exactActiveLink - Per node, on the entry parts: an entry whose link
|
|
2820
2826
|
* points at the current page itself — its `exactActiveClass` is on.
|
|
2821
2827
|
* @state selected - Per node, on the entry parts: a selectable group's
|
|
@@ -2854,6 +2860,8 @@ export const BB_DROPDOWN_PT = {
|
|
|
2854
2860
|
'box',
|
|
2855
2861
|
'input',
|
|
2856
2862
|
'list',
|
|
2863
|
+
'groupLabel',
|
|
2864
|
+
'groupHeader',
|
|
2857
2865
|
'item',
|
|
2858
2866
|
'itemText',
|
|
2859
2867
|
'itemIcon',
|
|
@@ -2942,26 +2950,24 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
2942
2950
|
*/
|
|
2943
2951
|
activator?: ElementOrComponentRef;
|
|
2944
2952
|
/**
|
|
2945
|
-
* On mobile (below `config.mobileMaxWidth`),
|
|
2946
|
-
*
|
|
2947
|
-
*
|
|
2948
|
-
* `all.adaptive`.
|
|
2953
|
+
* On mobile (below `config.mobileMaxWidth`), the menu is a bottom sheet
|
|
2954
|
+
* drilling into submenus a level at a time, not hover flyouts; slots and
|
|
2955
|
+
* selection unchanged. Unset: the global `all.adaptive`.
|
|
2949
2956
|
*
|
|
2950
2957
|
* @defaultValue `all.adaptive` (`true`)
|
|
2951
2958
|
*/
|
|
2952
2959
|
adaptive?: boolean;
|
|
2953
2960
|
/**
|
|
2954
|
-
* Whether a selection closes the menu. Unset: a
|
|
2955
|
-
*
|
|
2956
|
-
* open. `true`: every
|
|
2961
|
+
* Whether a selection closes the menu. Unset: a single-choice group's
|
|
2962
|
+
* change closes it (an untick too, any depth), a `multiple` group stays
|
|
2963
|
+
* open. `true`: every change closes it; `false`: none.
|
|
2957
2964
|
*
|
|
2958
2965
|
* @defaultValue unset (close after a single-choice change)
|
|
2959
2966
|
*/
|
|
2960
2967
|
closeOnSelect?: boolean;
|
|
2961
2968
|
/**
|
|
2962
|
-
* Compact density, the `BbSelect` ladder: flyout rows
|
|
2963
|
-
*
|
|
2964
|
-
* not change.
|
|
2969
|
+
* Compact density, the `BbSelect` ladder: flyout rows 28 → 24px, sheet rows
|
|
2970
|
+
* 44 → 36px (still a touch target). The label size stays.
|
|
2965
2971
|
*/
|
|
2966
2972
|
compact?: boolean;
|
|
2967
2973
|
/**
|
|
@@ -2977,8 +2983,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
2977
2983
|
/**
|
|
2978
2984
|
* Keeps the panel inside this element beside its trigger (sideways under a
|
|
2979
2985
|
* menu); away from it only the viewport flips it. An element, component ref
|
|
2980
|
-
* or CSS selector (a `useTemplateRef`, not `$refs.x`).
|
|
2981
|
-
*
|
|
2986
|
+
* or CSS selector (a `useTemplateRef`, not `$refs.x`). In a `BbTable`: its
|
|
2987
|
+
* left and right edges.
|
|
2982
2988
|
*/
|
|
2983
2989
|
// Spelled out, not `ElementOrComponentRefOrSelector`: one type name
|
|
2984
2990
|
// fewer in the component's agent answer, which sits at its size cap.
|
|
@@ -2988,9 +2994,9 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
2988
2994
|
*/
|
|
2989
2995
|
disabled?: boolean;
|
|
2990
2996
|
/**
|
|
2991
|
-
* Renders the
|
|
2992
|
-
*
|
|
2993
|
-
*
|
|
2997
|
+
* Renders the panel (the phone sheet's too) at mount, not on the first
|
|
2998
|
+
* open, and keeps its rows after a close; otherwise rows mount on each open
|
|
2999
|
+
* and go after the close.
|
|
2994
3000
|
*/
|
|
2995
3001
|
eager?: boolean;
|
|
2996
3002
|
/**
|
|
@@ -3060,18 +3066,16 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
3060
3066
|
*/
|
|
3061
3067
|
queryDebounceTime?: number;
|
|
3062
3068
|
/**
|
|
3063
|
-
* The open / close transition
|
|
3064
|
-
*
|
|
3065
|
-
*
|
|
3069
|
+
* The open / close transition (ms). Menus take the fast 150, not the
|
|
3070
|
+
* popovers' 250: a menu is picked from and gone, quicker than a panel you
|
|
3071
|
+
* read or edit.
|
|
3066
3072
|
*
|
|
3067
3073
|
* @defaultValue `150`
|
|
3068
3074
|
*/
|
|
3069
3075
|
transitionDuration?: number;
|
|
3070
3076
|
/**
|
|
3071
|
-
*
|
|
3072
|
-
*
|
|
3073
|
-
* - `'click'` — left-click / tap (default)
|
|
3074
|
-
* - `'contextMenu'` — right-click on desktop, long-press on mobile
|
|
3077
|
+
* What opens the menu, one or an array: `'click'` (left-click / tap) or
|
|
3078
|
+
* `'contextMenu'` (right-click; long-press on mobile).
|
|
3075
3079
|
*
|
|
3076
3080
|
* @defaultValue `'click'`
|
|
3077
3081
|
*/
|
|
@@ -3096,9 +3100,9 @@ export type BbDropdownEvents = {
|
|
|
3096
3100
|
/** Emitted once the menu has finished closing. */
|
|
3097
3101
|
(e: 'hidden'): void;
|
|
3098
3102
|
/**
|
|
3099
|
-
* The user selected a row in a selectable group, at the click
|
|
3100
|
-
* controlled companion's app then refuses
|
|
3101
|
-
*
|
|
3103
|
+
* The user selected a row in a selectable group, at the click, even when a
|
|
3104
|
+
* controlled companion's app then refuses it. Payload: the row's value
|
|
3105
|
+
* (`item-value` for pipeline groups, else `value`).
|
|
3102
3106
|
*/
|
|
3103
3107
|
// 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)`
|
|
3104
3108
|
(e: 'item:selected', value: any): void;
|
|
@@ -3276,9 +3280,9 @@ export type BbDropdownSlots = {
|
|
|
3276
3280
|
*/
|
|
3277
3281
|
loading?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
3278
3282
|
/**
|
|
3279
|
-
* Replaces the
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3283
|
+
* Replaces the placeholder row of a pipeline group that resolved to no
|
|
3284
|
+
* items, once per empty group. A failed load is not empty: it keeps its
|
|
3285
|
+
* own row (error icon, `failedText`).
|
|
3282
3286
|
*/
|
|
3283
3287
|
empty?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
3284
3288
|
/**
|
|
@@ -3296,9 +3300,9 @@ export type BbDropdownSlots = {
|
|
|
3296
3300
|
*/
|
|
3297
3301
|
'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
|
|
3298
3302
|
/**
|
|
3299
|
-
* The trailing region of every row (and group
|
|
3300
|
-
* `append:icon` wherever it renders. A named slot wins;
|
|
3301
|
-
*
|
|
3303
|
+
* The trailing region of every row (and group label), replacing its
|
|
3304
|
+
* `append:icon` wherever it renders. A named slot wins; a submenu chevron
|
|
3305
|
+
* or a selected row's check takes its place.
|
|
3302
3306
|
*/
|
|
3303
3307
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
3304
3308
|
/**
|
|
@@ -3659,7 +3663,9 @@ export type BbDropdownGroupEvents = {
|
|
|
3659
3663
|
margin-top: -1.5px;
|
|
3660
3664
|
}
|
|
3661
3665
|
|
|
3662
|
-
.
|
|
3666
|
+
/* A group's label and a `groupBy` heading share the look, not the class. */
|
|
3667
|
+
.bb-dropdown__group-label,
|
|
3668
|
+
.bb-dropdown__group-header {
|
|
3663
3669
|
align-items: center;
|
|
3664
3670
|
/* Same token as BbSelectPopover's group headers (for parity), so
|
|
3665
3671
|
* the two menus can never drift. Muted, not faint: a title is read
|
|
@@ -3686,14 +3692,15 @@ export type BbDropdownGroupEvents = {
|
|
|
3686
3692
|
}
|
|
3687
3693
|
}
|
|
3688
3694
|
|
|
3689
|
-
.group-
|
|
3690
|
-
.group-
|
|
3695
|
+
.group-label__prepend-icon,
|
|
3696
|
+
.group-label__append-icon {
|
|
3691
3697
|
--size: 14px;
|
|
3692
3698
|
flex-shrink: 0;
|
|
3693
3699
|
font-size: 13px;
|
|
3694
3700
|
}
|
|
3695
3701
|
|
|
3696
|
-
.group-
|
|
3702
|
+
.group-label__content,
|
|
3703
|
+
.group-header__content {
|
|
3697
3704
|
flex: auto;
|
|
3698
3705
|
min-width: 0;
|
|
3699
3706
|
overflow: hidden;
|
|
@@ -3701,7 +3708,7 @@ export type BbDropdownGroupEvents = {
|
|
|
3701
3708
|
white-space: nowrap;
|
|
3702
3709
|
}
|
|
3703
3710
|
|
|
3704
|
-
&.bb-dropdown__group-
|
|
3711
|
+
&.bb-dropdown__group-label--variant-destructive {
|
|
3705
3712
|
color: var(--bb-danger);
|
|
3706
3713
|
}
|
|
3707
3714
|
}
|
|
@@ -3710,14 +3717,14 @@ export type BbDropdownGroupEvents = {
|
|
|
3710
3717
|
scrolled heading stays pinned while its rows pass under it, over the
|
|
3711
3718
|
list's own inset so no row peeks above it. A row focused from the
|
|
3712
3719
|
keyboard stops below it, never under it. */
|
|
3713
|
-
.bb-
|
|
3720
|
+
.bb-dropdown__group-header {
|
|
3714
3721
|
background-color: var(--bg);
|
|
3715
3722
|
position: sticky;
|
|
3716
3723
|
top: calc(-1 * var(--menu-inset));
|
|
3717
3724
|
z-index: 1;
|
|
3718
3725
|
}
|
|
3719
3726
|
|
|
3720
|
-
.bb-
|
|
3727
|
+
.bb-dropdown__group-section .bb-dropdown__item {
|
|
3721
3728
|
scroll-margin-top: 1.75rem;
|
|
3722
3729
|
}
|
|
3723
3730
|
|
|
@@ -3885,6 +3892,18 @@ export type BbDropdownGroupEvents = {
|
|
|
3885
3892
|
transition: stroke-dashoffset var(--bb-transition-medium)
|
|
3886
3893
|
var(--bb-ease);
|
|
3887
3894
|
}
|
|
3895
|
+
|
|
3896
|
+
/* An app's own check glyph (any set, stroked or filled) has no
|
|
3897
|
+
draw-in: it simply appears on the selected row. */
|
|
3898
|
+
&.item__check--own {
|
|
3899
|
+
visibility: hidden;
|
|
3900
|
+
|
|
3901
|
+
path {
|
|
3902
|
+
stroke-dasharray: none;
|
|
3903
|
+
stroke-dashoffset: 0;
|
|
3904
|
+
transition: none;
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3888
3907
|
}
|
|
3889
3908
|
|
|
3890
3909
|
&.bb-dropdown__item--selected {
|
|
@@ -3894,6 +3913,10 @@ export type BbDropdownGroupEvents = {
|
|
|
3894
3913
|
.item__check path {
|
|
3895
3914
|
stroke-dashoffset: 0;
|
|
3896
3915
|
}
|
|
3916
|
+
|
|
3917
|
+
.item__check--own {
|
|
3918
|
+
visibility: visible;
|
|
3919
|
+
}
|
|
3897
3920
|
}
|
|
3898
3921
|
|
|
3899
3922
|
&.bb-dropdown__item--variant-destructive {
|
|
@@ -4008,9 +4031,9 @@ export type BbDropdownGroupEvents = {
|
|
|
4008
4031
|
|
|
4009
4032
|
/* Flat multi-group sheets: space a following section after the previous
|
|
4010
4033
|
group's items/search. */
|
|
4011
|
-
.bb-dropdown__group-items + .bb-dropdown__group-
|
|
4012
|
-
.bb-dropdown__group-search + .bb-dropdown__group-
|
|
4013
|
-
.bb-dropdown__divider + .bb-dropdown__group-
|
|
4034
|
+
.bb-dropdown__group-items + .bb-dropdown__group-label,
|
|
4035
|
+
.bb-dropdown__group-search + .bb-dropdown__group-label,
|
|
4036
|
+
.bb-dropdown__divider + .bb-dropdown__group-label {
|
|
4014
4037
|
margin-top: 0.5rem;
|
|
4015
4038
|
}
|
|
4016
4039
|
|
|
@@ -4020,7 +4043,8 @@ export type BbDropdownGroupEvents = {
|
|
|
4020
4043
|
header, and repeating it under every group stacked like extra chrome.
|
|
4021
4044
|
Nested drills with `hideLabel` skip this entirely; the drill nav title is
|
|
4022
4045
|
already that label. */
|
|
4023
|
-
.bb-dropdown__group-
|
|
4046
|
+
.bb-dropdown__group-label,
|
|
4047
|
+
.bb-dropdown__group-header {
|
|
4024
4048
|
align-items: center;
|
|
4025
4049
|
border-bottom: 0;
|
|
4026
4050
|
color: var(--bb-text);
|
|
@@ -4035,7 +4059,8 @@ export type BbDropdownGroupEvents = {
|
|
|
4035
4059
|
same way City sits above its field. */
|
|
4036
4060
|
padding: 0.25rem 0 calc(var(--py, var(--bb-panel-p)) - 6px);
|
|
4037
4061
|
|
|
4038
|
-
.group-
|
|
4062
|
+
.group-label__content,
|
|
4063
|
+
.group-header__content {
|
|
4039
4064
|
flex: 1 1 auto;
|
|
4040
4065
|
line-height: normal;
|
|
4041
4066
|
overflow-x: clip;
|
|
@@ -4043,8 +4068,8 @@ export type BbDropdownGroupEvents = {
|
|
|
4043
4068
|
text-align: center;
|
|
4044
4069
|
}
|
|
4045
4070
|
|
|
4046
|
-
.group-
|
|
4047
|
-
.group-
|
|
4071
|
+
.group-label__prepend-icon,
|
|
4072
|
+
.group-label__append-icon {
|
|
4048
4073
|
--size: 1.25rem;
|
|
4049
4074
|
font-size: var(--size);
|
|
4050
4075
|
}
|
|
@@ -4062,7 +4087,7 @@ export type BbDropdownGroupEvents = {
|
|
|
4062
4087
|
|
|
4063
4088
|
&.bb-offcanvas--no-header
|
|
4064
4089
|
.bb-dropdown__list
|
|
4065
|
-
> .bb-dropdown__group-
|
|
4090
|
+
> .bb-dropdown__group-label:first-child {
|
|
4066
4091
|
padding-top: 0;
|
|
4067
4092
|
}
|
|
4068
4093
|
|
|
@@ -111,7 +111,7 @@ import { useLocale } from '@/composables/useLocale';
|
|
|
111
111
|
import { useOpenProp } from '@/composables/useOpenModel';
|
|
112
112
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
113
113
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
114
|
-
import
|
|
114
|
+
import chevronDownSvgBuiltin from '@/assets/svgs/chevron_down.svg?raw';
|
|
115
115
|
import {
|
|
116
116
|
BB_DROPDOWN_BUTTON_PT,
|
|
117
117
|
type BbDropdownButtonEvents,
|
|
@@ -124,12 +124,7 @@ import {
|
|
|
124
124
|
variantPt,
|
|
125
125
|
} from '@/composables/usePassthrough';
|
|
126
126
|
import { useConfigDefaults } from '@/composables/useConfigDefaults';
|
|
127
|
-
|
|
128
|
-
BbDropdownButtonEvents,
|
|
129
|
-
BbDropdownButtonProps,
|
|
130
|
-
BbDropdownButtonSlots,
|
|
131
|
-
};
|
|
132
|
-
|
|
127
|
+
import { useInternalIcon } from '@/composables/useInternalIcon';
|
|
133
128
|
defineOptions({
|
|
134
129
|
// An app's own variants as declared `pt:<part>:<name>` props.
|
|
135
130
|
mixins: [variantPt(BB_DROPDOWN_BUTTON_PT)],
|
|
@@ -161,8 +156,13 @@ const props = withDefaults(
|
|
|
161
156
|
}
|
|
162
157
|
);
|
|
163
158
|
const emit = defineEmits<BbDropdownButtonEvents>();
|
|
164
|
-
|
|
165
159
|
const slots = defineSlots<BbDropdownButtonSlots>();
|
|
160
|
+
const chevronDownSvg = useInternalIcon('expandChevron', chevronDownSvgBuiltin);
|
|
161
|
+
export type {
|
|
162
|
+
BbDropdownButtonEvents,
|
|
163
|
+
BbDropdownButtonProps,
|
|
164
|
+
BbDropdownButtonSlots,
|
|
165
|
+
};
|
|
166
166
|
|
|
167
167
|
const configDefaults = useConfigDefaults('BbDropdownButton', props, {
|
|
168
168
|
block: false,
|
|
@@ -324,7 +324,18 @@ const menuPt = () => ({
|
|
|
324
324
|
...passthrough.forward(
|
|
325
325
|
// `submenu` is a surface too; its per-item function travels with it and
|
|
326
326
|
// is called by the dropdown with the entry that opens the flyout.
|
|
327
|
-
[
|
|
327
|
+
[
|
|
328
|
+
'panel',
|
|
329
|
+
'sheet',
|
|
330
|
+
'header',
|
|
331
|
+
'footer',
|
|
332
|
+
'box',
|
|
333
|
+
'input',
|
|
334
|
+
'list',
|
|
335
|
+
'groupLabel',
|
|
336
|
+
'groupHeader',
|
|
337
|
+
'submenu',
|
|
338
|
+
],
|
|
328
339
|
// The link states too: the surface's are the main button's, from here.
|
|
329
340
|
BB_DROPDOWN_PT.states.filter(
|
|
330
341
|
(state) => state !== 'disabled' && !LINK_STATES.includes(state)
|
|
@@ -340,7 +351,7 @@ if (process.env.NODE_ENV !== 'production')
|
|
|
340
351
|
warnRemovedAttrs('BbDropdownButton', removedPropsFor('BbDropdownButton'));
|
|
341
352
|
|
|
342
353
|
/** Icon shown inside the right-side toggle button; the chevron unless overridden. */
|
|
343
|
-
const toggleIcon = computed(() => props['toggle:icon'] ?? chevronDownSvg);
|
|
354
|
+
const toggleIcon = computed(() => props['toggle:icon'] ?? chevronDownSvg.value);
|
|
344
355
|
|
|
345
356
|
const { t } = useLocale();
|
|
346
357
|
const root = useTemplateRef<HTMLElement>('root-el');
|
|
@@ -468,6 +479,8 @@ export type BbDropdownButtonItemFnPtPart =
|
|
|
468
479
|
* magnifier) — handed to the `BbDropdown` as its own `pt:box`.
|
|
469
480
|
* @part list - The menu's top-level items container — handed to the
|
|
470
481
|
* `BbDropdown` as its own `pt:list`.
|
|
482
|
+
* @part groupLabel - Every menu group's label row (the menu's own).
|
|
483
|
+
* @part groupHeader - Every `groupBy` heading in the menu (the menu's own).
|
|
471
484
|
* @part input - A searchable group's search field in the menu — a broadcast,
|
|
472
485
|
* every searchable group's field — handed to the `BbDropdown` as its own
|
|
473
486
|
* `pt:input`.
|
|
@@ -485,7 +498,9 @@ export type BbDropdownButtonOwnPtPart =
|
|
|
485
498
|
| 'footer'
|
|
486
499
|
| 'box'
|
|
487
500
|
| 'input'
|
|
488
|
-
| 'list'
|
|
501
|
+
| 'list'
|
|
502
|
+
| 'groupLabel'
|
|
503
|
+
| 'groupHeader';
|
|
489
504
|
/**
|
|
490
505
|
* The menu-entry parts — broadcasts resolved per entry by the `BbDropdown`.
|
|
491
506
|
*
|
|
@@ -520,15 +535,15 @@ export type BbDropdownButtonPtState =
|
|
|
520
535
|
*
|
|
521
536
|
* @state loading - Component-wide: `loading` is on — the main button shows
|
|
522
537
|
* its spinner.
|
|
523
|
-
* @state disabled - Component-wide while the control is `disabled`;
|
|
524
|
-
* node, on the entry parts: a
|
|
538
|
+
* @state disabled - Component-wide while the control is `disabled`; per
|
|
539
|
+
* node, on the entry parts: a disabled entry.
|
|
525
540
|
* @state open - Component-wide: the menu is open.
|
|
526
|
-
* @state activeLink - Component-wide while the main button
|
|
527
|
-
* current page or
|
|
528
|
-
*
|
|
529
|
-
* @state exactActiveLink - Component-wide while the main button
|
|
530
|
-
*
|
|
531
|
-
*
|
|
541
|
+
* @state activeLink - Component-wide while the main button links to the
|
|
542
|
+
* current page or an ancestor (its `activeClass` is on); per node, on the
|
|
543
|
+
* entry parts: an entry whose link does. The weakest state.
|
|
544
|
+
* @state exactActiveLink - Component-wide while the main button links to the
|
|
545
|
+
* current page itself (its `exactActiveClass` is on); per node, on the
|
|
546
|
+
* entry parts.
|
|
532
547
|
*/
|
|
533
548
|
export type BbDropdownButtonWidePtState =
|
|
534
549
|
| 'activeLink'
|
|
@@ -560,6 +575,8 @@ export const BB_DROPDOWN_BUTTON_PT = {
|
|
|
560
575
|
'box',
|
|
561
576
|
'input',
|
|
562
577
|
'list',
|
|
578
|
+
'groupLabel',
|
|
579
|
+
'groupHeader',
|
|
563
580
|
'item',
|
|
564
581
|
'itemText',
|
|
565
582
|
'itemIcon',
|