@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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./Select.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const SelectContext =
|
|
3
|
+
import { createContext, createEffect, createMemo, createSignal, createUniqueId, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Select.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<button>"), _tmpl$3 = /*#__PURE__*/ template("<span>"), _tmpl$4 = /*#__PURE__*/ template("<span><span>"), _tmpl$5 = /*#__PURE__*/ template("<button><span>");
|
|
7
|
+
const SelectContext = createContext();
|
|
8
8
|
const invokeEventHandler = (handler, event)=>{
|
|
9
9
|
if ("function" == typeof handler) return void handler(event);
|
|
10
10
|
if (Array.isArray(handler) && "function" == typeof handler[0]) handler[0](handler[1], event);
|
|
@@ -33,7 +33,7 @@ const sortOptionsByDomOrder = (options)=>[
|
|
|
33
33
|
return 0;
|
|
34
34
|
});
|
|
35
35
|
const SelectRoot = (props)=>{
|
|
36
|
-
const [local, others] =
|
|
36
|
+
const [local, others] = splitProps(props, [
|
|
37
37
|
"children",
|
|
38
38
|
"class",
|
|
39
39
|
"className",
|
|
@@ -55,7 +55,7 @@ const SelectRoot = (props)=>{
|
|
|
55
55
|
"onOpenChange",
|
|
56
56
|
"ref"
|
|
57
57
|
]);
|
|
58
|
-
const baseId =
|
|
58
|
+
const baseId = createUniqueId();
|
|
59
59
|
const triggerId = `${baseId}-trigger`;
|
|
60
60
|
const listboxId = `${baseId}-listbox`;
|
|
61
61
|
const selectionMode = ()=>local.selectionMode ?? "single";
|
|
@@ -63,21 +63,21 @@ const SelectRoot = (props)=>{
|
|
|
63
63
|
const fullWidth = ()=>Boolean(local.fullWidth);
|
|
64
64
|
const disabled = ()=>Boolean(local.isDisabled) || Boolean(local.disabled);
|
|
65
65
|
const initialSelected = normalizeSelection(selectionMode(), local.defaultSelectedKeys ?? local.defaultValue);
|
|
66
|
-
const [internalSelectedKeys, setInternalSelectedKeys] =
|
|
67
|
-
const [internalOpen, setInternalOpen] =
|
|
68
|
-
const [options, setOptions] =
|
|
69
|
-
const [focusedKey, setFocusedKey] =
|
|
70
|
-
const [focusRequest, setFocusRequest] =
|
|
71
|
-
const [triggerRef, setTriggerRefSignal] =
|
|
72
|
-
const [rootRef, setRootRefSignal] =
|
|
66
|
+
const [internalSelectedKeys, setInternalSelectedKeys] = createSignal(initialSelected);
|
|
67
|
+
const [internalOpen, setInternalOpen] = createSignal(Boolean(local.defaultOpen));
|
|
68
|
+
const [options, setOptions] = createSignal([]);
|
|
69
|
+
const [focusedKey, setFocusedKey] = createSignal();
|
|
70
|
+
const [focusRequest, setFocusRequest] = createSignal(null);
|
|
71
|
+
const [triggerRef, setTriggerRefSignal] = createSignal();
|
|
72
|
+
const [rootRef, setRootRefSignal] = createSignal();
|
|
73
73
|
const open = ()=>void 0 !== local.isOpen ? Boolean(local.isOpen) : internalOpen();
|
|
74
|
-
const selectedKeys =
|
|
74
|
+
const selectedKeys = createMemo(()=>{
|
|
75
75
|
const controlledValue = void 0 !== local.selectedKeys ? local.selectedKeys : local.value;
|
|
76
76
|
if (void 0 !== controlledValue) return normalizeSelection(selectionMode(), controlledValue);
|
|
77
77
|
return normalizeSelection(selectionMode(), internalSelectedKeys());
|
|
78
78
|
});
|
|
79
|
-
const selectedSet =
|
|
80
|
-
const selectedText =
|
|
79
|
+
const selectedSet = createMemo(()=>new Set(selectedKeys()));
|
|
80
|
+
const selectedText = createMemo(()=>{
|
|
81
81
|
if (!selectedKeys().length) return "";
|
|
82
82
|
const optionMap = new Map(options().map((option)=>[
|
|
83
83
|
option.key,
|
|
@@ -166,14 +166,14 @@ const SelectRoot = (props)=>{
|
|
|
166
166
|
setRootRefSignal(el);
|
|
167
167
|
if ("function" == typeof local.ref) local.ref(el);
|
|
168
168
|
};
|
|
169
|
-
|
|
169
|
+
createEffect(()=>{
|
|
170
170
|
if (!open()) return;
|
|
171
171
|
const request = focusRequest();
|
|
172
172
|
if (!request) return;
|
|
173
173
|
focusBoundary(request);
|
|
174
174
|
setFocusRequest(null);
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
createEffect(()=>{
|
|
177
177
|
const currentFocused = focusedKey();
|
|
178
178
|
const currentOptions = options();
|
|
179
179
|
if (currentFocused && !currentOptions.some((option)=>option.key === currentFocused)) return void setFocusedKey(void 0);
|
|
@@ -182,7 +182,7 @@ const SelectRoot = (props)=>{
|
|
|
182
182
|
setFocusedKey(selected?.key ?? currentOptions.find((option)=>!option.disabled)?.key);
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
|
-
|
|
185
|
+
onMount(()=>{
|
|
186
186
|
const handlePointerDown = (event)=>{
|
|
187
187
|
if (!open()) return;
|
|
188
188
|
const root = rootRef();
|
|
@@ -191,11 +191,11 @@ const SelectRoot = (props)=>{
|
|
|
191
191
|
setOpen(false);
|
|
192
192
|
};
|
|
193
193
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
194
|
-
|
|
194
|
+
onCleanup(()=>{
|
|
195
195
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
196
196
|
});
|
|
197
197
|
});
|
|
198
|
-
return
|
|
198
|
+
return createComponent(SelectContext.Provider, {
|
|
199
199
|
value: {
|
|
200
200
|
open,
|
|
201
201
|
variant,
|
|
@@ -223,9 +223,9 @@ const SelectRoot = (props)=>{
|
|
|
223
223
|
},
|
|
224
224
|
get children () {
|
|
225
225
|
var _el$ = _tmpl$();
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
class:
|
|
226
|
+
use(setRootRef, _el$);
|
|
227
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
228
|
+
class: twMerge(CLASSES.base, CLASSES.variant[variant()], fullWidth() && CLASSES.flag.fullWidth, local.class, local.className)
|
|
229
229
|
}), {
|
|
230
230
|
get ["data-theme"] () {
|
|
231
231
|
return local.dataTheme;
|
|
@@ -241,14 +241,14 @@ const SelectRoot = (props)=>{
|
|
|
241
241
|
return selectionMode();
|
|
242
242
|
}
|
|
243
243
|
}), false, true);
|
|
244
|
-
|
|
244
|
+
insert(_el$, ()=>local.children);
|
|
245
245
|
return _el$;
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
248
|
};
|
|
249
249
|
const SelectTrigger = (props)=>{
|
|
250
|
-
const ctx =
|
|
251
|
-
const [local, others] =
|
|
250
|
+
const ctx = useContext(SelectContext);
|
|
251
|
+
const [local, others] = splitProps(props, [
|
|
252
252
|
"children",
|
|
253
253
|
"class",
|
|
254
254
|
"className",
|
|
@@ -263,8 +263,8 @@ const SelectTrigger = (props)=>{
|
|
|
263
263
|
]);
|
|
264
264
|
if (!ctx) return (()=>{
|
|
265
265
|
var _el$2 = _tmpl$2();
|
|
266
|
-
|
|
267
|
-
class:
|
|
266
|
+
spread(_el$2, mergeProps(others, ()=>({
|
|
267
|
+
class: twMerge(CLASSES.slot.trigger, local.class, local.className)
|
|
268
268
|
}), {
|
|
269
269
|
get ["data-theme"] () {
|
|
270
270
|
return local.dataTheme;
|
|
@@ -273,30 +273,30 @@ const SelectTrigger = (props)=>{
|
|
|
273
273
|
return local.type ?? "button";
|
|
274
274
|
}
|
|
275
275
|
}), false, true);
|
|
276
|
-
|
|
277
|
-
var _c$ =
|
|
276
|
+
insert(_el$2, (()=>{
|
|
277
|
+
var _c$ = memo(()=>!!local.startIcon);
|
|
278
278
|
return ()=>_c$() ? (()=>{
|
|
279
279
|
var _el$3 = _tmpl$3();
|
|
280
|
-
|
|
281
|
-
class:
|
|
280
|
+
spread(_el$3, mergeProps(()=>({
|
|
281
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
282
282
|
}), {
|
|
283
283
|
"data-slot": "ui-select-trigger-start-icon"
|
|
284
284
|
}), false, true);
|
|
285
|
-
|
|
285
|
+
insert(_el$3, ()=>local.startIcon);
|
|
286
286
|
return _el$3;
|
|
287
287
|
})() : null;
|
|
288
288
|
})(), null);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
var _c$2 =
|
|
289
|
+
insert(_el$2, ()=>local.children, null);
|
|
290
|
+
insert(_el$2, (()=>{
|
|
291
|
+
var _c$2 = memo(()=>!!local.endIcon);
|
|
292
292
|
return ()=>_c$2() ? (()=>{
|
|
293
293
|
var _el$4 = _tmpl$3();
|
|
294
|
-
|
|
295
|
-
class:
|
|
294
|
+
spread(_el$4, mergeProps(()=>({
|
|
295
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
296
296
|
}), {
|
|
297
297
|
"data-slot": "ui-select-trigger-end-icon"
|
|
298
298
|
}), false, true);
|
|
299
|
-
|
|
299
|
+
insert(_el$4, ()=>local.endIcon);
|
|
300
300
|
return _el$4;
|
|
301
301
|
})() : null;
|
|
302
302
|
})(), null);
|
|
@@ -345,8 +345,8 @@ const SelectTrigger = (props)=>{
|
|
|
345
345
|
};
|
|
346
346
|
return (()=>{
|
|
347
347
|
var _el$5 = _tmpl$2();
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
use(setRef, _el$5);
|
|
349
|
+
spread(_el$5, mergeProps(others, {
|
|
350
350
|
get id () {
|
|
351
351
|
return ctx.triggerId;
|
|
352
352
|
},
|
|
@@ -354,7 +354,7 @@ const SelectTrigger = (props)=>{
|
|
|
354
354
|
return local.type ?? "button";
|
|
355
355
|
}
|
|
356
356
|
}, ()=>({
|
|
357
|
-
class:
|
|
357
|
+
class: twMerge(CLASSES.slot.trigger, ctx.fullWidth() && CLASSES.slot.triggerFullWidth, local.class, local.className)
|
|
358
358
|
}), {
|
|
359
359
|
get ["data-theme"] () {
|
|
360
360
|
return local.dataTheme;
|
|
@@ -379,30 +379,30 @@ const SelectTrigger = (props)=>{
|
|
|
379
379
|
onClick: handleClick,
|
|
380
380
|
onKeyDown: handleKeyDown
|
|
381
381
|
}), false, true);
|
|
382
|
-
|
|
383
|
-
var _c$3 =
|
|
382
|
+
insert(_el$5, (()=>{
|
|
383
|
+
var _c$3 = memo(()=>!!local.startIcon);
|
|
384
384
|
return ()=>_c$3() ? (()=>{
|
|
385
385
|
var _el$6 = _tmpl$3();
|
|
386
|
-
|
|
387
|
-
class:
|
|
386
|
+
spread(_el$6, mergeProps(()=>({
|
|
387
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
388
388
|
}), {
|
|
389
389
|
"data-slot": "ui-select-trigger-start-icon"
|
|
390
390
|
}), false, true);
|
|
391
|
-
|
|
391
|
+
insert(_el$6, ()=>local.startIcon);
|
|
392
392
|
return _el$6;
|
|
393
393
|
})() : null;
|
|
394
394
|
})(), null);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
var _c$4 =
|
|
395
|
+
insert(_el$5, ()=>local.children, null);
|
|
396
|
+
insert(_el$5, (()=>{
|
|
397
|
+
var _c$4 = memo(()=>!!local.endIcon);
|
|
398
398
|
return ()=>_c$4() ? (()=>{
|
|
399
399
|
var _el$7 = _tmpl$3();
|
|
400
|
-
|
|
401
|
-
class:
|
|
400
|
+
spread(_el$7, mergeProps(()=>({
|
|
401
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
402
402
|
}), {
|
|
403
403
|
"data-slot": "ui-select-trigger-end-icon"
|
|
404
404
|
}), false, true);
|
|
405
|
-
|
|
405
|
+
insert(_el$7, ()=>local.endIcon);
|
|
406
406
|
return _el$7;
|
|
407
407
|
})() : null;
|
|
408
408
|
})(), null);
|
|
@@ -410,8 +410,8 @@ const SelectTrigger = (props)=>{
|
|
|
410
410
|
})();
|
|
411
411
|
};
|
|
412
412
|
const SelectValue = (props)=>{
|
|
413
|
-
const ctx =
|
|
414
|
-
const [local, others] =
|
|
413
|
+
const ctx = useContext(SelectContext);
|
|
414
|
+
const [local, others] = splitProps(props, [
|
|
415
415
|
"children",
|
|
416
416
|
"class",
|
|
417
417
|
"className",
|
|
@@ -422,8 +422,8 @@ const SelectValue = (props)=>{
|
|
|
422
422
|
const isPlaceholder = ()=>0 === text().length;
|
|
423
423
|
return (()=>{
|
|
424
424
|
var _el$8 = _tmpl$3();
|
|
425
|
-
|
|
426
|
-
class:
|
|
425
|
+
spread(_el$8, mergeProps(others, ()=>({
|
|
426
|
+
class: twMerge(CLASSES.slot.value, local.class, local.className)
|
|
427
427
|
}), {
|
|
428
428
|
get ["data-theme"] () {
|
|
429
429
|
return local.dataTheme;
|
|
@@ -433,13 +433,13 @@ const SelectValue = (props)=>{
|
|
|
433
433
|
return isPlaceholder() ? "true" : "false";
|
|
434
434
|
}
|
|
435
435
|
}), false, true);
|
|
436
|
-
|
|
436
|
+
insert(_el$8, ()=>local.children ?? (isPlaceholder() ? placeholder() : text()));
|
|
437
437
|
return _el$8;
|
|
438
438
|
})();
|
|
439
439
|
};
|
|
440
440
|
const SelectIndicator = (props)=>{
|
|
441
|
-
const ctx =
|
|
442
|
-
const [local, others] =
|
|
441
|
+
const ctx = useContext(SelectContext);
|
|
442
|
+
const [local, others] = splitProps(props, [
|
|
443
443
|
"children",
|
|
444
444
|
"class",
|
|
445
445
|
"className",
|
|
@@ -449,8 +449,8 @@ const SelectIndicator = (props)=>{
|
|
|
449
449
|
]);
|
|
450
450
|
return (()=>{
|
|
451
451
|
var _el$9 = _tmpl$3();
|
|
452
|
-
|
|
453
|
-
class:
|
|
452
|
+
spread(_el$9, mergeProps(others, ()=>({
|
|
453
|
+
class: twMerge(CLASSES.slot.indicator, local.class, local.className)
|
|
454
454
|
}), {
|
|
455
455
|
get ["data-theme"] () {
|
|
456
456
|
return local.dataTheme;
|
|
@@ -461,30 +461,30 @@ const SelectIndicator = (props)=>{
|
|
|
461
461
|
},
|
|
462
462
|
"aria-hidden": "true"
|
|
463
463
|
}), false, true);
|
|
464
|
-
|
|
465
|
-
var _c$5 =
|
|
464
|
+
insert(_el$9, (()=>{
|
|
465
|
+
var _c$5 = memo(()=>!!local.startIcon);
|
|
466
466
|
return ()=>_c$5() ? (()=>{
|
|
467
467
|
var _el$0 = _tmpl$3();
|
|
468
|
-
|
|
469
|
-
class:
|
|
468
|
+
spread(_el$0, mergeProps(()=>({
|
|
469
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
470
470
|
}), {
|
|
471
471
|
"data-slot": "ui-select-indicator-start-icon"
|
|
472
472
|
}), false, true);
|
|
473
|
-
|
|
473
|
+
insert(_el$0, ()=>local.startIcon);
|
|
474
474
|
return _el$0;
|
|
475
475
|
})() : null;
|
|
476
476
|
})(), null);
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
var _c$6 =
|
|
477
|
+
insert(_el$9, ()=>local.children, null);
|
|
478
|
+
insert(_el$9, (()=>{
|
|
479
|
+
var _c$6 = memo(()=>!!local.endIcon);
|
|
480
480
|
return ()=>_c$6() ? (()=>{
|
|
481
481
|
var _el$1 = _tmpl$3();
|
|
482
|
-
|
|
483
|
-
class:
|
|
482
|
+
spread(_el$1, mergeProps(()=>({
|
|
483
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
484
484
|
}), {
|
|
485
485
|
"data-slot": "ui-select-indicator-end-icon"
|
|
486
486
|
}), false, true);
|
|
487
|
-
|
|
487
|
+
insert(_el$1, ()=>local.endIcon);
|
|
488
488
|
return _el$1;
|
|
489
489
|
})() : null;
|
|
490
490
|
})(), null);
|
|
@@ -492,8 +492,8 @@ const SelectIndicator = (props)=>{
|
|
|
492
492
|
})();
|
|
493
493
|
};
|
|
494
494
|
const SelectPopover = (props)=>{
|
|
495
|
-
const ctx =
|
|
496
|
-
const [local, others] =
|
|
495
|
+
const ctx = useContext(SelectContext);
|
|
496
|
+
const [local, others] = splitProps(props, [
|
|
497
497
|
"children",
|
|
498
498
|
"class",
|
|
499
499
|
"className",
|
|
@@ -501,8 +501,8 @@ const SelectPopover = (props)=>{
|
|
|
501
501
|
]);
|
|
502
502
|
return (()=>{
|
|
503
503
|
var _el$10 = _tmpl$();
|
|
504
|
-
|
|
505
|
-
class:
|
|
504
|
+
spread(_el$10, mergeProps(others, ()=>({
|
|
505
|
+
class: twMerge(CLASSES.slot.popover, local.class, local.className)
|
|
506
506
|
}), {
|
|
507
507
|
get ["data-theme"] () {
|
|
508
508
|
return local.dataTheme;
|
|
@@ -512,13 +512,13 @@ const SelectPopover = (props)=>{
|
|
|
512
512
|
return ctx?.open() ? "true" : "false";
|
|
513
513
|
}
|
|
514
514
|
}), false, true);
|
|
515
|
-
|
|
515
|
+
insert(_el$10, ()=>local.children);
|
|
516
516
|
return _el$10;
|
|
517
517
|
})();
|
|
518
518
|
};
|
|
519
519
|
const SelectListbox = (props)=>{
|
|
520
|
-
const ctx =
|
|
521
|
-
const [local, others] =
|
|
520
|
+
const ctx = useContext(SelectContext);
|
|
521
|
+
const [local, others] = splitProps(props, [
|
|
522
522
|
"children",
|
|
523
523
|
"class",
|
|
524
524
|
"className",
|
|
@@ -526,12 +526,12 @@ const SelectListbox = (props)=>{
|
|
|
526
526
|
]);
|
|
527
527
|
return (()=>{
|
|
528
528
|
var _el$11 = _tmpl$();
|
|
529
|
-
|
|
529
|
+
spread(_el$11, mergeProps(others, {
|
|
530
530
|
get id () {
|
|
531
531
|
return ctx?.listboxId;
|
|
532
532
|
}
|
|
533
533
|
}, ()=>({
|
|
534
|
-
class:
|
|
534
|
+
class: twMerge(CLASSES.slot.listbox, local.class, local.className)
|
|
535
535
|
}), {
|
|
536
536
|
get ["data-theme"] () {
|
|
537
537
|
return local.dataTheme;
|
|
@@ -543,13 +543,13 @@ const SelectListbox = (props)=>{
|
|
|
543
543
|
},
|
|
544
544
|
tabindex: -1
|
|
545
545
|
}), false, true);
|
|
546
|
-
|
|
546
|
+
insert(_el$11, ()=>local.children);
|
|
547
547
|
return _el$11;
|
|
548
548
|
})();
|
|
549
549
|
};
|
|
550
550
|
const SelectOption = (props)=>{
|
|
551
|
-
const ctx =
|
|
552
|
-
const [local, others] =
|
|
551
|
+
const ctx = useContext(SelectContext);
|
|
552
|
+
const [local, others] = splitProps(props, [
|
|
553
553
|
"children",
|
|
554
554
|
"class",
|
|
555
555
|
"className",
|
|
@@ -568,8 +568,8 @@ const SelectOption = (props)=>{
|
|
|
568
568
|
]);
|
|
569
569
|
if (!ctx) return (()=>{
|
|
570
570
|
var _el$12 = _tmpl$2();
|
|
571
|
-
|
|
572
|
-
class:
|
|
571
|
+
spread(_el$12, mergeProps(others, ()=>({
|
|
572
|
+
class: twMerge(CLASSES.slot.option, local.class, local.className)
|
|
573
573
|
}), {
|
|
574
574
|
get ["data-theme"] () {
|
|
575
575
|
return local.dataTheme;
|
|
@@ -578,36 +578,36 @@ const SelectOption = (props)=>{
|
|
|
578
578
|
return local.type ?? "button";
|
|
579
579
|
}
|
|
580
580
|
}), false, true);
|
|
581
|
-
|
|
582
|
-
var _c$7 =
|
|
581
|
+
insert(_el$12, (()=>{
|
|
582
|
+
var _c$7 = memo(()=>!!local.startIcon);
|
|
583
583
|
return ()=>_c$7() ? (()=>{
|
|
584
584
|
var _el$13 = _tmpl$3();
|
|
585
|
-
|
|
586
|
-
class:
|
|
585
|
+
spread(_el$13, mergeProps(()=>({
|
|
586
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
587
587
|
}), {
|
|
588
588
|
"data-slot": "ui-select-option-start-icon"
|
|
589
589
|
}), false, true);
|
|
590
|
-
|
|
590
|
+
insert(_el$13, ()=>local.startIcon);
|
|
591
591
|
return _el$13;
|
|
592
592
|
})() : null;
|
|
593
593
|
})(), null);
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
var _c$8 =
|
|
594
|
+
insert(_el$12, ()=>local.children, null);
|
|
595
|
+
insert(_el$12, (()=>{
|
|
596
|
+
var _c$8 = memo(()=>!!local.endIcon);
|
|
597
597
|
return ()=>_c$8() ? (()=>{
|
|
598
598
|
var _el$14 = _tmpl$4(), _el$15 = _el$14.firstChild;
|
|
599
|
-
|
|
600
|
-
class:
|
|
599
|
+
spread(_el$14, mergeProps(()=>({
|
|
600
|
+
class: CLASSES.slot.optionIndicator
|
|
601
601
|
}), {
|
|
602
602
|
"data-slot": "ui-select-option-indicator",
|
|
603
603
|
"aria-hidden": "true"
|
|
604
604
|
}), false, true);
|
|
605
|
-
|
|
606
|
-
class:
|
|
605
|
+
spread(_el$15, mergeProps(()=>({
|
|
606
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
607
607
|
}), {
|
|
608
608
|
"data-slot": "ui-select-option-end-icon"
|
|
609
609
|
}), false, true);
|
|
610
|
-
|
|
610
|
+
insert(_el$15, ()=>local.endIcon);
|
|
611
611
|
return _el$14;
|
|
612
612
|
})() : null;
|
|
613
613
|
})(), null);
|
|
@@ -628,7 +628,7 @@ const SelectOption = (props)=>{
|
|
|
628
628
|
});
|
|
629
629
|
if ("function" == typeof local.ref) local.ref(el);
|
|
630
630
|
};
|
|
631
|
-
|
|
631
|
+
createEffect(()=>{
|
|
632
632
|
if (!optionRef) return;
|
|
633
633
|
ctx.registerOption({
|
|
634
634
|
key: key(),
|
|
@@ -637,7 +637,7 @@ const SelectOption = (props)=>{
|
|
|
637
637
|
ref: optionRef
|
|
638
638
|
});
|
|
639
639
|
});
|
|
640
|
-
|
|
640
|
+
onCleanup(()=>{
|
|
641
641
|
ctx.unregisterOption(key());
|
|
642
642
|
});
|
|
643
643
|
const handleClick = (event)=>{
|
|
@@ -692,13 +692,13 @@ const SelectOption = (props)=>{
|
|
|
692
692
|
};
|
|
693
693
|
return (()=>{
|
|
694
694
|
var _el$16 = _tmpl$5(), _el$17 = _el$16.firstChild;
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
use(setRef, _el$16);
|
|
696
|
+
spread(_el$16, mergeProps(others, {
|
|
697
697
|
get type () {
|
|
698
698
|
return local.type ?? "button";
|
|
699
699
|
}
|
|
700
700
|
}, ()=>({
|
|
701
|
-
class:
|
|
701
|
+
class: twMerge(CLASSES.slot.option, local.class, local.className)
|
|
702
702
|
}), {
|
|
703
703
|
get ["data-theme"] () {
|
|
704
704
|
return local.dataTheme;
|
|
@@ -729,41 +729,41 @@ const SelectOption = (props)=>{
|
|
|
729
729
|
onFocus: ()=>ctx.setFocusedKey(key()),
|
|
730
730
|
onKeyDown: handleKeyDown
|
|
731
731
|
}), false, true);
|
|
732
|
-
|
|
733
|
-
var _c$9 =
|
|
732
|
+
insert(_el$16, (()=>{
|
|
733
|
+
var _c$9 = memo(()=>!!local.startIcon);
|
|
734
734
|
return ()=>_c$9() ? (()=>{
|
|
735
735
|
var _el$18 = _tmpl$3();
|
|
736
|
-
|
|
737
|
-
class:
|
|
736
|
+
spread(_el$18, mergeProps(()=>({
|
|
737
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
738
738
|
}), {
|
|
739
739
|
"data-slot": "ui-select-option-start-icon"
|
|
740
740
|
}), false, true);
|
|
741
|
-
|
|
741
|
+
insert(_el$18, ()=>local.startIcon);
|
|
742
742
|
return _el$18;
|
|
743
743
|
})() : null;
|
|
744
744
|
})(), _el$17);
|
|
745
|
-
|
|
746
|
-
class:
|
|
745
|
+
spread(_el$17, mergeProps(()=>({
|
|
746
|
+
class: CLASSES.slot.optionLabel
|
|
747
747
|
}), {
|
|
748
748
|
"data-slot": "ui-select-option-label"
|
|
749
749
|
}), false, true);
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
var _c$0 =
|
|
750
|
+
insert(_el$17, ()=>local.children);
|
|
751
|
+
insert(_el$16, (()=>{
|
|
752
|
+
var _c$0 = memo(()=>!!local.endIcon);
|
|
753
753
|
return ()=>_c$0() ? (()=>{
|
|
754
754
|
var _el$19 = _tmpl$4(), _el$20 = _el$19.firstChild;
|
|
755
|
-
|
|
756
|
-
class:
|
|
755
|
+
spread(_el$19, mergeProps(()=>({
|
|
756
|
+
class: CLASSES.slot.optionIndicator
|
|
757
757
|
}), {
|
|
758
758
|
"data-slot": "ui-select-option-indicator",
|
|
759
759
|
"aria-hidden": "true"
|
|
760
760
|
}), false, true);
|
|
761
|
-
|
|
762
|
-
class:
|
|
761
|
+
spread(_el$20, mergeProps(()=>({
|
|
762
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
763
763
|
}), {
|
|
764
764
|
"data-slot": "ui-select-option-end-icon"
|
|
765
765
|
}), false, true);
|
|
766
|
-
|
|
766
|
+
insert(_el$20, ()=>local.endIcon);
|
|
767
767
|
return _el$19;
|
|
768
768
|
})() : null;
|
|
769
769
|
})(), null);
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_Select_js_default from "./Select.js";
|
|
2
|
+
export { external_Select_js_default as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Separator.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 "./Separator.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
7
|
+
const Separator = (props)=>{
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"class",
|
|
10
10
|
"className",
|
|
11
11
|
"dataTheme",
|
|
@@ -18,7 +18,7 @@ const Separator_Separator = (props)=>{
|
|
|
18
18
|
const variant = ()=>local.variant ?? "default";
|
|
19
19
|
return (()=>{
|
|
20
20
|
var _el$ = _tmpl$();
|
|
21
|
-
|
|
21
|
+
spread(_el$, mergeProps(others, {
|
|
22
22
|
get role () {
|
|
23
23
|
return local.role ?? "separator";
|
|
24
24
|
},
|
|
@@ -33,7 +33,7 @@ const Separator_Separator = (props)=>{
|
|
|
33
33
|
return variant();
|
|
34
34
|
},
|
|
35
35
|
get ["class"] () {
|
|
36
|
-
return
|
|
36
|
+
return twMerge(CLASSES.base, CLASSES.orientation[orientation()], CLASSES.variant[variant()], local.class, local.className);
|
|
37
37
|
},
|
|
38
38
|
get ["data-theme"] () {
|
|
39
39
|
return local.dataTheme;
|
|
@@ -45,5 +45,5 @@ const Separator_Separator = (props)=>{
|
|
|
45
45
|
return _el$;
|
|
46
46
|
})();
|
|
47
47
|
};
|
|
48
|
-
const
|
|
49
|
-
export {
|
|
48
|
+
const separator_Separator = Separator;
|
|
49
|
+
export { Separator, separator_Separator as default };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Separator_js_c4a9d2eb__["default"];
|
|
4
|
-
export { __webpack_exports__Separator as Separator, __webpack_exports__default as default };
|
|
1
|
+
import external_Separator_js_default, { Separator } from "./Separator.js";
|
|
2
|
+
export { Separator, external_Separator_js_default as default };
|