bitboss-ui 3.0.0-beta.72 → 3.0.0-beta.74
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 +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +34 -7
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +17 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +11 -7
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +60 -4
- package/dist/ai/components.json +56 -20
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/use-confirm.md +4 -1
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirm.removed.json +4 -4
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToast.removed.json +1 -1
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +80 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +874 -136
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +123 -3
- package/dist/utilities/functions/isEqual.js +69 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -5
- package/llms.txt +3 -1
- package/package.json +2 -3
- package/scripts/README.md +43 -43
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +153 -6
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,36 +6,37 @@ import { useConfigDefaults as i, useConfigSetting as a } from "../../composables
|
|
|
6
6
|
import { extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
|
|
7
7
|
import { useClosingInert as s } from "../../composables/useClosingInert.js";
|
|
8
8
|
import { useId as ee } from "../../composables/useId.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import ie from "
|
|
13
|
-
import
|
|
14
|
-
import oe from "../
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
9
|
+
import { useOwnModel as te } from "../../composables/useOwnModel.js";
|
|
10
|
+
import { useLocale as ne } from "../../composables/useLocale.js";
|
|
11
|
+
import { useEscapeStackEntry as re } from "../../composables/useEscapeStackEntry.js";
|
|
12
|
+
import { useMobile as ie } from "../../composables/useMobile.js";
|
|
13
|
+
import ae from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
14
|
+
import { BB_OFF_CANVAS_PT as oe } from "../BbOffCanvas/types.js";
|
|
15
|
+
import se from "../CommonPopover/CommonPopover.vue.js";
|
|
16
|
+
import { removedPropsFor as ce } from "../../deprecation/removedProps.js";
|
|
17
|
+
import { warnRemovedAttrs as le } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
18
|
+
import { BB_COLOR_PALETTE_PT as ue } from "./types.js";
|
|
19
|
+
import { usePassthrough as de } from "../../composables/usePassthrough.js";
|
|
20
|
+
import { withoutPt as fe } from "../../utils/passthrough.js";
|
|
20
21
|
import { transitions as c } from "../../utilities/misc/transitions.js";
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { createReusableTemplate as
|
|
22
|
+
import { Fragment as pe, computed as l, createBlock as me, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as he, guardReactiveProps as ge, mergeProps as m, nextTick as _e, normalizeClass as ve, normalizeProps as ye, normalizeStyle as h, onBeforeUnmount as be, onDeactivated as xe, openBlock as g, ref as _, renderList as Se, renderSlot as Ce, toDisplayString as we, unref as v, useAttrs as Te, watch as y, withCtx as b } from "vue";
|
|
23
|
+
import { createReusableTemplate as Ee } from "@vueuse/core";
|
|
23
24
|
// src/components/BbColorPalette/BbColorPalette.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
-
var
|
|
25
|
+
var De = ["aria-label"], Oe = {
|
|
25
26
|
"aria-live": "polite",
|
|
26
27
|
class: "bb-color-palette__canvas-announcer",
|
|
27
28
|
role: "status"
|
|
28
|
-
},
|
|
29
|
+
}, ke = { class: "bb-color-palette__controls" }, Ae = { class: "bb-color-palette__preview-wrap" }, je = { class: "bb-color-palette__sliders" }, Me = ["aria-label", "aria-valuenow"], Ne = ["aria-label", "aria-valuenow"], Pe = ["aria-label", "disabled"], Fe = {
|
|
29
30
|
key: 0,
|
|
30
31
|
class: "bb-color-palette__swatches"
|
|
31
|
-
},
|
|
32
|
+
}, Ie = [
|
|
32
33
|
"aria-label",
|
|
33
34
|
"aria-pressed",
|
|
34
35
|
"tabindex",
|
|
35
36
|
"onClick",
|
|
36
37
|
"onFocus",
|
|
37
38
|
"onKeydown"
|
|
38
|
-
], x = /*@__PURE__*/
|
|
39
|
+
], x = /*@__PURE__*/ he({
|
|
39
40
|
inheritAttrs: !1,
|
|
40
41
|
__name: "BbColorPalette",
|
|
41
42
|
props: {
|
|
@@ -84,75 +85,79 @@ var Ee = ["aria-label"], De = {
|
|
|
84
85
|
"hidden",
|
|
85
86
|
"update:modelValue"
|
|
86
87
|
],
|
|
87
|
-
setup(c, { emit:
|
|
88
|
-
let x = c, S =
|
|
88
|
+
setup(c, { emit: he }) {
|
|
89
|
+
let x = c, S = he, { model: Le, set: Re } = te(x, "modelValue", (e, t) => t !== null && S(e, t), () => null), ze = a(null, "popoverOffset"), C = de({
|
|
89
90
|
component: "BbColorPalette",
|
|
90
91
|
props: x,
|
|
91
|
-
parts:
|
|
92
|
-
states:
|
|
92
|
+
parts: ue.parts,
|
|
93
|
+
states: ue.states,
|
|
93
94
|
active: { open: () => E.value },
|
|
94
|
-
attrs:
|
|
95
|
+
attrs: Te()
|
|
95
96
|
});
|
|
96
|
-
process.env.NODE_ENV !== "production" &&
|
|
97
|
-
let { t: w } =
|
|
97
|
+
process.env.NODE_ENV !== "production" && le("BbColorPalette", ce("BbColorPalette"));
|
|
98
|
+
let { t: w } = ne(), { isMobile: Be } = ie(), Ve = ee().id.value, He = `${Ve}_panel`, [Ue, We] = Ee(), T = _(), Ge = _(), Ke = l(() => x.activator != null), qe = (e) => {
|
|
98
99
|
T.value = o(e) ?? void 0;
|
|
99
|
-
},
|
|
100
|
-
|
|
100
|
+
}, Je = (e) => {
|
|
101
|
+
Ge.value = o(e) ?? void 0;
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
+
y(() => x.activator, (e) => {
|
|
103
104
|
T.value = o(e) ?? void 0;
|
|
104
|
-
}, { immediate: !0 }),
|
|
105
|
-
|
|
105
|
+
}, { immediate: !0 }), y(() => x.anchor, (e) => {
|
|
106
|
+
Ge.value = e == null ? void 0 : o(e) ?? void 0;
|
|
106
107
|
}, { immediate: !0 });
|
|
107
|
-
let
|
|
108
|
+
let Ye = l(() => Ge.value ?? T.value), E = _(!1), Xe = s(E, () => x.transitionDuration), Ze = null, Qe = (e) => {
|
|
108
109
|
x.disabled || x.readonly || (e.stopPropagation(), E.value = !E.value);
|
|
109
|
-
},
|
|
110
|
-
|
|
110
|
+
}, $e = (e) => {
|
|
111
|
+
let t = e.target;
|
|
112
|
+
t instanceof Node && ((H.value?.closest(".bb-common-popover"))?.contains(t) || T.value?.contains(t) || (E.value = !1));
|
|
111
113
|
};
|
|
112
|
-
|
|
113
|
-
e ? (
|
|
114
|
+
y(E, async (e) => {
|
|
115
|
+
e ? (nt.value = tt(), Ze = document.activeElement instanceof HTMLElement ? document.activeElement : null, D.value || document.addEventListener("click", $e, {
|
|
116
|
+
passive: !0,
|
|
117
|
+
capture: !0
|
|
118
|
+
}), await _e(), H.value?.focus()) : (document.removeEventListener("click", $e, { capture: !0 }), Ze?.focus(), Ze = null);
|
|
114
119
|
});
|
|
115
|
-
let
|
|
116
|
-
|
|
117
|
-
() =>
|
|
118
|
-
|
|
120
|
+
let et = i("BbColorPalette", x, { adaptive: !0 }), tt = () => et.adaptive && Be.value ? "canvas" : "popover", nt = _(tt()), D = l(() => nt.value === "canvas");
|
|
121
|
+
y([
|
|
122
|
+
() => et.adaptive,
|
|
123
|
+
Be,
|
|
119
124
|
E
|
|
120
125
|
], () => {
|
|
121
|
-
E.value || (
|
|
122
|
-
}),
|
|
123
|
-
let
|
|
126
|
+
E.value || (nt.value = tt());
|
|
127
|
+
}), re(() => E.value && !D.value, () => E.value = !1);
|
|
128
|
+
let rt = l(() => ({
|
|
124
129
|
side: "bottom",
|
|
125
130
|
size: "auto",
|
|
126
131
|
draggable: !0,
|
|
127
132
|
hideClose: !0,
|
|
128
133
|
eager: x.eager,
|
|
129
134
|
transitionDuration: x.transitionDuration,
|
|
130
|
-
...x.offCanvasProps?.title ? {} : { "aria-labelledby":
|
|
131
|
-
...
|
|
132
|
-
})),
|
|
135
|
+
...x.offCanvasProps?.title ? {} : { "aria-labelledby": ot.value },
|
|
136
|
+
...fe(x.offCanvasProps)
|
|
137
|
+
})), it = () => {
|
|
133
138
|
T.value?.focus(), S("hidden");
|
|
134
|
-
}, O = null, k =
|
|
135
|
-
|
|
139
|
+
}, O = null, k = _();
|
|
140
|
+
y(T, (e) => {
|
|
136
141
|
if (O?.(), O = null, !e) return;
|
|
137
142
|
let t = !e.id;
|
|
138
|
-
t && (e.id = `${
|
|
139
|
-
e.removeEventListener("click",
|
|
143
|
+
t && (e.id = `${Ve}_activator`), k.value = e.id, e.addEventListener("click", Qe), O = () => {
|
|
144
|
+
e.removeEventListener("click", Qe), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-labelledby"), e.removeAttribute("aria-controls"), j.has(e) && (e.removeAttribute("disabled"), e.removeAttribute("aria-disabled"), j.delete(e)), t && e.removeAttribute("id"), k.value = void 0;
|
|
140
145
|
};
|
|
141
146
|
}, { immediate: !0 });
|
|
142
|
-
let
|
|
143
|
-
ref:
|
|
147
|
+
let at = l(() => x.label ?? w("colorInput.openPicker").value), A = `${Ve}_label`, ot = l(() => k.value ? `${A} ${k.value}` : A), j = /* @__PURE__ */ new WeakSet(), st = l(() => x.disabled ? {
|
|
148
|
+
ref: qe,
|
|
144
149
|
disabled: !0,
|
|
145
150
|
"aria-disabled": "true"
|
|
146
|
-
} : { ref:
|
|
147
|
-
|
|
151
|
+
} : { ref: qe });
|
|
152
|
+
y([
|
|
148
153
|
T,
|
|
149
154
|
E,
|
|
150
155
|
() => x.disabled,
|
|
151
156
|
() => x.readonly
|
|
152
157
|
], ([e, t, n, r]) => {
|
|
153
|
-
e && (e.setAttribute("aria-labelledby", `${A} ${e.id}`), n ? (e.setAttribute("disabled", ""), e.setAttribute("aria-disabled", "true"), j.add(e)) : j.has(e) && (e.removeAttribute("disabled"), e.removeAttribute("aria-disabled"), j.delete(e)), n || r ? (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls")) : (e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", t ? "true" : "false"), t ? e.setAttribute("aria-controls",
|
|
154
|
-
}, { immediate: !0 }),
|
|
155
|
-
O?.(), document.removeEventListener("click",
|
|
158
|
+
e && (e.setAttribute("aria-labelledby", `${A} ${e.id}`), n ? (e.setAttribute("disabled", ""), e.setAttribute("aria-disabled", "true"), j.add(e)) : j.has(e) && (e.removeAttribute("disabled"), e.removeAttribute("aria-disabled"), j.delete(e)), n || r ? (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls")) : (e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", t ? "true" : "false"), t ? e.setAttribute("aria-controls", He) : e.removeAttribute("aria-controls")));
|
|
159
|
+
}, { immediate: !0 }), be(() => {
|
|
160
|
+
O?.(), document.removeEventListener("click", $e, { capture: !0 });
|
|
156
161
|
});
|
|
157
162
|
function M(e, t, n) {
|
|
158
163
|
let r = (r) => {
|
|
@@ -165,7 +170,7 @@ var Ee = ["aria-label"], De = {
|
|
|
165
170
|
Math.round(r(1) * 255)
|
|
166
171
|
];
|
|
167
172
|
}
|
|
168
|
-
function
|
|
173
|
+
function ct(e, t, n) {
|
|
169
174
|
let r = e / 255, i = t / 255, a = n / 255, o = Math.max(r, i, a), s = o - Math.min(r, i, a), ee = o === 0 ? 0 : s / o, te = o, ne = 0;
|
|
170
175
|
return s !== 0 && (ne = o === r ? ((i - a) / s + (i < a ? 6 : 0)) / 6 : o === i ? ((a - r) / s + 2) / 6 : ((r - i) / s + 4) / 6), [
|
|
171
176
|
ne * 360,
|
|
@@ -173,7 +178,7 @@ var Ee = ["aria-label"], De = {
|
|
|
173
178
|
te
|
|
174
179
|
];
|
|
175
180
|
}
|
|
176
|
-
function
|
|
181
|
+
function lt(e) {
|
|
177
182
|
let t = e.replace(/^#/, "");
|
|
178
183
|
return t.length === 3 ? [
|
|
179
184
|
parseInt(t[0] + t[0], 16),
|
|
@@ -200,11 +205,11 @@ var Ee = ["aria-label"], De = {
|
|
|
200
205
|
function N(e) {
|
|
201
206
|
return Math.round(Math.max(0, Math.min(255, e))).toString(16).padStart(2, "0");
|
|
202
207
|
}
|
|
203
|
-
function
|
|
208
|
+
function ut(e, t, n, r, i) {
|
|
204
209
|
let a = `#${N(e)}${N(t)}${N(n)}`;
|
|
205
210
|
return i ? a + N(r * 255) : a;
|
|
206
211
|
}
|
|
207
|
-
let
|
|
212
|
+
let dt = [
|
|
208
213
|
[
|
|
209
214
|
"#FFCDD2",
|
|
210
215
|
"#EF9A9A",
|
|
@@ -247,13 +252,13 @@ var Ee = ["aria-label"], De = {
|
|
|
247
252
|
"#7B1FA2",
|
|
248
253
|
"#4A148C"
|
|
249
254
|
]
|
|
250
|
-
], P =
|
|
255
|
+
], P = _(0), F = _(1), I = _(1), L = _(1), R = l(() => {
|
|
251
256
|
let [e, t, n] = M(P.value, F.value, I.value);
|
|
252
|
-
return
|
|
253
|
-
}),
|
|
257
|
+
return ut(e, t, n, L.value, x.alpha);
|
|
258
|
+
}), ft = l(() => {
|
|
254
259
|
let [e, t, n] = M(P.value, F.value, I.value);
|
|
255
260
|
return x.alpha ? `rgba(${e},${t},${n},${L.value})` : `rgb(${e},${t},${n})`;
|
|
256
|
-
}),
|
|
261
|
+
}), pt = l(() => !!x.swatches), z = l(() => Array.isArray(x.swatches) ? x.swatches : dt), B = _(null), mt = _(null), V = _(null), H = _(null), U = _(null), W = _(null), G = () => {
|
|
257
262
|
let e = B.value;
|
|
258
263
|
if (!e || e.width === 0 || e.height === 0) return;
|
|
259
264
|
let t = e.getContext("2d");
|
|
@@ -262,8 +267,8 @@ var Ee = ["aria-label"], De = {
|
|
|
262
267
|
a.addColorStop(0, "#ffffff"), a.addColorStop(1, `rgb(${n},${r},${i})`), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height);
|
|
263
268
|
let o = t.createLinearGradient(0, 0, 0, e.height);
|
|
264
269
|
o.addColorStop(0, "rgba(0,0,0,0)"), o.addColorStop(1, "rgba(0,0,0,1)"), t.fillStyle = o, t.fillRect(0, 0, e.width, e.height);
|
|
265
|
-
},
|
|
266
|
-
let e =
|
|
270
|
+
}, ht = () => {
|
|
271
|
+
let e = mt.value;
|
|
267
272
|
if (!e || e.width === 0 || e.height === 0) return;
|
|
268
273
|
let t = e.getContext("2d");
|
|
269
274
|
if (!t) return;
|
|
@@ -278,33 +283,33 @@ var Ee = ["aria-label"], De = {
|
|
|
278
283
|
t.clearRect(0, 0, e.width, e.height);
|
|
279
284
|
let [n, r, i] = M(P.value, F.value, I.value), a = t.createLinearGradient(0, 0, e.width, 0);
|
|
280
285
|
a.addColorStop(0, `rgba(${n},${r},${i},0)`), a.addColorStop(1, `rgba(${n},${r},${i},1)`), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height);
|
|
281
|
-
},
|
|
282
|
-
G(),
|
|
283
|
-
}, q = null,
|
|
286
|
+
}, gt = () => {
|
|
287
|
+
G(), ht(), x.alpha && K();
|
|
288
|
+
}, q = null, _t = (e) => {
|
|
284
289
|
e.width = e.offsetWidth, e.height = e.offsetHeight;
|
|
285
|
-
}, ht = () => {
|
|
286
|
-
let e = B.value, t = dt.value;
|
|
287
|
-
e && t && e.offsetWidth !== 0 && (mt(e), mt(t), x.alpha && V.value && mt(V.value), pt());
|
|
288
|
-
}, gt = !1, _t = () => {
|
|
289
|
-
P.value = 0, F.value = 1, I.value = 1, L.value = 1, Tt.value = "", Y.value = !1, X.value = !1, Z.value = !1, Q.value = !1, zt = void 0;
|
|
290
290
|
}, vt = () => {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
291
|
+
let e = B.value, t = mt.value;
|
|
292
|
+
e && t && e.offsetWidth !== 0 && (_t(e), _t(t), x.alpha && V.value && _t(V.value), gt());
|
|
293
|
+
}, yt = !1, bt = () => {
|
|
294
|
+
P.value = 0, F.value = 1, I.value = 1, L.value = 1, Ot.value = "", Y.value = !1, X.value = !1, Z.value = !1, Q.value = !1, Ht = void 0;
|
|
295
|
+
}, xt = () => {
|
|
296
|
+
yt = !0, q = new ResizeObserver(vt), B.value && q.observe(B.value), wt(Le.value), vt();
|
|
297
|
+
}, St = () => {
|
|
298
|
+
yt = !1, q?.disconnect(), q = null, bt();
|
|
299
|
+
}, Ct = l(() => m({
|
|
300
|
+
id: He,
|
|
296
301
|
class: "bb-color-palette__panel",
|
|
297
|
-
inert:
|
|
298
|
-
}, D.value ? {} : C.panel ?? {})),
|
|
302
|
+
inert: Xe.value
|
|
303
|
+
}, D.value ? {} : C.panel ?? {})), wt = (e) => {
|
|
299
304
|
if (e) try {
|
|
300
|
-
let [t, n, r, i] =
|
|
305
|
+
let [t, n, r, i] = lt(e), [a, o, s] = ct(t, n, r);
|
|
301
306
|
o > .01 && (P.value = a), F.value = o, I.value = s, L.value = i;
|
|
302
307
|
} catch {}
|
|
303
308
|
};
|
|
304
|
-
|
|
305
|
-
|
|
309
|
+
y(() => Le.value, (e) => {
|
|
310
|
+
yt && (e && e === R.value || (e ? wt(e) : (P.value = 0, F.value = 1, I.value = 1, L.value = 1), G(), x.alpha && K()));
|
|
306
311
|
});
|
|
307
|
-
let J = () =>
|
|
312
|
+
let J = () => Re(R.value), Y = _(!1), Tt = (e) => {
|
|
308
313
|
let t = H.value;
|
|
309
314
|
if (!t) return {
|
|
310
315
|
s: F.value,
|
|
@@ -315,19 +320,19 @@ var Ee = ["aria-label"], De = {
|
|
|
315
320
|
s: Math.max(0, Math.min(1, (e.clientX - n.left) / n.width)),
|
|
316
321
|
v: Math.max(0, Math.min(1, 1 - (e.clientY - n.top) / n.height))
|
|
317
322
|
};
|
|
318
|
-
},
|
|
323
|
+
}, Et = (e) => {
|
|
319
324
|
H.value?.setPointerCapture(e.pointerId), Y.value = !0;
|
|
320
|
-
let { s: t, v: n } =
|
|
325
|
+
let { s: t, v: n } = Tt(e);
|
|
321
326
|
F.value = t, I.value = n, x.alpha && K(), J();
|
|
322
|
-
},
|
|
327
|
+
}, Dt = (e) => {
|
|
323
328
|
if (!Y.value) return;
|
|
324
|
-
let { s: t, v: n } =
|
|
329
|
+
let { s: t, v: n } = Tt(e);
|
|
325
330
|
F.value = t, I.value = n, x.alpha && K(), J();
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
H.value?.releasePointerCapture(e.pointerId), Y.value &&
|
|
330
|
-
},
|
|
331
|
+
}, Ot = _(""), kt = () => {
|
|
332
|
+
Ot.value = w("colorInput.mainCanvasSelectedColor", R.value).value;
|
|
333
|
+
}, At = (e) => {
|
|
334
|
+
H.value?.releasePointerCapture(e.pointerId), Y.value && kt(), Y.value = !1;
|
|
335
|
+
}, jt = (e) => {
|
|
331
336
|
let t = e.shiftKey ? .05 : .01;
|
|
332
337
|
switch (e.key) {
|
|
333
338
|
case "ArrowLeft":
|
|
@@ -344,19 +349,19 @@ var Ee = ["aria-label"], De = {
|
|
|
344
349
|
break;
|
|
345
350
|
default: return;
|
|
346
351
|
}
|
|
347
|
-
x.alpha && K(), J(),
|
|
348
|
-
}, X =
|
|
352
|
+
x.alpha && K(), J(), kt(), e.preventDefault();
|
|
353
|
+
}, X = _(!1), Mt = (e) => {
|
|
349
354
|
let t = U.value;
|
|
350
355
|
if (!t) return P.value;
|
|
351
356
|
let n = t.getBoundingClientRect();
|
|
352
357
|
return Math.max(0, Math.min(360, (e.clientX - n.left) / n.width * 360));
|
|
353
|
-
}, At = (e) => {
|
|
354
|
-
U.value?.setPointerCapture(e.pointerId), X.value = !0, P.value = kt(e), G(), x.alpha && K(), J();
|
|
355
|
-
}, jt = (e) => {
|
|
356
|
-
X.value && (P.value = kt(e), G(), x.alpha && K(), J());
|
|
357
|
-
}, Mt = (e) => {
|
|
358
|
-
U.value?.releasePointerCapture(e.pointerId), X.value = !1;
|
|
359
358
|
}, Nt = (e) => {
|
|
359
|
+
U.value?.setPointerCapture(e.pointerId), X.value = !0, P.value = Mt(e), G(), x.alpha && K(), J();
|
|
360
|
+
}, Pt = (e) => {
|
|
361
|
+
X.value && (P.value = Mt(e), G(), x.alpha && K(), J());
|
|
362
|
+
}, Ft = (e) => {
|
|
363
|
+
U.value?.releasePointerCapture(e.pointerId), X.value = !1;
|
|
364
|
+
}, It = (e) => {
|
|
360
365
|
let t = e.shiftKey ? 10 : 1;
|
|
361
366
|
switch (e.key) {
|
|
362
367
|
case "ArrowLeft":
|
|
@@ -368,18 +373,18 @@ var Ee = ["aria-label"], De = {
|
|
|
368
373
|
default: return;
|
|
369
374
|
}
|
|
370
375
|
G(), x.alpha && K(), J(), e.preventDefault();
|
|
371
|
-
}, Z =
|
|
376
|
+
}, Z = _(!1), Lt = (e) => {
|
|
372
377
|
let t = W.value;
|
|
373
378
|
if (!t) return L.value;
|
|
374
379
|
let n = t.getBoundingClientRect();
|
|
375
380
|
return Math.max(0, Math.min(1, (e.clientX - n.left) / n.width));
|
|
376
|
-
}, Ft = (e) => {
|
|
377
|
-
W.value?.setPointerCapture(e.pointerId), Z.value = !0, L.value = Pt(e), J();
|
|
378
|
-
}, It = (e) => {
|
|
379
|
-
Z.value && (L.value = Pt(e), J());
|
|
380
|
-
}, Lt = (e) => {
|
|
381
|
-
W.value?.releasePointerCapture(e.pointerId), Z.value = !1;
|
|
382
381
|
}, Rt = (e) => {
|
|
382
|
+
W.value?.setPointerCapture(e.pointerId), Z.value = !0, L.value = Lt(e), J();
|
|
383
|
+
}, zt = (e) => {
|
|
384
|
+
Z.value && (L.value = Lt(e), J());
|
|
385
|
+
}, Bt = (e) => {
|
|
386
|
+
W.value?.releasePointerCapture(e.pointerId), Z.value = !1;
|
|
387
|
+
}, Vt = (e) => {
|
|
383
388
|
let t = e.shiftKey ? .05 : .01;
|
|
384
389
|
switch (e.key) {
|
|
385
390
|
case "ArrowLeft":
|
|
@@ -391,16 +396,16 @@ var Ee = ["aria-label"], De = {
|
|
|
391
396
|
default: return;
|
|
392
397
|
}
|
|
393
398
|
J(), e.preventDefault();
|
|
394
|
-
},
|
|
395
|
-
if (
|
|
399
|
+
}, Ht, Ut = () => Ht ??= typeof window < "u" && "EyeDropper" in window, Q = _(!1), Wt = async () => {
|
|
400
|
+
if (Ut()) try {
|
|
396
401
|
Q.value = !0;
|
|
397
402
|
let e = await new window.EyeDropper().open();
|
|
398
|
-
|
|
403
|
+
Xt(e.sRGBHex);
|
|
399
404
|
} catch {} finally {
|
|
400
405
|
Q.value = !1;
|
|
401
406
|
}
|
|
402
|
-
},
|
|
403
|
-
let e =
|
|
407
|
+
}, Gt = _(null), Kt = (e) => e && z.value[e[0]]?.[e[1]] !== void 0 ? e : null, qt = l(() => {
|
|
408
|
+
let e = Kt(Gt.value);
|
|
404
409
|
if (e) return e;
|
|
405
410
|
let t = z.value;
|
|
406
411
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -409,7 +414,7 @@ var Ee = ["aria-label"], De = {
|
|
|
409
414
|
}
|
|
410
415
|
let n = t.findIndex((e) => e.length > 0);
|
|
411
416
|
return [Math.max(n, 0), 0];
|
|
412
|
-
}),
|
|
417
|
+
}), Jt = (e, t) => qt.value[0] === e && qt.value[1] === t ? 0 : -1, Yt = (t, n, r) => {
|
|
413
418
|
if (t.altKey || t.ctrlKey || t.metaKey || t.shiftKey) return;
|
|
414
419
|
let i = z.value, a = e(t.key, t.currentTarget), o = null;
|
|
415
420
|
if (a) {
|
|
@@ -429,64 +434,64 @@ var Ee = ["aria-label"], De = {
|
|
|
429
434
|
e !== -1 && (o = [e, i[e].length - 1]);
|
|
430
435
|
} else return;
|
|
431
436
|
t.preventDefault(), o && (t.currentTarget.closest(".bb-color-palette__swatches")?.children[o[0]]?.children[o[1]])?.focus();
|
|
432
|
-
}, $ = (e) => R.value.slice(0, 7).toLowerCase() === e.slice(0, 7).toLowerCase(),
|
|
433
|
-
let [t, n, r, i] =
|
|
437
|
+
}, $ = (e) => R.value.slice(0, 7).toLowerCase() === e.slice(0, 7).toLowerCase(), Xt = (e) => {
|
|
438
|
+
let [t, n, r, i] = lt(e), [a, o, s] = ct(t, n, r);
|
|
434
439
|
o > .01 && (P.value = a), F.value = o, I.value = s, L.value = i, G(), x.alpha && K(), J();
|
|
435
440
|
};
|
|
436
|
-
return
|
|
441
|
+
return xe(() => {
|
|
437
442
|
E.value = !1;
|
|
438
|
-
}), (e, i) => (
|
|
439
|
-
|
|
440
|
-
props:
|
|
441
|
-
anchorProps: { ref:
|
|
443
|
+
}), (e, i) => (g(), d(pe, null, [
|
|
444
|
+
Ke.value ? u("", !0) : Ce(e.$slots, "activator", ye(ge({
|
|
445
|
+
props: st.value,
|
|
446
|
+
anchorProps: { ref: Je },
|
|
442
447
|
open: E.value,
|
|
443
|
-
value:
|
|
448
|
+
value: v(Le),
|
|
444
449
|
disabled: c.disabled
|
|
445
450
|
})), void 0, void 0, 0),
|
|
446
|
-
|
|
451
|
+
f("span", {
|
|
447
452
|
id: A,
|
|
448
453
|
hidden: ""
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
default:
|
|
452
|
-
|
|
454
|
+
}, we(at.value), 1),
|
|
455
|
+
p(v(Ue), null, {
|
|
456
|
+
default: b(() => [
|
|
457
|
+
f("div", {
|
|
453
458
|
ref_key: "canvasWrapRef",
|
|
454
459
|
ref: H,
|
|
455
|
-
"aria-label":
|
|
460
|
+
"aria-label": v(w)("colorInput.mainCanvasDesc").value,
|
|
456
461
|
class: "bb-color-palette__canvas-wrap",
|
|
457
462
|
"data-bb-no-drag": "",
|
|
458
463
|
role: "application",
|
|
459
464
|
tabindex: "0",
|
|
460
|
-
onKeydown:
|
|
461
|
-
onPointercancel:
|
|
462
|
-
onPointerdown:
|
|
463
|
-
onPointermove:
|
|
464
|
-
onPointerup:
|
|
465
|
-
onVnodeBeforeUnmount:
|
|
466
|
-
onVnodeMounted:
|
|
467
|
-
}, [
|
|
465
|
+
onKeydown: jt,
|
|
466
|
+
onPointercancel: At,
|
|
467
|
+
onPointerdown: Et,
|
|
468
|
+
onPointermove: Dt,
|
|
469
|
+
onPointerup: At,
|
|
470
|
+
onVnodeBeforeUnmount: St,
|
|
471
|
+
onVnodeMounted: xt
|
|
472
|
+
}, [f("canvas", {
|
|
468
473
|
ref_key: "mainCanvasRef",
|
|
469
474
|
ref: B,
|
|
470
475
|
"aria-hidden": "true",
|
|
471
476
|
class: "bb-color-palette__canvas"
|
|
472
|
-
}, null, 512),
|
|
477
|
+
}, null, 512), f("div", {
|
|
473
478
|
"aria-hidden": "true",
|
|
474
479
|
class: "bb-color-palette__canvas-thumb",
|
|
475
|
-
style:
|
|
480
|
+
style: h({
|
|
476
481
|
left: `${F.value * 100}%`,
|
|
477
482
|
top: `${(1 - I.value) * 100}%`
|
|
478
483
|
})
|
|
479
|
-
}, null, 4)], 40,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
class:
|
|
484
|
-
style:
|
|
484
|
+
}, null, 4)], 40, De),
|
|
485
|
+
f("div", Oe, we(Ot.value), 1),
|
|
486
|
+
f("div", ke, [
|
|
487
|
+
f("div", Ae, [f("div", {
|
|
488
|
+
class: ve(["bb-color-palette__preview", { "bb-color-palette__preview--alpha": c.alpha }]),
|
|
489
|
+
style: h({ "--picker-preview-color": ft.value })
|
|
485
490
|
}, null, 6)]),
|
|
486
|
-
|
|
491
|
+
f("div", je, [f("div", {
|
|
487
492
|
ref_key: "hueWrapRef",
|
|
488
493
|
ref: U,
|
|
489
|
-
"aria-label":
|
|
494
|
+
"aria-label": v(w)("colorInput.hueCanvasDesc").value,
|
|
490
495
|
"aria-valuemax": "360",
|
|
491
496
|
"aria-valuemin": "0",
|
|
492
497
|
"aria-valuenow": Math.round(P.value),
|
|
@@ -494,25 +499,25 @@ var Ee = ["aria-label"], De = {
|
|
|
494
499
|
"data-bb-no-drag": "",
|
|
495
500
|
role: "slider",
|
|
496
501
|
tabindex: "0",
|
|
497
|
-
onKeydown:
|
|
498
|
-
onPointercancel:
|
|
499
|
-
onPointerdown:
|
|
500
|
-
onPointermove:
|
|
501
|
-
onPointerup:
|
|
502
|
-
}, [
|
|
502
|
+
onKeydown: It,
|
|
503
|
+
onPointercancel: Ft,
|
|
504
|
+
onPointerdown: Nt,
|
|
505
|
+
onPointermove: Pt,
|
|
506
|
+
onPointerup: Ft
|
|
507
|
+
}, [f("canvas", {
|
|
503
508
|
ref_key: "hueCanvasRef",
|
|
504
|
-
ref:
|
|
509
|
+
ref: mt,
|
|
505
510
|
"aria-hidden": "true",
|
|
506
511
|
class: "bb-color-palette__slider-track"
|
|
507
|
-
}, null, 512),
|
|
512
|
+
}, null, 512), f("div", {
|
|
508
513
|
"aria-hidden": "true",
|
|
509
514
|
class: "bb-color-palette__slider-thumb",
|
|
510
|
-
style:
|
|
511
|
-
}, null, 4)], 40,
|
|
515
|
+
style: h({ left: `${P.value / 360 * 100}%` })
|
|
516
|
+
}, null, 4)], 40, Me), c.alpha ? (g(), d("div", {
|
|
512
517
|
key: 0,
|
|
513
518
|
ref_key: "alphaWrapRef",
|
|
514
519
|
ref: W,
|
|
515
|
-
"aria-label":
|
|
520
|
+
"aria-label": v(w)("colorInput.alphaSliderDesc").value,
|
|
516
521
|
"aria-valuemax": "100",
|
|
517
522
|
"aria-valuemin": "0",
|
|
518
523
|
"aria-valuenow": Math.round(L.value * 100),
|
|
@@ -520,82 +525,82 @@ var Ee = ["aria-label"], De = {
|
|
|
520
525
|
"data-bb-no-drag": "",
|
|
521
526
|
role: "slider",
|
|
522
527
|
tabindex: "0",
|
|
523
|
-
onKeydown:
|
|
524
|
-
onPointercancel:
|
|
525
|
-
onPointerdown:
|
|
526
|
-
onPointermove:
|
|
527
|
-
onPointerup:
|
|
528
|
-
}, [
|
|
528
|
+
onKeydown: Vt,
|
|
529
|
+
onPointercancel: Bt,
|
|
530
|
+
onPointerdown: Rt,
|
|
531
|
+
onPointermove: zt,
|
|
532
|
+
onPointerup: Bt
|
|
533
|
+
}, [f("canvas", {
|
|
529
534
|
ref_key: "alphaCanvasRef",
|
|
530
535
|
ref: V,
|
|
531
536
|
"aria-hidden": "true",
|
|
532
537
|
class: "bb-color-palette__slider-track"
|
|
533
|
-
}, null, 512),
|
|
538
|
+
}, null, 512), f("div", {
|
|
534
539
|
"aria-hidden": "true",
|
|
535
540
|
class: "bb-color-palette__slider-thumb",
|
|
536
|
-
style:
|
|
537
|
-
}, null, 4)], 40,
|
|
538
|
-
|
|
541
|
+
style: h({ left: `${L.value * 100}%` })
|
|
542
|
+
}, null, 4)], 40, Ne)) : u("", !0)]),
|
|
543
|
+
Ut() && c.eyeDropper ? (g(), d("button", {
|
|
539
544
|
key: 0,
|
|
540
|
-
"aria-label":
|
|
545
|
+
"aria-label": v(w)("colorInput.eyeDropper").value,
|
|
541
546
|
class: "bb-color-palette__eyedropper",
|
|
542
547
|
disabled: Q.value || void 0,
|
|
543
548
|
type: "button",
|
|
544
|
-
onClick:
|
|
545
|
-
}, [
|
|
546
|
-
icon:
|
|
549
|
+
onClick: Wt
|
|
550
|
+
}, [p(t, {
|
|
551
|
+
icon: v(n),
|
|
547
552
|
size: "16"
|
|
548
|
-
}, null, 8, ["icon"])], 8,
|
|
553
|
+
}, null, 8, ["icon"])], 8, Pe)) : u("", !0)
|
|
549
554
|
]),
|
|
550
|
-
|
|
555
|
+
pt.value ? (g(), d("div", Fe, [(g(!0), d(pe, null, Se(z.value, (e, t) => (g(), d("div", {
|
|
551
556
|
key: t,
|
|
552
557
|
class: "bb-color-palette__swatch-group"
|
|
553
|
-
}, [(
|
|
558
|
+
}, [(g(!0), d(pe, null, Se(e, (e, n) => (g(), d("button", m({
|
|
554
559
|
key: e,
|
|
555
560
|
"aria-label": e,
|
|
556
561
|
"aria-pressed": $(e),
|
|
557
562
|
class: ["bb-color-palette__swatch", { "bb-color-palette__swatch--active": $(e) }],
|
|
558
563
|
style: { background: e },
|
|
559
|
-
tabindex:
|
|
564
|
+
tabindex: Jt(t, n),
|
|
560
565
|
type: "button",
|
|
561
|
-
onClick: (t) =>
|
|
562
|
-
onFocus: (e) =>
|
|
563
|
-
onKeydown: (e) =>
|
|
564
|
-
}, { ref_for: !0 },
|
|
566
|
+
onClick: (t) => Xt(e),
|
|
567
|
+
onFocus: (e) => Gt.value = [t, n],
|
|
568
|
+
onKeydown: (e) => Yt(e, t, n)
|
|
569
|
+
}, { ref_for: !0 }, v(C).part?.("swatch", { selected: $(e) })), null, 16, Ie))), 128))]))), 128))])) : u("", !0)
|
|
565
570
|
]),
|
|
566
571
|
_: 1
|
|
567
572
|
}),
|
|
568
|
-
D.value ? (
|
|
573
|
+
D.value ? (g(), me(ae, m({
|
|
569
574
|
key: 1,
|
|
570
575
|
modelValue: E.value,
|
|
571
576
|
"onUpdate:modelValue": i[0] ||= (e) => E.value = e,
|
|
572
577
|
class: "bb-color-palette__sheet",
|
|
573
|
-
pt:
|
|
578
|
+
pt: v(C).forward({
|
|
574
579
|
panel: "root",
|
|
575
580
|
sheet: "root"
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
onHidden:
|
|
581
|
+
}, v(oe).states, () => c.offCanvasProps?.pt)
|
|
582
|
+
}, m(rt.value, v(r)(v(C).forwardAttrs)), {
|
|
583
|
+
onHidden: it,
|
|
579
584
|
onHide: i[1] ||= (e) => S("hide"),
|
|
580
585
|
onShow: i[2] ||= (e) => S("show"),
|
|
581
586
|
onShown: i[3] ||= (e) => S("shown")
|
|
582
587
|
}), {
|
|
583
|
-
default:
|
|
588
|
+
default: b(() => [f("div", ye(ge(Ct.value)), [p(v(We))], 16)]),
|
|
584
589
|
_: 1
|
|
585
|
-
}, 16, ["modelValue", "pt"])) : (
|
|
590
|
+
}, 16, ["modelValue", "pt"])) : (g(), me(se, m({
|
|
586
591
|
key: 2,
|
|
587
592
|
modelValue: E.value,
|
|
588
593
|
"onUpdate:modelValue": i[4] ||= (e) => E.value = e,
|
|
589
|
-
anchor:
|
|
590
|
-
"aria-label":
|
|
594
|
+
anchor: Ye.value,
|
|
595
|
+
"aria-label": v(w)("colorInput.dialogLabel").value,
|
|
591
596
|
boundary: c.boundary,
|
|
592
|
-
"bubble-attrs":
|
|
597
|
+
"bubble-attrs": Ct.value,
|
|
593
598
|
class: "bb-color-palette",
|
|
594
599
|
dialog: "",
|
|
595
600
|
"disable-flip": c.disableFlip,
|
|
596
601
|
eager: c.eager,
|
|
597
602
|
"hide-arrow": "",
|
|
598
|
-
offset: c.offset ??
|
|
603
|
+
offset: c.offset ?? v(ze)() ?? 4,
|
|
599
604
|
padding: c.padding,
|
|
600
605
|
placement: c.placement,
|
|
601
606
|
"transition-duration": c.transitionDuration,
|
|
@@ -603,8 +608,8 @@ var Ee = ["aria-label"], De = {
|
|
|
603
608
|
onHide: i[6] ||= (e) => S("hide"),
|
|
604
609
|
onShow: i[7] ||= (e) => S("show"),
|
|
605
610
|
onShown: i[8] ||= (e) => S("shown")
|
|
606
|
-
},
|
|
607
|
-
default:
|
|
611
|
+
}, v(C).rootAttrs), {
|
|
612
|
+
default: b(() => [p(v(We))]),
|
|
608
613
|
_: 1
|
|
609
614
|
}, 16, [
|
|
610
615
|
"modelValue",
|