@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, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./Dropdown.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const DropdownContext =
|
|
3
|
+
import { createContext, createEffect, createSignal, createUniqueId, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Dropdown.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<button>"), _tmpl$3 = /*#__PURE__*/ template("<div><div>");
|
|
7
|
+
const DropdownContext = 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);
|
|
@@ -19,7 +19,7 @@ const sortItemsByDomOrder = (items)=>[
|
|
|
19
19
|
return 0;
|
|
20
20
|
});
|
|
21
21
|
const DropdownRoot = (props)=>{
|
|
22
|
-
const [local, others] =
|
|
22
|
+
const [local, others] = splitProps(props, [
|
|
23
23
|
"children",
|
|
24
24
|
"class",
|
|
25
25
|
"open",
|
|
@@ -30,15 +30,15 @@ const DropdownRoot = (props)=>{
|
|
|
30
30
|
"className",
|
|
31
31
|
"ref"
|
|
32
32
|
]);
|
|
33
|
-
const baseId =
|
|
33
|
+
const baseId = createUniqueId();
|
|
34
34
|
const triggerId = `${baseId}-trigger`;
|
|
35
35
|
const menuId = `${baseId}-menu`;
|
|
36
|
-
const [internalOpen, setInternalOpen] =
|
|
37
|
-
const [items, setItems] =
|
|
38
|
-
const [focusedKey, setFocusedKey] =
|
|
39
|
-
const [focusRequest, setFocusRequest] =
|
|
40
|
-
const [triggerRef, setTriggerRefSignal] =
|
|
41
|
-
const [rootRef, setRootRefSignal] =
|
|
36
|
+
const [internalOpen, setInternalOpen] = createSignal(Boolean(local.defaultOpen));
|
|
37
|
+
const [items, setItems] = createSignal([]);
|
|
38
|
+
const [focusedKey, setFocusedKey] = createSignal(void 0);
|
|
39
|
+
const [focusRequest, setFocusRequest] = createSignal(null);
|
|
40
|
+
const [triggerRef, setTriggerRefSignal] = createSignal(void 0);
|
|
41
|
+
const [rootRef, setRootRefSignal] = createSignal(void 0);
|
|
42
42
|
const isControlled = ()=>void 0 !== local.open;
|
|
43
43
|
const isDisabled = ()=>Boolean(local.disabled);
|
|
44
44
|
const open = ()=>isControlled() ? Boolean(local.open) : internalOpen();
|
|
@@ -95,14 +95,14 @@ const DropdownRoot = (props)=>{
|
|
|
95
95
|
setItems((prev)=>prev.filter((item)=>item.key !== key));
|
|
96
96
|
if (focusedKey() === key) setFocusedKey(void 0);
|
|
97
97
|
};
|
|
98
|
-
|
|
98
|
+
createEffect(()=>{
|
|
99
99
|
if (!open()) return;
|
|
100
100
|
const request = focusRequest();
|
|
101
101
|
if (!request) return;
|
|
102
102
|
focusBoundary("first" === request ? "first" : "last");
|
|
103
103
|
setFocusRequest(null);
|
|
104
104
|
});
|
|
105
|
-
|
|
105
|
+
createEffect(()=>{
|
|
106
106
|
const list = items();
|
|
107
107
|
const currentFocused = focusedKey();
|
|
108
108
|
if (currentFocused && !list.some((item)=>item.key === currentFocused)) return void setFocusedKey(void 0);
|
|
@@ -111,7 +111,7 @@ const DropdownRoot = (props)=>{
|
|
|
111
111
|
if (firstEnabled) setFocusedKey(firstEnabled.key);
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
|
|
114
|
+
onMount(()=>{
|
|
115
115
|
const handlePointerDown = (event)=>{
|
|
116
116
|
if (!open()) return;
|
|
117
117
|
const root = rootRef();
|
|
@@ -120,11 +120,11 @@ const DropdownRoot = (props)=>{
|
|
|
120
120
|
setOpen(false);
|
|
121
121
|
};
|
|
122
122
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
123
|
-
|
|
123
|
+
onCleanup(()=>{
|
|
124
124
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
|
-
return
|
|
127
|
+
return createComponent(DropdownContext.Provider, {
|
|
128
128
|
value: {
|
|
129
129
|
open,
|
|
130
130
|
disabled: isDisabled,
|
|
@@ -144,9 +144,9 @@ const DropdownRoot = (props)=>{
|
|
|
144
144
|
},
|
|
145
145
|
get children () {
|
|
146
146
|
var _el$ = _tmpl$();
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
class:
|
|
147
|
+
use(setRootRef, _el$);
|
|
148
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
149
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
150
150
|
}), {
|
|
151
151
|
get ["data-theme"] () {
|
|
152
152
|
return local.dataTheme;
|
|
@@ -156,14 +156,14 @@ const DropdownRoot = (props)=>{
|
|
|
156
156
|
return open() ? "true" : "false";
|
|
157
157
|
}
|
|
158
158
|
}), false, true);
|
|
159
|
-
|
|
159
|
+
insert(_el$, ()=>local.children);
|
|
160
160
|
return _el$;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
164
|
const DropdownTrigger = (props)=>{
|
|
165
|
-
const ctx =
|
|
166
|
-
const [local, others] =
|
|
165
|
+
const ctx = useContext(DropdownContext);
|
|
166
|
+
const [local, others] = splitProps(props, [
|
|
167
167
|
"class",
|
|
168
168
|
"children",
|
|
169
169
|
"disabled",
|
|
@@ -174,14 +174,14 @@ const DropdownTrigger = (props)=>{
|
|
|
174
174
|
]);
|
|
175
175
|
if (!ctx) return (()=>{
|
|
176
176
|
var _el$2 = _tmpl$2();
|
|
177
|
-
|
|
178
|
-
class:
|
|
177
|
+
spread(_el$2, mergeProps(others, ()=>({
|
|
178
|
+
class: twMerge(CLASSES.slot.trigger, local.class)
|
|
179
179
|
}), {
|
|
180
180
|
get type () {
|
|
181
181
|
return local.type ?? "button";
|
|
182
182
|
}
|
|
183
183
|
}), false, true);
|
|
184
|
-
|
|
184
|
+
insert(_el$2, ()=>local.children);
|
|
185
185
|
return _el$2;
|
|
186
186
|
})();
|
|
187
187
|
const isDisabled = ()=>Boolean(local.disabled) || ctx.disabled();
|
|
@@ -232,8 +232,8 @@ const DropdownTrigger = (props)=>{
|
|
|
232
232
|
};
|
|
233
233
|
return (()=>{
|
|
234
234
|
var _el$3 = _tmpl$2();
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
use(setRef, _el$3);
|
|
236
|
+
spread(_el$3, mergeProps(others, {
|
|
237
237
|
get id () {
|
|
238
238
|
return ctx.triggerId;
|
|
239
239
|
},
|
|
@@ -241,7 +241,7 @@ const DropdownTrigger = (props)=>{
|
|
|
241
241
|
return local.type ?? "button";
|
|
242
242
|
}
|
|
243
243
|
}, ()=>({
|
|
244
|
-
class:
|
|
244
|
+
class: twMerge(CLASSES.slot.trigger, local.class)
|
|
245
245
|
}), {
|
|
246
246
|
"data-slot": "dropdown-trigger",
|
|
247
247
|
"aria-haspopup": "menu",
|
|
@@ -257,13 +257,13 @@ const DropdownTrigger = (props)=>{
|
|
|
257
257
|
onClick: handleClick,
|
|
258
258
|
onKeyDown: handleKeyDown
|
|
259
259
|
}), false, true);
|
|
260
|
-
|
|
260
|
+
insert(_el$3, ()=>local.children);
|
|
261
261
|
return _el$3;
|
|
262
262
|
})();
|
|
263
263
|
};
|
|
264
264
|
const DropdownMenu = (props)=>{
|
|
265
|
-
const ctx =
|
|
266
|
-
const [local, others] =
|
|
265
|
+
const ctx = useContext(DropdownContext);
|
|
266
|
+
const [local, others] = splitProps(props, [
|
|
267
267
|
"class",
|
|
268
268
|
"children",
|
|
269
269
|
"align",
|
|
@@ -274,13 +274,13 @@ const DropdownMenu = (props)=>{
|
|
|
274
274
|
]);
|
|
275
275
|
if (!ctx) return (()=>{
|
|
276
276
|
var _el$4 = _tmpl$3(), _el$5 = _el$4.firstChild;
|
|
277
|
-
|
|
278
|
-
class:
|
|
277
|
+
spread(_el$4, mergeProps(others, ()=>({
|
|
278
|
+
class: twMerge(CLASSES.slot.popover, local.class)
|
|
279
279
|
})), false, true);
|
|
280
|
-
|
|
281
|
-
class:
|
|
280
|
+
spread(_el$5, mergeProps(()=>({
|
|
281
|
+
class: CLASSES.slot.menu
|
|
282
282
|
})), false, true);
|
|
283
|
-
|
|
283
|
+
insert(_el$5, ()=>local.children);
|
|
284
284
|
return _el$4;
|
|
285
285
|
})();
|
|
286
286
|
const handleKeyDown = (event)=>{
|
|
@@ -325,12 +325,12 @@ const DropdownMenu = (props)=>{
|
|
|
325
325
|
};
|
|
326
326
|
return (()=>{
|
|
327
327
|
var _el$6 = _tmpl$3(), _el$7 = _el$6.firstChild;
|
|
328
|
-
|
|
328
|
+
spread(_el$6, mergeProps(others, {
|
|
329
329
|
get id () {
|
|
330
330
|
return ctx.menuId;
|
|
331
331
|
}
|
|
332
332
|
}, ()=>({
|
|
333
|
-
class:
|
|
333
|
+
class: twMerge(CLASSES.slot.popover, local.class)
|
|
334
334
|
}), {
|
|
335
335
|
get role () {
|
|
336
336
|
return local.role ?? "menu";
|
|
@@ -350,18 +350,18 @@ const DropdownMenu = (props)=>{
|
|
|
350
350
|
},
|
|
351
351
|
onKeyDown: handleKeyDown
|
|
352
352
|
}), false, true);
|
|
353
|
-
|
|
354
|
-
class:
|
|
353
|
+
spread(_el$7, mergeProps(()=>({
|
|
354
|
+
class: CLASSES.slot.menu
|
|
355
355
|
}), {
|
|
356
356
|
"data-slot": "dropdown-menu"
|
|
357
357
|
}), false, true);
|
|
358
|
-
|
|
358
|
+
insert(_el$7, ()=>local.children);
|
|
359
359
|
return _el$6;
|
|
360
360
|
})();
|
|
361
361
|
};
|
|
362
362
|
const DropdownItem = (props)=>{
|
|
363
|
-
const ctx =
|
|
364
|
-
const [local, others] =
|
|
363
|
+
const ctx = useContext(DropdownContext);
|
|
364
|
+
const [local, others] = splitProps(props, [
|
|
365
365
|
"class",
|
|
366
366
|
"children",
|
|
367
367
|
"disabled",
|
|
@@ -373,17 +373,17 @@ const DropdownItem = (props)=>{
|
|
|
373
373
|
"role",
|
|
374
374
|
"type"
|
|
375
375
|
]);
|
|
376
|
-
const itemKey =
|
|
376
|
+
const itemKey = createUniqueId();
|
|
377
377
|
let itemRef;
|
|
378
378
|
if (ctx) {
|
|
379
|
-
|
|
379
|
+
onMount(()=>{
|
|
380
380
|
if (itemRef) ctx.registerItem({
|
|
381
381
|
key: itemKey,
|
|
382
382
|
ref: itemRef,
|
|
383
383
|
disabled: Boolean(local.disabled)
|
|
384
384
|
});
|
|
385
385
|
});
|
|
386
|
-
|
|
386
|
+
onCleanup(()=>{
|
|
387
387
|
ctx.unregisterItem(itemKey);
|
|
388
388
|
});
|
|
389
389
|
}
|
|
@@ -412,8 +412,8 @@ const DropdownItem = (props)=>{
|
|
|
412
412
|
};
|
|
413
413
|
return (()=>{
|
|
414
414
|
var _el$8 = _tmpl$2();
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
use(setRef, _el$8);
|
|
416
|
+
spread(_el$8, mergeProps(others, {
|
|
417
417
|
get type () {
|
|
418
418
|
return local.type ?? "button";
|
|
419
419
|
},
|
|
@@ -421,7 +421,7 @@ const DropdownItem = (props)=>{
|
|
|
421
421
|
return local.role ?? "menuitem";
|
|
422
422
|
}
|
|
423
423
|
}, ()=>({
|
|
424
|
-
class:
|
|
424
|
+
class: twMerge(CLASSES.slot.item, local.class)
|
|
425
425
|
}), {
|
|
426
426
|
"data-slot": "menu-item",
|
|
427
427
|
get ["data-disabled"] () {
|
|
@@ -443,38 +443,38 @@ const DropdownItem = (props)=>{
|
|
|
443
443
|
onMouseEnter: handleMouseEnter,
|
|
444
444
|
onFocus: handleFocus
|
|
445
445
|
}), false, true);
|
|
446
|
-
|
|
446
|
+
insert(_el$8, ()=>local.children);
|
|
447
447
|
return _el$8;
|
|
448
448
|
})();
|
|
449
449
|
};
|
|
450
450
|
const DropdownGroup = (props)=>{
|
|
451
|
-
const [local, others] =
|
|
451
|
+
const [local, others] = splitProps(props, [
|
|
452
452
|
"class",
|
|
453
453
|
"children"
|
|
454
454
|
]);
|
|
455
455
|
return (()=>{
|
|
456
456
|
var _el$9 = _tmpl$();
|
|
457
|
-
|
|
457
|
+
spread(_el$9, mergeProps(others, {
|
|
458
458
|
role: "group"
|
|
459
459
|
}, ()=>({
|
|
460
|
-
class:
|
|
460
|
+
class: twMerge(CLASSES.slot.group, local.class)
|
|
461
461
|
}), {
|
|
462
462
|
"data-slot": "dropdown-group"
|
|
463
463
|
}), false, true);
|
|
464
|
-
|
|
464
|
+
insert(_el$9, ()=>local.children);
|
|
465
465
|
return _el$9;
|
|
466
466
|
})();
|
|
467
467
|
};
|
|
468
468
|
const DropdownSeparator = (props)=>{
|
|
469
|
-
const [local, others] =
|
|
469
|
+
const [local, others] = splitProps(props, [
|
|
470
470
|
"class"
|
|
471
471
|
]);
|
|
472
472
|
return (()=>{
|
|
473
473
|
var _el$0 = _tmpl$();
|
|
474
|
-
|
|
474
|
+
spread(_el$0, mergeProps(others, {
|
|
475
475
|
role: "separator"
|
|
476
476
|
}, ()=>({
|
|
477
|
-
class:
|
|
477
|
+
class: twMerge(CLASSES.slot.separator, local.class)
|
|
478
478
|
}), {
|
|
479
479
|
"data-slot": "separator",
|
|
480
480
|
"aria-orientation": "horizontal"
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Dropdown_js_379094a4__["default"];
|
|
4
|
-
export { __webpack_exports__Dropdown as Dropdown, __webpack_exports__default as default };
|
|
1
|
+
import external_Dropdown_js_default, { Dropdown } from "./Dropdown.js";
|
|
2
|
+
export { Dropdown, external_Dropdown_js_default as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./EmptyState.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./EmptyState.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<h3>"), _tmpl$3 = /*#__PURE__*/ template("<p>");
|
|
7
7
|
const EmptyStateRoot = (props)=>{
|
|
8
|
-
const [local, others] =
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"children",
|
|
10
10
|
"class",
|
|
11
11
|
"className",
|
|
@@ -14,10 +14,10 @@ const EmptyStateRoot = (props)=>{
|
|
|
14
14
|
]);
|
|
15
15
|
return (()=>{
|
|
16
16
|
var _el$ = _tmpl$();
|
|
17
|
-
|
|
17
|
+
spread(_el$, mergeProps(others, {
|
|
18
18
|
role: "status"
|
|
19
19
|
}, ()=>({
|
|
20
|
-
class:
|
|
20
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
21
21
|
}), {
|
|
22
22
|
"data-slot": "empty-state",
|
|
23
23
|
get ["data-theme"] () {
|
|
@@ -27,12 +27,12 @@ const EmptyStateRoot = (props)=>{
|
|
|
27
27
|
return local.style;
|
|
28
28
|
}
|
|
29
29
|
}), false, true);
|
|
30
|
-
|
|
30
|
+
insert(_el$, ()=>local.children);
|
|
31
31
|
return _el$;
|
|
32
32
|
})();
|
|
33
33
|
};
|
|
34
34
|
const EmptyStateIcon = (props)=>{
|
|
35
|
-
const [local, others] =
|
|
35
|
+
const [local, others] = splitProps(props, [
|
|
36
36
|
"children",
|
|
37
37
|
"class",
|
|
38
38
|
"className",
|
|
@@ -41,8 +41,8 @@ const EmptyStateIcon = (props)=>{
|
|
|
41
41
|
]);
|
|
42
42
|
return (()=>{
|
|
43
43
|
var _el$2 = _tmpl$();
|
|
44
|
-
|
|
45
|
-
class:
|
|
44
|
+
spread(_el$2, mergeProps(others, ()=>({
|
|
45
|
+
class: twMerge(CLASSES.slot.icon, local.class, local.className)
|
|
46
46
|
}), {
|
|
47
47
|
"data-slot": "empty-state-icon",
|
|
48
48
|
get ["data-theme"] () {
|
|
@@ -53,12 +53,12 @@ const EmptyStateIcon = (props)=>{
|
|
|
53
53
|
},
|
|
54
54
|
"aria-hidden": "true"
|
|
55
55
|
}), false, true);
|
|
56
|
-
|
|
56
|
+
insert(_el$2, ()=>local.children);
|
|
57
57
|
return _el$2;
|
|
58
58
|
})();
|
|
59
59
|
};
|
|
60
60
|
const EmptyStateTitle = (props)=>{
|
|
61
|
-
const [local, others] =
|
|
61
|
+
const [local, others] = splitProps(props, [
|
|
62
62
|
"children",
|
|
63
63
|
"class",
|
|
64
64
|
"className",
|
|
@@ -67,8 +67,8 @@ const EmptyStateTitle = (props)=>{
|
|
|
67
67
|
]);
|
|
68
68
|
return (()=>{
|
|
69
69
|
var _el$3 = _tmpl$2();
|
|
70
|
-
|
|
71
|
-
class:
|
|
70
|
+
spread(_el$3, mergeProps(others, ()=>({
|
|
71
|
+
class: twMerge(CLASSES.slot.title, local.class, local.className)
|
|
72
72
|
}), {
|
|
73
73
|
"data-slot": "empty-state-title",
|
|
74
74
|
get ["data-theme"] () {
|
|
@@ -78,12 +78,12 @@ const EmptyStateTitle = (props)=>{
|
|
|
78
78
|
return local.style;
|
|
79
79
|
}
|
|
80
80
|
}), false, true);
|
|
81
|
-
|
|
81
|
+
insert(_el$3, ()=>local.children);
|
|
82
82
|
return _el$3;
|
|
83
83
|
})();
|
|
84
84
|
};
|
|
85
85
|
const EmptyStateDescription = (props)=>{
|
|
86
|
-
const [local, others] =
|
|
86
|
+
const [local, others] = splitProps(props, [
|
|
87
87
|
"children",
|
|
88
88
|
"class",
|
|
89
89
|
"className",
|
|
@@ -92,8 +92,8 @@ const EmptyStateDescription = (props)=>{
|
|
|
92
92
|
]);
|
|
93
93
|
return (()=>{
|
|
94
94
|
var _el$4 = _tmpl$3();
|
|
95
|
-
|
|
96
|
-
class:
|
|
95
|
+
spread(_el$4, mergeProps(others, ()=>({
|
|
96
|
+
class: twMerge(CLASSES.slot.description, local.class, local.className)
|
|
97
97
|
}), {
|
|
98
98
|
"data-slot": "empty-state-description",
|
|
99
99
|
get ["data-theme"] () {
|
|
@@ -103,12 +103,12 @@ const EmptyStateDescription = (props)=>{
|
|
|
103
103
|
return local.style;
|
|
104
104
|
}
|
|
105
105
|
}), false, true);
|
|
106
|
-
|
|
106
|
+
insert(_el$4, ()=>local.children);
|
|
107
107
|
return _el$4;
|
|
108
108
|
})();
|
|
109
109
|
};
|
|
110
110
|
const EmptyStateActions = (props)=>{
|
|
111
|
-
const [local, others] =
|
|
111
|
+
const [local, others] = splitProps(props, [
|
|
112
112
|
"children",
|
|
113
113
|
"class",
|
|
114
114
|
"className",
|
|
@@ -117,8 +117,8 @@ const EmptyStateActions = (props)=>{
|
|
|
117
117
|
]);
|
|
118
118
|
return (()=>{
|
|
119
119
|
var _el$5 = _tmpl$();
|
|
120
|
-
|
|
121
|
-
class:
|
|
120
|
+
spread(_el$5, mergeProps(others, ()=>({
|
|
121
|
+
class: twMerge(CLASSES.slot.actions, local.class, local.className)
|
|
122
122
|
}), {
|
|
123
123
|
"data-slot": "empty-state-actions",
|
|
124
124
|
get ["data-theme"] () {
|
|
@@ -128,7 +128,7 @@ const EmptyStateActions = (props)=>{
|
|
|
128
128
|
return local.style;
|
|
129
129
|
}
|
|
130
130
|
}), false, true);
|
|
131
|
-
|
|
131
|
+
insert(_el$5, ()=>local.children);
|
|
132
132
|
return _el$5;
|
|
133
133
|
})();
|
|
134
134
|
};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__EmptyStateActions = __WEBPACK_EXTERNAL_MODULE__EmptyState_js_010733b6__.EmptyStateActions;
|
|
4
|
-
var __webpack_exports__EmptyStateDescription = __WEBPACK_EXTERNAL_MODULE__EmptyState_js_010733b6__.EmptyStateDescription;
|
|
5
|
-
var __webpack_exports__EmptyStateIcon = __WEBPACK_EXTERNAL_MODULE__EmptyState_js_010733b6__.EmptyStateIcon;
|
|
6
|
-
var __webpack_exports__EmptyStateRoot = __WEBPACK_EXTERNAL_MODULE__EmptyState_js_010733b6__.EmptyStateRoot;
|
|
7
|
-
var __webpack_exports__EmptyStateTitle = __WEBPACK_EXTERNAL_MODULE__EmptyState_js_010733b6__.EmptyStateTitle;
|
|
8
|
-
export { __webpack_exports__EmptyState as EmptyState, __webpack_exports__EmptyStateActions as EmptyStateActions, __webpack_exports__EmptyStateDescription as EmptyStateDescription, __webpack_exports__EmptyStateIcon as EmptyStateIcon, __webpack_exports__EmptyStateRoot as EmptyStateRoot, __webpack_exports__EmptyStateTitle as EmptyStateTitle };
|
|
1
|
+
import external_EmptyState_js_default, { EmptyStateActions, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateTitle } from "./EmptyState.js";
|
|
2
|
+
export { external_EmptyState_js_default as EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateTitle };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./ErrorMessage.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./ErrorMessage.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>");
|
|
7
7
|
const ErrorMessageRoot = (props)=>{
|
|
8
|
-
const [local, others] =
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"children",
|
|
10
10
|
"class",
|
|
11
11
|
"className",
|
|
@@ -15,8 +15,8 @@ const ErrorMessageRoot = (props)=>{
|
|
|
15
15
|
]);
|
|
16
16
|
return (()=>{
|
|
17
17
|
var _el$ = _tmpl$();
|
|
18
|
-
|
|
19
|
-
class:
|
|
18
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
19
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
20
20
|
}), {
|
|
21
21
|
"data-slot": "error-message",
|
|
22
22
|
get slot () {
|
|
@@ -29,12 +29,12 @@ const ErrorMessageRoot = (props)=>{
|
|
|
29
29
|
return local.style;
|
|
30
30
|
}
|
|
31
31
|
}), false, true);
|
|
32
|
-
|
|
32
|
+
insert(_el$, ()=>local.children);
|
|
33
33
|
return _el$;
|
|
34
34
|
})();
|
|
35
35
|
};
|
|
36
|
-
const
|
|
36
|
+
const ErrorMessage = Object.assign(ErrorMessageRoot, {
|
|
37
37
|
Root: ErrorMessageRoot
|
|
38
38
|
});
|
|
39
|
-
const
|
|
40
|
-
export {
|
|
39
|
+
const error_message_ErrorMessage = ErrorMessage;
|
|
40
|
+
export { ErrorMessage, ErrorMessageRoot, error_message_ErrorMessage as default };
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__ErrorMessageRoot = __WEBPACK_EXTERNAL_MODULE__ErrorMessage_js_a8db9ade__.ErrorMessageRoot;
|
|
4
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__ErrorMessage_js_a8db9ade__["default"];
|
|
5
|
-
export { __webpack_exports__ErrorMessage as ErrorMessage, __webpack_exports__ErrorMessageRoot as ErrorMessageRoot, __webpack_exports__default as default };
|
|
1
|
+
import external_ErrorMessage_js_default, { ErrorMessage, ErrorMessageRoot } from "./ErrorMessage.js";
|
|
2
|
+
export { ErrorMessage, ErrorMessageRoot, external_ErrorMessage_js_default as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./FieldError.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createMemo, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { useFieldError } from "../../hooks/form/index.js";
|
|
6
|
+
import { CLASSES } from "./FieldError.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
8
8
|
const FieldErrorRoot = (props)=>{
|
|
9
9
|
let rootRef;
|
|
10
|
-
const [local, others] =
|
|
10
|
+
const [local, others] = splitProps(props, [
|
|
11
11
|
"children",
|
|
12
12
|
"class",
|
|
13
13
|
"className",
|
|
@@ -19,12 +19,12 @@ const FieldErrorRoot = (props)=>{
|
|
|
19
19
|
"form",
|
|
20
20
|
"showWhenTouched"
|
|
21
21
|
]);
|
|
22
|
-
const hookError =
|
|
22
|
+
const hookError = useFieldError(()=>local.name, {
|
|
23
23
|
form: local.form,
|
|
24
24
|
element: ()=>rootRef,
|
|
25
25
|
showWhenTouched: local.showWhenTouched
|
|
26
26
|
});
|
|
27
|
-
const hookMessage =
|
|
27
|
+
const hookMessage = createMemo(()=>hookError());
|
|
28
28
|
const isVisible = ()=>{
|
|
29
29
|
if ("boolean" == typeof local.isVisible) return local.isVisible;
|
|
30
30
|
if (hookMessage()) return true;
|
|
@@ -40,9 +40,9 @@ const FieldErrorRoot = (props)=>{
|
|
|
40
40
|
return (()=>{
|
|
41
41
|
var _el$ = _tmpl$();
|
|
42
42
|
var _ref$ = rootRef;
|
|
43
|
-
"function" == typeof _ref$ ?
|
|
44
|
-
|
|
45
|
-
class:
|
|
43
|
+
"function" == typeof _ref$ ? use(_ref$, _el$) : rootRef = _el$;
|
|
44
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
45
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
46
46
|
}), {
|
|
47
47
|
"data-slot": "field-error",
|
|
48
48
|
get ["data-visible"] () {
|
|
@@ -58,12 +58,12 @@ const FieldErrorRoot = (props)=>{
|
|
|
58
58
|
return local.style;
|
|
59
59
|
}
|
|
60
60
|
}), false, true);
|
|
61
|
-
|
|
61
|
+
insert(_el$, content);
|
|
62
62
|
return _el$;
|
|
63
63
|
})();
|
|
64
64
|
};
|
|
65
|
-
const
|
|
65
|
+
const FieldError_FieldError = Object.assign(FieldErrorRoot, {
|
|
66
66
|
Root: FieldErrorRoot
|
|
67
67
|
});
|
|
68
|
-
const
|
|
69
|
-
export { FieldError, FieldErrorRoot,
|
|
68
|
+
const FieldError = FieldError_FieldError;
|
|
69
|
+
export { FieldError_FieldError as FieldError, FieldErrorRoot, FieldError as default };
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__FieldErrorRoot = __WEBPACK_EXTERNAL_MODULE__FieldError_js_e28dd93b__.FieldErrorRoot;
|
|
4
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__FieldError_js_e28dd93b__["default"];
|
|
5
|
-
export { __webpack_exports__FieldError as FieldError, __webpack_exports__FieldErrorRoot as FieldErrorRoot, __webpack_exports__default as default };
|
|
1
|
+
import external_FieldError_js_default, { FieldError, FieldErrorRoot } from "./FieldError.js";
|
|
2
|
+
export { FieldError, FieldErrorRoot, external_FieldError_js_default as default };
|