ropav 0.0.9 → 0.0.11
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 +6 -0
- package/dist/accordion.css +115 -111
- package/dist/accordion.js +60 -16
- package/dist/alert.css +110 -108
- package/dist/alert.js +48 -26
- package/dist/aspect-ratio.css +17 -15
- package/dist/aspect-ratio.js +20 -6
- package/dist/avatar.css +98 -96
- package/dist/avatar.js +27 -16
- package/dist/badge.css +95 -93
- package/dist/badge.js +29 -16
- package/dist/base.css +672 -671
- package/dist/button-group.css +39 -37
- package/dist/button-group.js +23 -12
- package/dist/button-link.css +160 -158
- package/dist/button-link.js +43 -24
- package/dist/button.css +160 -158
- package/dist/button.js +37 -19
- package/dist/card.css +109 -107
- package/dist/card.js +42 -17
- package/dist/checkbox.css +139 -137
- package/dist/checkbox.js +79 -28
- package/dist/collapse.css +29 -27
- package/dist/collapse.js +44 -10
- package/dist/color-input.css +137 -107
- package/dist/color-input.js +91 -17
- package/dist/color-picker.css +309 -303
- package/dist/color-picker.js +250 -77
- package/dist/color-picker2.js +9 -1
- package/dist/color-swatch.css +48 -46
- package/dist/color-swatch.js +15 -11
- package/dist/color-swatch2.js +4 -0
- package/dist/components/accordion/accordion-item.d.ts +16 -4
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +5 -4
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion/types.d.ts +10 -5
- package/dist/components/accordion/useAccordion.d.ts +1 -1
- package/dist/components/alert/alert.d.ts +3 -3
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/alert/index.js +2 -2
- package/dist/components/alert/types.d.ts +5 -2
- package/dist/components/alert/useAlertColor.d.ts +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +1 -1
- package/dist/components/aspect-ratio/index.d.ts +3 -2
- package/dist/components/aspect-ratio/index.js +2 -2
- package/dist/components/aspect-ratio/types.d.ts +4 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/types.d.ts +5 -2
- package/dist/components/avatar/useAvatarColor.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/index.js +2 -2
- package/dist/components/badge/types.d.ts +5 -2
- package/dist/components/badge/useBadgeColor.d.ts +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/types.d.ts +5 -2
- package/dist/components/button/useButtonColor.d.ts +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +3 -2
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-group/types.d.ts +4 -1
- package/dist/components/button-link/button-link.d.ts +1 -1
- package/dist/components/button-link/index.d.ts +3 -2
- package/dist/components/button-link/index.js +2 -2
- package/dist/components/button-link/types.d.ts +5 -2
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/index.d.ts +3 -2
- package/dist/components/card/index.js +2 -2
- package/dist/components/card/types.d.ts +5 -1
- package/dist/components/checkbox/checkbox.d.ts +5 -2
- package/dist/components/checkbox/index.d.ts +3 -2
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/types.d.ts +7 -2
- package/dist/components/checkbox/useCheckbox.d.ts +4 -2
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +4 -3
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/types.d.ts +9 -2
- package/dist/components/collapse/useCollapse.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +1 -1
- package/dist/components/color-input/index.d.ts +3 -2
- package/dist/components/color-input/index.js +2 -2
- package/dist/components/color-input/types.d.ts +8 -4
- package/dist/components/color-input/useColorInput.d.ts +5 -5
- package/dist/components/color-input/useColorInputEyeDropper.d.ts +1 -1
- package/dist/components/color-input/useColorInputPopover.d.ts +2 -2
- package/dist/components/color-input/useColorInputValue.d.ts +1 -1
- package/dist/components/color-picker/color-picker-saturation.d.ts +1 -1
- package/dist/components/color-picker/color-picker-slider.d.ts +1 -1
- package/dist/components/color-picker/color-picker-utils.d.ts +1 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +3 -3
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +13 -1
- package/dist/components/color-picker/useColorPickerDrag.d.ts +7 -2
- package/dist/components/color-picker/useColorPickerSwatches.d.ts +1 -1
- package/dist/components/color-picker/useColorPickerValue.d.ts +2 -2
- package/dist/components/color-swatch/color-swatch.d.ts +1 -1
- package/dist/components/color-swatch/index.d.ts +3 -2
- package/dist/components/color-swatch/index.js +2 -1
- package/dist/components/color-swatch/types.d.ts +4 -1
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +15 -6
- package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +724 -0
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/index.d.ts +55 -3
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +142 -6
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +21 -12
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +6 -4
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +4 -3
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +5 -5
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +25 -5
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +3 -3
- package/dist/components/field/field.d.ts +2 -2
- package/dist/components/field/index.d.ts +3 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/types.d.ts +4 -1
- package/dist/components/field/useField.d.ts +1 -1
- package/dist/components/floating/index.d.ts +1 -0
- package/dist/components/floating/index.js +0 -0
- package/dist/components/floating/types.d.ts +31 -0
- package/dist/components/floating/useFloatingPosition.d.ts +38 -0
- package/dist/components/focus-trap/focus-trap.d.ts +31 -0
- package/dist/components/focus-trap/index.d.ts +4 -0
- package/dist/components/focus-trap/index.js +3 -0
- package/dist/components/focus-trap/types.d.ts +41 -0
- package/dist/components/focus-trap/useFocusTrap.d.ts +2 -0
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/index.d.ts +3 -2
- package/dist/components/icon-button/index.js +2 -1
- package/dist/components/icon-button/types.d.ts +5 -2
- package/dist/components/input/index.d.ts +3 -2
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/types.d.ts +4 -1
- package/dist/components/input/useInput.d.ts +2 -2
- package/dist/components/modal/index.d.ts +3 -2
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/types.d.ts +9 -2
- package/dist/components/modal/useModal.d.ts +1 -1
- package/dist/components/number-input/index.d.ts +3 -2
- package/dist/components/number-input/index.js +2 -2
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/types.d.ts +5 -2
- package/dist/components/number-input/useNumberInput.d.ts +2 -2
- package/dist/components/overlay/index.d.ts +3 -2
- package/dist/components/overlay/index.js +2 -1
- package/dist/components/overlay/overlay.d.ts +1 -1
- package/dist/components/overlay/types.d.ts +4 -1
- package/dist/components/overlay/useOverlay.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +21 -11
- package/dist/components/popover/usePopover.d.ts +11 -2
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/progress/types.d.ts +5 -2
- package/dist/components/progress/useProgress.d.ts +2 -2
- package/dist/components/radio/index.d.ts +4 -3
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +9 -4
- package/dist/components/radio/types.d.ts +21 -4
- package/dist/components/radio/useRadio.d.ts +10 -5
- package/dist/components/select/index.d.ts +3 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/types.d.ts +4 -1
- package/dist/components/select/useSelect.d.ts +4 -3
- package/dist/components/slider/index.d.ts +4 -4
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +37 -0
- package/dist/components/slider/range-slider.d.ts +8 -13
- package/dist/components/slider/slider.d.ts +5 -2
- package/dist/components/slider/sliderCore.d.ts +35 -0
- package/dist/components/slider/types.d.ts +14 -7
- package/dist/components/slider/useRangeSlider.d.ts +5 -7
- package/dist/components/slider/useRangeSliderPointer.d.ts +19 -0
- package/dist/components/slider/useRangeSliderTooltipCollision.d.ts +31 -2
- package/dist/components/slider/useRangeSliderTooltipState.d.ts +23 -0
- package/dist/components/slider/useSlider.d.ts +11 -15
- package/dist/components/switch/index.d.ts +3 -2
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.ts +5 -2
- package/dist/components/switch/types.d.ts +7 -2
- package/dist/components/switch/useSwitch.d.ts +4 -2
- package/dist/components/tabs/index.d.ts +7 -6
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/tabs-content.d.ts +2 -2
- package/dist/components/tabs/tabs-list.d.ts +4 -4
- package/dist/components/tabs/tabs-trigger.d.ts +5 -5
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/types.d.ts +13 -4
- package/dist/components/tabs/useTabs.d.ts +1 -1
- package/dist/components/teleport-provider/index.d.ts +2 -0
- package/dist/components/teleport-provider/index.js +2 -0
- package/dist/components/teleport-provider/teleport-provider.d.ts +21 -0
- package/dist/components/teleport-provider/types.d.ts +4 -0
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +5 -0
- package/dist/components/textarea/index.d.ts +3 -2
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +5 -2
- package/dist/components/textarea/types.d.ts +6 -1
- package/dist/components/textarea/useTextarea.d.ts +3 -2
- package/dist/components/toast/defaults.d.ts +7 -0
- package/dist/components/toast/index.d.ts +7 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast-provider.d.ts +21 -0
- package/dist/components/toast/toast-viewport.d.ts +34 -0
- package/dist/components/toast/toast.d.ts +31 -0
- package/dist/components/toast/types.d.ts +110 -0
- package/dist/components/toast/useToast.d.ts +4 -0
- package/dist/components/toast/useToastColor.d.ts +3 -0
- package/dist/components/toast/useToastState.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts +3 -2
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +14 -13
- package/dist/components/tooltip/useTooltip.d.ts +15 -3
- package/dist/dropdown-menu.css +191 -107
- package/dist/dropdown-menu.js +1729 -107
- package/dist/field.css +41 -39
- package/dist/field.js +40 -16
- package/dist/focus-trap.js +80 -0
- package/dist/icon-button.css +193 -189
- package/dist/icon-button.js +23 -18
- package/dist/icon-button2.js +8 -0
- package/dist/index.d.ts +35 -30
- package/dist/index.js +36 -31
- package/dist/input.css +122 -120
- package/dist/input.js +47 -34
- package/dist/input2.js +9 -0
- package/dist/legacy-unlayered.css +5461 -0
- package/dist/modal.css +129 -127
- package/dist/modal.js +160 -200
- package/dist/number-input.css +87 -85
- package/dist/number-input.js +61 -17
- package/dist/overlay.css +26 -24
- package/dist/overlay.js +17 -9
- package/dist/overlay2.js +4 -0
- package/dist/popover.css +140 -107
- package/dist/popover.js +295 -189
- package/dist/popover2.js +6 -1
- package/dist/progress.css +101 -99
- package/dist/progress.js +50 -28
- package/dist/radio.css +114 -105
- package/dist/radio.js +154 -56
- package/dist/select.css +244 -242
- package/dist/select.js +92 -47
- package/dist/slider.css +1109 -904
- package/dist/slider.js +1118 -923
- package/dist/styles-api.d.ts +22 -0
- package/dist/styles-api.js +49 -0
- package/dist/switch.css +120 -108
- package/dist/switch.js +89 -33
- package/dist/tabs.css +286 -278
- package/dist/tabs.js +60 -21
- package/dist/teleport-provider.js +15 -0
- package/dist/textarea.css +132 -130
- package/dist/textarea.js +77 -29
- package/dist/toast.css +236 -0
- package/dist/toast.js +739 -0
- package/dist/tooltip.css +137 -107
- package/dist/tooltip.js +182 -223
- package/dist/tooltip2.js +8 -0
- package/dist/useClickOutside.js +1 -1
- package/dist/useFloatingPosition.js +1284 -0
- package/dist/useFocusTrap.js +130 -0
- package/dist/useTeleportTarget.js +29 -0
- package/dist/utils/componentColors.d.ts +60 -0
- package/docs/public-styles-api.md +133 -0
- package/docs/public-tokens.md +545 -0
- package/package.json +44 -12
- package/src/styles/_tokens.scss +33 -28
- package/src/styles/_utilities.scss +11 -9
- package/src/styles/styles-manifest.json +4125 -0
- package/dist/components/slider/useRangeSliderTooltipTransition.d.ts +0 -4
package/dist/color-picker.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import './color-picker.css';
|
|
2
2
|
import { t as bem } from "./bem.js";
|
|
3
|
+
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
3
4
|
import { t as parseCssColor } from "./color.js";
|
|
4
5
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
6
|
import { t as check_default } from "./check.js";
|
|
6
7
|
import { t as color_swatch_default } from "./color-swatch.js";
|
|
7
|
-
import { child, computed, createComponent, createFor, createIf, createInvoker, createSlot, createTemplateRefSetter, defineVaporComponent, delegateEvents, extend, next, on, onBeforeUnmount, ref, renderEffect, setAttr, setClass, setDynamicProps, setInsertionState, setProp, setStyle, setValue, template, unref
|
|
8
|
+
import { child, computed, createComponent, createFor, createIf, createInvoker, createSlot, createTemplateRefSetter, defineVaporComponent, delegateEvents, extend, next, nthChild, on, onBeforeUnmount, ref, renderEffect, setAttr, setClass, setDynamicProps, setInsertionState, setProp, setStyle, setValue, template, unref } from "vue";
|
|
8
9
|
function clamp(value, min, max) {
|
|
9
10
|
return Math.min(max, Math.max(min, value));
|
|
10
11
|
}
|
|
@@ -145,42 +146,122 @@ function formatNumber(value) {
|
|
|
145
146
|
}
|
|
146
147
|
//#endregion
|
|
147
148
|
//#region src/components/color-picker/useColorPickerDrag.ts
|
|
148
|
-
function
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
function getPointerId(event) {
|
|
150
|
+
return Number.isFinite(event.pointerId) ? event.pointerId : void 0;
|
|
151
|
+
}
|
|
152
|
+
function useColorPickerDrag({ target, focusTarget, readonly, isGeometryValid, updateFromPointer }) {
|
|
153
|
+
let session;
|
|
154
|
+
let frameWindow = null;
|
|
155
|
+
let frameId;
|
|
156
|
+
let geometryDirty = false;
|
|
157
|
+
let pendingPointer;
|
|
158
|
+
function isCurrentPointer(event) {
|
|
159
|
+
const currentSession = session;
|
|
160
|
+
if (!currentSession) return false;
|
|
161
|
+
const pointerId = getPointerId(event);
|
|
162
|
+
return currentSession.pointerId === void 0 || pointerId === currentSession.pointerId;
|
|
156
163
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
164
|
+
function cancelScheduledFrame() {
|
|
165
|
+
if (frameId !== void 0) frameWindow?.cancelAnimationFrame(frameId);
|
|
166
|
+
frameWindow = null;
|
|
167
|
+
frameId = void 0;
|
|
168
|
+
}
|
|
169
|
+
function applyScheduledUpdate(currentSession) {
|
|
170
|
+
if (session !== currentSession) return;
|
|
171
|
+
if (geometryDirty) {
|
|
172
|
+
const rect = currentSession.element.getBoundingClientRect();
|
|
173
|
+
if (!isGeometryValid(rect)) return;
|
|
174
|
+
currentSession.rect = rect;
|
|
175
|
+
geometryDirty = false;
|
|
176
|
+
}
|
|
177
|
+
const pointer = pendingPointer;
|
|
178
|
+
pendingPointer = void 0;
|
|
179
|
+
if (pointer) updateFromPointer(pointer, currentSession.rect);
|
|
180
|
+
}
|
|
181
|
+
function flushScheduledUpdate() {
|
|
182
|
+
const currentSession = session;
|
|
183
|
+
cancelScheduledFrame();
|
|
184
|
+
if (currentSession) applyScheduledUpdate(currentSession);
|
|
185
|
+
}
|
|
186
|
+
function scheduleUpdate() {
|
|
187
|
+
const currentSession = session;
|
|
188
|
+
if (!currentSession) return;
|
|
189
|
+
const view = currentSession.view;
|
|
190
|
+
if (!view?.requestAnimationFrame) {
|
|
191
|
+
applyScheduledUpdate(currentSession);
|
|
161
192
|
return;
|
|
162
193
|
}
|
|
163
|
-
|
|
194
|
+
if (frameId !== void 0) return;
|
|
195
|
+
frameWindow = view;
|
|
196
|
+
frameId = view.requestAnimationFrame(() => {
|
|
197
|
+
frameWindow = null;
|
|
198
|
+
frameId = void 0;
|
|
199
|
+
applyScheduledUpdate(currentSession);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function onGeometryChange() {
|
|
203
|
+
if (!session) return;
|
|
204
|
+
geometryDirty = true;
|
|
205
|
+
scheduleUpdate();
|
|
206
|
+
}
|
|
207
|
+
function stopDragging() {
|
|
208
|
+
const stoppedSession = session;
|
|
209
|
+
if (!stoppedSession) return;
|
|
210
|
+
stoppedSession.view?.removeEventListener("pointermove", onPointerMove);
|
|
211
|
+
stoppedSession.view?.removeEventListener("pointerup", onPointerEnd);
|
|
212
|
+
stoppedSession.view?.removeEventListener("pointercancel", onPointerEnd);
|
|
213
|
+
stoppedSession.view?.removeEventListener("resize", onGeometryChange);
|
|
214
|
+
stoppedSession.view?.removeEventListener("scroll", onGeometryChange, true);
|
|
215
|
+
cancelScheduledFrame();
|
|
216
|
+
geometryDirty = false;
|
|
217
|
+
pendingPointer = void 0;
|
|
218
|
+
session = void 0;
|
|
219
|
+
}
|
|
220
|
+
function onPointerMove(event) {
|
|
221
|
+
if (!isCurrentPointer(event)) return;
|
|
222
|
+
pendingPointer = {
|
|
223
|
+
clientX: event.clientX,
|
|
224
|
+
clientY: event.clientY
|
|
225
|
+
};
|
|
226
|
+
scheduleUpdate();
|
|
227
|
+
}
|
|
228
|
+
function onPointerEnd(event) {
|
|
229
|
+
if (!isCurrentPointer(event)) return;
|
|
230
|
+
if (event.type === "pointerup") flushScheduledUpdate();
|
|
231
|
+
stopDragging();
|
|
164
232
|
}
|
|
165
233
|
function onPointerDown(event) {
|
|
166
|
-
if (readonly()) return;
|
|
234
|
+
if (readonly() || event.button !== 0 || event.isPrimary === false) return;
|
|
167
235
|
const el = target.value;
|
|
168
236
|
if (!el) return;
|
|
169
237
|
event.preventDefault();
|
|
170
238
|
(focusTarget?.value ?? el).focus();
|
|
171
|
-
updateFromPointer(event, el);
|
|
172
239
|
stopDragging();
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
240
|
+
const nextSession = {
|
|
241
|
+
element: el,
|
|
242
|
+
pointerId: getPointerId(event),
|
|
243
|
+
rect: el.getBoundingClientRect(),
|
|
244
|
+
view: el.ownerDocument.defaultView
|
|
245
|
+
};
|
|
246
|
+
session = nextSession;
|
|
247
|
+
geometryDirty = !isGeometryValid(nextSession.rect);
|
|
248
|
+
if (!geometryDirty) updateFromPointer({
|
|
249
|
+
clientX: event.clientX,
|
|
250
|
+
clientY: event.clientY
|
|
251
|
+
}, nextSession.rect);
|
|
252
|
+
if (session !== nextSession) return;
|
|
253
|
+
nextSession.view?.addEventListener("pointermove", onPointerMove);
|
|
254
|
+
nextSession.view?.addEventListener("pointerup", onPointerEnd);
|
|
255
|
+
nextSession.view?.addEventListener("pointercancel", onPointerEnd);
|
|
256
|
+
nextSession.view?.addEventListener("resize", onGeometryChange);
|
|
257
|
+
nextSession.view?.addEventListener("scroll", onGeometryChange, true);
|
|
177
258
|
}
|
|
178
259
|
onBeforeUnmount(stopDragging);
|
|
179
260
|
return { onPointerDown };
|
|
180
261
|
}
|
|
181
262
|
//#endregion
|
|
182
263
|
//#region src/components/color-picker/color-picker-saturation.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
183
|
-
var t0$2 = template("<div data-v-
|
|
264
|
+
var t0$2 = template("<div data-v-fbb051b0 role=group data-control=saturation><input data-v-fbb051b0 class=\"rp-color-picker__axis-input rp-color-picker__axis-input--saturation\"type=range min=0 max=100 step=1 aria-label=Saturation aria-orientation=horizontal><input data-v-fbb051b0 class=\"rp-color-picker__axis-input rp-color-picker__axis-input--value\"type=range min=0 max=100 step=1 aria-label=Value aria-orientation=vertical><span data-v-fbb051b0 class=rp-color-picker__surface aria-hidden=true></span><span data-v-fbb051b0 data-control=saturation aria-hidden=true>", 1);
|
|
184
265
|
delegateEvents("input", "keydown", "pointerdown");
|
|
185
266
|
//#endregion
|
|
186
267
|
//#region src/components/color-picker/color-picker-saturation.vue
|
|
@@ -197,7 +278,35 @@ var color_picker_saturation_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
197
278
|
},
|
|
198
279
|
ariaLabel: {},
|
|
199
280
|
describedby: {},
|
|
200
|
-
labelledby: {}
|
|
281
|
+
labelledby: {},
|
|
282
|
+
controlClass: { type: [
|
|
283
|
+
Boolean,
|
|
284
|
+
null,
|
|
285
|
+
String,
|
|
286
|
+
Object,
|
|
287
|
+
Array
|
|
288
|
+
] },
|
|
289
|
+
controlStyle: { type: [
|
|
290
|
+
Boolean,
|
|
291
|
+
null,
|
|
292
|
+
String,
|
|
293
|
+
Object,
|
|
294
|
+
Array
|
|
295
|
+
] },
|
|
296
|
+
handleClass: { type: [
|
|
297
|
+
Boolean,
|
|
298
|
+
null,
|
|
299
|
+
String,
|
|
300
|
+
Object,
|
|
301
|
+
Array
|
|
302
|
+
] },
|
|
303
|
+
handleStyle: { type: [
|
|
304
|
+
Boolean,
|
|
305
|
+
null,
|
|
306
|
+
String,
|
|
307
|
+
Object,
|
|
308
|
+
Array
|
|
309
|
+
] }
|
|
201
310
|
},
|
|
202
311
|
emits: ["update:modelValue"],
|
|
203
312
|
setup(__props, { emit: __emit }) {
|
|
@@ -226,8 +335,7 @@ var color_picker_saturation_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
226
335
|
value: normalizedValue
|
|
227
336
|
});
|
|
228
337
|
}
|
|
229
|
-
function updateFromPointer(e,
|
|
230
|
-
const rect = el.getBoundingClientRect();
|
|
338
|
+
function updateFromPointer(e, rect) {
|
|
231
339
|
if (rect.width <= 0 || rect.height <= 0) return;
|
|
232
340
|
updateValue((e.clientX - rect.left) / rect.width * 100, 100 - (e.clientY - rect.top) / rect.height * 100);
|
|
233
341
|
}
|
|
@@ -235,6 +343,7 @@ var color_picker_saturation_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
235
343
|
target: saturationRef,
|
|
236
344
|
focusTarget: saturationInputRef,
|
|
237
345
|
readonly: () => props.readonly,
|
|
346
|
+
isGeometryValid: (rect) => rect.width > 0 && rect.height > 0,
|
|
238
347
|
updateFromPointer
|
|
239
348
|
});
|
|
240
349
|
function onAxisKeydown(event, axis) {
|
|
@@ -275,47 +384,52 @@ var color_picker_saturation_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
275
384
|
else updateValue(saturation.value, nextValue);
|
|
276
385
|
}
|
|
277
386
|
const _setTemplateRef = createTemplateRefSetter();
|
|
278
|
-
const
|
|
279
|
-
const n0 = child(
|
|
387
|
+
const n3 = t0$2();
|
|
388
|
+
const n0 = child(n3);
|
|
280
389
|
const n1 = next(n0, 1);
|
|
390
|
+
const n2 = nthChild(n3, 3);
|
|
281
391
|
n0.$evtinput = createInvoker(($event) => onAxisInput($event, "saturation"));
|
|
282
392
|
n0.$evtkeydown = createInvoker(($event) => onAxisKeydown($event, "saturation"));
|
|
283
393
|
_setTemplateRef(n0, saturationInputRef, null, "saturationInputRef");
|
|
284
394
|
n1.$evtinput = createInvoker(($event) => onAxisInput($event, "value"));
|
|
285
395
|
n1.$evtkeydown = createInvoker(($event) => onAxisKeydown($event, "value"));
|
|
286
|
-
|
|
287
|
-
_setTemplateRef(
|
|
396
|
+
n3.$evtpointerdown = createInvoker((e) => unref(onPointerDown)(e));
|
|
397
|
+
_setTemplateRef(n3, saturationRef, null, "saturationRef");
|
|
288
398
|
renderEffect(() => {
|
|
289
399
|
const _describedby = __props.describedby;
|
|
400
|
+
const _readonly = __props.readonly;
|
|
290
401
|
const _id = __props.id;
|
|
291
402
|
const _saturation = saturation.value;
|
|
292
403
|
const _ariaValueText = ariaValueText.value;
|
|
293
404
|
const _value = value.value;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
setAttr(
|
|
297
|
-
setAttr(
|
|
298
|
-
setAttr(
|
|
299
|
-
setAttr(
|
|
405
|
+
setClass(n3, ["rp-color-picker__saturation", __props.controlClass]);
|
|
406
|
+
setStyle(n3, [saturationStyle.value, __props.controlStyle]);
|
|
407
|
+
setAttr(n3, "aria-label", groupAriaLabel.value);
|
|
408
|
+
setAttr(n3, "aria-labelledby", __props.labelledby);
|
|
409
|
+
setAttr(n3, "aria-describedby", _describedby);
|
|
410
|
+
setAttr(n3, "aria-readonly", _readonly || void 0);
|
|
411
|
+
setAttr(n3, "data-readonly", unref(presence)(_readonly));
|
|
300
412
|
setProp(n0, "id", _id);
|
|
301
413
|
setValue(n0, _saturation);
|
|
302
414
|
setAttr(n0, "aria-valuenow", Math.round(_saturation));
|
|
303
415
|
setAttr(n0, "aria-valuetext", _ariaValueText);
|
|
304
416
|
setAttr(n0, "aria-describedby", _describedby);
|
|
305
|
-
setAttr(n0, "aria-readonly",
|
|
417
|
+
setAttr(n0, "aria-readonly", _readonly || void 0);
|
|
306
418
|
setProp(n1, "id", _id ? `${_id}-value` : void 0);
|
|
307
419
|
setValue(n1, _value);
|
|
308
420
|
setAttr(n1, "aria-valuenow", Math.round(_value));
|
|
309
421
|
setAttr(n1, "aria-valuetext", _ariaValueText);
|
|
310
422
|
setAttr(n1, "aria-describedby", _describedby);
|
|
311
|
-
setAttr(n1, "aria-readonly",
|
|
423
|
+
setAttr(n1, "aria-readonly", _readonly || void 0);
|
|
424
|
+
setClass(n2, ["rp-color-picker__handle", __props.handleClass]);
|
|
425
|
+
setStyle(n2, __props.handleStyle);
|
|
312
426
|
});
|
|
313
|
-
return
|
|
427
|
+
return n3;
|
|
314
428
|
}
|
|
315
|
-
}), [["__scopeId", "data-v-
|
|
429
|
+
}), [["__scopeId", "data-v-fbb051b0"]]);
|
|
316
430
|
//#endregion
|
|
317
431
|
//#region src/components/color-picker/color-picker-slider.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
318
|
-
var t0$1 = template("<div data-v-
|
|
432
|
+
var t0$1 = template("<div data-v-0299a505 role=slider tabindex=0 aria-orientation=horizontal aria-valuemin=0><span data-v-0299a505 aria-hidden=true></span><span data-v-0299a505 aria-hidden=true>", 1);
|
|
319
433
|
delegateEvents("pointerdown", "keydown");
|
|
320
434
|
//#endregion
|
|
321
435
|
//#region src/components/color-picker/color-picker-slider.vue
|
|
@@ -329,7 +443,35 @@ var color_picker_slider_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
329
443
|
readonly: {
|
|
330
444
|
type: Boolean,
|
|
331
445
|
default: false
|
|
332
|
-
}
|
|
446
|
+
},
|
|
447
|
+
controlClass: { type: [
|
|
448
|
+
Boolean,
|
|
449
|
+
null,
|
|
450
|
+
String,
|
|
451
|
+
Object,
|
|
452
|
+
Array
|
|
453
|
+
] },
|
|
454
|
+
controlStyle: { type: [
|
|
455
|
+
Boolean,
|
|
456
|
+
null,
|
|
457
|
+
String,
|
|
458
|
+
Object,
|
|
459
|
+
Array
|
|
460
|
+
] },
|
|
461
|
+
handleClass: { type: [
|
|
462
|
+
Boolean,
|
|
463
|
+
null,
|
|
464
|
+
String,
|
|
465
|
+
Object,
|
|
466
|
+
Array
|
|
467
|
+
] },
|
|
468
|
+
handleStyle: { type: [
|
|
469
|
+
Boolean,
|
|
470
|
+
null,
|
|
471
|
+
String,
|
|
472
|
+
Object,
|
|
473
|
+
Array
|
|
474
|
+
] }
|
|
333
475
|
},
|
|
334
476
|
emits: ["update:value"],
|
|
335
477
|
setup(__props, { emit: __emit }) {
|
|
@@ -340,7 +482,7 @@ var color_picker_slider_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
340
482
|
const max = computed(() => isHue.value ? 359 : 100);
|
|
341
483
|
const rootClass = computed(() => `rp-color-picker__${props.variant}`);
|
|
342
484
|
const surfaceClass = computed(() => ["rp-color-picker__slider-surface", `rp-color-picker__${props.variant}-surface`]);
|
|
343
|
-
const
|
|
485
|
+
const internalHandleClass = computed(() => ["rp-color-picker__slider-handle", `rp-color-picker__${props.variant}-handle`]);
|
|
344
486
|
const normalizedValue = computed(() => isHue.value ? normalizeHue(props.value) : clampOpacity(props.value));
|
|
345
487
|
const currentOutputValue = computed(() => normalizeOutputValue(normalizedValue.value));
|
|
346
488
|
const sliderStyle = computed(() => {
|
|
@@ -357,14 +499,14 @@ var color_picker_slider_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
357
499
|
if (normalizedNextValue === currentOutputValue.value) return;
|
|
358
500
|
emit("update:value", normalizedNextValue);
|
|
359
501
|
}
|
|
360
|
-
function updateFromPointer(e,
|
|
361
|
-
const rect = el.getBoundingClientRect();
|
|
502
|
+
function updateFromPointer(e, rect) {
|
|
362
503
|
if (rect.width <= 0) return;
|
|
363
504
|
updateValue((e.clientX - rect.left) / rect.width * max.value);
|
|
364
505
|
}
|
|
365
506
|
const { onPointerDown } = useColorPickerDrag({
|
|
366
507
|
target: sliderRef,
|
|
367
508
|
readonly: () => props.readonly,
|
|
509
|
+
isGeometryValid: (rect) => rect.width > 0,
|
|
368
510
|
updateFromPointer
|
|
369
511
|
});
|
|
370
512
|
function onKeydown(e) {
|
|
@@ -402,20 +544,25 @@ var color_picker_slider_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
402
544
|
n2.$evtkeydown = createInvoker(onKeydown);
|
|
403
545
|
_setTemplateRef(n2, sliderRef, null, "sliderRef");
|
|
404
546
|
renderEffect(() => {
|
|
405
|
-
|
|
406
|
-
|
|
547
|
+
const _readonly = __props.readonly;
|
|
548
|
+
const _variant = __props.variant;
|
|
549
|
+
setClass(n2, [rootClass.value, __props.controlClass]);
|
|
550
|
+
setStyle(n2, [sliderStyle.value, __props.controlStyle]);
|
|
407
551
|
setAttr(n2, "aria-label", ariaLabel.value);
|
|
408
552
|
setAttr(n2, "aria-valuemax", max.value);
|
|
409
553
|
setAttr(n2, "aria-valuenow", Math.round(normalizedValue.value));
|
|
410
554
|
setAttr(n2, "aria-valuetext", ariaValueText.value);
|
|
411
|
-
setAttr(n2, "aria-readonly",
|
|
412
|
-
setAttr(n2, "data-readonly",
|
|
555
|
+
setAttr(n2, "aria-readonly", _readonly || void 0);
|
|
556
|
+
setAttr(n2, "data-readonly", unref(presence)(_readonly));
|
|
557
|
+
setAttr(n2, "data-control", _variant);
|
|
413
558
|
setClass(n0, surfaceClass.value);
|
|
414
|
-
setClass(n1,
|
|
559
|
+
setClass(n1, [internalHandleClass.value, __props.handleClass]);
|
|
560
|
+
setStyle(n1, __props.handleStyle);
|
|
561
|
+
setAttr(n1, "data-control", _variant);
|
|
415
562
|
});
|
|
416
563
|
return n2;
|
|
417
564
|
}
|
|
418
|
-
}), [["__scopeId", "data-v-
|
|
565
|
+
}), [["__scopeId", "data-v-0299a505"]]);
|
|
419
566
|
//#endregion
|
|
420
567
|
//#region src/components/color-picker/useColorPickerSwatches.ts
|
|
421
568
|
var MAX_SWATCHES_PER_ROW = 15;
|
|
@@ -574,10 +721,10 @@ function getComparableColor(color) {
|
|
|
574
721
|
}
|
|
575
722
|
//#endregion
|
|
576
723
|
//#region src/components/color-picker/color-picker.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
577
|
-
var t0 = template("<div data-v-
|
|
578
|
-
var t1 = template("<button data-v-
|
|
579
|
-
var t2 = template("<div data-v-
|
|
580
|
-
var t3 = template("<div data-v-
|
|
724
|
+
var t0 = template("<div data-v-41c4ca07 class=rp-color-picker__header><span data-v-41c4ca07>");
|
|
725
|
+
var t1 = template("<button data-v-41c4ca07>");
|
|
726
|
+
var t2 = template("<div data-v-41c4ca07>");
|
|
727
|
+
var t3 = template("<div data-v-41c4ca07>", 1);
|
|
581
728
|
delegateEvents("click", "keydown", "focusout");
|
|
582
729
|
//#endregion
|
|
583
730
|
//#region src/components/color-picker/color-picker.vue
|
|
@@ -602,7 +749,9 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
602
749
|
swatchesPerRow: {},
|
|
603
750
|
ariaLabel: {},
|
|
604
751
|
describedby: {},
|
|
605
|
-
labelledby: {}
|
|
752
|
+
labelledby: {},
|
|
753
|
+
classNames: {},
|
|
754
|
+
styles: {}
|
|
606
755
|
},
|
|
607
756
|
emits: ["update:modelValue"],
|
|
608
757
|
setup(__props, { emit: __emit, slots: $slots }) {
|
|
@@ -612,11 +761,11 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
612
761
|
[`size-${props.size}`]: Boolean(props.size),
|
|
613
762
|
readonly: props.readonly
|
|
614
763
|
}));
|
|
615
|
-
const
|
|
616
|
-
const rootAttrs = computed(() => {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
});
|
|
764
|
+
const { getPartAttrs, getRootAttrs } = useStylesApi(props, "root");
|
|
765
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
766
|
+
class: rootClass.value,
|
|
767
|
+
"data-readonly": presence(props.readonly)
|
|
768
|
+
}));
|
|
620
769
|
const { selectedColor, saturationValue, opacityColor, showAlphaControls, updateSelection, updateHue, updateOpacity, selectColor, isColorSelected } = useColorPickerValue(props, (value) => emit("update:modelValue", value));
|
|
621
770
|
const { swatchesRef, normalizedSwatchesPerRow, validSwatches, swatchesStyle, swatchSize, isSwatchSelected, getSwatchTabindex, selectSwatch, onSwatchFocus, onSwatchesFocusout, onSwatchKeydown } = useColorPickerSwatches(props, {
|
|
622
771
|
isSelected: isColorSelected,
|
|
@@ -624,14 +773,13 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
624
773
|
});
|
|
625
774
|
const _setTemplateRef = createTemplateRefSetter();
|
|
626
775
|
const n22 = t3();
|
|
627
|
-
renderEffect(() => setDynamicProps(n22, [rootAttrs.value
|
|
628
|
-
class: rootClass.value,
|
|
629
|
-
"data-readonly": __props.readonly || void 0
|
|
630
|
-
}]));
|
|
776
|
+
renderEffect(() => setDynamicProps(n22, [rootAttrs.value]));
|
|
631
777
|
setInsertionState(n22, null, 0);
|
|
632
778
|
createIf(() => $slots.default, () => {
|
|
633
779
|
const n4 = t0();
|
|
634
|
-
|
|
780
|
+
const n3 = child(n4);
|
|
781
|
+
renderEffect(() => setDynamicProps(n3, [unref(getPartAttrs)("label", { class: "rp-color-picker__label" })]));
|
|
782
|
+
setInsertionState(n3, null, 0);
|
|
635
783
|
createSlot("default", null, null, 1);
|
|
636
784
|
return n4;
|
|
637
785
|
});
|
|
@@ -646,12 +794,20 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
646
794
|
"aria-label": () => __props.ariaLabel,
|
|
647
795
|
describedby: () => __props.describedby,
|
|
648
796
|
labelledby: () => __props.labelledby,
|
|
797
|
+
"control-class": () => __props.classNames?.control,
|
|
798
|
+
"control-style": () => __props.styles?.control,
|
|
799
|
+
"handle-class": () => __props.classNames?.handle,
|
|
800
|
+
"handle-style": () => __props.styles?.handle,
|
|
649
801
|
"onUpdate:modelValue": () => unref(updateSelection)
|
|
650
802
|
}),
|
|
651
803
|
createComponent(color_picker_slider_default, {
|
|
652
804
|
variant: "hue",
|
|
653
805
|
value: () => unref(selectedColor).hue,
|
|
654
806
|
readonly: () => __props.readonly,
|
|
807
|
+
"control-class": () => __props.classNames?.control,
|
|
808
|
+
"control-style": () => __props.styles?.control,
|
|
809
|
+
"handle-class": () => __props.classNames?.handle,
|
|
810
|
+
"handle-style": () => __props.styles?.handle,
|
|
655
811
|
"onUpdate:value": () => unref(updateHue)
|
|
656
812
|
}),
|
|
657
813
|
createIf(() => unref(showAlphaControls), () => {
|
|
@@ -660,6 +816,10 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
660
816
|
color: () => unref(opacityColor),
|
|
661
817
|
value: () => unref(selectedColor).opacity,
|
|
662
818
|
readonly: () => __props.readonly,
|
|
819
|
+
"control-class": () => __props.classNames?.control,
|
|
820
|
+
"control-style": () => __props.styles?.control,
|
|
821
|
+
"handle-class": () => __props.classNames?.handle,
|
|
822
|
+
"handle-style": () => __props.styles?.handle,
|
|
663
823
|
"onUpdate:value": () => unref(updateOpacity)
|
|
664
824
|
});
|
|
665
825
|
})
|
|
@@ -670,13 +830,18 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
670
830
|
const n21 = t2();
|
|
671
831
|
renderEffect(() => {
|
|
672
832
|
const _withPicker = __props.withPicker;
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
833
|
+
setDynamicProps(n21, [unref(getPartAttrs)("swatches", {
|
|
834
|
+
class: "rp-color-picker__swatches",
|
|
835
|
+
style: unref(swatchesStyle)
|
|
836
|
+
}), {
|
|
837
|
+
"data-fill": unref(normalizedSwatchesPerRow) ? true : void 0,
|
|
838
|
+
"data-with-picker": _withPicker || void 0,
|
|
839
|
+
id: _withPicker ? void 0 : __props.id,
|
|
840
|
+
role: "radiogroup",
|
|
841
|
+
"aria-label": _withPicker ? "Color swatches" : __props.ariaLabel || "Color swatches",
|
|
842
|
+
"aria-describedby": _withPicker ? void 0 : __props.describedby,
|
|
843
|
+
"aria-labelledby": _withPicker ? void 0 : __props.labelledby
|
|
844
|
+
}]);
|
|
680
845
|
});
|
|
681
846
|
setInsertionState(n21, null, 0);
|
|
682
847
|
createFor(() => unref(validSwatches), (_for_item0, _for_key0) => {
|
|
@@ -684,12 +849,20 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
684
849
|
renderEffect(() => {
|
|
685
850
|
const _readonly = __props.readonly;
|
|
686
851
|
const _index = _for_key0.value;
|
|
852
|
+
const _isSwatchSelected = unref(isSwatchSelected);
|
|
687
853
|
const _swatch = _for_item0.value;
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
854
|
+
const _presence = unref(presence);
|
|
855
|
+
setDynamicProps(n20, [unref(getPartAttrs)("swatch", { class: "rp-color-picker__swatch" }), {
|
|
856
|
+
type: "button",
|
|
857
|
+
role: "radio",
|
|
858
|
+
disabled: _readonly,
|
|
859
|
+
tabindex: _readonly ? -1 : unref(getSwatchTabindex)(_index),
|
|
860
|
+
"aria-checked": _isSwatchSelected(_index),
|
|
861
|
+
"aria-label": `Select color ${_swatch}`,
|
|
862
|
+
title: _swatch,
|
|
863
|
+
"data-selected": _presence(_isSwatchSelected(_index)),
|
|
864
|
+
"data-readonly": _presence(_readonly)
|
|
865
|
+
}]);
|
|
693
866
|
});
|
|
694
867
|
setInsertionState(n20, null, 0);
|
|
695
868
|
createComponent(color_swatch_default, {
|
|
@@ -712,6 +885,6 @@ var color_picker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
712
885
|
});
|
|
713
886
|
return n22;
|
|
714
887
|
}
|
|
715
|
-
}), [["__scopeId", "data-v-
|
|
888
|
+
}), [["__scopeId", "data-v-41c4ca07"]]);
|
|
716
889
|
//#endregion
|
|
717
890
|
export { formatColorPickerValue as n, parseColorPickerValue as r, color_picker_default as t };
|
package/dist/color-picker2.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
//#region src/components/color-picker/types.ts
|
|
2
|
+
var colorPickerParts = [
|
|
3
|
+
"root",
|
|
4
|
+
"label",
|
|
5
|
+
"control",
|
|
6
|
+
"handle",
|
|
7
|
+
"swatches",
|
|
8
|
+
"swatch"
|
|
9
|
+
];
|
|
2
10
|
var colorPickerFormats = [
|
|
3
11
|
"hex",
|
|
4
12
|
"hexa",
|
|
@@ -15,4 +23,4 @@ var colorPickerSizes = [
|
|
|
15
23
|
"xl"
|
|
16
24
|
];
|
|
17
25
|
//#endregion
|
|
18
|
-
export {
|
|
26
|
+
export { colorPickerParts as n, colorPickerSizes as r, colorPickerFormats as t };
|
package/dist/color-swatch.css
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-color-swatch[data-v-13032098] {
|
|
3
|
+
--_rp-color-swatch-size: 24px;
|
|
4
|
+
--_rp-color-swatch-radius: var(--rp-radius-sm);
|
|
5
|
+
--_rp-color-swatch-checkerboard-tile: var(--rp-color-gray-3);
|
|
6
|
+
--_rp-color-swatch-checkerboard-tile-alt: var(--rp-color-white);
|
|
7
|
+
--_rp-color-swatch-checkerboard: conic-gradient(
|
|
8
|
+
var(--_rp-color-swatch-checkerboard-tile) 25%,
|
|
9
|
+
var(--_rp-color-swatch-checkerboard-tile-alt) 0 50%,
|
|
10
|
+
var(--_rp-color-swatch-checkerboard-tile) 0 75%,
|
|
11
|
+
var(--_rp-color-swatch-checkerboard-tile-alt) 0
|
|
12
|
+
);
|
|
13
|
+
--_rp-color-swatch-checkerboard-size: calc(var(--_rp-color-swatch-size) / 2)
|
|
14
|
+
calc(var(--_rp-color-swatch-size) / 2);
|
|
15
|
+
--_rp-color-swatch-overlay-stroke: rgb(0 0 0 / 10%);
|
|
16
|
+
--_rp-color-swatch-overlay-shadow: rgb(0 0 0 / 15%);
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
width: var(--_rp-color-swatch-size);
|
|
22
|
+
height: var(--_rp-color-swatch-size);
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
background: linear-gradient(var(--_rp-color-swatch-color), var(--_rp-color-swatch-color)), var(--_rp-color-swatch-checkerboard);
|
|
25
|
+
background-size: auto, var(--_rp-color-swatch-checkerboard-size);
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: var(--_rp-color-swatch-radius);
|
|
28
|
+
box-shadow: var(--_rp-color-swatch-overlay-stroke) 0 0 0 0.0625rem inset, var(--_rp-color-swatch-overlay-shadow) 0 0 0.25rem inset;
|
|
29
|
+
color: var(--_rp-color-swatch-fg);
|
|
30
|
+
line-height: 1;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
vertical-align: middle;
|
|
32
33
|
}
|
|
33
|
-
html.dark .rp-color-swatch[data-v-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
html.dark .rp-color-swatch[data-v-13032098], [data-rp-color-scheme=dark] .rp-color-swatch[data-v-13032098] {
|
|
35
|
+
--_rp-color-swatch-checkerboard-tile: var(--rp-color-dark-6);
|
|
36
|
+
--_rp-color-swatch-checkerboard-tile-alt: var(--rp-color-dark-4);
|
|
36
37
|
}
|
|
37
|
-
.rp-color-swatch__icon[data-v-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
.rp-color-swatch__icon[data-v-13032098] {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: 70%;
|
|
43
|
+
height: 70%;
|
|
44
|
+
color: inherit;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
.rp-color-swatch__icon[data-v-13032098] svg {
|
|
48
|
+
display: block;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
45
51
|
}
|
|
46
|
-
.rp-color-swatch__icon[data-v-b0899989] svg {
|
|
47
|
-
display: block;
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
52
|
}
|