bitboss-ui 3.0.0-beta.74 → 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/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- 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-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- 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 +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- 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.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- 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/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- 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/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- 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 +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- 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/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- 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 +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -2,17 +2,18 @@ import { vAutofocus as e } from "../../utilities/misc/autofocus.js";
|
|
|
2
2
|
import { useConfigDefaults as t } from "../../composables/useConfigDefaults.js";
|
|
3
3
|
import { useFormBinding as n } from "../../composables/useFormBinding.js";
|
|
4
4
|
import { useLocale as r } from "../../composables/useLocale.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useOpenProp as i } from "../../composables/useOpenModel.js";
|
|
6
|
+
import { TEXT_CONTROL_NATIVE_ATTRS as a, formControlPtActive as o, usePassthrough as s, variantPt as c } from "../../composables/usePassthrough.js";
|
|
7
|
+
import { isHex as l } from "../../utilities/functions/isHex.js";
|
|
8
|
+
import { isNotNil as ee } from "../../utilities/functions/isNotNil.js";
|
|
8
9
|
import { removedPropsFor as u } from "../../deprecation/removedProps.js";
|
|
9
|
-
import { warnRemovedAttrs as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { BB_COLOR_PALETTE_PT as
|
|
14
|
-
import { BB_COLOR_INPUT_PT as
|
|
15
|
-
import { computed as
|
|
10
|
+
import { warnRemovedAttrs as te } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
11
|
+
import d from "../CommonField/CommonField.vue.js";
|
|
12
|
+
import f from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
13
|
+
import p from "../BbColorPalette/BbColorPalette.vue.js";
|
|
14
|
+
import { BB_COLOR_PALETTE_PT as m } from "../BbColorPalette/types.js";
|
|
15
|
+
import { BB_COLOR_INPUT_PT as h } from "./types.js";
|
|
16
|
+
import { computed as g, createBlock as ne, createCommentVNode as re, createElementBlock as _, createElementVNode as v, createSlots as y, createVNode as b, defineComponent as x, guardReactiveProps as S, mergeProps as C, normalizeProps as w, openBlock as T, ref as E, renderSlot as D, unref as O, useAttrs as k, watch as A, withCtx as j, withDirectives as ie } from "vue";
|
|
16
17
|
import { vMaska as ae } from "maska/vue";
|
|
17
18
|
// src/components/BbColorInput/BbColorInput.vue?vue&type=script&setup=true&lang.ts
|
|
18
19
|
var oe = [
|
|
@@ -31,8 +32,8 @@ var oe = [
|
|
|
31
32
|
"readonly",
|
|
32
33
|
"required",
|
|
33
34
|
"value"
|
|
34
|
-
], se = ["disabled"],
|
|
35
|
-
mixins: [
|
|
35
|
+
], se = ["disabled"], M = /*@__PURE__*/ x({
|
|
36
|
+
mixins: [c(h)],
|
|
36
37
|
inheritAttrs: !1,
|
|
37
38
|
__name: "BbColorInput",
|
|
38
39
|
props: {
|
|
@@ -199,6 +200,7 @@ var oe = [
|
|
|
199
200
|
"pt:swatch:errors": {},
|
|
200
201
|
"pt:swatch:open": {},
|
|
201
202
|
"pt:swatch:loading": {},
|
|
203
|
+
open: { type: Boolean },
|
|
202
204
|
pt: {},
|
|
203
205
|
adaptive: {
|
|
204
206
|
type: Boolean,
|
|
@@ -256,6 +258,7 @@ var oe = [
|
|
|
256
258
|
"show",
|
|
257
259
|
"shown",
|
|
258
260
|
"hide",
|
|
261
|
+
"update:open",
|
|
259
262
|
"hidden",
|
|
260
263
|
"blur",
|
|
261
264
|
"change",
|
|
@@ -271,148 +274,150 @@ var oe = [
|
|
|
271
274
|
"compositionend",
|
|
272
275
|
"update:modelValue"
|
|
273
276
|
],
|
|
274
|
-
setup(
|
|
275
|
-
let
|
|
277
|
+
setup(c, { emit: x }) {
|
|
278
|
+
let M = c, N = x, { props: P, emit: F, showAsterisk: I, errors: L, required: R, ariaRequired: z, model: B, readonly: V } = n(M, N, {
|
|
276
279
|
componentName: "BbColorInput",
|
|
277
|
-
identifierFallback: () =>
|
|
280
|
+
identifierFallback: () => M.label,
|
|
278
281
|
leaveOn: "blur"
|
|
279
282
|
});
|
|
280
|
-
process.env.NODE_ENV !== "production" &&
|
|
281
|
-
let
|
|
283
|
+
process.env.NODE_ENV !== "production" && te("BbColorInput", u("BbColorInput"));
|
|
284
|
+
let H = E(!1), U = g(() => P.persistentHint || H.value), W = g(() => ee(P.modelValue)), G = t("BbColorInput", P, {
|
|
282
285
|
labelMode: "outside",
|
|
283
286
|
autocomplete: "off",
|
|
284
287
|
compact: !1,
|
|
285
288
|
reverse: !1
|
|
286
|
-
}),
|
|
287
|
-
title:
|
|
288
|
-
...
|
|
289
|
-
})),
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
},
|
|
289
|
+
}), K = g(() => G.labelMode), ce = g(() => ({
|
|
290
|
+
title: P.label,
|
|
291
|
+
...P.offCanvasProps
|
|
292
|
+
})), q = E(!1), le = () => {
|
|
293
|
+
q.value = !0, F("show");
|
|
294
|
+
}, ue = () => {
|
|
295
|
+
q.value = !1, F("hide");
|
|
296
|
+
}, { model: de, set: fe } = i(M, N), J = s({
|
|
294
297
|
component: "BbColorInput",
|
|
295
|
-
attrs:
|
|
296
|
-
controlAttrs:
|
|
297
|
-
props:
|
|
298
|
-
parts:
|
|
299
|
-
states:
|
|
298
|
+
attrs: k(),
|
|
299
|
+
controlAttrs: a,
|
|
300
|
+
props: P,
|
|
301
|
+
parts: h.parts,
|
|
302
|
+
states: h.states,
|
|
300
303
|
active: {
|
|
301
|
-
...
|
|
302
|
-
open: () =>
|
|
304
|
+
...o(P, () => W.value),
|
|
305
|
+
open: () => q.value
|
|
303
306
|
},
|
|
304
307
|
variant: {
|
|
305
|
-
...
|
|
306
|
-
current: () =>
|
|
308
|
+
...h.variant,
|
|
309
|
+
current: () => P.variant ?? "outline"
|
|
307
310
|
}
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
let
|
|
311
|
+
}), Y = E(null), { t: X } = r(), pe = g(() => P.modelValue ? X("colorInput.openPickerSelected", P.modelValue).value : X("colorInput.openPicker").value), Z = E(null), me = g(() => Z.value !== null && l(Z.value) && Z.value.toLowerCase() === P.modelValue ? Z.value : P.modelValue), Q = E(P.modelValue ?? null);
|
|
312
|
+
A(() => P.modelValue, (e) => Q.value = e ?? null);
|
|
313
|
+
let he = (e) => {
|
|
311
314
|
let t = e.detail;
|
|
312
|
-
Z.value = t.masked,
|
|
313
|
-
},
|
|
315
|
+
Z.value = t.masked, l(t.masked) ? (Q.value = t.masked.toLowerCase(), F("update:modelValue", Q.value)) : t.masked === "" && (Q.value = null, F("update:modelValue", null));
|
|
316
|
+
}, ge = (e) => {
|
|
314
317
|
Z.value = null;
|
|
315
318
|
let t = e.value;
|
|
316
319
|
if (t === "") return;
|
|
317
|
-
let n =
|
|
320
|
+
let n = l(t) ? t.toLowerCase() : Q.value ?? "";
|
|
318
321
|
n !== t && (e.value = n);
|
|
319
322
|
}, $ = {
|
|
320
323
|
onBlur: (e) => {
|
|
321
|
-
|
|
324
|
+
H.value = !1, e.target instanceof HTMLInputElement && ge(e.target), F("blur", e);
|
|
322
325
|
},
|
|
323
|
-
onChange: (e) =>
|
|
324
|
-
onClick: (e) =>
|
|
326
|
+
onChange: (e) => F("change", e),
|
|
327
|
+
onClick: (e) => F("click", e),
|
|
325
328
|
onFocus: (e) => {
|
|
326
|
-
|
|
329
|
+
H.value = !0, F("focus", e);
|
|
327
330
|
},
|
|
328
|
-
onInput: (e) =>
|
|
329
|
-
onKeydown: (e) =>
|
|
330
|
-
onKeyup: (e) =>
|
|
331
|
-
onMaska:
|
|
332
|
-
onMousedown: (e) =>
|
|
333
|
-
onMouseup: (e) =>
|
|
334
|
-
onPaste: (e) =>
|
|
335
|
-
onCompositionstart: (e) =>
|
|
336
|
-
onCompositionend: (e) =>
|
|
337
|
-
},
|
|
338
|
-
mask:
|
|
331
|
+
onInput: (e) => F("input", e),
|
|
332
|
+
onKeydown: (e) => F("keydown", e),
|
|
333
|
+
onKeyup: (e) => F("keyup", e),
|
|
334
|
+
onMaska: he,
|
|
335
|
+
onMousedown: (e) => F("mousedown", e),
|
|
336
|
+
onMouseup: (e) => F("mouseup", e),
|
|
337
|
+
onPaste: (e) => F("paste", e),
|
|
338
|
+
onCompositionstart: (e) => F("compositionstart", e),
|
|
339
|
+
onCompositionend: (e) => F("compositionend", e)
|
|
340
|
+
}, _e = g(() => J.input ? C($, J.input) : $), ve = g(() => ({
|
|
341
|
+
mask: P.alpha ? "!#HHHHHHHH" : "!#HHHHHH",
|
|
339
342
|
tokens: { H: { pattern: /[0-9a-fA-F]/ } },
|
|
340
343
|
eager: !0
|
|
341
|
-
})),
|
|
342
|
-
return (t, n) => (
|
|
343
|
-
id:
|
|
344
|
+
})), ye = (e) => J.indicator ? C(e, J.indicator) : e;
|
|
345
|
+
return (t, n) => (T(), ne(d, C({
|
|
346
|
+
id: c.id,
|
|
344
347
|
class: "bb-color-input",
|
|
345
|
-
clearable:
|
|
346
|
-
compact:
|
|
347
|
-
description:
|
|
348
|
-
disabled:
|
|
349
|
-
errors:
|
|
350
|
-
"has-errors":
|
|
351
|
-
"has-value":
|
|
352
|
-
"has-warnings":
|
|
353
|
-
"hide-label":
|
|
354
|
-
hint:
|
|
355
|
-
"input-align":
|
|
356
|
-
label:
|
|
357
|
-
"label-align":
|
|
358
|
-
"label-mode":
|
|
359
|
-
"label-position":
|
|
360
|
-
layout:
|
|
361
|
-
loading:
|
|
362
|
-
name:
|
|
363
|
-
passthrough:
|
|
364
|
-
readonly:
|
|
365
|
-
reverse:
|
|
366
|
-
"show-asterisk":
|
|
367
|
-
"show-hint":
|
|
368
|
-
warnings:
|
|
369
|
-
},
|
|
370
|
-
label:
|
|
371
|
-
input:
|
|
348
|
+
clearable: c.clearable && W.value,
|
|
349
|
+
compact: O(G).compact,
|
|
350
|
+
description: c.description,
|
|
351
|
+
disabled: c.disabled,
|
|
352
|
+
errors: O(L),
|
|
353
|
+
"has-errors": c.hasErrors,
|
|
354
|
+
"has-value": W.value,
|
|
355
|
+
"has-warnings": c.hasWarnings,
|
|
356
|
+
"hide-label": c.hideLabel,
|
|
357
|
+
hint: c.hint,
|
|
358
|
+
"input-align": c.inputAlign,
|
|
359
|
+
label: c.label,
|
|
360
|
+
"label-align": c.labelAlign,
|
|
361
|
+
"label-mode": K.value,
|
|
362
|
+
"label-position": c.labelPosition,
|
|
363
|
+
layout: O(G).layout,
|
|
364
|
+
loading: c.loading,
|
|
365
|
+
name: c.name,
|
|
366
|
+
passthrough: O(J),
|
|
367
|
+
readonly: O(V),
|
|
368
|
+
reverse: O(G).reverse,
|
|
369
|
+
"show-asterisk": O(I),
|
|
370
|
+
"show-hint": U.value,
|
|
371
|
+
warnings: c.warnings
|
|
372
|
+
}, O(J).forwardAttrs), y({
|
|
373
|
+
label: j((e) => [D(t.$slots, "label", w(S(e)))]),
|
|
374
|
+
input: j(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o, ariaLabelledby: s }) => [b(f, {
|
|
372
375
|
ref_key: "wrapperRef",
|
|
373
|
-
ref:
|
|
374
|
-
"append:icon":
|
|
376
|
+
ref: Y,
|
|
377
|
+
"append:icon": O(P)["append:icon"],
|
|
375
378
|
class: "bb-color-input__field",
|
|
376
|
-
clearable:
|
|
377
|
-
compact:
|
|
378
|
-
disabled:
|
|
379
|
+
clearable: c.clearable && W.value && !O(V) && !c.disabled,
|
|
380
|
+
compact: O(G).compact,
|
|
381
|
+
disabled: c.disabled,
|
|
379
382
|
"has-errors": i,
|
|
380
|
-
"has-value":
|
|
383
|
+
"has-value": W.value,
|
|
381
384
|
"has-warnings": a,
|
|
382
|
-
loading:
|
|
383
|
-
passthrough:
|
|
384
|
-
"prepend:icon":
|
|
385
|
-
readonly:
|
|
386
|
-
variant:
|
|
387
|
-
"onClick:clear": n[3] ||= (e) =>
|
|
388
|
-
},
|
|
389
|
-
"prepend:outer":
|
|
390
|
-
prepend:
|
|
391
|
-
append:
|
|
392
|
-
adaptive:
|
|
393
|
-
alpha:
|
|
394
|
-
anchor:
|
|
395
|
-
disabled:
|
|
396
|
-
"eye-dropper":
|
|
397
|
-
label:
|
|
398
|
-
"model-value":
|
|
399
|
-
"off-canvas-props":
|
|
400
|
-
|
|
385
|
+
loading: c.loading,
|
|
386
|
+
passthrough: O(J),
|
|
387
|
+
"prepend:icon": O(P)["prepend:icon"],
|
|
388
|
+
readonly: O(V),
|
|
389
|
+
variant: c.variant,
|
|
390
|
+
"onClick:clear": n[3] ||= (e) => O(F)("update:modelValue", null)
|
|
391
|
+
}, y({
|
|
392
|
+
"prepend:outer": j(() => [D(t.$slots, "prepend:outer")]),
|
|
393
|
+
prepend: j(() => [D(t.$slots, "prepend")]),
|
|
394
|
+
append: j(() => [b(p, {
|
|
395
|
+
adaptive: O(G).adaptive,
|
|
396
|
+
alpha: c.alpha,
|
|
397
|
+
anchor: Y.value,
|
|
398
|
+
disabled: c.disabled || O(V),
|
|
399
|
+
"eye-dropper": c.eyeDropper,
|
|
400
|
+
label: pe.value,
|
|
401
|
+
"model-value": O(B) ?? null,
|
|
402
|
+
"off-canvas-props": ce.value,
|
|
403
|
+
open: O(de),
|
|
404
|
+
pt: O(J).forward({
|
|
401
405
|
panel: "panel",
|
|
402
406
|
sheet: "sheet",
|
|
403
407
|
swatch: "swatch"
|
|
404
|
-
},
|
|
405
|
-
swatches:
|
|
406
|
-
onHidden: n[0] ||= (e) =>
|
|
407
|
-
onHide:
|
|
408
|
-
onShow:
|
|
409
|
-
onShown: n[1] ||= (e) =>
|
|
410
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
408
|
+
}, O(m).states),
|
|
409
|
+
swatches: c.swatches,
|
|
410
|
+
onHidden: n[0] ||= (e) => O(F)("hidden"),
|
|
411
|
+
onHide: ue,
|
|
412
|
+
onShow: le,
|
|
413
|
+
onShown: n[1] ||= (e) => O(F)("shown"),
|
|
414
|
+
"onUpdate:modelValue": n[2] ||= (e) => O(F)("update:modelValue", typeof e == "string" ? e.toLowerCase() : e),
|
|
415
|
+
"onUpdate:open": O(fe)
|
|
411
416
|
}, {
|
|
412
|
-
activator:
|
|
417
|
+
activator: j(({ props: e }) => [v("button", C(ye(e), {
|
|
413
418
|
class: "bb-color-input__indicator",
|
|
414
|
-
disabled:
|
|
415
|
-
style: { backgroundColor:
|
|
419
|
+
disabled: c.disabled || O(V),
|
|
420
|
+
style: { backgroundColor: O(B) ?? void 0 },
|
|
416
421
|
type: "button"
|
|
417
422
|
}), null, 16, se)]),
|
|
418
423
|
_: 1
|
|
@@ -425,37 +430,39 @@ var oe = [
|
|
|
425
430
|
"label",
|
|
426
431
|
"model-value",
|
|
427
432
|
"off-canvas-props",
|
|
433
|
+
"open",
|
|
428
434
|
"pt",
|
|
429
|
-
"swatches"
|
|
430
|
-
|
|
435
|
+
"swatches",
|
|
436
|
+
"onUpdate:open"
|
|
437
|
+
]), D(t.$slots, "append", {}, () => [t.$slots.suffix ? (T(), _("span", C({
|
|
431
438
|
key: 0,
|
|
432
439
|
class: "bb-field-input__suffix"
|
|
433
|
-
},
|
|
434
|
-
"append:outer":
|
|
435
|
-
default:
|
|
440
|
+
}, O(J).suffix), [D(t.$slots, "suffix")], 16)) : re("", !0)])]),
|
|
441
|
+
"append:outer": j(() => [D(t.$slots, "append:outer")]),
|
|
442
|
+
default: j(() => [ie(v("input", C({
|
|
436
443
|
id: r,
|
|
437
444
|
"aria-describedby": o,
|
|
438
|
-
"aria-disabled":
|
|
445
|
+
"aria-disabled": c.disabled || void 0,
|
|
439
446
|
"aria-invalid": i ? !0 : void 0,
|
|
440
|
-
"aria-labelledby":
|
|
441
|
-
"aria-readonly":
|
|
442
|
-
"aria-required":
|
|
443
|
-
autocomplete:
|
|
444
|
-
autofocus:
|
|
447
|
+
"aria-labelledby": s,
|
|
448
|
+
"aria-readonly": O(V) || void 0,
|
|
449
|
+
"aria-required": O(z),
|
|
450
|
+
autocomplete: O(G).autocomplete,
|
|
451
|
+
autofocus: c.autofocus,
|
|
445
452
|
class: "bb-color-input__input",
|
|
446
|
-
disabled:
|
|
447
|
-
name:
|
|
448
|
-
placeholder:
|
|
449
|
-
readonly:
|
|
450
|
-
required:
|
|
453
|
+
disabled: c.disabled,
|
|
454
|
+
name: c.name,
|
|
455
|
+
placeholder: c.placeholder,
|
|
456
|
+
readonly: O(V),
|
|
457
|
+
required: O(R),
|
|
451
458
|
size: "1",
|
|
452
459
|
type: "text",
|
|
453
|
-
value:
|
|
454
|
-
},
|
|
460
|
+
value: me.value
|
|
461
|
+
}, C(O(J).controlAttrs, _e.value)), null, 16, oe), [[O(e)], [O(ae), ve.value]])]),
|
|
455
462
|
_: 2
|
|
456
463
|
}, [t.$slots.prefix ? {
|
|
457
464
|
name: "prefix",
|
|
458
|
-
fn:
|
|
465
|
+
fn: j(() => [D(t.$slots, "prefix")]),
|
|
459
466
|
key: "0"
|
|
460
467
|
} : void 0]), 1032, [
|
|
461
468
|
"append:icon",
|
|
@@ -474,7 +481,7 @@ var oe = [
|
|
|
474
481
|
_: 2
|
|
475
482
|
}, [t.$slots.description ? {
|
|
476
483
|
name: "description",
|
|
477
|
-
fn:
|
|
484
|
+
fn: j((e) => [D(t.$slots, "description", w(S(e)))]),
|
|
478
485
|
key: "0"
|
|
479
486
|
} : void 0]), 1040, [
|
|
480
487
|
"id",
|
|
@@ -505,4 +512,4 @@ var oe = [
|
|
|
505
512
|
]));
|
|
506
513
|
}
|
|
507
514
|
});
|
|
508
|
-
export {
|
|
515
|
+
export { M as default };
|
|
@@ -66,6 +66,11 @@ export declare const BB_COLOR_INPUT_PT: {
|
|
|
66
66
|
*/
|
|
67
67
|
type BbColorInputPtProps = /* @vue-ignore */ PtCompoundProps<typeof BB_COLOR_INPUT_PT, PtVariantAttrs<TextControlPtPart, keyof ColorInputVariantRegistry>> & BbColorInputPtKeys;
|
|
68
68
|
export type BbColorInputProps = BbColorInputPtProps & {
|
|
69
|
+
/**
|
|
70
|
+
* Whether the panel is open (`v-model:open`; `v-model` stays the value).
|
|
71
|
+
* Bound, the app opens and closes it; unbound, the initial state.
|
|
72
|
+
*/
|
|
73
|
+
open?: boolean;
|
|
69
74
|
/**
|
|
70
75
|
* Passthrough, object form: `{ box: '…', 'box:errors': '…' }` — the same
|
|
71
76
|
* keys as the `pt:*` attributes without the prefix. See the `pt:<part>` row.
|
|
@@ -276,6 +281,8 @@ export type BbColorInputEvents = {
|
|
|
276
281
|
(e: 'shown'): void;
|
|
277
282
|
/** Emitted as soon as the palette starts to close. */
|
|
278
283
|
(e: 'hide'): void;
|
|
284
|
+
/** The panel opened or closed (`v-model:open`). */
|
|
285
|
+
(e: 'update:open', value: boolean): void;
|
|
279
286
|
/** Emitted once the palette has finished closing. */
|
|
280
287
|
(e: 'hidden'): void;
|
|
281
288
|
/**
|
|
@@ -9,12 +9,14 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
9
9
|
show: () => any;
|
|
10
10
|
shown: () => any;
|
|
11
11
|
hidden: () => any;
|
|
12
|
+
"update:open": (value: boolean) => any;
|
|
12
13
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
14
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
15
|
onHide?: (() => any) | undefined;
|
|
15
16
|
onShow?: (() => any) | undefined;
|
|
16
17
|
onShown?: (() => any) | undefined;
|
|
17
18
|
onHidden?: (() => any) | undefined;
|
|
19
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
20
|
}>, {
|
|
19
21
|
adaptive: boolean;
|
|
20
22
|
transitionDuration: number;
|