@pathscale/ui 1.1.44 → 1.1.45
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 +51 -0
- package/dist/components/drawer/Drawer.d.ts +7 -0
- package/dist/components/drawer/Drawer.js +105 -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 +9 -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.css +0 -4
- 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.css +0 -9
- 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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { Show, createSignal, onCleanup, onMount } from "solid-js";
|
|
3
|
+
import index_js_default from "../../button/index.js";
|
|
4
|
+
import external_card_index_js_default from "../../card/index.js";
|
|
5
|
+
import external_flex_index_js_default from "../../flex/index.js";
|
|
6
|
+
import { CLASSES } from "../ImmersiveLanding.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div><img>"), _tmpl$2 = /*#__PURE__*/ template("<h3 id=pwa-install-title>"), _tmpl$3 = /*#__PURE__*/ template("<p>"), _tmpl$4 = /*#__PURE__*/ template("<div role=dialog aria-modal=false aria-labelledby=pwa-install-title>");
|
|
8
8
|
const DISMISS_DURATION = 604800000;
|
|
9
9
|
const defaultTexts = {
|
|
10
10
|
title: "Install App",
|
|
@@ -24,8 +24,8 @@ const PWAInstallPrompt = (props)=>{
|
|
|
24
24
|
notNowButton: props.texts?.notNowButton ?? defaultTexts.notNowButton,
|
|
25
25
|
closeLabel: props.texts?.closeLabel ?? defaultTexts.closeLabel
|
|
26
26
|
});
|
|
27
|
-
const [deferredPrompt, setDeferredPrompt] =
|
|
28
|
-
const [showPrompt, setShowPrompt] =
|
|
27
|
+
const [deferredPrompt, setDeferredPrompt] = createSignal(null);
|
|
28
|
+
const [showPrompt, setShowPrompt] = createSignal(false);
|
|
29
29
|
const checkDismissalStatus = ()=>{
|
|
30
30
|
const dismissed = localStorage.getItem(STORAGE_KEY());
|
|
31
31
|
if (!dismissed) return true;
|
|
@@ -66,36 +66,36 @@ const PWAInstallPrompt = (props)=>{
|
|
|
66
66
|
setShowPrompt(false);
|
|
67
67
|
setDeferredPrompt(null);
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
onMount(()=>{
|
|
70
70
|
window.addEventListener("beforeinstallprompt", handleBeforeInstallPrompt);
|
|
71
71
|
window.addEventListener("appinstalled", handleAppInstalled);
|
|
72
72
|
});
|
|
73
|
-
|
|
73
|
+
onCleanup(()=>{
|
|
74
74
|
window.removeEventListener("beforeinstallprompt", handleBeforeInstallPrompt);
|
|
75
75
|
window.removeEventListener("appinstalled", handleAppInstalled);
|
|
76
76
|
});
|
|
77
|
-
return
|
|
77
|
+
return createComponent(Show, {
|
|
78
78
|
get when () {
|
|
79
79
|
return showPrompt();
|
|
80
80
|
},
|
|
81
81
|
get children () {
|
|
82
82
|
var _el$ = _tmpl$4();
|
|
83
|
-
|
|
84
|
-
class:
|
|
83
|
+
spread(_el$, mergeProps(()=>({
|
|
84
|
+
class: CLASSES.pwaPrompt.dialog
|
|
85
85
|
})), false, true);
|
|
86
|
-
|
|
86
|
+
insert(_el$, createComponent(external_card_index_js_default, mergeProps({
|
|
87
87
|
variant: "shadow"
|
|
88
88
|
}, ()=>({
|
|
89
|
-
class:
|
|
89
|
+
class: CLASSES.pwaPrompt.card
|
|
90
90
|
}), {
|
|
91
91
|
get children () {
|
|
92
92
|
return [
|
|
93
|
-
|
|
93
|
+
createComponent(index_js_default, mergeProps({
|
|
94
94
|
size: "sm",
|
|
95
95
|
variant: "ghost",
|
|
96
96
|
isIconOnly: true
|
|
97
97
|
}, ()=>({
|
|
98
|
-
class:
|
|
98
|
+
class: CLASSES.pwaPrompt.closeButton
|
|
99
99
|
}), {
|
|
100
100
|
onClick: handleDismiss,
|
|
101
101
|
get ["aria-label"] () {
|
|
@@ -103,24 +103,24 @@ const PWAInstallPrompt = (props)=>{
|
|
|
103
103
|
},
|
|
104
104
|
children: "X"
|
|
105
105
|
})),
|
|
106
|
-
|
|
107
|
-
class:
|
|
106
|
+
createComponent(external_card_index_js_default.Body, mergeProps(()=>({
|
|
107
|
+
class: CLASSES.pwaPrompt.body
|
|
108
108
|
}), {
|
|
109
109
|
get children () {
|
|
110
|
-
return
|
|
110
|
+
return createComponent(external_flex_index_js_default, mergeProps({
|
|
111
111
|
align: "start",
|
|
112
112
|
gap: "md"
|
|
113
113
|
}, ()=>({
|
|
114
|
-
class:
|
|
114
|
+
class: CLASSES.pwaPrompt.media
|
|
115
115
|
}), {
|
|
116
116
|
get children () {
|
|
117
117
|
return [
|
|
118
118
|
(()=>{
|
|
119
119
|
var _el$2 = _tmpl$(), _el$3 = _el$2.firstChild;
|
|
120
|
-
|
|
121
|
-
class:
|
|
120
|
+
spread(_el$2, mergeProps(()=>({
|
|
121
|
+
class: CLASSES.pwaPrompt.appIconWrap
|
|
122
122
|
})), false, true);
|
|
123
|
-
|
|
123
|
+
spread(_el$3, mergeProps({
|
|
124
124
|
get src () {
|
|
125
125
|
return appIcon();
|
|
126
126
|
},
|
|
@@ -128,32 +128,32 @@ const PWAInstallPrompt = (props)=>{
|
|
|
128
128
|
return appName();
|
|
129
129
|
}
|
|
130
130
|
}, ()=>({
|
|
131
|
-
class:
|
|
131
|
+
class: CLASSES.pwaPrompt.appIcon
|
|
132
132
|
})), false, false);
|
|
133
133
|
return _el$2;
|
|
134
134
|
})(),
|
|
135
|
-
|
|
135
|
+
createComponent(external_flex_index_js_default, mergeProps({
|
|
136
136
|
direction: "col",
|
|
137
137
|
gap: "sm"
|
|
138
138
|
}, ()=>({
|
|
139
|
-
class:
|
|
139
|
+
class: CLASSES.pwaPrompt.textWrap
|
|
140
140
|
}), {
|
|
141
141
|
get children () {
|
|
142
142
|
return [
|
|
143
143
|
(()=>{
|
|
144
144
|
var _el$4 = _tmpl$2();
|
|
145
|
-
|
|
146
|
-
class:
|
|
145
|
+
spread(_el$4, mergeProps(()=>({
|
|
146
|
+
class: CLASSES.pwaPrompt.title
|
|
147
147
|
})), false, true);
|
|
148
|
-
|
|
148
|
+
insert(_el$4, ()=>texts().title);
|
|
149
149
|
return _el$4;
|
|
150
150
|
})(),
|
|
151
151
|
(()=>{
|
|
152
152
|
var _el$5 = _tmpl$3();
|
|
153
|
-
|
|
154
|
-
class:
|
|
153
|
+
spread(_el$5, mergeProps(()=>({
|
|
154
|
+
class: CLASSES.pwaPrompt.description
|
|
155
155
|
})), false, true);
|
|
156
|
-
|
|
156
|
+
insert(_el$5, ()=>texts().description);
|
|
157
157
|
return _el$5;
|
|
158
158
|
})()
|
|
159
159
|
];
|
|
@@ -164,25 +164,25 @@ const PWAInstallPrompt = (props)=>{
|
|
|
164
164
|
}));
|
|
165
165
|
}
|
|
166
166
|
})),
|
|
167
|
-
|
|
168
|
-
class:
|
|
167
|
+
createComponent(external_card_index_js_default.Footer, mergeProps(()=>({
|
|
168
|
+
class: CLASSES.pwaPrompt.footer
|
|
169
169
|
}), {
|
|
170
170
|
get children () {
|
|
171
171
|
return [
|
|
172
|
-
|
|
172
|
+
createComponent(index_js_default, mergeProps({
|
|
173
173
|
variant: "primary"
|
|
174
174
|
}, ()=>({
|
|
175
|
-
class:
|
|
175
|
+
class: CLASSES.pwaPrompt.action
|
|
176
176
|
}), {
|
|
177
177
|
onClick: handleInstall,
|
|
178
178
|
get children () {
|
|
179
179
|
return texts().installButton;
|
|
180
180
|
}
|
|
181
181
|
})),
|
|
182
|
-
|
|
182
|
+
createComponent(index_js_default, mergeProps({
|
|
183
183
|
variant: "ghost"
|
|
184
184
|
}, ()=>({
|
|
185
|
-
class:
|
|
185
|
+
class: CLASSES.pwaPrompt.action
|
|
186
186
|
}), {
|
|
187
187
|
onClick: handleDismiss,
|
|
188
188
|
get children () {
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import "./ImmersiveLanding.css";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
var __webpack_exports__FirefoxPWABanner = __WEBPACK_EXTERNAL_MODULE__components_FirefoxPWABanner_js_46fc5861__.FirefoxPWABanner;
|
|
10
|
-
var __webpack_exports__ImmersiveLandingContext = __WEBPACK_EXTERNAL_MODULE__ImmersiveLandingContext_js_0e3f38c0__.ImmersiveLandingContext;
|
|
11
|
-
var __webpack_exports__PWAInstallPrompt = __WEBPACK_EXTERNAL_MODULE__components_PWAInstallPrompt_js_a5e100bf__.PWAInstallPrompt;
|
|
12
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__ImmersiveLanding_js_2b17ea6a__["default"];
|
|
13
|
-
var __webpack_exports__useImmersiveLanding = __WEBPACK_EXTERNAL_MODULE__useImmersiveLanding_js_66194376__.useImmersiveLanding;
|
|
14
|
-
var __webpack_exports__useImmersiveLandingContext = __WEBPACK_EXTERNAL_MODULE__ImmersiveLandingContext_js_0e3f38c0__.useImmersiveLandingContext;
|
|
15
|
-
export { __webpack_exports__CookieConsent as CookieConsent, __webpack_exports__FirefoxPWABanner as FirefoxPWABanner, __webpack_exports__ImmersiveLandingContext as ImmersiveLandingContext, __webpack_exports__PWAInstallPrompt as PWAInstallPrompt, __webpack_exports__default as default, __webpack_exports__useImmersiveLanding as useImmersiveLanding, __webpack_exports__useImmersiveLandingContext as useImmersiveLandingContext };
|
|
2
|
+
import external_ImmersiveLanding_js_default from "./ImmersiveLanding.js";
|
|
3
|
+
import { useImmersiveLanding } from "./useImmersiveLanding.js";
|
|
4
|
+
import { ImmersiveLandingContext, useImmersiveLandingContext } from "./ImmersiveLandingContext.js";
|
|
5
|
+
import { CookieConsent } from "./components/CookieConsent.js";
|
|
6
|
+
import { PWAInstallPrompt } from "./components/PWAInstallPrompt.js";
|
|
7
|
+
import { FirefoxPWABanner } from "./components/FirefoxPWABanner.js";
|
|
8
|
+
export { CookieConsent, FirefoxPWABanner, ImmersiveLandingContext, PWAInstallPrompt, external_ImmersiveLanding_js_default as default, useImmersiveLanding, useImmersiveLandingContext };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createEffect, createSignal, onCleanup, onMount } from "solid-js";
|
|
2
2
|
function useImmersiveLanding(options) {
|
|
3
3
|
const { pages, initialPage = pages[0], currentPage: controlledPage, transitionDuration = 400, onNavigate, onNavigationComplete, enableScrollNavigation = true } = options;
|
|
4
4
|
const isControlled = !!controlledPage;
|
|
5
|
-
const [internalPage, setInternalPage] =
|
|
6
|
-
const [isTransitioning, setIsTransitioning] =
|
|
7
|
-
const [direction, setDirection] =
|
|
5
|
+
const [internalPage, setInternalPage] = createSignal(initialPage);
|
|
6
|
+
const [isTransitioning, setIsTransitioning] = createSignal(false);
|
|
7
|
+
const [direction, setDirection] = createSignal(null);
|
|
8
8
|
const activePage = isControlled ? controlledPage : internalPage;
|
|
9
9
|
const currentIndex = ()=>pages.indexOf(activePage());
|
|
10
10
|
const isFirstPage = ()=>0 === currentIndex();
|
|
11
11
|
const isLastPage = ()=>currentIndex() === pages.length - 1;
|
|
12
12
|
if (isControlled) {
|
|
13
13
|
let prevPage = controlledPage();
|
|
14
|
-
|
|
14
|
+
createEffect(()=>{
|
|
15
15
|
const next = controlledPage();
|
|
16
16
|
if (next !== prevPage && !isTransitioning()) {
|
|
17
17
|
const fromIndex = pages.indexOf(prevPage);
|
|
@@ -57,7 +57,7 @@ function useImmersiveLanding(options) {
|
|
|
57
57
|
const idx = currentIndex();
|
|
58
58
|
if (idx > 0) navigateToInternal(pages[idx - 1]);
|
|
59
59
|
};
|
|
60
|
-
|
|
60
|
+
onMount(()=>{
|
|
61
61
|
if ("undefined" == typeof window) return;
|
|
62
62
|
if (!enableScrollNavigation) return;
|
|
63
63
|
let scrollLocked = false;
|
|
@@ -128,7 +128,7 @@ function useImmersiveLanding(options) {
|
|
|
128
128
|
passive: true
|
|
129
129
|
});
|
|
130
130
|
window.addEventListener("keydown", handleKeyDown);
|
|
131
|
-
|
|
131
|
+
onCleanup(()=>{
|
|
132
132
|
window.removeEventListener("wheel", handleWheel);
|
|
133
133
|
window.removeEventListener("touchstart", handleTouchStart);
|
|
134
134
|
window.removeEventListener("touchend", handleTouchEnd);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Input.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const InputContext =
|
|
3
|
+
import { Show, createContext, createUniqueId, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Input.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<span>"), _tmpl$3 = /*#__PURE__*/ template("<div><input>"), _tmpl$4 = /*#__PURE__*/ template("<label>"), _tmpl$5 = /*#__PURE__*/ template("<p>");
|
|
7
|
+
const InputContext = createContext();
|
|
8
8
|
const InputRoot = (props)=>{
|
|
9
|
-
const [local, others] =
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
10
|
"children",
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
@@ -16,12 +16,12 @@ const InputRoot = (props)=>{
|
|
|
16
16
|
"isInvalid",
|
|
17
17
|
"dataTheme"
|
|
18
18
|
]);
|
|
19
|
-
const baseId =
|
|
19
|
+
const baseId = createUniqueId();
|
|
20
20
|
const size = ()=>local.size ?? "md";
|
|
21
21
|
const isDisabled = ()=>Boolean(local.isDisabled);
|
|
22
22
|
const isInvalid = ()=>Boolean(local.isInvalid);
|
|
23
23
|
const fullWidth = ()=>Boolean(local.fullWidth);
|
|
24
|
-
return
|
|
24
|
+
return createComponent(InputContext.Provider, {
|
|
25
25
|
value: {
|
|
26
26
|
fieldId: ()=>`${baseId}-field`,
|
|
27
27
|
helperId: ()=>`${baseId}-helper`,
|
|
@@ -32,22 +32,22 @@ const InputRoot = (props)=>{
|
|
|
32
32
|
},
|
|
33
33
|
get children () {
|
|
34
34
|
var _el$ = _tmpl$();
|
|
35
|
-
|
|
36
|
-
class:
|
|
35
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
36
|
+
class: twMerge(CLASSES.base, fullWidth() && CLASSES.flag.fullWidthRoot, local.class, local.className)
|
|
37
37
|
}), {
|
|
38
38
|
get ["data-theme"] () {
|
|
39
39
|
return local.dataTheme;
|
|
40
40
|
},
|
|
41
41
|
"data-slot": "input-root"
|
|
42
42
|
}), false, true);
|
|
43
|
-
|
|
43
|
+
insert(_el$, ()=>local.children);
|
|
44
44
|
return _el$;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
const InputField = (props)=>{
|
|
49
|
-
const ctx =
|
|
50
|
-
const [local, others] =
|
|
49
|
+
const ctx = useContext(InputContext);
|
|
50
|
+
const [local, others] = splitProps(props, [
|
|
51
51
|
"class",
|
|
52
52
|
"className",
|
|
53
53
|
"size",
|
|
@@ -67,10 +67,10 @@ const InputField = (props)=>{
|
|
|
67
67
|
const fullWidth = ()=>Boolean(local.fullWidth) || Boolean(ctx?.fullWidth());
|
|
68
68
|
const inputId = ()=>local.id ?? ctx?.fieldId();
|
|
69
69
|
const ariaInvalid = ()=>local["aria-invalid"] ?? (isInvalid() ? true : void 0);
|
|
70
|
-
const controlClasses = ()=>
|
|
70
|
+
const controlClasses = ()=>twMerge(CLASSES.slot.control, CLASSES.size[size()], fullWidth() && CLASSES.flag.fullWidthControl, isDisabled() && CLASSES.flag.disabled, isInvalid() && CLASSES.flag.invalid, local.class, local.className);
|
|
71
71
|
return (()=>{
|
|
72
72
|
var _el$2 = _tmpl$3(), _el$4 = _el$2.firstChild;
|
|
73
|
-
|
|
73
|
+
spread(_el$2, mergeProps(()=>({
|
|
74
74
|
class: controlClasses()
|
|
75
75
|
}), {
|
|
76
76
|
get ["data-theme"] () {
|
|
@@ -84,27 +84,27 @@ const InputField = (props)=>{
|
|
|
84
84
|
return isInvalid() ? "true" : "false";
|
|
85
85
|
}
|
|
86
86
|
}), false, true);
|
|
87
|
-
|
|
87
|
+
insert(_el$2, createComponent(Show, {
|
|
88
88
|
get when () {
|
|
89
89
|
return local.startIcon;
|
|
90
90
|
},
|
|
91
91
|
get children () {
|
|
92
92
|
var _el$3 = _tmpl$2();
|
|
93
|
-
|
|
94
|
-
class:
|
|
93
|
+
spread(_el$3, mergeProps(()=>({
|
|
94
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
95
95
|
}), {
|
|
96
96
|
"data-slot": "input-start-icon"
|
|
97
97
|
}), false, true);
|
|
98
|
-
|
|
98
|
+
insert(_el$3, ()=>local.startIcon);
|
|
99
99
|
return _el$3;
|
|
100
100
|
}
|
|
101
101
|
}), _el$4);
|
|
102
|
-
|
|
102
|
+
spread(_el$4, mergeProps(others, {
|
|
103
103
|
get id () {
|
|
104
104
|
return inputId();
|
|
105
105
|
}
|
|
106
106
|
}, ()=>({
|
|
107
|
-
class:
|
|
107
|
+
class: CLASSES.slot.field
|
|
108
108
|
}), {
|
|
109
109
|
get disabled () {
|
|
110
110
|
return isDisabled();
|
|
@@ -117,18 +117,18 @@ const InputField = (props)=>{
|
|
|
117
117
|
},
|
|
118
118
|
"data-slot": "input-field"
|
|
119
119
|
}), false, false);
|
|
120
|
-
|
|
120
|
+
insert(_el$2, createComponent(Show, {
|
|
121
121
|
get when () {
|
|
122
122
|
return local.endIcon;
|
|
123
123
|
},
|
|
124
124
|
get children () {
|
|
125
125
|
var _el$5 = _tmpl$2();
|
|
126
|
-
|
|
127
|
-
class:
|
|
126
|
+
spread(_el$5, mergeProps(()=>({
|
|
127
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
128
128
|
}), {
|
|
129
129
|
"data-slot": "input-end-icon"
|
|
130
130
|
}), false, true);
|
|
131
|
-
|
|
131
|
+
insert(_el$5, ()=>local.endIcon);
|
|
132
132
|
return _el$5;
|
|
133
133
|
}
|
|
134
134
|
}), null);
|
|
@@ -136,8 +136,8 @@ const InputField = (props)=>{
|
|
|
136
136
|
})();
|
|
137
137
|
};
|
|
138
138
|
const InputLabel = (props)=>{
|
|
139
|
-
const ctx =
|
|
140
|
-
const [local, others] =
|
|
139
|
+
const ctx = useContext(InputContext);
|
|
140
|
+
const [local, others] = splitProps(props, [
|
|
141
141
|
"class",
|
|
142
142
|
"className",
|
|
143
143
|
"for",
|
|
@@ -145,22 +145,22 @@ const InputLabel = (props)=>{
|
|
|
145
145
|
]);
|
|
146
146
|
return (()=>{
|
|
147
147
|
var _el$6 = _tmpl$4();
|
|
148
|
-
|
|
148
|
+
spread(_el$6, mergeProps(others, {
|
|
149
149
|
get ["for"] () {
|
|
150
150
|
return local.for ?? ctx?.fieldId();
|
|
151
151
|
}
|
|
152
152
|
}, ()=>({
|
|
153
|
-
class:
|
|
153
|
+
class: twMerge(CLASSES.slot.label, local.class, local.className)
|
|
154
154
|
}), {
|
|
155
155
|
"data-slot": "input-label"
|
|
156
156
|
}), false, true);
|
|
157
|
-
|
|
157
|
+
insert(_el$6, ()=>local.children);
|
|
158
158
|
return _el$6;
|
|
159
159
|
})();
|
|
160
160
|
};
|
|
161
161
|
const InputHelper = (props)=>{
|
|
162
|
-
const ctx =
|
|
163
|
-
const [local, others] =
|
|
162
|
+
const ctx = useContext(InputContext);
|
|
163
|
+
const [local, others] = splitProps(props, [
|
|
164
164
|
"class",
|
|
165
165
|
"className",
|
|
166
166
|
"invalid",
|
|
@@ -170,22 +170,22 @@ const InputHelper = (props)=>{
|
|
|
170
170
|
const invalid = ()=>Boolean(local.invalid) || Boolean(ctx?.isInvalid());
|
|
171
171
|
return (()=>{
|
|
172
172
|
var _el$7 = _tmpl$5();
|
|
173
|
-
|
|
173
|
+
spread(_el$7, mergeProps(others, {
|
|
174
174
|
get id () {
|
|
175
175
|
return local.id ?? ctx?.helperId();
|
|
176
176
|
}
|
|
177
177
|
}, ()=>({
|
|
178
|
-
class:
|
|
178
|
+
class: twMerge(CLASSES.slot.helper, invalid() && CLASSES.flag.helperInvalid, local.class, local.className)
|
|
179
179
|
}), {
|
|
180
180
|
"data-slot": "input-helper"
|
|
181
181
|
}), false, true);
|
|
182
|
-
|
|
182
|
+
insert(_el$7, ()=>local.children);
|
|
183
183
|
return _el$7;
|
|
184
184
|
})();
|
|
185
185
|
};
|
|
186
186
|
const InputBase = (props)=>{
|
|
187
|
-
const generatedId =
|
|
188
|
-
const [local, fieldProps] =
|
|
187
|
+
const generatedId = createUniqueId();
|
|
188
|
+
const [local, fieldProps] = splitProps(props, [
|
|
189
189
|
"id",
|
|
190
190
|
"size",
|
|
191
191
|
"fullWidth",
|
|
@@ -206,7 +206,7 @@ const InputBase = (props)=>{
|
|
|
206
206
|
const helperContent = ()=>local.errorMessage ?? local.helperText;
|
|
207
207
|
const hasHelper = ()=>null != helperContent();
|
|
208
208
|
const helperId = ()=>`${inputId()}-helper`;
|
|
209
|
-
return
|
|
209
|
+
return createComponent(InputRoot, {
|
|
210
210
|
get size () {
|
|
211
211
|
return local.size;
|
|
212
212
|
},
|
|
@@ -224,19 +224,19 @@ const InputBase = (props)=>{
|
|
|
224
224
|
},
|
|
225
225
|
get children () {
|
|
226
226
|
return [
|
|
227
|
-
|
|
227
|
+
createComponent(Show, {
|
|
228
228
|
get when () {
|
|
229
229
|
return local.label;
|
|
230
230
|
},
|
|
231
231
|
get children () {
|
|
232
|
-
return
|
|
232
|
+
return createComponent(InputLabel, {
|
|
233
233
|
get children () {
|
|
234
234
|
return local.label;
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
}),
|
|
239
|
-
|
|
239
|
+
createComponent(InputField, mergeProps(fieldProps, {
|
|
240
240
|
get id () {
|
|
241
241
|
return inputId();
|
|
242
242
|
},
|
|
@@ -250,7 +250,7 @@ const InputBase = (props)=>{
|
|
|
250
250
|
return isInvalid();
|
|
251
251
|
},
|
|
252
252
|
get ["aria-describedby"] () {
|
|
253
|
-
return
|
|
253
|
+
return memo(()=>!!hasHelper())() ? helperId() : void 0;
|
|
254
254
|
}
|
|
255
255
|
}, ()=>({
|
|
256
256
|
class: local.class
|
|
@@ -262,12 +262,12 @@ const InputBase = (props)=>{
|
|
|
262
262
|
return local.dataTheme;
|
|
263
263
|
}
|
|
264
264
|
})),
|
|
265
|
-
|
|
265
|
+
createComponent(Show, {
|
|
266
266
|
get when () {
|
|
267
267
|
return hasHelper();
|
|
268
268
|
},
|
|
269
269
|
get children () {
|
|
270
|
-
return
|
|
270
|
+
return createComponent(InputHelper, {
|
|
271
271
|
get id () {
|
|
272
272
|
return helperId();
|
|
273
273
|
},
|
|
@@ -284,11 +284,11 @@ const InputBase = (props)=>{
|
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
};
|
|
287
|
-
const
|
|
287
|
+
const Input_Input = Object.assign(InputBase, {
|
|
288
288
|
Root: InputRoot,
|
|
289
289
|
Field: InputField,
|
|
290
290
|
Label: InputLabel,
|
|
291
291
|
Helper: InputHelper
|
|
292
292
|
});
|
|
293
|
-
const
|
|
294
|
-
export {
|
|
293
|
+
const Input = Input_Input;
|
|
294
|
+
export { Input as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const input =
|
|
1
|
+
import external_Input_js_default from "./Input.js";
|
|
2
|
+
const input = external_Input_js_default;
|
|
3
3
|
export { input as default };
|