bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +1183 -301
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +211 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +149 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +153 -34
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +3467 -801
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +5 -4
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/helpers-add.mjs +26 -2
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -2,22 +2,23 @@ import { hash as e } from "../../utilities/functions/hash.js";
|
|
|
2
2
|
import { slotKey as t } from "../../utilities/functions/slotKey.js";
|
|
3
3
|
import { useLocale as n } from "../../composables/useLocale.js";
|
|
4
4
|
import { matchAnyKey as r } from "../../utilities/functions/matchAnyKey.js";
|
|
5
|
-
import { selectablePredicateOf as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { selectablePredicateOf as ee } from "./types.js";
|
|
6
|
+
import { sectionTitle as te } from "./normalizeGroups.js";
|
|
7
|
+
import { useDropdownContext as ne } from "./useDropdownContext.js";
|
|
8
|
+
import { useArray as re } from "../../composables/useArray.js";
|
|
9
|
+
import { useItemsGetter as i } from "../../composables/useItemsGetter.js";
|
|
10
|
+
import { useItemText as ie } from "../../composables/useItemText.js";
|
|
10
11
|
import { useItemValue as a } from "../../composables/useItemValue.js";
|
|
11
|
-
import { asDescription as
|
|
12
|
-
import { useHashedWatcher as
|
|
13
|
-
import { useDropdownGroupRegistry as
|
|
14
|
-
import { computed as
|
|
12
|
+
import { asDescription as ae, createItemPropsResolver as o } from "../../utilities/functions/itemProps.js";
|
|
13
|
+
import { useHashedWatcher as oe } from "../../composables/useHashedWatcher.js";
|
|
14
|
+
import { useDropdownGroupRegistry as se } from "./useDropdownGroupRegistry.js";
|
|
15
|
+
import { computed as s, defineComponent as c, getCurrentInstance as l, onUnmounted as u, ref as d, renderSlot as f, watch as p, watchEffect as m } from "vue";
|
|
15
16
|
//#region src/components/BbDropdown/DropdownPipelineResolver.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var h = "__bb-dropdown-group:loading__", g = "__bb-dropdown-group:no-data__",
|
|
17
|
+
var h = "__bb-dropdown-group:loading__", g = "__bb-dropdown-group:no-data__", ce = "__bb-dropdown-group:failed__", _ = /*@__PURE__*/ c({
|
|
17
18
|
__name: "DropdownPipelineResolver",
|
|
18
19
|
props: { id: {} },
|
|
19
|
-
setup(
|
|
20
|
-
let
|
|
20
|
+
setup(c) {
|
|
21
|
+
let _ = c, le = /* @__PURE__ */ new Set([
|
|
21
22
|
"value",
|
|
22
23
|
"label",
|
|
23
24
|
"rowKey",
|
|
@@ -29,115 +30,115 @@ var h = "__bb-dropdown-group:loading__", g = "__bb-dropdown-group:no-data__", _
|
|
|
29
30
|
"placeholder",
|
|
30
31
|
"slotKey",
|
|
31
32
|
"disabled"
|
|
32
|
-
]),
|
|
33
|
+
]), v = se(), y = ne(), b = l().uid, x = s(() => v?.configFor(_.id)), { t: S } = n(), C = S("common.loadingText"), w = S("common.emptyText"), T = S("common.failedText"), ue = S("select.searchToStart"), E = s(() => !!x.value?.searchable), D = s(() => y.queryFor(_.id)), O = s(() => x.value?.filterBy ?? []), k = s(() => x.value?.prefill ?? "interaction"), de = s(() => k.value === !1), A = () => v?.modelValueFor(_.id), j = (e) => [
|
|
33
34
|
E.value ? D.value : void 0,
|
|
34
35
|
e,
|
|
35
|
-
|
|
36
|
-
],
|
|
37
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
36
|
+
A()
|
|
37
|
+
], M = (e) => me(...j(e)), N = d(!1), P = s(() => !!x.value?.stash), { array: F, add: I, remove: L } = re(), { getOptionText: R } = ie(), { getOptionValue: z } = a(), B = (e) => z(e, x.value?.itemValue), V = (e) => R(e, x.value?.itemText), H = s(() => o(x.value?.itemProps)), U = s(() => x.value ? ee(x.value) : void 0), fe = (e) => ae(H.value.field(e, "description")), W = (e) => {
|
|
38
|
+
if (Array.isArray(e)) return e.map((e) => W(e));
|
|
38
39
|
if (!e || typeof e != "object") return e;
|
|
39
40
|
let t = e;
|
|
40
|
-
return Object.keys(t).sort().reduce((e, n) => (e[n] =
|
|
41
|
+
return Object.keys(t).sort().reduce((e, n) => (e[n] = W(t[n]), e), {});
|
|
41
42
|
}, pe = (e) => {
|
|
42
43
|
if (typeof e == "string") return t(e);
|
|
43
44
|
if (e == null || typeof e == "number" || typeof e == "boolean") return t(String(e));
|
|
44
45
|
try {
|
|
45
|
-
return t(JSON.stringify(
|
|
46
|
+
return t(JSON.stringify(W(e)) ?? String(e));
|
|
46
47
|
} catch {
|
|
47
48
|
return t(String(e));
|
|
48
49
|
}
|
|
49
|
-
}, { getter: me, debouncedGetter: he, items:
|
|
50
|
-
items:
|
|
51
|
-
debounce:
|
|
52
|
-
}),
|
|
50
|
+
}, { getter: me, debouncedGetter: he, items: G, loading: K, error: q } = i({
|
|
51
|
+
items: s(() => x.value?.items),
|
|
52
|
+
debounce: y.queryDebounceTime.value
|
|
53
|
+
}), J = s(() => {
|
|
53
54
|
let t = /* @__PURE__ */ new Map();
|
|
54
|
-
for (let n of
|
|
55
|
+
for (let n of G.value) t.set(e(B(n)), n);
|
|
55
56
|
return t;
|
|
56
|
-
}), ge =
|
|
57
|
-
let t =
|
|
58
|
-
if (!
|
|
59
|
-
let n = new Set(t.map((t) => e(
|
|
57
|
+
}), ge = s(() => {
|
|
58
|
+
let t = G.value;
|
|
59
|
+
if (!P.value || !F.value.length) return t;
|
|
60
|
+
let n = new Set(t.map((t) => e(B(t)))), r = F.value.filter((t) => !n.has(e(B(t))));
|
|
60
61
|
return r.length ? [...t, ...r] : t;
|
|
61
|
-
}),
|
|
62
|
-
|
|
63
|
-
if (!
|
|
64
|
-
let t =
|
|
65
|
-
t !== void 0 &&
|
|
66
|
-
}),
|
|
67
|
-
if (!
|
|
68
|
-
let t =
|
|
62
|
+
}), Y = /* @__PURE__ */ new Map();
|
|
63
|
+
v?.onPick(_.id, (e) => {
|
|
64
|
+
if (!P.value) return;
|
|
65
|
+
let t = J.value.get(e);
|
|
66
|
+
t !== void 0 && Y.set(e, t);
|
|
67
|
+
}), u(() => v?.onPick(_.id, null)), m(() => {
|
|
68
|
+
if (!P.value) return;
|
|
69
|
+
let t = v?.selectionFor(_.id) ?? [];
|
|
69
70
|
if (!t.length) return;
|
|
70
|
-
let n = new Set(
|
|
71
|
+
let n = new Set(F.value.map((t) => e(B(t))));
|
|
71
72
|
for (let e of t) {
|
|
72
73
|
if (n.has(e)) continue;
|
|
73
|
-
let t =
|
|
74
|
-
t !== void 0 &&
|
|
74
|
+
let t = J.value.get(e) ?? Y.get(e);
|
|
75
|
+
t !== void 0 && I(t), Y.delete(e);
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
|
-
let
|
|
78
|
+
let X = s(() => ge.value.map((t) => ({
|
|
78
79
|
item: t,
|
|
79
|
-
value:
|
|
80
|
-
key: e(
|
|
81
|
-
slotToken: pe(
|
|
82
|
-
text:
|
|
80
|
+
value: B(t),
|
|
81
|
+
key: e(B(t)),
|
|
82
|
+
slotToken: pe(B(t)),
|
|
83
|
+
text: V(t),
|
|
83
84
|
description: fe(t)
|
|
84
|
-
}))), _e =
|
|
85
|
-
if (!E.value || !D.value || O.value === !1) return
|
|
85
|
+
}))), _e = s(() => {
|
|
86
|
+
if (!E.value || !D.value || O.value === !1) return X.value;
|
|
86
87
|
let e = D.value.trim(), t = O.value;
|
|
87
|
-
return
|
|
88
|
+
return X.value.filter((n) => t.length ? r(n.item, t, e) : r({
|
|
88
89
|
text: n.text,
|
|
89
90
|
description: n.description
|
|
90
91
|
}, n.description == null ? ["text"] : ["text", "description"], e));
|
|
91
|
-
}), ve =
|
|
92
|
+
}), ve = s(() => {
|
|
92
93
|
let e = /* @__PURE__ */ new Map();
|
|
93
|
-
for (let t of
|
|
94
|
+
for (let t of X.value) e.set(t.key, t.value);
|
|
94
95
|
return e;
|
|
95
|
-
}), ye =
|
|
96
|
+
}), ye = s(() => {
|
|
96
97
|
let e = /* @__PURE__ */ new Map();
|
|
97
|
-
for (let t of
|
|
98
|
+
for (let t of X.value) e.set(t.key, t.item);
|
|
98
99
|
return e;
|
|
99
|
-
}),
|
|
100
|
+
}), be = s(() => {
|
|
100
101
|
let e = /* @__PURE__ */ new Map();
|
|
101
|
-
for (let t of
|
|
102
|
+
for (let t of X.value) e.set(t.key, t.text);
|
|
102
103
|
return e;
|
|
103
|
-
}),
|
|
104
|
+
}), xe = s(() => {
|
|
104
105
|
let e = /* @__PURE__ */ new Map();
|
|
105
|
-
for (let t of
|
|
106
|
+
for (let t of X.value) t.description != null && e.set(t.key, t.description);
|
|
106
107
|
return e;
|
|
107
|
-
}), Z =
|
|
108
|
+
}), Z = s(() => v?.selectionFor(_.id) ?? []);
|
|
108
109
|
p(Z, (t) => {
|
|
109
|
-
if (!
|
|
110
|
+
if (!P.value || !F.value.length) return;
|
|
110
111
|
let n = new Set(t);
|
|
111
|
-
|
|
112
|
+
L((t) => n.has(e(B(t))));
|
|
112
113
|
});
|
|
113
|
-
let
|
|
114
|
-
if (
|
|
114
|
+
let Se = s(() => x.value?.multiple ?? v?.multipleFor(_.id) ?? !1), Q = s(() => K.value && X.value.length > 0), Ce = s(() => {
|
|
115
|
+
if (K.value && !X.value.length) return [{
|
|
115
116
|
rowKey: h,
|
|
116
117
|
placeholder: "loading",
|
|
117
|
-
label:
|
|
118
|
+
label: x.value?.loadingText ?? y.loadingText.value ?? C.value,
|
|
118
119
|
disabled: !0
|
|
119
120
|
}];
|
|
120
|
-
if (E.value &&
|
|
121
|
+
if (E.value && de.value && !N.value) return [{
|
|
121
122
|
rowKey: g,
|
|
122
123
|
placeholder: "empty",
|
|
123
|
-
label:
|
|
124
|
+
label: ue.value,
|
|
124
125
|
disabled: !0
|
|
125
126
|
}];
|
|
126
127
|
let e = _e.value;
|
|
127
128
|
if (!e.length) return Q.value ? [{
|
|
128
129
|
rowKey: h,
|
|
129
130
|
placeholder: "loading",
|
|
130
|
-
label:
|
|
131
|
+
label: x.value?.loadingText ?? y.loadingText.value ?? C.value,
|
|
131
132
|
disabled: !0
|
|
132
|
-
}] :
|
|
133
|
+
}] : q.value === null ? [{
|
|
133
134
|
rowKey: g,
|
|
134
135
|
placeholder: "empty",
|
|
135
|
-
label:
|
|
136
|
+
label: x.value?.emptyText ?? y.emptyText.value ?? w.value,
|
|
136
137
|
disabled: !0
|
|
137
138
|
}] : [$()];
|
|
138
|
-
let t =
|
|
139
|
+
let t = x.value?.max ?? Infinity, n = Se.value && Z.value.length >= t, r = e.map((e) => {
|
|
139
140
|
let t = {};
|
|
140
|
-
for (let [n, r] of Object.entries(
|
|
141
|
+
for (let [n, r] of Object.entries(H.value.all(e.item))) le.has(n) || (t[n] = r);
|
|
141
142
|
return {
|
|
142
143
|
...t,
|
|
143
144
|
rowKey: e.key,
|
|
@@ -145,54 +146,55 @@ var h = "__bb-dropdown-group:loading__", g = "__bb-dropdown-group:no-data__", _
|
|
|
145
146
|
label: e.text,
|
|
146
147
|
description: e.description,
|
|
147
148
|
fetched: !0,
|
|
148
|
-
|
|
149
|
+
...x.value?.groupBy == null ? {} : { section: te(x.value.groupBy, e.item) },
|
|
150
|
+
disabled: (U.value ? !U.value(e.item) : !1) || n && !Z.value.includes(e.key)
|
|
149
151
|
};
|
|
150
152
|
});
|
|
151
|
-
return
|
|
153
|
+
return q.value !== null && r.push($()), r;
|
|
152
154
|
}), $ = () => ({
|
|
153
|
-
rowKey:
|
|
155
|
+
rowKey: ce,
|
|
154
156
|
placeholder: "failed",
|
|
155
|
-
error:
|
|
156
|
-
label:
|
|
157
|
+
error: q.value,
|
|
158
|
+
label: x.value?.failedText ?? y.failedText.value ?? T.value,
|
|
157
159
|
disabled: !0
|
|
158
160
|
});
|
|
159
|
-
if (
|
|
160
|
-
let e =
|
|
161
|
-
key:
|
|
162
|
-
items:
|
|
163
|
-
order:
|
|
161
|
+
if (v) {
|
|
162
|
+
let e = s(() => ({
|
|
163
|
+
key: _.id,
|
|
164
|
+
items: Ce.value,
|
|
165
|
+
order: b
|
|
164
166
|
}));
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
v.register(b, e), m(() => {
|
|
168
|
+
v.publishPipeline(_.id, {
|
|
167
169
|
valueByKey: ve.value,
|
|
168
170
|
itemByKey: ye.value,
|
|
169
|
-
textByKey:
|
|
170
|
-
descriptionByKey:
|
|
171
|
+
textByKey: be.value,
|
|
172
|
+
descriptionByKey: xe.value
|
|
171
173
|
});
|
|
172
|
-
}), m(() =>
|
|
173
|
-
let t =
|
|
174
|
-
if (!
|
|
175
|
-
let e =
|
|
176
|
-
r.length !== n.length && (
|
|
177
|
-
}, r =
|
|
178
|
-
p(
|
|
179
|
-
!e ||
|
|
174
|
+
}), m(() => v.publishLoading(_.id, Q.value)), m(() => v.publishFetching(_.id, K.value));
|
|
175
|
+
let t = s(() => x.value?.enforceCoherence ?? y.enforceCoherence.value ?? !1), n = () => {
|
|
176
|
+
if (!v || !t.value) return;
|
|
177
|
+
let e = J.value, n = v.selectionFor(_.id), r = n.filter((t) => e.has(t));
|
|
178
|
+
r.length !== n.length && (v.isControlled(_.id) ? v.request(_.id, { keep: new Set(e.keys()) }) : v.setSelection(_.id, r));
|
|
179
|
+
}, r = s(() => y.isTopLevelPipeline(_.id) ? y.open.value : y.isActivated(_.id));
|
|
180
|
+
p(s(() => k.value === !0 ? !0 : k.value === "interaction" || !E.value ? r.value : !1), async (e) => {
|
|
181
|
+
!e || N.value || (N.value = !0, await M("initial") === "applied" && n());
|
|
180
182
|
}, { immediate: !0 }), p(D, () => {
|
|
181
183
|
if (E.value) {
|
|
182
|
-
if (!
|
|
184
|
+
if (!N.value) {
|
|
183
185
|
if (!D.value) return;
|
|
184
|
-
|
|
186
|
+
N.value = !0;
|
|
185
187
|
}
|
|
186
|
-
he(() =>
|
|
188
|
+
he(() => j("search"));
|
|
187
189
|
}
|
|
188
|
-
}),
|
|
189
|
-
|
|
190
|
-
}, { debounce:
|
|
191
|
-
|
|
190
|
+
}), oe(() => [x.value?.dependencies], async () => {
|
|
191
|
+
N.value && await M("dependencies") === "applied" && n();
|
|
192
|
+
}, { debounce: x.value?.depsDebounceTime ?? 0 }), u(() => {
|
|
193
|
+
v.unregister(b), v.publishPipeline(_.id, null), v.publishLoading(_.id, !1), v.publishFetching(_.id, !1);
|
|
192
194
|
});
|
|
193
195
|
}
|
|
194
|
-
return (e, t) =>
|
|
196
|
+
return (e, t) => f(e.$slots, "default");
|
|
195
197
|
}
|
|
196
198
|
});
|
|
197
199
|
//#endregion
|
|
198
|
-
export {
|
|
200
|
+
export { _ as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Slot, Slots } from 'vue';
|
|
2
|
+
import { LinkState } from '../BbBaseButton/useLinkState';
|
|
2
3
|
import { BbDropdownItemSlotProps, KeyedItem, NormalizedGroup } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* What a row reads from its list: one object the list builds once, so it never
|
|
@@ -8,9 +9,9 @@ import { BbDropdownItemSlotProps, KeyedItem, NormalizedGroup } from './types';
|
|
|
8
9
|
export interface DropdownRowApi {
|
|
9
10
|
slots: Slots;
|
|
10
11
|
setItemEl: (index: number, comp: unknown) => void;
|
|
11
|
-
itemAttrs: (group: NormalizedGroup, item: KeyedItem, index: number, selected: boolean) => Record<string, unknown>;
|
|
12
|
-
rowPart: (name: 'itemText' | 'itemIcon' | 'itemDescription', item: KeyedItem, selected: boolean) => Record<string, unknown>;
|
|
13
|
-
slotProps: (group: NormalizedGroup, item: KeyedItem, index: number, selected: boolean) => BbDropdownItemSlotProps;
|
|
12
|
+
itemAttrs: (group: NormalizedGroup, item: KeyedItem, index: number, selected: boolean, link?: LinkState) => Record<string, unknown>;
|
|
13
|
+
rowPart: (name: 'itemText' | 'itemIcon' | 'itemDescription', item: KeyedItem, selected: boolean, link?: LinkState) => Record<string, unknown>;
|
|
14
|
+
slotProps: (group: NormalizedGroup, item: KeyedItem, index: number, selected: boolean, link?: LinkState) => BbDropdownItemSlotProps;
|
|
14
15
|
rowSlot: (group: NormalizedGroup, item: KeyedItem, suffix?: 'prepend' | 'append') => Slot | undefined;
|
|
15
16
|
itemSlot: (item: KeyedItem, suffix?: 'prepend' | 'append') => Slot | undefined;
|
|
16
17
|
groupRowSlot: (group: NormalizedGroup, suffix?: 'prepend' | 'append') => Slot | undefined;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import e from "../BbIcon/BbIcon.vue.js";
|
|
2
|
-
import t from "../BbBaseButton/
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { provideLinkState as t, useLinkState as n } from "../BbBaseButton/useLinkState.js";
|
|
3
|
+
import r from "../BbBaseButton/BbBaseButton.vue.js";
|
|
4
|
+
import i from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
5
|
+
import a from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
6
|
+
import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, defineComponent as d, mergeProps as f, normalizeProps as p, openBlock as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
|
|
6
7
|
//#region src/components/BbDropdown/DropdownRow.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var y = {
|
|
8
9
|
key: 4,
|
|
9
10
|
class: "item__content"
|
|
10
|
-
},
|
|
11
|
+
}, b = ["id"], x = ["id"], S = /*@__PURE__*/ d({
|
|
11
12
|
__name: "DropdownRow",
|
|
12
13
|
props: {
|
|
13
14
|
group: {},
|
|
@@ -16,45 +17,65 @@ var _ = {
|
|
|
16
17
|
selected: { type: Boolean },
|
|
17
18
|
row: {}
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
setup(d) {
|
|
21
|
+
let S = d, C = n({
|
|
22
|
+
get to() {
|
|
23
|
+
return S.item.to;
|
|
24
|
+
},
|
|
25
|
+
get href() {
|
|
26
|
+
return S.item.href;
|
|
27
|
+
},
|
|
28
|
+
get disabled() {
|
|
29
|
+
return S.item.disabled;
|
|
30
|
+
},
|
|
31
|
+
get external() {
|
|
32
|
+
return S.item.external;
|
|
33
|
+
},
|
|
34
|
+
get target() {
|
|
35
|
+
return S.item.target;
|
|
36
|
+
},
|
|
37
|
+
get replace() {
|
|
38
|
+
return S.item.replace;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return t(C), (t, n) => (m(), s(r, f({
|
|
42
|
+
ref: (e) => t.row.setItemEl(t.index, e),
|
|
22
43
|
class: "bb-dropdown__item"
|
|
23
|
-
},
|
|
24
|
-
default:
|
|
25
|
-
|
|
44
|
+
}, t.row.itemAttrs(t.group, t.item, t.index, t.selected, _(C))), {
|
|
45
|
+
default: v(() => [
|
|
46
|
+
t.row.rowSlot(t.group, t.item, "prepend") ? (m(), s(h(t.row.rowSlot(t.group, t.item, "prepend")), p(f({ key: 0 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : t.row.slots["item:prepend"] ? (m(), s(h(t.row.slots["item:prepend"]), p(f({ key: 1 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : t.item["prepend:icon"] ? (m(), s(e, f({
|
|
26
47
|
key: 2,
|
|
27
48
|
class: "bb-dropdown__item-icon item__prepend-icon",
|
|
28
|
-
icon:
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
id:
|
|
49
|
+
icon: t.item["prepend:icon"]
|
|
50
|
+
}, t.row.rowPart("itemIcon", t.item, t.selected, _(C))), null, 16, ["icon"])) : c("", !0),
|
|
51
|
+
t.row.rowSlot(t.group, t.item) ? (m(), s(h(t.row.rowSlot(t.group, t.item)), p(f({ key: 3 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : (m(), l("span", y, [u("span", f({
|
|
52
|
+
id: t.row.rowTextId(t.index),
|
|
32
53
|
class: "bb-dropdown__item-text"
|
|
33
|
-
},
|
|
54
|
+
}, t.row.rowPart("itemText", t.item, t.selected, _(C))), g(t.item.label), 17, b), t.item.description ? (m(), l("span", f({
|
|
34
55
|
key: 0,
|
|
35
|
-
id:
|
|
56
|
+
id: t.row.rowDescriptionId(t.index),
|
|
36
57
|
class: "bb-dropdown__item-description"
|
|
37
|
-
},
|
|
38
|
-
|
|
58
|
+
}, t.row.rowPart("itemDescription", t.item, t.selected, _(C))), g(t.item.description), 17, x)) : c("", !0)])),
|
|
59
|
+
t.group.selectable ? (m(), s(e, {
|
|
39
60
|
key: 5,
|
|
40
61
|
"aria-hidden": "true",
|
|
41
62
|
class: "item__check",
|
|
42
|
-
icon:
|
|
43
|
-
}, null, 8, ["icon"])) :
|
|
44
|
-
|
|
63
|
+
icon: _(i)
|
|
64
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
65
|
+
t.selected ? c("", !0) : (m(), l(o, { key: 6 }, [t.row.itemSlot(t.item, "append") ? (m(), s(h(t.row.itemSlot(t.item, "append")), p(f({ key: 0 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : t.item.items ? (m(), s(e, {
|
|
45
66
|
key: 1,
|
|
46
67
|
"aria-hidden": "true",
|
|
47
68
|
class: "item__chevron",
|
|
48
|
-
icon:
|
|
49
|
-
}, null, 8, ["icon"])) :
|
|
69
|
+
icon: _(a)
|
|
70
|
+
}, null, 8, ["icon"])) : t.row.groupRowSlot(t.group, "append") ? (m(), s(h(t.row.groupRowSlot(t.group, "append")), p(f({ key: 2 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : t.row.slots["item:append"] ? (m(), s(h(t.row.slots["item:append"]), p(f({ key: 3 }, t.row.slotProps(t.group, t.item, t.index, t.selected, _(C)))), null, 16)) : t.item["append:icon"] ? (m(), s(e, f({
|
|
50
71
|
key: 4,
|
|
51
72
|
class: "bb-dropdown__item-icon item__append-icon",
|
|
52
|
-
icon:
|
|
53
|
-
},
|
|
73
|
+
icon: t.item["append:icon"]
|
|
74
|
+
}, t.row.rowPart("itemIcon", t.item, t.selected, _(C))), null, 16, ["icon"])) : c("", !0)], 64))
|
|
54
75
|
]),
|
|
55
76
|
_: 1
|
|
56
77
|
}, 16));
|
|
57
78
|
}
|
|
58
79
|
});
|
|
59
80
|
//#endregion
|
|
60
|
-
export {
|
|
81
|
+
export { S as default };
|
|
@@ -31,3 +31,9 @@ export declare const normalizeGroups: (items?: Item[]) => NormalizedGroup[];
|
|
|
31
31
|
* makes it an action row.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hasRowValue: (item: InternalItem) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A row's section title under a group's `groupBy` (ATT-15 prototype): the path
|
|
36
|
+
* read off `row`, or the getter's answer. `undefined` = no section (listed
|
|
37
|
+
* without a heading), like a nullish group in `BbSelect`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const sectionTitle: (groupBy: NormalizedGroup["groupBy"], row: unknown) => string | undefined;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { hash as e } from "../../utilities/functions/hash.js";
|
|
2
2
|
import { slotKey as t } from "../../utilities/functions/slotKey.js";
|
|
3
|
-
import {
|
|
3
|
+
import { get as n } from "../../utilities/functions/get.js";
|
|
4
|
+
import { groupItemsAsArray as r, isGroup as i, isSelectableGroup as a, selectablePredicateOf as o } from "./types.js";
|
|
4
5
|
//#region src/components/BbDropdown/normalizeGroups.ts
|
|
5
|
-
var
|
|
6
|
-
let t = [],
|
|
7
|
-
|
|
6
|
+
var s = (e) => e.some((e) => !!e.searchable && !!e.id), c = (e = []) => {
|
|
7
|
+
let t = [], n = [], s = () => {
|
|
8
|
+
n.length && (t.push({
|
|
8
9
|
selectable: !1,
|
|
9
10
|
multiple: !1,
|
|
10
11
|
selected: [],
|
|
11
|
-
items:
|
|
12
|
+
items: n,
|
|
12
13
|
divider: !1
|
|
13
|
-
}),
|
|
14
|
+
}), n = []);
|
|
14
15
|
};
|
|
15
|
-
for (let c of e) if (
|
|
16
|
+
for (let c of e) if (i(c)) {
|
|
16
17
|
s();
|
|
17
|
-
let e =
|
|
18
|
+
let e = r(c.items).flat();
|
|
18
19
|
if (!e.length) continue;
|
|
19
|
-
let
|
|
20
|
+
let n = a(c) && c.id != null && c.id !== "", i = o(c), l = i ? e.map((e) => e.fetched || e.placeholder || e.disabled || i(e) ? e : {
|
|
20
21
|
...e,
|
|
21
22
|
disabled: !0
|
|
22
23
|
}) : e;
|
|
@@ -24,7 +25,7 @@ var o = (e) => e.some((e) => !!e.searchable && !!e.id), s = (e = []) => {
|
|
|
24
25
|
id: c.id,
|
|
25
26
|
label: c.label,
|
|
26
27
|
hideLabel: c.hideLabel,
|
|
27
|
-
selectable:
|
|
28
|
+
selectable: n,
|
|
28
29
|
multiple: c.multiple ?? !1,
|
|
29
30
|
clearable: c.clearable,
|
|
30
31
|
selected: [],
|
|
@@ -35,6 +36,7 @@ var o = (e) => e.some((e) => !!e.searchable && !!e.id), s = (e = []) => {
|
|
|
35
36
|
onClick: c.onClick,
|
|
36
37
|
searchable: c.searchable,
|
|
37
38
|
searchPlaceholder: c.searchPlaceholder,
|
|
39
|
+
groupBy: c.groupBy,
|
|
38
40
|
filterBy: c.filterBy,
|
|
39
41
|
maxHeight: c.maxHeight,
|
|
40
42
|
meta: c.meta,
|
|
@@ -46,9 +48,9 @@ var o = (e) => e.some((e) => !!e.searchable && !!e.id), s = (e = []) => {
|
|
|
46
48
|
selected: [],
|
|
47
49
|
items: c,
|
|
48
50
|
divider: t.length > 0
|
|
49
|
-
})) :
|
|
50
|
-
return s(),
|
|
51
|
-
},
|
|
51
|
+
})) : n.push(c);
|
|
52
|
+
return s(), u(t);
|
|
53
|
+
}, l = (e) => e.value !== void 0, u = (n) => {
|
|
52
54
|
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
53
55
|
let t = e || "row";
|
|
54
56
|
for (let n = 2; r.has(t); n++) t = `${e || "row"}-${n}`;
|
|
@@ -61,7 +63,7 @@ var o = (e) => e.some((e) => !!e.searchable && !!e.id), s = (e = []) => {
|
|
|
61
63
|
return n.map((n) => ({
|
|
62
64
|
...n,
|
|
63
65
|
items: n.items.map((r) => {
|
|
64
|
-
if (r.rowKey != null ||
|
|
66
|
+
if (r.rowKey != null || l(r)) {
|
|
65
67
|
let t = r.rowKey ?? e(r.value);
|
|
66
68
|
return {
|
|
67
69
|
...r,
|
|
@@ -79,6 +81,10 @@ var o = (e) => e.some((e) => !!e.searchable && !!e.id), s = (e = []) => {
|
|
|
79
81
|
};
|
|
80
82
|
})
|
|
81
83
|
}));
|
|
84
|
+
}, d = (e, t) => {
|
|
85
|
+
if (e == null || t == null) return;
|
|
86
|
+
let r = typeof e == "function" ? e(t) : n(t, e);
|
|
87
|
+
return r == null || r === "" ? void 0 : String(r);
|
|
82
88
|
};
|
|
83
89
|
//#endregion
|
|
84
|
-
export {
|
|
90
|
+
export { l as hasRowValue, s as levelHasSearch, c as normalizeGroups, d as sectionTitle };
|