@pathscale/ui 1.2.5 → 1.2.7
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/LICENSE +22 -22
- package/README.md +59 -59
- package/dist/components/_shared/index.js +2 -3
- package/dist/components/_shared/overlayPosition.js +5 -5
- package/dist/components/accordion/Accordion.css +158 -158
- package/dist/components/accordion/Accordion.js +44 -44
- package/dist/components/accordion/index.js +2 -9
- package/dist/components/alert/Alert.css +116 -116
- package/dist/components/alert/Alert.js +30 -30
- package/dist/components/alert/index.js +2 -8
- package/dist/components/auth-card/AuthCard.js +20 -20
- package/dist/components/auth-card/index.js +2 -3
- package/dist/components/auth-error-message/AuthErrorMessage.js +12 -12
- package/dist/components/auth-error-message/index.js +2 -3
- package/dist/components/auth-field-group/AuthFieldGroup.js +11 -11
- package/dist/components/auth-field-group/index.js +2 -3
- package/dist/components/auth-footer-links/AuthFooterLinks.js +20 -20
- package/dist/components/auth-footer-links/index.js +2 -3
- package/dist/components/auth-form/AuthForm.js +11 -11
- package/dist/components/auth-form/index.js +2 -3
- package/dist/components/auth-powered-by/AuthPoweredBy.js +15 -26
- package/dist/components/auth-powered-by/index.js +2 -3
- package/dist/components/auth-submit-button/AuthSubmitButton.js +10 -10
- package/dist/components/auth-submit-button/index.js +2 -3
- package/dist/components/auth-success-message/AuthSuccessMessage.js +9 -9
- package/dist/components/auth-success-message/index.js +2 -3
- package/dist/components/avatar/Avatar.css +124 -124
- 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.css +164 -164
- package/dist/components/badge/Badge.js +19 -19
- package/dist/components/badge/index.js +6 -9
- package/dist/components/breadcrumbs/Breadcrumbs.css +63 -63
- package/dist/components/breadcrumbs/Breadcrumbs.js +25 -25
- package/dist/components/breadcrumbs/index.js +2 -5
- package/dist/components/button/Button.css +194 -194
- package/dist/components/button/Button.js +22 -22
- package/dist/components/button/index.js +2 -3
- package/dist/components/button-group/ButtonGroup.css +117 -117
- 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.css +258 -258
- package/dist/components/calendar/Calendar.js +85 -85
- package/dist/components/calendar/index.js +2 -3
- package/dist/components/card/Card.css +110 -110
- package/dist/components/card/Card.js +21 -21
- package/dist/components/card/index.js +2 -8
- package/dist/components/chatbubble/ChatBubble.css +164 -164
- 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.css +183 -183
- package/dist/components/checkbox/Checkbox.js +29 -29
- package/dist/components/checkbox/index.js +2 -3
- package/dist/components/checkbox-group/CheckboxGroup.css +10 -10
- 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.css +197 -197
- package/dist/components/chip/Chip.js +32 -32
- package/dist/components/chip/index.js +5 -7
- package/dist/components/close-button/CloseButton.css +81 -81
- package/dist/components/close-button/CloseButton.js +22 -22
- package/dist/components/close-button/index.js +2 -3
- package/dist/components/color-area/ColorArea.css +54 -54
- package/dist/components/color-area/ColorArea.js +13 -13
- package/dist/components/color-area/index.js +2 -2
- package/dist/components/color-field/ColorField.css +88 -88
- package/dist/components/color-field/ColorField.js +23 -23
- package/dist/components/color-field/index.js +2 -2
- package/dist/components/color-picker/ColorPicker.css +28 -28
- package/dist/components/color-picker/ColorPicker.js +44 -44
- package/dist/components/color-picker/index.js +2 -8
- package/dist/components/color-slider/ColorSlider.css +57 -57
- package/dist/components/color-slider/ColorSlider.js +21 -21
- package/dist/components/color-slider/index.js +2 -2
- package/dist/components/color-swatch/ColorSwatch.css +84 -84
- 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.css +12 -12
- 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.css +147 -147
- 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.css +344 -344
- package/dist/components/combo-box/ComboBox.js +90 -90
- package/dist/components/combo-box/index.js +2 -10
- package/dist/components/date-field/DateField.css +215 -215
- package/dist/components/date-field/DateField.js +41 -41
- package/dist/components/date-field/index.js +2 -11
- package/dist/components/date-picker/DatePicker.css +143 -143
- 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.css +149 -149
- 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.css +10 -10
- package/dist/components/description/Description.js +9 -9
- package/dist/components/description/index.js +2 -5
- package/dist/components/disclosure/Disclosure.css +84 -84
- package/dist/components/disclosure/Disclosure.js +40 -40
- package/dist/components/disclosure/index.js +3 -9
- package/dist/components/disclosure-group/DisclosureGroup.css +9 -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.context.js +3 -3
- package/dist/components/drawer/Drawer.css +463 -463
- package/dist/components/drawer/Drawer.js +107 -107
- package/dist/components/drawer/index.js +2 -15
- package/dist/components/dropdown/Dropdown.css +211 -211
- package/dist/components/dropdown/Dropdown.js +66 -66
- package/dist/components/dropdown/index.js +2 -4
- package/dist/components/empty-state/EmptyState.css +39 -39
- package/dist/components/empty-state/EmptyState.js +25 -25
- package/dist/components/empty-state/index.js +2 -8
- package/dist/components/error-message/ErrorMessage.css +20 -20
- package/dist/components/error-message/ErrorMessage.js +12 -12
- package/dist/components/error-message/index.js +2 -5
- package/dist/components/field-error/FieldError.css +27 -27
- package/dist/components/field-error/FieldError.js +14 -14
- package/dist/components/field-error/index.js +2 -5
- package/dist/components/fieldset/Fieldset.css +30 -30
- package/dist/components/fieldset/Fieldset.js +21 -21
- package/dist/components/fieldset/index.js +2 -8
- package/dist/components/flex/Flex.css +5 -5
- package/dist/components/flex/Flex.js +14 -14
- package/dist/components/flex/index.js +2 -3
- package/dist/components/floating-dock/FloatingDock.css +208 -208
- 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/footer.css +51 -51
- package/dist/components/footer/index.js +2 -3
- package/dist/components/form/FieldErrorMessage.js +8 -8
- package/dist/components/form/Form.css +5 -5
- package/dist/components/form/Form.js +21 -21
- package/dist/components/form/FormField.js +19 -19
- package/dist/components/form/FormSubmitButton.js +11 -11
- package/dist/components/form/index.js +5 -12
- package/dist/components/glass-panel/GlassPanel.css +359 -359
- package/dist/components/glass-panel/GlassPanel.js +29 -29
- package/dist/components/glass-panel/index.js +2 -3
- package/dist/components/glow-card/GlowCard.css +100 -100
- package/dist/components/glow-card/GlowCard.js +10 -10
- package/dist/components/glow-card/index.js +2 -3
- package/dist/components/grid/Grid.css +5 -5
- package/dist/components/grid/Grid.js +15 -15
- package/dist/components/grid/index.js +2 -3
- package/dist/components/header/Header.css +13 -13
- package/dist/components/header/Header.js +12 -12
- package/dist/components/header/index.js +2 -5
- package/dist/components/icon/Icon.css +10 -10
- package/dist/components/icon/Icon.js +8 -8
- package/dist/components/icon/index.js +2 -3
- package/dist/components/immersive-landing/ImmersiveLanding.css +565 -565
- 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 +155 -155
- package/dist/components/input/Input.js +48 -48
- package/dist/components/input/index.js +2 -2
- package/dist/components/input-group/InputGroup.css +172 -172
- package/dist/components/input-group/InputGroup.js +33 -33
- package/dist/components/input-group/index.js +2 -9
- package/dist/components/input-otp/InputOTP.css +170 -170
- 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.css +60 -60
- package/dist/components/kbd/Kbd.js +20 -20
- package/dist/components/kbd/index.js +2 -8
- package/dist/components/label/Label.css +30 -30
- package/dist/components/label/Label.js +9 -9
- package/dist/components/label/index.js +2 -5
- package/dist/components/language-switcher/LanguageSwitcher.css +56 -56
- 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.css +131 -131
- package/dist/components/link/Link.js +22 -22
- package/dist/components/link/index.js +2 -5
- package/dist/components/list-box/ListBox.css +148 -148
- 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/LiveChat.css +324 -324
- 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.css +199 -199
- 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.css +89 -89
- package/dist/components/meter/Meter.js +31 -31
- package/dist/components/meter/index.js +2 -8
- package/dist/components/modal/Modal.css +320 -320
- package/dist/components/modal/Modal.js +80 -80
- package/dist/components/modal/index.js +2 -13
- package/dist/components/navbar/Navbar.css +110 -110
- 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.css +66 -66
- package/dist/components/noise-background/NoiseBackground.js +35 -35
- package/dist/components/noise-background/index.js +2 -3
- package/dist/components/number-field/NumberField.css +198 -198
- package/dist/components/number-field/NumberField.js +42 -42
- package/dist/components/number-field/index.js +2 -9
- package/dist/components/pagination/Pagination.css +121 -121
- package/dist/components/pagination/Pagination.js +34 -34
- package/dist/components/pagination/index.js +2 -3
- package/dist/components/password-field/PasswordField.js +15 -15
- package/dist/components/password-field/index.js +2 -3
- package/dist/components/password-requirements/PasswordRequirements.js +24 -24
- package/dist/components/password-requirements/index.js +2 -3
- package/dist/components/password-rules/index.js +2 -4
- package/dist/components/popover/Popover.css +117 -117
- package/dist/components/popover/Popover.js +50 -50
- package/dist/components/popover/index.js +3 -9
- package/dist/components/progress-bar/ProgressBar.css +104 -104
- package/dist/components/progress-bar/ProgressBar.js +27 -27
- package/dist/components/progress-bar/index.js +2 -3
- package/dist/components/progress-circle/ProgressCircle.css +82 -82
- package/dist/components/progress-circle/ProgressCircle.js +32 -32
- package/dist/components/progress-circle/index.js +2 -3
- package/dist/components/radio/Radio.css +129 -129
- package/dist/components/radio/Radio.js +27 -27
- package/dist/components/radio/index.js +2 -3
- package/dist/components/radio-group/RadioGroup.css +58 -58
- 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.css +51 -51
- package/dist/components/range-calendar/RangeCalendar.js +15 -15
- package/dist/components/range-calendar/index.js +2 -3
- package/dist/components/scroll-shadow/ScrollShadow.css +93 -93
- 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.css +183 -183
- package/dist/components/search-field/SearchField.js +38 -38
- package/dist/components/search-field/index.js +2 -9
- package/dist/components/select/Select.css +284 -284
- package/dist/components/select/Select.js +129 -129
- package/dist/components/select/index.js +2 -3
- package/dist/components/separator/Separator.css +35 -35
- 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.css +95 -95
- package/dist/components/skeleton/Skeleton.js +8 -8
- package/dist/components/skeleton/index.js +2 -3
- package/dist/components/slider/Slider.css +122 -122
- package/dist/components/slider/Slider.js +26 -26
- package/dist/components/slider/index.js +2 -3
- package/dist/components/spinner/Spinner.css +131 -131
- package/dist/components/spinner/Spinner.js +19 -19
- package/dist/components/spinner/index.js +2 -5
- package/dist/components/surface/Surface.css +37 -37
- package/dist/components/surface/Surface.js +9 -9
- package/dist/components/surface/index.js +2 -4
- package/dist/components/table/ExpandToggle.js +14 -14
- package/dist/components/table/InlineConfirm.js +11 -11
- package/dist/components/table/MobileListView.js +24 -24
- package/dist/components/table/SortIcon.js +13 -13
- package/dist/components/table/Table.css +426 -426
- package/dist/components/table/Table.js +80 -80
- package/dist/components/table/VirtualSpacerRow.js +8 -8
- package/dist/components/table/index.js +8 -38
- package/dist/components/tabs/Tabs.css +203 -203
- package/dist/components/tabs/Tabs.js +59 -59
- package/dist/components/tabs/index.js +2 -4
- package/dist/components/tag/Tag.css +121 -121
- package/dist/components/tag/Tag.js +40 -40
- package/dist/components/tag/index.js +2 -6
- package/dist/components/tag-group/TagGroup.css +22 -22
- 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.css +66 -66
- package/dist/components/text/Text.js +9 -9
- package/dist/components/text/index.js +2 -5
- package/dist/components/text-area/TextArea.css +95 -95
- package/dist/components/text-area/TextArea.js +10 -10
- package/dist/components/text-area/index.js +2 -5
- package/dist/components/text-field/TextField.css +33 -33
- 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 +49 -49
- 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.css +215 -215
- package/dist/components/time-field/TimeField.js +41 -41
- package/dist/components/time-field/index.js +2 -11
- package/dist/components/toast/Toast.css +344 -344
- package/dist/components/toast/Toast.js +98 -98
- package/dist/components/toast/index.js +2 -19
- package/dist/components/toggle/Toggle.css +237 -237
- package/dist/components/toggle/Toggle.js +31 -31
- package/dist/components/toggle/index.js +2 -3
- package/dist/components/toolbar/Toolbar.css +55 -55
- package/dist/components/toolbar/Toolbar.js +10 -10
- package/dist/components/toolbar/index.js +2 -5
- package/dist/components/tooltip/Tooltip.css +153 -153
- package/dist/components/tooltip/Tooltip.js +36 -36
- 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/FormContext.js +3 -3
- package/dist/hooks/form/createForm.js +4 -4
- package/dist/hooks/form/index.js +5 -10
- package/dist/hooks/form/useFieldNew.js +10 -10
- 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.css +74 -74
- package/dist/index.js +108 -398
- 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 -39
- 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/AnimatedCollapse.js +27 -27
- package/dist/motion/solid/MotionDiv.js +13 -13
- package/dist/motion/solid/Presence.js +9 -9
- package/dist/motion/solid/index.js +4 -10
- 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 +15599 -15825
- package/dist/styles/base/index.css +43 -43
- package/dist/styles/themes/dark.css +141 -141
- package/dist/styles/themes/light.css +143 -143
- package/package.json +41 -34
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
var _tmpl$ = /*#__PURE__*/
|
|
1
|
+
import { createComponent, effect, insert, mergeProps, setAttribute, spread, template } from "solid-js/web";
|
|
2
|
+
import { Show, splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
var _tmpl$ = /*#__PURE__*/ template('<span class="inline-flex shrink-0"aria-hidden=true>'), _tmpl$2 = /*#__PURE__*/ template('<span class="inline-flex items-center gap-1.5"><span>'), _tmpl$3 = /*#__PURE__*/ template('<div><a target=_blank rel="noopener noreferrer"class="underline-offset-4 transition hover:underline">');
|
|
5
5
|
const ALIGN_CLASS = {
|
|
6
6
|
left: "justify-start text-left",
|
|
7
7
|
center: "justify-center text-center",
|
|
@@ -13,7 +13,7 @@ const VARIANT_CLASS = {
|
|
|
13
13
|
inline: "text-sm"
|
|
14
14
|
};
|
|
15
15
|
const AuthPoweredBy_AuthPoweredBy = (props)=>{
|
|
16
|
-
const [local, others] =
|
|
16
|
+
const [local, others] = splitProps(props, [
|
|
17
17
|
"label",
|
|
18
18
|
"logo",
|
|
19
19
|
"href",
|
|
@@ -23,46 +23,35 @@ const AuthPoweredBy_AuthPoweredBy = (props)=>{
|
|
|
23
23
|
"className",
|
|
24
24
|
"dataTheme"
|
|
25
25
|
]);
|
|
26
|
-
const label = ()=>local.label ?? "
|
|
26
|
+
const label = ()=>local.label ?? "Secure Auth by Honey";
|
|
27
|
+
const href = ()=>local.href ?? "https://honey.id/";
|
|
27
28
|
const content = ()=>(()=>{
|
|
28
29
|
var _el$ = _tmpl$2(), _el$3 = _el$.firstChild;
|
|
29
|
-
|
|
30
|
+
insert(_el$, createComponent(Show, {
|
|
30
31
|
get when () {
|
|
31
32
|
return local.logo;
|
|
32
33
|
},
|
|
33
34
|
get children () {
|
|
34
35
|
var _el$2 = _tmpl$();
|
|
35
|
-
|
|
36
|
+
insert(_el$2, ()=>local.logo);
|
|
36
37
|
return _el$2;
|
|
37
38
|
}
|
|
38
39
|
}), _el$3);
|
|
39
|
-
|
|
40
|
+
insert(_el$3, label);
|
|
40
41
|
return _el$;
|
|
41
42
|
})();
|
|
42
43
|
return (()=>{
|
|
43
|
-
var _el$4 = _tmpl$
|
|
44
|
-
|
|
45
|
-
class:
|
|
44
|
+
var _el$4 = _tmpl$3(), _el$5 = _el$4.firstChild;
|
|
45
|
+
spread(_el$4, mergeProps(others, ()=>({
|
|
46
|
+
class: twMerge("flex w-full", ALIGN_CLASS[local.align ?? "center"], VARIANT_CLASS[local.variant ?? "subtle"], local.class, local.className)
|
|
46
47
|
}), {
|
|
47
48
|
get ["data-theme"] () {
|
|
48
49
|
return local.dataTheme;
|
|
49
50
|
},
|
|
50
51
|
"data-slot": "auth-powered-by"
|
|
51
52
|
}), false, true);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return local.href;
|
|
55
|
-
},
|
|
56
|
-
get fallback () {
|
|
57
|
-
return content();
|
|
58
|
-
},
|
|
59
|
-
get children () {
|
|
60
|
-
var _el$5 = _tmpl$3();
|
|
61
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, content);
|
|
62
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "href", local.href));
|
|
63
|
-
return _el$5;
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
53
|
+
insert(_el$5, content);
|
|
54
|
+
effect(()=>setAttribute(_el$5, "href", href()));
|
|
66
55
|
return _el$4;
|
|
67
56
|
})();
|
|
68
57
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__AuthPoweredBy as AuthPoweredBy };
|
|
1
|
+
import external_AuthPoweredBy_js_default from "./AuthPoweredBy.js";
|
|
2
|
+
export { external_AuthPoweredBy_js_default as AuthPoweredBy };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import index_js_default from "../button/index.js";
|
|
5
5
|
const toButtonVariant = (variant)=>{
|
|
6
6
|
if ("danger" === variant) return "danger";
|
|
7
7
|
if ("ghost" === variant) return "ghost";
|
|
8
8
|
if ("secondary" === variant) return "secondary";
|
|
9
9
|
return "primary";
|
|
10
10
|
};
|
|
11
|
-
const
|
|
12
|
-
const [local, others] =
|
|
11
|
+
const AuthSubmitButton = (props)=>{
|
|
12
|
+
const [local, others] = splitProps(props, [
|
|
13
13
|
"children",
|
|
14
14
|
"pending",
|
|
15
15
|
"disabled",
|
|
@@ -19,7 +19,7 @@ const AuthSubmitButton_AuthSubmitButton = (props)=>{
|
|
|
19
19
|
"className",
|
|
20
20
|
"dataTheme"
|
|
21
21
|
]);
|
|
22
|
-
return
|
|
22
|
+
return createComponent(index_js_default, mergeProps(others, {
|
|
23
23
|
get type () {
|
|
24
24
|
return others.type ?? "submit";
|
|
25
25
|
},
|
|
@@ -36,7 +36,7 @@ const AuthSubmitButton_AuthSubmitButton = (props)=>{
|
|
|
36
36
|
return Boolean(local.disabled) || Boolean(local.pending);
|
|
37
37
|
}
|
|
38
38
|
}, ()=>({
|
|
39
|
-
class:
|
|
39
|
+
class: twMerge(local.class, local.className)
|
|
40
40
|
}), {
|
|
41
41
|
get ["data-theme"] () {
|
|
42
42
|
return local.dataTheme;
|
|
@@ -47,5 +47,5 @@ const AuthSubmitButton_AuthSubmitButton = (props)=>{
|
|
|
47
47
|
}
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
50
|
-
const
|
|
51
|
-
export {
|
|
50
|
+
const auth_submit_button_AuthSubmitButton = AuthSubmitButton;
|
|
51
|
+
export { auth_submit_button_AuthSubmitButton as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__AuthSubmitButton as AuthSubmitButton };
|
|
1
|
+
import external_AuthSubmitButton_js_default from "./AuthSubmitButton.js";
|
|
2
|
+
export { external_AuthSubmitButton_js_default as AuthSubmitButton };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Show, splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import index_js_default from "../alert/index.js";
|
|
5
5
|
const AuthSuccessMessage_AuthSuccessMessage = (props)=>{
|
|
6
|
-
const [local, others] =
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
7
|
"message",
|
|
8
8
|
"class",
|
|
9
9
|
"className",
|
|
10
10
|
"dataTheme"
|
|
11
11
|
]);
|
|
12
|
-
return
|
|
12
|
+
return createComponent(Show, {
|
|
13
13
|
get when () {
|
|
14
|
-
return null != local.message && "" !== local.message;
|
|
14
|
+
return memo(()=>null != local.message)() && "" !== local.message;
|
|
15
15
|
},
|
|
16
16
|
get children () {
|
|
17
|
-
return
|
|
17
|
+
return createComponent(index_js_default, mergeProps(others, {
|
|
18
18
|
status: "success"
|
|
19
19
|
}, ()=>({
|
|
20
|
-
class:
|
|
20
|
+
class: twMerge("text-sm", local.class, local.className)
|
|
21
21
|
}), {
|
|
22
22
|
get ["data-theme"] () {
|
|
23
23
|
return local.dataTheme;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__AuthSuccessMessage as AuthSuccessMessage };
|
|
1
|
+
import external_AuthSuccessMessage_js_default from "./AuthSuccessMessage.js";
|
|
2
|
+
export { external_AuthSuccessMessage_js_default as AuthSuccessMessage };
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
/* -------------------------------------------------------------------------------------------------
|
|
3
|
-
* Root
|
|
4
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
5
|
-
.avatar {
|
|
6
|
-
position: relative;
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
border-radius: 9999px;
|
|
13
|
-
width: 2.5rem;
|
|
14
|
-
height: 2.5rem;
|
|
15
|
-
background-color: var(--color-base-200);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* -------------------------------------------------------------------------------------------------
|
|
19
|
-
* Size modifiers
|
|
20
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
21
|
-
.avatar--sm {
|
|
22
|
-
width: 2rem;
|
|
23
|
-
height: 2rem;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* md is default — no extra styles */
|
|
27
|
-
|
|
28
|
-
.avatar--lg {
|
|
29
|
-
width: 3rem;
|
|
30
|
-
height: 3rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.avatar--lg .avatar__fallback {
|
|
34
|
-
font-size: 1rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* -------------------------------------------------------------------------------------------------
|
|
38
|
-
* Image
|
|
39
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
40
|
-
.avatar__image {
|
|
41
|
-
position: absolute;
|
|
42
|
-
inset: 0;
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 100%;
|
|
45
|
-
aspect-ratio: 1 / 1;
|
|
46
|
-
object-fit: cover;
|
|
47
|
-
transition: opacity 250ms ease;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@media (prefers-reduced-motion: reduce) {
|
|
51
|
-
.avatar__image {
|
|
52
|
-
transition: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* -------------------------------------------------------------------------------------------------
|
|
57
|
-
* Fallback
|
|
58
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
59
|
-
.avatar__fallback {
|
|
60
|
-
display: flex;
|
|
61
|
-
width: 100%;
|
|
62
|
-
height: 100%;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
background-color: var(--color-base-200);
|
|
66
|
-
font-size: 0.875rem;
|
|
67
|
-
font-weight: 500;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* -------------------------------------------------------------------------------------------------
|
|
71
|
-
* Fallback color modifiers
|
|
72
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
73
|
-
.avatar__fallback--default {
|
|
74
|
-
color: var(--color-base-content);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.avatar__fallback--accent {
|
|
78
|
-
color: var(--color-accent);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.avatar__fallback--success {
|
|
82
|
-
color: var(--color-success);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.avatar__fallback--warning {
|
|
86
|
-
color: var(--color-warning);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.avatar__fallback--danger {
|
|
90
|
-
color: var(--color-error);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* -------------------------------------------------------------------------------------------------
|
|
94
|
-
* Variant: soft
|
|
95
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
96
|
-
.avatar--soft {
|
|
97
|
-
background-color: transparent;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.avatar--soft .avatar__fallback--accent {
|
|
101
|
-
background-color: color-mix(in oklab, var(--color-accent) 12%, transparent);
|
|
102
|
-
color: var(--color-accent);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.avatar--soft .avatar__fallback--success {
|
|
106
|
-
background-color: color-mix(in oklab, var(--color-success) 12%, transparent);
|
|
107
|
-
color: var(--color-success);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.avatar--soft .avatar__fallback--warning {
|
|
111
|
-
background-color: color-mix(in oklab, var(--color-warning) 12%, transparent);
|
|
112
|
-
color: var(--color-warning);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.avatar--soft .avatar__fallback--danger {
|
|
116
|
-
background-color: color-mix(in oklab, var(--color-error) 12%, transparent);
|
|
117
|
-
color: var(--color-error);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.avatar--soft .avatar__fallback--default {
|
|
121
|
-
background-color: var(--color-base-200);
|
|
122
|
-
color: var(--color-base-content);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
/* -------------------------------------------------------------------------------------------------
|
|
3
|
+
* Root
|
|
4
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
5
|
+
.avatar {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
border-radius: 9999px;
|
|
13
|
+
width: 2.5rem;
|
|
14
|
+
height: 2.5rem;
|
|
15
|
+
background-color: var(--color-base-200);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* -------------------------------------------------------------------------------------------------
|
|
19
|
+
* Size modifiers
|
|
20
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
21
|
+
.avatar--sm {
|
|
22
|
+
width: 2rem;
|
|
23
|
+
height: 2rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* md is default — no extra styles */
|
|
27
|
+
|
|
28
|
+
.avatar--lg {
|
|
29
|
+
width: 3rem;
|
|
30
|
+
height: 3rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.avatar--lg .avatar__fallback {
|
|
34
|
+
font-size: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* -------------------------------------------------------------------------------------------------
|
|
38
|
+
* Image
|
|
39
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
40
|
+
.avatar__image {
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset: 0;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
aspect-ratio: 1 / 1;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
transition: opacity 250ms ease;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
.avatar__image {
|
|
52
|
+
transition: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* -------------------------------------------------------------------------------------------------
|
|
57
|
+
* Fallback
|
|
58
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
59
|
+
.avatar__fallback {
|
|
60
|
+
display: flex;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
background-color: var(--color-base-200);
|
|
66
|
+
font-size: 0.875rem;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* -------------------------------------------------------------------------------------------------
|
|
71
|
+
* Fallback color modifiers
|
|
72
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
73
|
+
.avatar__fallback--default {
|
|
74
|
+
color: var(--color-base-content);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.avatar__fallback--accent {
|
|
78
|
+
color: var(--color-accent);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.avatar__fallback--success {
|
|
82
|
+
color: var(--color-success);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.avatar__fallback--warning {
|
|
86
|
+
color: var(--color-warning);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.avatar__fallback--danger {
|
|
90
|
+
color: var(--color-error);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* -------------------------------------------------------------------------------------------------
|
|
94
|
+
* Variant: soft
|
|
95
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
96
|
+
.avatar--soft {
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.avatar--soft .avatar__fallback--accent {
|
|
101
|
+
background-color: color-mix(in oklab, var(--color-accent) 12%, transparent);
|
|
102
|
+
color: var(--color-accent);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.avatar--soft .avatar__fallback--success {
|
|
106
|
+
background-color: color-mix(in oklab, var(--color-success) 12%, transparent);
|
|
107
|
+
color: var(--color-success);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.avatar--soft .avatar__fallback--warning {
|
|
111
|
+
background-color: color-mix(in oklab, var(--color-warning) 12%, transparent);
|
|
112
|
+
color: var(--color-warning);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.avatar--soft .avatar__fallback--danger {
|
|
116
|
+
background-color: color-mix(in oklab, var(--color-error) 12%, transparent);
|
|
117
|
+
color: var(--color-error);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.avatar--soft .avatar__fallback--default {
|
|
121
|
+
background-color: var(--color-base-200);
|
|
122
|
+
color: var(--color-base-content);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Avatar.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const AvatarContext =
|
|
3
|
+
import { Show, createContext, createSignal, onMount, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Avatar.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>"), _tmpl$2 = /*#__PURE__*/ template("<img>");
|
|
7
|
+
const AvatarContext = createContext();
|
|
8
8
|
const useAvatarContext = ()=>{
|
|
9
|
-
const ctx =
|
|
9
|
+
const ctx = useContext(AvatarContext);
|
|
10
10
|
if (!ctx) throw new Error("Avatar compound components must be used within <Avatar>");
|
|
11
11
|
return ctx;
|
|
12
12
|
};
|
|
13
13
|
const AvatarRoot = (props)=>{
|
|
14
|
-
const [local, others] =
|
|
14
|
+
const [local, others] = splitProps(props, [
|
|
15
15
|
"children",
|
|
16
16
|
"class",
|
|
17
17
|
"className",
|
|
@@ -21,7 +21,7 @@ const AvatarRoot = (props)=>{
|
|
|
21
21
|
"dataTheme",
|
|
22
22
|
"style"
|
|
23
23
|
]);
|
|
24
|
-
const [imageLoaded, setImageLoaded] =
|
|
24
|
+
const [imageLoaded, setImageLoaded] = createSignal(false);
|
|
25
25
|
const size = ()=>local.size ?? "md";
|
|
26
26
|
const color = ()=>local.color ?? "default";
|
|
27
27
|
const variant = ()=>local.variant ?? "default";
|
|
@@ -32,12 +32,12 @@ const AvatarRoot = (props)=>{
|
|
|
32
32
|
imageLoaded,
|
|
33
33
|
setImageLoaded
|
|
34
34
|
};
|
|
35
|
-
return
|
|
35
|
+
return createComponent(AvatarContext.Provider, {
|
|
36
36
|
value: ctx,
|
|
37
37
|
get children () {
|
|
38
38
|
var _el$ = _tmpl$();
|
|
39
|
-
|
|
40
|
-
class:
|
|
39
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
40
|
+
class: twMerge(CLASSES.base, CLASSES.size[size()], CLASSES.variant[variant()], local.class, local.className)
|
|
41
41
|
}), {
|
|
42
42
|
"data-slot": "avatar-root",
|
|
43
43
|
get ["data-theme"] () {
|
|
@@ -47,13 +47,13 @@ const AvatarRoot = (props)=>{
|
|
|
47
47
|
return local.style;
|
|
48
48
|
}
|
|
49
49
|
}), false, true);
|
|
50
|
-
|
|
50
|
+
insert(_el$, ()=>local.children);
|
|
51
51
|
return _el$;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
const AvatarImage = (props)=>{
|
|
56
|
-
const [local, others] =
|
|
56
|
+
const [local, others] = splitProps(props, [
|
|
57
57
|
"class",
|
|
58
58
|
"className",
|
|
59
59
|
"dataTheme",
|
|
@@ -74,7 +74,7 @@ const AvatarImage = (props)=>{
|
|
|
74
74
|
};
|
|
75
75
|
return (()=>{
|
|
76
76
|
var _el$2 = _tmpl$2();
|
|
77
|
-
|
|
77
|
+
spread(_el$2, mergeProps(others, {
|
|
78
78
|
get src () {
|
|
79
79
|
return local.src;
|
|
80
80
|
},
|
|
@@ -82,7 +82,7 @@ const AvatarImage = (props)=>{
|
|
|
82
82
|
return local.alt;
|
|
83
83
|
}
|
|
84
84
|
}, ()=>({
|
|
85
|
-
class:
|
|
85
|
+
class: twMerge(CLASSES.slot.image, local.class, local.className)
|
|
86
86
|
}), {
|
|
87
87
|
"data-slot": "avatar-image",
|
|
88
88
|
get style () {
|
|
@@ -95,7 +95,7 @@ const AvatarImage = (props)=>{
|
|
|
95
95
|
})();
|
|
96
96
|
};
|
|
97
97
|
const AvatarFallback = (props)=>{
|
|
98
|
-
const [local, others] =
|
|
98
|
+
const [local, others] = splitProps(props, [
|
|
99
99
|
"children",
|
|
100
100
|
"class",
|
|
101
101
|
"className",
|
|
@@ -104,21 +104,21 @@ const AvatarFallback = (props)=>{
|
|
|
104
104
|
"delayMs"
|
|
105
105
|
]);
|
|
106
106
|
const ctx = useAvatarContext();
|
|
107
|
-
const [showFallback, setShowFallback] =
|
|
108
|
-
|
|
107
|
+
const [showFallback, setShowFallback] = createSignal(!local.delayMs);
|
|
108
|
+
onMount(()=>{
|
|
109
109
|
if (local.delayMs) {
|
|
110
110
|
const timer = setTimeout(()=>setShowFallback(true), local.delayMs);
|
|
111
111
|
return ()=>clearTimeout(timer);
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
return
|
|
114
|
+
return createComponent(Show, {
|
|
115
115
|
get when () {
|
|
116
|
-
return
|
|
116
|
+
return memo(()=>!!showFallback())() && !ctx.imageLoaded();
|
|
117
117
|
},
|
|
118
118
|
get children () {
|
|
119
119
|
var _el$3 = _tmpl$();
|
|
120
|
-
|
|
121
|
-
class:
|
|
120
|
+
spread(_el$3, mergeProps(others, ()=>({
|
|
121
|
+
class: twMerge(CLASSES.slot.fallback, CLASSES.color[ctx.color()], local.class, local.className)
|
|
122
122
|
}), {
|
|
123
123
|
"data-slot": "avatar-fallback",
|
|
124
124
|
get ["data-theme"] () {
|
|
@@ -128,15 +128,15 @@ const AvatarFallback = (props)=>{
|
|
|
128
128
|
return local.style;
|
|
129
129
|
}
|
|
130
130
|
}), false, true);
|
|
131
|
-
|
|
131
|
+
insert(_el$3, ()=>local.children);
|
|
132
132
|
return _el$3;
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
|
-
const
|
|
136
|
+
const Avatar = Object.assign(AvatarRoot, {
|
|
137
137
|
Root: AvatarRoot,
|
|
138
138
|
Image: AvatarImage,
|
|
139
139
|
Fallback: AvatarFallback
|
|
140
140
|
});
|
|
141
|
-
const
|
|
142
|
-
export { AvatarFallback, AvatarImage, AvatarRoot,
|
|
141
|
+
const avatar_Avatar = Avatar;
|
|
142
|
+
export { AvatarFallback, AvatarImage, AvatarRoot, avatar_Avatar as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Dynamic, createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./Avatar.classes.js";
|
|
5
5
|
const VoidElementList = [
|
|
6
6
|
"area",
|
|
7
7
|
"base",
|
|
@@ -19,24 +19,24 @@ const VoidElementList = [
|
|
|
19
19
|
"track",
|
|
20
20
|
"wbr"
|
|
21
21
|
];
|
|
22
|
-
const
|
|
23
|
-
const [local, others] =
|
|
22
|
+
const AvatarGroup = (props)=>{
|
|
23
|
+
const [local, others] = splitProps(props, [
|
|
24
24
|
"as",
|
|
25
25
|
"class",
|
|
26
26
|
"className",
|
|
27
27
|
"children"
|
|
28
28
|
]);
|
|
29
29
|
const Tag = local.as || "div";
|
|
30
|
-
const classes = ()=>
|
|
30
|
+
const classes = ()=>twMerge(CLASSES.group.base, CLASSES.group.overlap, local.class, local.className);
|
|
31
31
|
const ariaLabel = `Group of ${local.children.length} avatar photos`;
|
|
32
|
-
if (VoidElementList.includes(Tag)) return
|
|
32
|
+
if (VoidElementList.includes(Tag)) return createComponent(Dynamic, mergeProps({
|
|
33
33
|
component: Tag
|
|
34
34
|
}, others, {
|
|
35
35
|
"aria-label": ariaLabel
|
|
36
36
|
}, ()=>({
|
|
37
37
|
class: classes()
|
|
38
38
|
})));
|
|
39
|
-
return
|
|
39
|
+
return createComponent(Dynamic, mergeProps({
|
|
40
40
|
component: Tag
|
|
41
41
|
}, others, {
|
|
42
42
|
"aria-label": ariaLabel
|
|
@@ -48,5 +48,5 @@ const AvatarGroup_AvatarGroup = (props)=>{
|
|
|
48
48
|
}
|
|
49
49
|
}));
|
|
50
50
|
};
|
|
51
|
-
const
|
|
52
|
-
export {
|
|
51
|
+
const avatar_AvatarGroup = AvatarGroup;
|
|
52
|
+
export { avatar_AvatarGroup as default };
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__AvatarImage = __WEBPACK_EXTERNAL_MODULE__Avatar_js_7e0bab6d__.AvatarImage;
|
|
4
|
-
var __webpack_exports__AvatarRoot = __WEBPACK_EXTERNAL_MODULE__Avatar_js_7e0bab6d__.AvatarRoot;
|
|
5
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Avatar_js_7e0bab6d__["default"];
|
|
6
|
-
export { __webpack_exports__AvatarFallback as AvatarFallback, __webpack_exports__AvatarImage as AvatarImage, __webpack_exports__AvatarRoot as AvatarRoot, __webpack_exports__default as default };
|
|
1
|
+
import external_Avatar_js_default, { AvatarFallback, AvatarImage, AvatarRoot } from "./Avatar.js";
|
|
2
|
+
export { AvatarFallback, AvatarImage, AvatarRoot, external_Avatar_js_default as default };
|