@pathscale/ui 1.1.44 → 1.1.46
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/dist/components/accordion/Accordion.js +44 -44
- package/dist/components/accordion/index.js +2 -9
- package/dist/components/alert/Alert.js +30 -30
- package/dist/components/alert/index.js +2 -8
- package/dist/components/avatar/Avatar.js +27 -27
- package/dist/components/avatar/AvatarGroup.js +11 -11
- package/dist/components/avatar/index.js +2 -6
- package/dist/components/badge/Badge.js +19 -19
- package/dist/components/badge/index.js +6 -9
- package/dist/components/breadcrumbs/Breadcrumbs.js +25 -25
- package/dist/components/breadcrumbs/index.js +2 -5
- package/dist/components/button/Button.js +22 -22
- package/dist/components/button/index.js +2 -3
- package/dist/components/button-group/ButtonGroup.js +14 -14
- package/dist/components/button-group/context.js +2 -2
- package/dist/components/button-group/index.js +2 -6
- package/dist/components/calendar/Calendar.js +85 -85
- package/dist/components/calendar/index.js +2 -3
- package/dist/components/card/Card.js +21 -21
- package/dist/components/card/index.js +2 -8
- package/dist/components/chatbubble/ChatBubble.js +19 -19
- package/dist/components/chatbubble/ChatBubbleAvatar.js +8 -8
- package/dist/components/chatbubble/ChatBubbleFooter.js +11 -11
- package/dist/components/chatbubble/ChatBubbleHeader.js +8 -8
- package/dist/components/chatbubble/ChatBubbleMessage.js +12 -12
- package/dist/components/chatbubble/ChatBubbleTime.js +11 -11
- package/dist/components/chatbubble/index.js +2 -3
- package/dist/components/checkbox/Checkbox.js +29 -29
- package/dist/components/checkbox/index.js +2 -3
- package/dist/components/checkbox-group/CheckboxGroup.js +16 -16
- package/dist/components/checkbox-group/context.js +2 -2
- package/dist/components/checkbox-group/index.js +3 -4
- package/dist/components/chip/Chip.js +32 -32
- package/dist/components/chip/index.js +5 -7
- package/dist/components/close-button/CloseButton.js +22 -22
- package/dist/components/close-button/index.js +2 -3
- package/dist/components/color-area/ColorArea.js +13 -13
- package/dist/components/color-area/index.js +2 -2
- package/dist/components/color-field/ColorField.js +23 -23
- package/dist/components/color-field/index.js +2 -2
- package/dist/components/color-picker/ColorPicker.js +44 -44
- package/dist/components/color-picker/index.js +2 -8
- package/dist/components/color-slider/ColorSlider.js +21 -21
- package/dist/components/color-slider/index.js +2 -2
- package/dist/components/color-swatch/ColorSwatch.js +14 -14
- package/dist/components/color-swatch/index.js +2 -2
- package/dist/components/color-swatch-picker/ColorSwatchPicker.js +14 -14
- package/dist/components/color-swatch-picker/index.js +2 -5
- package/dist/components/color-wheel-flower/ColorWheelFlower.js +83 -83
- package/dist/components/color-wheel-flower/colorWheelFlowerContext.js +3 -3
- package/dist/components/color-wheel-flower/index.js +3 -6
- package/dist/components/combo-box/ComboBox.js +90 -90
- package/dist/components/combo-box/index.js +2 -10
- package/dist/components/date-field/DateField.js +41 -41
- package/dist/components/date-field/index.js +2 -11
- package/dist/components/date-picker/DatePicker.js +40 -40
- package/dist/components/date-picker/index.js +2 -3
- package/dist/components/date-range-picker/DateRangePicker.js +55 -55
- package/dist/components/date-range-picker/index.js +2 -3
- package/dist/components/description/Description.js +9 -9
- package/dist/components/description/index.js +2 -5
- package/dist/components/disclosure/Disclosure.js +40 -40
- package/dist/components/disclosure/index.js +3 -9
- package/dist/components/disclosure-group/DisclosureGroup.js +13 -13
- package/dist/components/disclosure-group/index.js +4 -6
- package/dist/components/disclosure-group/useDisclosureGroupNavigation.js +4 -4
- package/dist/components/drawer/Drawer.css +39 -0
- package/dist/components/drawer/Drawer.d.ts +6 -0
- package/dist/components/drawer/Drawer.js +101 -80
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +2 -15
- package/dist/components/dropdown/Dropdown.js +60 -60
- package/dist/components/dropdown/index.js +2 -4
- package/dist/components/empty-state/EmptyState.js +25 -25
- package/dist/components/empty-state/index.js +2 -8
- package/dist/components/error-message/ErrorMessage.js +12 -12
- package/dist/components/error-message/index.js +2 -5
- package/dist/components/field-error/FieldError.js +16 -16
- package/dist/components/field-error/index.js +2 -5
- package/dist/components/fieldset/Fieldset.js +21 -21
- package/dist/components/fieldset/index.js +2 -8
- package/dist/components/flex/Flex.js +14 -14
- package/dist/components/flex/index.js +2 -3
- package/dist/components/floating-dock/FloatingDock.js +76 -76
- package/dist/components/floating-dock/index.js +2 -3
- package/dist/components/footer/Footer.js +11 -11
- package/dist/components/footer/FooterTitle.js +9 -9
- package/dist/components/footer/index.js +2 -3
- package/dist/components/form/Form.js +8 -8
- package/dist/components/form/index.js +2 -5
- package/dist/components/glass-panel/GlassPanel.js +29 -29
- package/dist/components/glass-panel/index.js +2 -3
- package/dist/components/glow-card/GlowCard.js +10 -10
- package/dist/components/glow-card/index.js +2 -3
- package/dist/components/grid/Grid.js +15 -15
- package/dist/components/grid/index.js +2 -3
- package/dist/components/header/Header.js +12 -12
- package/dist/components/header/index.js +2 -5
- package/dist/components/icon/Icon.js +8 -8
- package/dist/components/icon/index.js +2 -3
- package/dist/components/immersive-landing/ImmersiveLanding.js +44 -44
- package/dist/components/immersive-landing/ImmersiveLandingArrows.js +17 -17
- package/dist/components/immersive-landing/ImmersiveLandingContext.js +3 -3
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.js +36 -36
- package/dist/components/immersive-landing/ImmersiveLandingPage.js +15 -15
- package/dist/components/immersive-landing/components/CookieConsent.js +71 -71
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +42 -42
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +40 -40
- package/dist/components/immersive-landing/index.js +7 -14
- package/dist/components/immersive-landing/useImmersiveLanding.js +7 -7
- package/dist/components/input/Input.js +48 -48
- package/dist/components/input/index.js +2 -2
- package/dist/components/input-group/InputGroup.js +33 -33
- package/dist/components/input-group/index.js +2 -9
- package/dist/components/input-otp/InputOTP.js +48 -48
- package/dist/components/input-otp/index.js +2 -11
- package/dist/components/join/Join.js +14 -14
- package/dist/components/join/index.js +2 -3
- package/dist/components/kbd/Kbd.js +20 -20
- package/dist/components/kbd/index.js +2 -8
- package/dist/components/label/Label.js +9 -9
- package/dist/components/label/index.js +2 -5
- package/dist/components/language-switcher/LanguageSwitcher.js +26 -26
- package/dist/components/language-switcher/createI18n.js +8 -8
- package/dist/components/language-switcher/index.js +3 -8
- package/dist/components/link/Link.js +22 -22
- package/dist/components/link/index.js +2 -5
- package/dist/components/list-box/ListBox.js +17 -17
- package/dist/components/list-box/ListBoxItem.js +32 -32
- package/dist/components/list-box/ListBoxSection.js +13 -13
- package/dist/components/list-box/context.js +2 -2
- package/dist/components/list-box/index.js +9 -15
- package/dist/components/live-chat/LiveChatBubble.js +27 -27
- package/dist/components/live-chat/LiveChatPanel.js +62 -62
- package/dist/components/live-chat/index.js +3 -5
- package/dist/components/menu/Menu.js +25 -30
- package/dist/components/menu/MenuItem.js +38 -38
- package/dist/components/menu/MenuSection.js +13 -13
- package/dist/components/menu/context.js +2 -2
- package/dist/components/menu/index.js +3 -12
- package/dist/components/meter/Meter.js +31 -31
- package/dist/components/meter/index.js +2 -8
- package/dist/components/modal/Modal.js +80 -80
- package/dist/components/modal/index.js +2 -13
- package/dist/components/navbar/Navbar.js +18 -18
- package/dist/components/navbar/NavbarRow.js +10 -10
- package/dist/components/navbar/NavbarSection.js +9 -9
- package/dist/components/navbar/NavbarStack.js +10 -10
- package/dist/components/navbar/index.js +2 -3
- package/dist/components/noise-background/NoiseBackground.js +35 -35
- package/dist/components/noise-background/index.js +2 -3
- package/dist/components/number-field/NumberField.js +42 -42
- package/dist/components/number-field/index.js +2 -9
- package/dist/components/pagination/Pagination.js +34 -34
- package/dist/components/pagination/index.js +2 -3
- package/dist/components/popover/Popover.js +44 -44
- package/dist/components/popover/index.js +3 -9
- package/dist/components/progress-bar/ProgressBar.js +27 -27
- package/dist/components/progress-bar/index.js +2 -3
- package/dist/components/progress-circle/ProgressCircle.js +32 -32
- package/dist/components/progress-circle/index.js +2 -3
- package/dist/components/radio/Radio.js +27 -27
- package/dist/components/radio/index.js +2 -3
- package/dist/components/radio-group/RadioGroup.js +33 -33
- package/dist/components/radio-group/context.js +2 -2
- package/dist/components/radio-group/index.js +3 -4
- package/dist/components/range-calendar/RangeCalendar.js +15 -15
- package/dist/components/range-calendar/index.js +2 -3
- package/dist/components/scroll-shadow/ScrollShadow.js +19 -19
- package/dist/components/scroll-shadow/index.js +2 -3
- package/dist/components/scroll-shadow/useScrollShadow.js +3 -3
- package/dist/components/search-field/SearchField.js +38 -38
- package/dist/components/search-field/index.js +2 -9
- package/dist/components/select/Select.js +123 -123
- package/dist/components/select/index.js +2 -3
- package/dist/components/separator/Separator.js +11 -11
- package/dist/components/separator/index.js +2 -4
- package/dist/components/size-picker/SizePicker.js +17 -17
- package/dist/components/size-picker/index.js +3 -6
- package/dist/components/size-picker/sizeStore.js +3 -3
- package/dist/components/skeleton/Skeleton.js +8 -8
- package/dist/components/skeleton/index.js +2 -3
- package/dist/components/slider/Slider.js +26 -26
- package/dist/components/slider/index.js +2 -3
- package/dist/components/spinner/Spinner.js +19 -19
- package/dist/components/spinner/index.js +2 -5
- package/dist/components/surface/Surface.js +9 -9
- package/dist/components/surface/index.js +2 -4
- package/dist/components/table/Table.js +80 -80
- package/dist/components/table/index.js +3 -28
- package/dist/components/tabs/Tabs.js +59 -59
- package/dist/components/tabs/index.js +2 -4
- package/dist/components/tag/Tag.js +40 -40
- package/dist/components/tag/index.js +2 -6
- package/dist/components/tag-group/TagGroup.js +20 -20
- package/dist/components/tag-group/context.js +2 -2
- package/dist/components/tag-group/index.js +2 -6
- package/dist/components/text/Text.js +9 -9
- package/dist/components/text/index.js +2 -5
- package/dist/components/text-area/TextArea.js +10 -10
- package/dist/components/text-area/index.js +2 -5
- package/dist/components/text-field/TextField.js +15 -15
- package/dist/components/text-field/index.js +2 -7
- package/dist/components/textarea/Textarea.js +11 -13
- package/dist/components/textarea/index.js +2 -6
- package/dist/components/theme-color-picker/ThemeColorPicker.js +43 -43
- package/dist/components/theme-color-picker/hueShift.js +3 -3
- package/dist/components/theme-color-picker/index.js +3 -7
- package/dist/components/time-field/TimeField.js +41 -41
- package/dist/components/time-field/index.js +2 -11
- package/dist/components/toast/Toast.js +98 -98
- package/dist/components/toast/index.js +2 -19
- package/dist/components/toggle/Toggle.js +31 -31
- package/dist/components/toggle/index.js +2 -3
- package/dist/components/toolbar/Toolbar.js +10 -10
- package/dist/components/toolbar/index.js +2 -5
- package/dist/components/tooltip/Tooltip.js +28 -28
- package/dist/components/tooltip/index.js +2 -7
- package/dist/components/utils.js +6 -7
- package/dist/components/video-preview/VideoPreview.js +15 -15
- package/dist/components/video-preview/index.js +2 -3
- package/dist/hooks/date/useCalendarNavigation.js +18 -18
- package/dist/hooks/date/useCalendarState.js +19 -19
- package/dist/hooks/date/useDateSelection.js +7 -7
- package/dist/hooks/date/usePickerOpenState.js +8 -8
- package/dist/hooks/date/useRangeSelection.js +16 -16
- package/dist/hooks/form/index.js +6 -12
- package/dist/hooks/form/useField.js +4 -4
- package/dist/hooks/form/useFieldError.js +2 -2
- package/dist/hooks/form/useFieldMeta.js +10 -10
- package/dist/hooks/form/useFieldProps.js +2 -2
- package/dist/hooks/form/useForm.js +4 -4
- package/dist/hooks/layout/index.js +2 -3
- package/dist/hooks/layout/useDesktop.js +4 -4
- package/dist/hooks/table/index.js +9 -18
- package/dist/hooks/table/useAnchoredOverlayPosition.js +4 -4
- package/dist/hooks/table/useTableExpansion.js +4 -4
- package/dist/hooks/table/useTableFiltering.js +8 -8
- package/dist/hooks/table/useTableModel.js +10 -10
- package/dist/hooks/table/useTablePagination.js +4 -4
- package/dist/hooks/table/useTableSelection.js +4 -4
- package/dist/hooks/table/useTableSorting.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +97 -366
- package/dist/lib/refs/index.js +2 -3
- package/dist/lib/refs/mergeRefs.js +2 -2
- package/dist/lib/style/index.js +2 -4
- package/dist/lib/tag/createIsButton.js +4 -4
- package/dist/lib/tag/createTagName.js +2 -2
- package/dist/lib/tag/index.js +3 -7
- package/dist/motion/engine.js +4 -4
- package/dist/motion/index.js +11 -34
- package/dist/motion/popmotion.js +2 -2
- package/dist/motion/presets.js +4 -4
- package/dist/motion/route.js +7 -7
- package/dist/motion/solid/MotionDiv.js +13 -13
- package/dist/motion/solid/index.js +2 -3
- package/dist/motion/system.js +9 -9
- package/dist/primitives/streaming/index.js +3 -5
- package/dist/primitives/streaming/useStreamingBuffer.js +2 -2
- package/dist/primitives/streaming/useStreamingSubscription.js +7 -7
- package/dist/primitives/virtualizer/index.js +2 -3
- package/dist/primitives/virtualizer/useVirtualRows.js +7 -7
- package/dist/purge-manifest.json +2287 -2287
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./CloseButton.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const
|
|
8
|
-
const [local, others] =
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./CloseButton.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<button>"), _tmpl$2 = /*#__PURE__*/ template("<span>");
|
|
7
|
+
const CloseButton = (props)=>{
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"children",
|
|
10
10
|
"class",
|
|
11
11
|
"className",
|
|
@@ -23,7 +23,7 @@ const CloseButton_CloseButton = (props)=>{
|
|
|
23
23
|
const disabled = ()=>Boolean(local.isDisabled) || Boolean(local.isPending);
|
|
24
24
|
return (()=>{
|
|
25
25
|
var _el$ = _tmpl$();
|
|
26
|
-
|
|
26
|
+
spread(_el$, mergeProps(others, {
|
|
27
27
|
get type () {
|
|
28
28
|
return local.type ?? "button";
|
|
29
29
|
},
|
|
@@ -31,7 +31,7 @@ const CloseButton_CloseButton = (props)=>{
|
|
|
31
31
|
return local["aria-label"] ?? "Close";
|
|
32
32
|
}
|
|
33
33
|
}, ()=>({
|
|
34
|
-
class:
|
|
34
|
+
class: twMerge(CLASSES.base, CLASSES.variant[variant()], local.class, local.className)
|
|
35
35
|
}), {
|
|
36
36
|
"data-slot": "close-button",
|
|
37
37
|
get ["data-pending"] () {
|
|
@@ -50,35 +50,35 @@ const CloseButton_CloseButton = (props)=>{
|
|
|
50
50
|
return disabled() ? "true" : "false";
|
|
51
51
|
}
|
|
52
52
|
}), false, true);
|
|
53
|
-
|
|
54
|
-
var _c$ =
|
|
53
|
+
insert(_el$, (()=>{
|
|
54
|
+
var _c$ = memo(()=>!!local.startIcon);
|
|
55
55
|
return ()=>_c$() ? (()=>{
|
|
56
56
|
var _el$2 = _tmpl$2();
|
|
57
|
-
|
|
58
|
-
class:
|
|
57
|
+
spread(_el$2, mergeProps(()=>({
|
|
58
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
59
59
|
}), {
|
|
60
60
|
"data-slot": "close-button-start-icon"
|
|
61
61
|
}), false, true);
|
|
62
|
-
|
|
62
|
+
insert(_el$2, ()=>local.startIcon);
|
|
63
63
|
return _el$2;
|
|
64
64
|
})() : null;
|
|
65
65
|
})(), null);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var _c$2 =
|
|
66
|
+
insert(_el$, ()=>local.children, null);
|
|
67
|
+
insert(_el$, (()=>{
|
|
68
|
+
var _c$2 = memo(()=>!!local.endIcon);
|
|
69
69
|
return ()=>_c$2() ? (()=>{
|
|
70
70
|
var _el$3 = _tmpl$2();
|
|
71
|
-
|
|
72
|
-
class:
|
|
71
|
+
spread(_el$3, mergeProps(()=>({
|
|
72
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
73
73
|
}), {
|
|
74
74
|
"data-slot": "close-button-end-icon"
|
|
75
75
|
}), false, true);
|
|
76
|
-
|
|
76
|
+
insert(_el$3, ()=>local.endIcon);
|
|
77
77
|
return _el$3;
|
|
78
78
|
})() : null;
|
|
79
79
|
})(), null);
|
|
80
80
|
return _el$;
|
|
81
81
|
})();
|
|
82
82
|
};
|
|
83
|
-
const
|
|
84
|
-
export {
|
|
83
|
+
const close_button_CloseButton = CloseButton;
|
|
84
|
+
export { close_button_CloseButton as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_CloseButton_js_default from "./CloseButton.js";
|
|
2
|
+
export { external_CloseButton_js_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./ColorArea.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createSignal, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./ColorArea.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div><div>");
|
|
7
7
|
const DEFAULT_VALUE = {
|
|
8
8
|
h: 0,
|
|
9
9
|
s: 100,
|
|
@@ -52,7 +52,7 @@ const hsvToRgb = (h, s, v)=>{
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
const ColorArea_ColorArea = (props)=>{
|
|
55
|
-
const [local, others] =
|
|
55
|
+
const [local, others] = splitProps(props, [
|
|
56
56
|
"class",
|
|
57
57
|
"className",
|
|
58
58
|
"value",
|
|
@@ -62,8 +62,8 @@ const ColorArea_ColorArea = (props)=>{
|
|
|
62
62
|
"style",
|
|
63
63
|
"aria-label"
|
|
64
64
|
]);
|
|
65
|
-
const [internalValue, setInternalValue] =
|
|
66
|
-
const [isDragging, setIsDragging] =
|
|
65
|
+
const [internalValue, setInternalValue] = createSignal(DEFAULT_VALUE);
|
|
66
|
+
const [isDragging, setIsDragging] = createSignal(false);
|
|
67
67
|
let areaRef;
|
|
68
68
|
const isControlled = ()=>void 0 !== local.value;
|
|
69
69
|
const currentValue = ()=>normalizeValue(local.value ?? internalValue());
|
|
@@ -152,9 +152,9 @@ const ColorArea_ColorArea = (props)=>{
|
|
|
152
152
|
return (()=>{
|
|
153
153
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
154
154
|
var _ref$ = areaRef;
|
|
155
|
-
"function" == typeof _ref$ ?
|
|
156
|
-
|
|
157
|
-
class:
|
|
155
|
+
"function" == typeof _ref$ ? use(_ref$, _el$) : areaRef = _el$;
|
|
156
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
157
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
158
158
|
}), {
|
|
159
159
|
get ["data-theme"] () {
|
|
160
160
|
return local.dataTheme;
|
|
@@ -190,8 +190,8 @@ const ColorArea_ColorArea = (props)=>{
|
|
|
190
190
|
onLostPointerCapture: handleLostPointerCapture,
|
|
191
191
|
onKeyDown: handleKeyDown
|
|
192
192
|
}), false, true);
|
|
193
|
-
|
|
194
|
-
class:
|
|
193
|
+
spread(_el$2, mergeProps(()=>({
|
|
194
|
+
class: CLASSES.slot.thumb
|
|
195
195
|
}), {
|
|
196
196
|
"data-slot": "color-area-thumb",
|
|
197
197
|
get ["data-dragging"] () {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const color_area =
|
|
1
|
+
import external_ColorArea_js_default from "./ColorArea.js";
|
|
2
|
+
const color_area = external_ColorArea_js_default;
|
|
3
3
|
export { color_area as default };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./ColorField.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createEffect, createSignal, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { formatColor, parseColor } from "../color-wheel-flower/ColorUtils.js";
|
|
6
|
+
import { CLASSES } from "./ColorField.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div><div><input>");
|
|
8
8
|
const FALLBACK_COLOR = "#FFFFFF";
|
|
9
9
|
const invokeEventHandler = (handler, event)=>{
|
|
10
10
|
if ("function" == typeof handler) return void handler(event);
|
|
11
11
|
if (Array.isArray(handler) && "function" == typeof handler[0]) handler[0](handler[1], event);
|
|
12
12
|
};
|
|
13
13
|
const normalizeColor = (value, format)=>{
|
|
14
|
-
const parsed =
|
|
14
|
+
const parsed = parseColor(value);
|
|
15
15
|
if (!parsed) return null;
|
|
16
|
-
const formatted =
|
|
16
|
+
const formatted = formatColor(parsed, format);
|
|
17
17
|
return "hex" === format ? formatted.toUpperCase() : formatted;
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
const [local, others] =
|
|
19
|
+
const ColorField_ColorField = (props)=>{
|
|
20
|
+
const [local, others] = splitProps(props, [
|
|
21
21
|
"class",
|
|
22
22
|
"className",
|
|
23
23
|
"value",
|
|
@@ -39,11 +39,11 @@ const ColorField = (props)=>{
|
|
|
39
39
|
const seed = local.value ?? local.defaultValue ?? FALLBACK_COLOR;
|
|
40
40
|
return normalizeColor(seed, format()) ?? FALLBACK_COLOR;
|
|
41
41
|
};
|
|
42
|
-
const [inputValue, setInputValue] =
|
|
43
|
-
const [lastValidValue, setLastValidValue] =
|
|
44
|
-
const [isInvalid, setIsInvalid] =
|
|
45
|
-
const [isFocused, setIsFocused] =
|
|
46
|
-
|
|
42
|
+
const [inputValue, setInputValue] = createSignal(initialValue());
|
|
43
|
+
const [lastValidValue, setLastValidValue] = createSignal(initialValue());
|
|
44
|
+
const [isInvalid, setIsInvalid] = createSignal(false);
|
|
45
|
+
const [isFocused, setIsFocused] = createSignal(false);
|
|
46
|
+
createEffect(()=>{
|
|
47
47
|
const nextValue = local.value;
|
|
48
48
|
const nextFormat = format();
|
|
49
49
|
if (isFocused()) return;
|
|
@@ -116,8 +116,8 @@ const ColorField = (props)=>{
|
|
|
116
116
|
};
|
|
117
117
|
return (()=>{
|
|
118
118
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
119
|
-
|
|
120
|
-
class:
|
|
119
|
+
spread(_el$, mergeProps(()=>({
|
|
120
|
+
class: twMerge(CLASSES.base, local.fullWidth && CLASSES.flag.fullWidth, isDisabled() && CLASSES.flag.disabled, local.class, local.className)
|
|
121
121
|
}), {
|
|
122
122
|
get ["data-theme"] () {
|
|
123
123
|
return local.dataTheme;
|
|
@@ -133,8 +133,8 @@ const ColorField = (props)=>{
|
|
|
133
133
|
return isDisabled() ? "true" : "false";
|
|
134
134
|
}
|
|
135
135
|
}), false, true);
|
|
136
|
-
|
|
137
|
-
class:
|
|
136
|
+
spread(_el$2, mergeProps(()=>({
|
|
137
|
+
class: twMerge(CLASSES.slot.group, isInvalid() && CLASSES.flag.groupInvalid, local.fullWidth && CLASSES.flag.groupFullWidth)
|
|
138
138
|
}), {
|
|
139
139
|
"data-slot": "color-field-group",
|
|
140
140
|
get ["data-disabled"] () {
|
|
@@ -144,7 +144,7 @@ const ColorField = (props)=>{
|
|
|
144
144
|
return isInvalid() ? "true" : "false";
|
|
145
145
|
}
|
|
146
146
|
}), false, true);
|
|
147
|
-
|
|
147
|
+
spread(_el$3, mergeProps(others, {
|
|
148
148
|
type: "text",
|
|
149
149
|
get value () {
|
|
150
150
|
return inputValue();
|
|
@@ -153,7 +153,7 @@ const ColorField = (props)=>{
|
|
|
153
153
|
return isDisabled();
|
|
154
154
|
}
|
|
155
155
|
}, ()=>({
|
|
156
|
-
class:
|
|
156
|
+
class: CLASSES.slot.input
|
|
157
157
|
}), {
|
|
158
158
|
"data-slot": "color-field-input",
|
|
159
159
|
spellcheck: false,
|
|
@@ -171,5 +171,5 @@ const ColorField = (props)=>{
|
|
|
171
171
|
return _el$;
|
|
172
172
|
})();
|
|
173
173
|
};
|
|
174
|
-
const
|
|
175
|
-
export {
|
|
174
|
+
const ColorField = ColorField_ColorField;
|
|
175
|
+
export { ColorField as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const color_field =
|
|
1
|
+
import external_ColorField_js_default from "./ColorField.js";
|
|
2
|
+
const color_field = external_ColorField_js_default;
|
|
3
3
|
export { color_field as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./ColorPicker.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createContext, createEffect, createMemo, createSignal, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import index_js_default from "../color-area/index.js";
|
|
6
|
+
import external_color_field_index_js_default from "../color-field/index.js";
|
|
7
|
+
import external_color_slider_index_js_default from "../color-slider/index.js";
|
|
8
|
+
import { formatColor, parseColor, rgbToHex } from "../color-wheel-flower/ColorUtils.js";
|
|
9
|
+
import { CLASSES } from "./ColorPicker.classes.js";
|
|
10
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
11
11
|
const DEFAULT_COLOR = "#3B82F6";
|
|
12
|
-
const ColorPickerContext =
|
|
12
|
+
const ColorPickerContext = createContext();
|
|
13
13
|
const clamp = (value, min, max)=>Math.min(max, Math.max(min, value));
|
|
14
14
|
const normalizeHue = (value)=>(value % 360 + 360) % 360;
|
|
15
15
|
const normalizeHsv = (value)=>({
|
|
@@ -85,9 +85,9 @@ const formatOutputColor = (value)=>{
|
|
|
85
85
|
};
|
|
86
86
|
const toColorState = (value)=>{
|
|
87
87
|
if (!value) return null;
|
|
88
|
-
const parsed =
|
|
88
|
+
const parsed = parseColor(value);
|
|
89
89
|
if (!parsed) return null;
|
|
90
|
-
const hex = normalizeHex(
|
|
90
|
+
const hex = normalizeHex(formatColor(parsed, "hex"));
|
|
91
91
|
const hsv = rgbToHsv(parsed.rgb.r, parsed.rgb.g, parsed.rgb.b);
|
|
92
92
|
const alpha = normalizeAlpha(parsed.rgb.a ?? 1);
|
|
93
93
|
return {
|
|
@@ -110,15 +110,15 @@ const fallbackState = ()=>{
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
const ColorPickerArea = (props)=>{
|
|
113
|
-
const ctx =
|
|
114
|
-
const [local, others] =
|
|
113
|
+
const ctx = useContext(ColorPickerContext);
|
|
114
|
+
const [local, others] = splitProps(props, [
|
|
115
115
|
"class",
|
|
116
116
|
"className",
|
|
117
117
|
"onChange",
|
|
118
118
|
"dataTheme"
|
|
119
119
|
]);
|
|
120
|
-
if (!ctx) return
|
|
121
|
-
class:
|
|
120
|
+
if (!ctx) return createComponent(index_js_default, mergeProps(others, ()=>({
|
|
121
|
+
class: twMerge(CLASSES.slot.area, local.class, local.className)
|
|
122
122
|
}), {
|
|
123
123
|
get dataTheme () {
|
|
124
124
|
return local.dataTheme;
|
|
@@ -131,7 +131,7 @@ const ColorPickerArea = (props)=>{
|
|
|
131
131
|
ctx.setFromArea(next);
|
|
132
132
|
local.onChange?.(next);
|
|
133
133
|
};
|
|
134
|
-
return
|
|
134
|
+
return createComponent(index_js_default, mergeProps(others, {
|
|
135
135
|
get value () {
|
|
136
136
|
return ctx.value().hsv;
|
|
137
137
|
},
|
|
@@ -139,7 +139,7 @@ const ColorPickerArea = (props)=>{
|
|
|
139
139
|
return ctx.isDisabled();
|
|
140
140
|
}
|
|
141
141
|
}, ()=>({
|
|
142
|
-
class:
|
|
142
|
+
class: twMerge(CLASSES.slot.area, local.class, local.className)
|
|
143
143
|
}), {
|
|
144
144
|
get dataTheme () {
|
|
145
145
|
return local.dataTheme;
|
|
@@ -148,8 +148,8 @@ const ColorPickerArea = (props)=>{
|
|
|
148
148
|
}));
|
|
149
149
|
};
|
|
150
150
|
const ColorPickerSlider = (props)=>{
|
|
151
|
-
const ctx =
|
|
152
|
-
const [local, others] =
|
|
151
|
+
const ctx = useContext(ColorPickerContext);
|
|
152
|
+
const [local, others] = splitProps(props, [
|
|
153
153
|
"class",
|
|
154
154
|
"className",
|
|
155
155
|
"onChange",
|
|
@@ -158,12 +158,12 @@ const ColorPickerSlider = (props)=>{
|
|
|
158
158
|
"dataTheme"
|
|
159
159
|
]);
|
|
160
160
|
const sliderType = ()=>local.type ?? "hue";
|
|
161
|
-
if (!ctx) return
|
|
161
|
+
if (!ctx) return createComponent(external_color_slider_index_js_default, mergeProps(others, {
|
|
162
162
|
get type () {
|
|
163
163
|
return sliderType();
|
|
164
164
|
}
|
|
165
165
|
}, ()=>({
|
|
166
|
-
class:
|
|
166
|
+
class: twMerge(CLASSES.slot.slider, local.class, local.className)
|
|
167
167
|
}), {
|
|
168
168
|
get dataTheme () {
|
|
169
169
|
return local.dataTheme;
|
|
@@ -191,7 +191,7 @@ const ColorPickerSlider = (props)=>{
|
|
|
191
191
|
...userStyle
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
|
-
return
|
|
194
|
+
return createComponent(external_color_slider_index_js_default, mergeProps(others, {
|
|
195
195
|
get type () {
|
|
196
196
|
return sliderType();
|
|
197
197
|
},
|
|
@@ -202,7 +202,7 @@ const ColorPickerSlider = (props)=>{
|
|
|
202
202
|
return ctx.isDisabled();
|
|
203
203
|
}
|
|
204
204
|
}, ()=>({
|
|
205
|
-
class:
|
|
205
|
+
class: twMerge(CLASSES.slot.slider, local.class, local.className)
|
|
206
206
|
}), {
|
|
207
207
|
get dataTheme () {
|
|
208
208
|
return local.dataTheme;
|
|
@@ -214,8 +214,8 @@ const ColorPickerSlider = (props)=>{
|
|
|
214
214
|
}));
|
|
215
215
|
};
|
|
216
216
|
const ColorPickerField = (props)=>{
|
|
217
|
-
const ctx =
|
|
218
|
-
const [local, others] =
|
|
217
|
+
const ctx = useContext(ColorPickerContext);
|
|
218
|
+
const [local, others] = splitProps(props, [
|
|
219
219
|
"class",
|
|
220
220
|
"className",
|
|
221
221
|
"onChange",
|
|
@@ -223,8 +223,8 @@ const ColorPickerField = (props)=>{
|
|
|
223
223
|
"format",
|
|
224
224
|
"dataTheme"
|
|
225
225
|
]);
|
|
226
|
-
if (!ctx) return
|
|
227
|
-
class:
|
|
226
|
+
if (!ctx) return createComponent(external_color_field_index_js_default, mergeProps(others, ()=>({
|
|
227
|
+
class: twMerge(CLASSES.slot.field, local.class, local.className)
|
|
228
228
|
}), {
|
|
229
229
|
get dataTheme () {
|
|
230
230
|
return local.dataTheme;
|
|
@@ -243,7 +243,7 @@ const ColorPickerField = (props)=>{
|
|
|
243
243
|
ctx.setFromField(next);
|
|
244
244
|
local.onChange?.(next);
|
|
245
245
|
};
|
|
246
|
-
return
|
|
246
|
+
return createComponent(external_color_field_index_js_default, mergeProps(others, {
|
|
247
247
|
get value () {
|
|
248
248
|
return ctx.value().hex;
|
|
249
249
|
},
|
|
@@ -251,7 +251,7 @@ const ColorPickerField = (props)=>{
|
|
|
251
251
|
return ctx.isDisabled();
|
|
252
252
|
}
|
|
253
253
|
}, ()=>({
|
|
254
|
-
class:
|
|
254
|
+
class: twMerge(CLASSES.slot.field, local.class, local.className)
|
|
255
255
|
}), {
|
|
256
256
|
get dataTheme () {
|
|
257
257
|
return local.dataTheme;
|
|
@@ -266,7 +266,7 @@ const ColorPickerField = (props)=>{
|
|
|
266
266
|
}));
|
|
267
267
|
};
|
|
268
268
|
const ColorPickerRoot = (props)=>{
|
|
269
|
-
const [local, others] =
|
|
269
|
+
const [local, others] = splitProps(props, [
|
|
270
270
|
"class",
|
|
271
271
|
"className",
|
|
272
272
|
"children",
|
|
@@ -276,14 +276,14 @@ const ColorPickerRoot = (props)=>{
|
|
|
276
276
|
"isDisabled",
|
|
277
277
|
"dataTheme"
|
|
278
278
|
]);
|
|
279
|
-
const [internalState, setInternalState] =
|
|
279
|
+
const [internalState, setInternalState] = createSignal(toColorState(local.value ?? local.defaultValue) ?? fallbackState());
|
|
280
280
|
const isControlled = ()=>void 0 !== local.value;
|
|
281
|
-
|
|
281
|
+
createEffect(()=>{
|
|
282
282
|
if (!isControlled()) return;
|
|
283
283
|
const next = toColorState(local.value);
|
|
284
284
|
if (next) setInternalState(next);
|
|
285
285
|
});
|
|
286
|
-
const currentState =
|
|
286
|
+
const currentState = createMemo(()=>{
|
|
287
287
|
if (!isControlled()) return internalState();
|
|
288
288
|
return toColorState(local.value) ?? internalState();
|
|
289
289
|
});
|
|
@@ -294,7 +294,7 @@ const ColorPickerRoot = (props)=>{
|
|
|
294
294
|
const setFromArea = (nextValue)=>{
|
|
295
295
|
const hsv = normalizeHsv(nextValue);
|
|
296
296
|
const rgb = hsvToRgb(hsv.h, hsv.s, hsv.v);
|
|
297
|
-
const hex = normalizeHex(
|
|
297
|
+
const hex = normalizeHex(rgbToHex(rgb.r, rgb.g, rgb.b));
|
|
298
298
|
emitChange({
|
|
299
299
|
hex,
|
|
300
300
|
hsv,
|
|
@@ -311,7 +311,7 @@ const ColorPickerRoot = (props)=>{
|
|
|
311
311
|
h: value
|
|
312
312
|
});
|
|
313
313
|
const rgb = hsvToRgb(hsv.h, hsv.s, hsv.v);
|
|
314
|
-
const hex = normalizeHex(
|
|
314
|
+
const hex = normalizeHex(rgbToHex(rgb.r, rgb.g, rgb.b));
|
|
315
315
|
emitChange({
|
|
316
316
|
hex,
|
|
317
317
|
hsv,
|
|
@@ -323,21 +323,21 @@ const ColorPickerRoot = (props)=>{
|
|
|
323
323
|
if (!next) return;
|
|
324
324
|
emitChange(next);
|
|
325
325
|
};
|
|
326
|
-
const context =
|
|
326
|
+
const context = createMemo(()=>({
|
|
327
327
|
value: currentState,
|
|
328
328
|
isDisabled: ()=>Boolean(local.isDisabled),
|
|
329
329
|
setFromArea,
|
|
330
330
|
setFromField,
|
|
331
331
|
setFromSlider
|
|
332
332
|
}));
|
|
333
|
-
return
|
|
333
|
+
return createComponent(ColorPickerContext.Provider, {
|
|
334
334
|
get value () {
|
|
335
335
|
return context();
|
|
336
336
|
},
|
|
337
337
|
get children () {
|
|
338
338
|
var _el$ = _tmpl$();
|
|
339
|
-
|
|
340
|
-
class:
|
|
339
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
340
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
341
341
|
}), {
|
|
342
342
|
get ["data-theme"] () {
|
|
343
343
|
return local.dataTheme;
|
|
@@ -347,12 +347,12 @@ const ColorPickerRoot = (props)=>{
|
|
|
347
347
|
return local.isDisabled ? "true" : "false";
|
|
348
348
|
}
|
|
349
349
|
}), false, true);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
insert(_el$, ()=>local.children ?? [
|
|
351
|
+
createComponent(ColorPickerArea, {}),
|
|
352
|
+
createComponent(ColorPickerSlider, {
|
|
353
353
|
type: "hue"
|
|
354
354
|
}),
|
|
355
|
-
|
|
355
|
+
createComponent(ColorPickerField, {})
|
|
356
356
|
]);
|
|
357
357
|
return _el$;
|
|
358
358
|
}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__ColorPickerArea = __WEBPACK_EXTERNAL_MODULE__ColorPicker_js_c381c0c3__.ColorPickerArea;
|
|
4
|
-
var __webpack_exports__ColorPickerField = __WEBPACK_EXTERNAL_MODULE__ColorPicker_js_c381c0c3__.ColorPickerField;
|
|
5
|
-
var __webpack_exports__ColorPickerRoot = __WEBPACK_EXTERNAL_MODULE__ColorPicker_js_c381c0c3__.ColorPickerRoot;
|
|
6
|
-
var __webpack_exports__ColorPickerSlider = __WEBPACK_EXTERNAL_MODULE__ColorPicker_js_c381c0c3__.ColorPickerSlider;
|
|
7
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__ColorPicker_js_c381c0c3__["default"];
|
|
8
|
-
export { __webpack_exports__ColorPicker as ColorPicker, __webpack_exports__ColorPickerArea as ColorPickerArea, __webpack_exports__ColorPickerField as ColorPickerField, __webpack_exports__ColorPickerRoot as ColorPickerRoot, __webpack_exports__ColorPickerSlider as ColorPickerSlider, __webpack_exports__default as default };
|
|
1
|
+
import external_ColorPicker_js_default, { ColorPicker, ColorPickerArea, ColorPickerField, ColorPickerRoot, ColorPickerSlider } from "./ColorPicker.js";
|
|
2
|
+
export { ColorPicker, ColorPickerArea, ColorPickerField, ColorPickerRoot, ColorPickerSlider, external_ColorPicker_js_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./ColorSlider.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createEffect, createMemo, createSignal, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./ColorSlider.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div><div></div><div>");
|
|
7
7
|
const clamp = (value, min, max)=>Math.min(max, Math.max(min, value));
|
|
8
8
|
const normalizeValue = (type, value)=>{
|
|
9
9
|
if ("alpha" === type) return clamp(value, 0, 1);
|
|
@@ -18,8 +18,8 @@ const fromPercent = (type, percent)=>{
|
|
|
18
18
|
if ("alpha" === type) return clamped / 100;
|
|
19
19
|
return clamped / 100 * 360;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
const [local, others] =
|
|
21
|
+
const ColorSlider_ColorSlider = (props)=>{
|
|
22
|
+
const [local, others] = splitProps(props, [
|
|
23
23
|
"class",
|
|
24
24
|
"className",
|
|
25
25
|
"value",
|
|
@@ -37,11 +37,11 @@ const ColorSlider = (props)=>{
|
|
|
37
37
|
const fallback = "alpha" === sliderType() ? 1 : 0;
|
|
38
38
|
return normalizeValue(sliderType(), local.value ?? local.defaultValue ?? fallback);
|
|
39
39
|
};
|
|
40
|
-
const [internalValue, setInternalValue] =
|
|
41
|
-
const [isDragging, setIsDragging] =
|
|
40
|
+
const [internalValue, setInternalValue] = createSignal(initialValue());
|
|
41
|
+
const [isDragging, setIsDragging] = createSignal(false);
|
|
42
42
|
let sliderRef;
|
|
43
43
|
const isControlled = ()=>void 0 !== local.value;
|
|
44
|
-
|
|
44
|
+
createEffect(()=>{
|
|
45
45
|
const nextType = sliderType();
|
|
46
46
|
const nextValue = local.value;
|
|
47
47
|
if (void 0 === nextValue) {
|
|
@@ -50,7 +50,7 @@ const ColorSlider = (props)=>{
|
|
|
50
50
|
}
|
|
51
51
|
setInternalValue(normalizeValue(nextType, nextValue));
|
|
52
52
|
});
|
|
53
|
-
const currentValue =
|
|
53
|
+
const currentValue = createMemo(()=>{
|
|
54
54
|
if (isControlled()) return normalizeValue(sliderType(), local.value ?? internalValue());
|
|
55
55
|
return normalizeValue(sliderType(), internalValue());
|
|
56
56
|
});
|
|
@@ -116,9 +116,9 @@ const ColorSlider = (props)=>{
|
|
|
116
116
|
return (()=>{
|
|
117
117
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
118
118
|
var _ref$ = sliderRef;
|
|
119
|
-
"function" == typeof _ref$ ?
|
|
120
|
-
|
|
121
|
-
class:
|
|
119
|
+
"function" == typeof _ref$ ? use(_ref$, _el$) : sliderRef = _el$;
|
|
120
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
121
|
+
class: twMerge(CLASSES.base, "alpha" === sliderType() && CLASSES.flag.alpha, isDragging() && CLASSES.flag.dragging, local.class, local.className)
|
|
122
122
|
}), {
|
|
123
123
|
get ["data-theme"] () {
|
|
124
124
|
return local.dataTheme;
|
|
@@ -144,7 +144,7 @@ const ColorSlider = (props)=>{
|
|
|
144
144
|
return "alpha" === sliderType() ? 1 : 360;
|
|
145
145
|
},
|
|
146
146
|
get ["aria-valuenow"] () {
|
|
147
|
-
return
|
|
147
|
+
return memo(()=>"alpha" === sliderType())() ? Number(currentValue().toFixed(2)) : Math.round(currentValue());
|
|
148
148
|
},
|
|
149
149
|
get ["aria-valuetext"] () {
|
|
150
150
|
return valueText();
|
|
@@ -161,13 +161,13 @@ const ColorSlider = (props)=>{
|
|
|
161
161
|
onLostPointerCapture: handleLostPointerCapture,
|
|
162
162
|
onKeyDown: handleKeyDown
|
|
163
163
|
}), false, true);
|
|
164
|
-
|
|
165
|
-
class:
|
|
164
|
+
spread(_el$2, mergeProps(()=>({
|
|
165
|
+
class: CLASSES.slot.track
|
|
166
166
|
}), {
|
|
167
167
|
"data-slot": "color-slider-track"
|
|
168
168
|
}), false, false);
|
|
169
|
-
|
|
170
|
-
class:
|
|
169
|
+
spread(_el$3, mergeProps(()=>({
|
|
170
|
+
class: CLASSES.slot.thumb
|
|
171
171
|
}), {
|
|
172
172
|
"data-slot": "color-slider-thumb",
|
|
173
173
|
get ["data-dragging"] () {
|
|
@@ -183,5 +183,5 @@ const ColorSlider = (props)=>{
|
|
|
183
183
|
return _el$;
|
|
184
184
|
})();
|
|
185
185
|
};
|
|
186
|
-
const
|
|
187
|
-
export {
|
|
186
|
+
const ColorSlider = ColorSlider_ColorSlider;
|
|
187
|
+
export { ColorSlider as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const color_slider =
|
|
1
|
+
import external_ColorSlider_js_default from "./ColorSlider.js";
|
|
2
|
+
const color_slider = external_ColorSlider_js_default;
|
|
3
3
|
export { color_slider as default };
|