@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,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Label.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 "./Label.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<label>");
|
|
7
7
|
const LabelRoot = (props)=>{
|
|
8
|
-
const [local, others] =
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"children",
|
|
10
10
|
"class",
|
|
11
11
|
"className",
|
|
@@ -19,12 +19,12 @@ const LabelRoot = (props)=>{
|
|
|
19
19
|
]);
|
|
20
20
|
return (()=>{
|
|
21
21
|
var _el$ = _tmpl$();
|
|
22
|
-
|
|
22
|
+
spread(_el$, mergeProps(others, {
|
|
23
23
|
get ["for"] () {
|
|
24
24
|
return local.for ?? local.htmlFor;
|
|
25
25
|
},
|
|
26
26
|
get ["class"] () {
|
|
27
|
-
return
|
|
27
|
+
return twMerge(CLASSES.base, local.isRequired && CLASSES.flag.required, local.isDisabled && CLASSES.flag.disabled, local.isInvalid && CLASSES.flag.invalid, local.class, local.className);
|
|
28
28
|
},
|
|
29
29
|
"data-slot": "label",
|
|
30
30
|
get ["data-required"] () {
|
|
@@ -49,7 +49,7 @@ const LabelRoot = (props)=>{
|
|
|
49
49
|
return local.isInvalid ? "true" : void 0;
|
|
50
50
|
}
|
|
51
51
|
}), false, true);
|
|
52
|
-
|
|
52
|
+
insert(_el$, ()=>local.children);
|
|
53
53
|
return _el$;
|
|
54
54
|
})();
|
|
55
55
|
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__LabelRoot = __WEBPACK_EXTERNAL_MODULE__Label_js_56960635__.LabelRoot;
|
|
4
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Label_js_56960635__["default"];
|
|
5
|
-
export { __webpack_exports__Label as Label, __webpack_exports__LabelRoot as LabelRoot, __webpack_exports__default as default };
|
|
1
|
+
import external_Label_js_default, { Label, LabelRoot } from "./Label.js";
|
|
2
|
+
export { Label, LabelRoot, external_Label_js_default as default };
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.language-switcher {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.language-switcher__trigger {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
min-height: 2rem;
|
|
9
|
-
min-width: 2.25rem;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
border-radius: var(--radius-field);
|
|
13
|
-
border: 1px solid color-mix(in oklab, var(--color-base-content) 18%, transparent);
|
|
14
|
-
background: var(--color-base-100);
|
|
15
|
-
color: var(--color-base-content);
|
|
16
|
-
padding: 0.25rem 0.5rem;
|
|
17
|
-
font-size: 0.75rem;
|
|
18
|
-
font-weight: 700;
|
|
19
|
-
text-transform: uppercase;
|
|
20
|
-
transition:
|
|
21
|
-
background-color 150ms ease,
|
|
22
|
-
border-color 150ms ease,
|
|
23
|
-
color 150ms ease;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.language-switcher__trigger:hover {
|
|
27
|
-
background: var(--color-base-200);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.language-switcher__trigger:focus-visible {
|
|
31
|
-
outline: 2px solid color-mix(in oklab, var(--color-primary) 70%, transparent);
|
|
32
|
-
outline-offset: 2px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.language-switcher__loading-icon {
|
|
36
|
-
animation: language-switcher-spin 0.9s linear infinite;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.language-switcher__locale {
|
|
40
|
-
letter-spacing: 0.04em;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.language-switcher__menu {
|
|
44
|
-
min-width: 8rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.language-switcher__item--selected {
|
|
48
|
-
background: var(--color-base-200);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@keyframes language-switcher-spin {
|
|
52
|
-
to {
|
|
53
|
-
transform: rotate(360deg);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.language-switcher {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.language-switcher__trigger {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
min-height: 2rem;
|
|
9
|
+
min-width: 2.25rem;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
border-radius: var(--radius-field);
|
|
13
|
+
border: 1px solid color-mix(in oklab, var(--color-base-content) 18%, transparent);
|
|
14
|
+
background: var(--color-base-100);
|
|
15
|
+
color: var(--color-base-content);
|
|
16
|
+
padding: 0.25rem 0.5rem;
|
|
17
|
+
font-size: 0.75rem;
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
transition:
|
|
21
|
+
background-color 150ms ease,
|
|
22
|
+
border-color 150ms ease,
|
|
23
|
+
color 150ms ease;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.language-switcher__trigger:hover {
|
|
27
|
+
background: var(--color-base-200);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.language-switcher__trigger:focus-visible {
|
|
31
|
+
outline: 2px solid color-mix(in oklab, var(--color-primary) 70%, transparent);
|
|
32
|
+
outline-offset: 2px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.language-switcher__loading-icon {
|
|
36
|
+
animation: language-switcher-spin 0.9s linear infinite;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.language-switcher__locale {
|
|
40
|
+
letter-spacing: 0.04em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.language-switcher__menu {
|
|
44
|
+
min-width: 8rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.language-switcher__item--selected {
|
|
48
|
+
background: var(--color-base-200);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes language-switcher-spin {
|
|
52
|
+
to {
|
|
53
|
+
transform: rotate(360deg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./LanguageSwitcher.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
var _tmpl$ = /*#__PURE__*/
|
|
9
|
-
const
|
|
10
|
-
const [local, others] =
|
|
3
|
+
import { For, Show, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import index_js_default from "../dropdown/index.js";
|
|
6
|
+
import external_icon_index_js_default from "../icon/index.js";
|
|
7
|
+
import { CLASSES } from "./LanguageSwitcher.classes.js";
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>");
|
|
9
|
+
const LanguageSwitcher_LanguageSwitcher = (props)=>{
|
|
10
|
+
const [local, others] = splitProps(props, [
|
|
11
11
|
"i18n",
|
|
12
12
|
"class",
|
|
13
13
|
"className",
|
|
@@ -25,8 +25,8 @@ const LanguageSwitcher = (props)=>{
|
|
|
25
25
|
await local.i18n.setLocale(lang);
|
|
26
26
|
local.onLanguageChange?.(lang);
|
|
27
27
|
};
|
|
28
|
-
const classes = ()=>
|
|
29
|
-
return
|
|
28
|
+
const classes = ()=>twMerge(CLASSES.base, local.class, local.className);
|
|
29
|
+
return createComponent(index_js_default.Root, mergeProps(others, ()=>({
|
|
30
30
|
class: classes()
|
|
31
31
|
}), {
|
|
32
32
|
get style () {
|
|
@@ -38,22 +38,22 @@ const LanguageSwitcher = (props)=>{
|
|
|
38
38
|
},
|
|
39
39
|
get children () {
|
|
40
40
|
return [
|
|
41
|
-
|
|
42
|
-
class:
|
|
41
|
+
createComponent(index_js_default.Trigger, mergeProps(()=>({
|
|
42
|
+
class: CLASSES.trigger
|
|
43
43
|
}), {
|
|
44
44
|
get ["aria-label"] () {
|
|
45
45
|
return `${local.currentLanguageLabel ?? "Current language"}: ${currentLanguageName()}`;
|
|
46
46
|
},
|
|
47
47
|
get children () {
|
|
48
|
-
return
|
|
48
|
+
return createComponent(Show, {
|
|
49
49
|
get when () {
|
|
50
50
|
return !local.i18n.isLoading;
|
|
51
51
|
},
|
|
52
52
|
get fallback () {
|
|
53
|
-
return
|
|
53
|
+
return createComponent(external_icon_index_js_default, mergeProps({
|
|
54
54
|
name: "icon-[mdi--loading]"
|
|
55
55
|
}, ()=>({
|
|
56
|
-
class:
|
|
56
|
+
class: CLASSES.loadingIcon
|
|
57
57
|
}), {
|
|
58
58
|
width: 16,
|
|
59
59
|
height: 16,
|
|
@@ -64,19 +64,19 @@ const LanguageSwitcher = (props)=>{
|
|
|
64
64
|
},
|
|
65
65
|
get children () {
|
|
66
66
|
var _el$ = _tmpl$();
|
|
67
|
-
|
|
68
|
-
class:
|
|
67
|
+
spread(_el$, mergeProps(()=>({
|
|
68
|
+
class: CLASSES.locale
|
|
69
69
|
}), {
|
|
70
70
|
"aria-hidden": "true"
|
|
71
71
|
}), false, true);
|
|
72
|
-
|
|
72
|
+
insert(_el$, ()=>local.i18n.locale.toUpperCase());
|
|
73
73
|
return _el$;
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
})),
|
|
78
|
-
|
|
79
|
-
class:
|
|
78
|
+
createComponent(index_js_default.Menu, mergeProps(()=>({
|
|
79
|
+
class: CLASSES.menu
|
|
80
80
|
}), {
|
|
81
81
|
get align () {
|
|
82
82
|
return local.align;
|
|
@@ -85,14 +85,14 @@ const LanguageSwitcher = (props)=>{
|
|
|
85
85
|
return local.optionsLabel ?? "Language options";
|
|
86
86
|
},
|
|
87
87
|
get children () {
|
|
88
|
-
return
|
|
88
|
+
return createComponent(For, {
|
|
89
89
|
get each () {
|
|
90
90
|
return local.i18n.languages;
|
|
91
91
|
},
|
|
92
|
-
children: (lang)=>
|
|
92
|
+
children: (lang)=>createComponent(index_js_default.Item, mergeProps({
|
|
93
93
|
onClick: ()=>handleSelect(lang.code)
|
|
94
94
|
}, ()=>({
|
|
95
|
-
class:
|
|
95
|
+
class: twMerge(CLASSES.item, isSelected(lang.code) && CLASSES.itemSelected)
|
|
96
96
|
}), {
|
|
97
97
|
get ["aria-current"] () {
|
|
98
98
|
return isSelected(lang.code) ? "true" : void 0;
|
|
@@ -108,5 +108,5 @@ const LanguageSwitcher = (props)=>{
|
|
|
108
108
|
}
|
|
109
109
|
}));
|
|
110
110
|
};
|
|
111
|
-
const
|
|
112
|
-
export {
|
|
111
|
+
const LanguageSwitcher = LanguageSwitcher_LanguageSwitcher;
|
|
112
|
+
export { LanguageSwitcher as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { createComponent } from "solid-js/web";
|
|
2
|
+
import { createContext, createSignal, useContext } from "solid-js";
|
|
3
3
|
function getNestedValue(obj, path) {
|
|
4
4
|
const keys = path.split(".");
|
|
5
5
|
let value = obj;
|
|
@@ -16,9 +16,9 @@ function createI18n(options) {
|
|
|
16
16
|
...acc,
|
|
17
17
|
[lang.code]: lang.name
|
|
18
18
|
}), {});
|
|
19
|
-
const [localeSignal, setLocaleSignal] =
|
|
20
|
-
const [translations, setTranslations] =
|
|
21
|
-
const [isLoadingSignal, setIsLoading] =
|
|
19
|
+
const [localeSignal, setLocaleSignal] = createSignal(defaultLanguage);
|
|
20
|
+
const [translations, setTranslations] = createSignal(initialTranslations);
|
|
21
|
+
const [isLoadingSignal, setIsLoading] = createSignal(false);
|
|
22
22
|
const t = (key)=>getNestedValue(translations(), key);
|
|
23
23
|
const setLocale = async (lang)=>{
|
|
24
24
|
if (!supportedCodes.includes(lang)) lang = defaultLanguage;
|
|
@@ -66,13 +66,13 @@ function createI18n(options) {
|
|
|
66
66
|
supportedCodes
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const I18nContext =
|
|
69
|
+
const I18nContext = createContext();
|
|
70
70
|
function useI18n() {
|
|
71
|
-
const context =
|
|
71
|
+
const context = useContext(I18nContext);
|
|
72
72
|
if (!context) throw new Error("useI18n must be used within an I18nProvider");
|
|
73
73
|
return context.i18n;
|
|
74
74
|
}
|
|
75
|
-
const I18nProvider = (props)=>
|
|
75
|
+
const I18nProvider = (props)=>createComponent(I18nContext.Provider, {
|
|
76
76
|
get value () {
|
|
77
77
|
return {
|
|
78
78
|
i18n: props.i18n
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
var __webpack_exports__I18nProvider = __WEBPACK_EXTERNAL_MODULE__createI18n_js_f0fd3cf5__.I18nProvider;
|
|
5
|
-
var __webpack_exports__LanguageSwitcher = __WEBPACK_EXTERNAL_MODULE__LanguageSwitcher_js_68b561ec__["default"];
|
|
6
|
-
var __webpack_exports__createI18n = __WEBPACK_EXTERNAL_MODULE__createI18n_js_f0fd3cf5__.createI18n;
|
|
7
|
-
var __webpack_exports__useI18n = __WEBPACK_EXTERNAL_MODULE__createI18n_js_f0fd3cf5__.useI18n;
|
|
8
|
-
export { __webpack_exports__I18nContext as I18nContext, __webpack_exports__I18nProvider as I18nProvider, __webpack_exports__LanguageSwitcher as LanguageSwitcher, __webpack_exports__createI18n as createI18n, __webpack_exports__useI18n as useI18n };
|
|
1
|
+
import external_LanguageSwitcher_js_default from "./LanguageSwitcher.js";
|
|
2
|
+
import { I18nContext, I18nProvider, createI18n, useI18n } from "./createI18n.js";
|
|
3
|
+
export { I18nContext, I18nProvider, external_LanguageSwitcher_js_default as LanguageSwitcher, createI18n, useI18n };
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.link {
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
width: fit-content;
|
|
6
|
-
height: fit-content;
|
|
7
|
-
align-items: center;
|
|
8
|
-
border-radius: 0.75rem;
|
|
9
|
-
font-size: 0.875rem;
|
|
10
|
-
font-weight: 500;
|
|
11
|
-
line-height: 1.25rem;
|
|
12
|
-
color: var(--color-link, var(--color-accent));
|
|
13
|
-
text-decoration-line: underline;
|
|
14
|
-
text-decoration-thickness: 1.5px;
|
|
15
|
-
text-decoration-color: var(
|
|
16
|
-
--color-separator-tertiary,
|
|
17
|
-
color-mix(in oklab, var(--color-base-content) 22%, transparent)
|
|
18
|
-
);
|
|
19
|
-
text-underline-offset: 0.25rem;
|
|
20
|
-
cursor: var(--cursor-interactive, pointer);
|
|
21
|
-
-webkit-tap-highlight-color: transparent;
|
|
22
|
-
transition:
|
|
23
|
-
color 100ms var(--ease-smooth, ease),
|
|
24
|
-
text-decoration-color 100ms var(--ease-out, ease),
|
|
25
|
-
background-color 150ms var(--ease-smooth, ease),
|
|
26
|
-
box-shadow 150ms var(--ease-out, ease),
|
|
27
|
-
opacity 100ms var(--ease-out, ease);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.link--default {
|
|
31
|
-
color: var(--color-link, var(--color-accent));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.link--underline-always {
|
|
35
|
-
text-decoration-line: underline;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.link--underline-hover {
|
|
39
|
-
text-decoration-line: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.link--underline-none {
|
|
43
|
-
text-decoration-line: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.link:visited {
|
|
47
|
-
color: var(
|
|
48
|
-
--color-link-visited,
|
|
49
|
-
color-mix(in oklab, var(--color-link, var(--color-accent)) 84%, black)
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@media (hover: hover) {
|
|
54
|
-
.link:hover,
|
|
55
|
-
.link[data-hovered="true"] {
|
|
56
|
-
text-decoration-color: var(
|
|
57
|
-
--color-muted,
|
|
58
|
-
color-mix(in oklab, var(--color-base-content) 50%, transparent)
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.link--underline-hover:hover,
|
|
63
|
-
.link--underline-hover[data-hovered="true"] {
|
|
64
|
-
text-decoration-line: underline;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.link:focus-visible,
|
|
69
|
-
.link[data-focus-visible="true"] {
|
|
70
|
-
outline: 2px solid var(--color-accent);
|
|
71
|
-
outline-offset: 2px;
|
|
72
|
-
text-decoration-color: currentColor;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.link--disabled,
|
|
76
|
-
.link[aria-disabled="true"] {
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
opacity: var(--disabled-opacity, 0.6);
|
|
80
|
-
text-decoration-line: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.link__icon {
|
|
84
|
-
pointer-events: none;
|
|
85
|
-
display: inline-flex;
|
|
86
|
-
width: 0.5rem;
|
|
87
|
-
height: 0.5rem;
|
|
88
|
-
flex-shrink: 0;
|
|
89
|
-
align-items: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
color: currentColor;
|
|
92
|
-
opacity: 0.6;
|
|
93
|
-
transition: opacity 150ms var(--ease-out, ease);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.link__icon-default {
|
|
97
|
-
display: block;
|
|
98
|
-
width: 100%;
|
|
99
|
-
height: 100%;
|
|
100
|
-
transform: translateY(1px);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.link__icon[data-default-icon="true"] {
|
|
104
|
-
margin-left: 0.25rem;
|
|
105
|
-
padding-bottom: 0.125rem;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@media (hover: hover) {
|
|
109
|
-
.link:hover .link__icon,
|
|
110
|
-
.link[data-hovered="true"] .link__icon {
|
|
111
|
-
opacity: 1;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.link:focus-visible .link__icon,
|
|
116
|
-
.link[data-focus-visible="true"] .link__icon {
|
|
117
|
-
opacity: 1;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.link.button {
|
|
121
|
-
gap: 0;
|
|
122
|
-
text-decoration-line: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@media (prefers-reduced-motion: reduce) {
|
|
126
|
-
.link,
|
|
127
|
-
.link__icon {
|
|
128
|
-
transition: none;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.link {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
height: fit-content;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-radius: 0.75rem;
|
|
9
|
+
font-size: 0.875rem;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
line-height: 1.25rem;
|
|
12
|
+
color: var(--color-link, var(--color-accent));
|
|
13
|
+
text-decoration-line: underline;
|
|
14
|
+
text-decoration-thickness: 1.5px;
|
|
15
|
+
text-decoration-color: var(
|
|
16
|
+
--color-separator-tertiary,
|
|
17
|
+
color-mix(in oklab, var(--color-base-content) 22%, transparent)
|
|
18
|
+
);
|
|
19
|
+
text-underline-offset: 0.25rem;
|
|
20
|
+
cursor: var(--cursor-interactive, pointer);
|
|
21
|
+
-webkit-tap-highlight-color: transparent;
|
|
22
|
+
transition:
|
|
23
|
+
color 100ms var(--ease-smooth, ease),
|
|
24
|
+
text-decoration-color 100ms var(--ease-out, ease),
|
|
25
|
+
background-color 150ms var(--ease-smooth, ease),
|
|
26
|
+
box-shadow 150ms var(--ease-out, ease),
|
|
27
|
+
opacity 100ms var(--ease-out, ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.link--default {
|
|
31
|
+
color: var(--color-link, var(--color-accent));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.link--underline-always {
|
|
35
|
+
text-decoration-line: underline;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.link--underline-hover {
|
|
39
|
+
text-decoration-line: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.link--underline-none {
|
|
43
|
+
text-decoration-line: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.link:visited {
|
|
47
|
+
color: var(
|
|
48
|
+
--color-link-visited,
|
|
49
|
+
color-mix(in oklab, var(--color-link, var(--color-accent)) 84%, black)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
.link:hover,
|
|
55
|
+
.link[data-hovered="true"] {
|
|
56
|
+
text-decoration-color: var(
|
|
57
|
+
--color-muted,
|
|
58
|
+
color-mix(in oklab, var(--color-base-content) 50%, transparent)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.link--underline-hover:hover,
|
|
63
|
+
.link--underline-hover[data-hovered="true"] {
|
|
64
|
+
text-decoration-line: underline;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.link:focus-visible,
|
|
69
|
+
.link[data-focus-visible="true"] {
|
|
70
|
+
outline: 2px solid var(--color-accent);
|
|
71
|
+
outline-offset: 2px;
|
|
72
|
+
text-decoration-color: currentColor;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.link--disabled,
|
|
76
|
+
.link[aria-disabled="true"] {
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
opacity: var(--disabled-opacity, 0.6);
|
|
80
|
+
text-decoration-line: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.link__icon {
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
width: 0.5rem;
|
|
87
|
+
height: 0.5rem;
|
|
88
|
+
flex-shrink: 0;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
color: currentColor;
|
|
92
|
+
opacity: 0.6;
|
|
93
|
+
transition: opacity 150ms var(--ease-out, ease);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.link__icon-default {
|
|
97
|
+
display: block;
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
transform: translateY(1px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.link__icon[data-default-icon="true"] {
|
|
104
|
+
margin-left: 0.25rem;
|
|
105
|
+
padding-bottom: 0.125rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (hover: hover) {
|
|
109
|
+
.link:hover .link__icon,
|
|
110
|
+
.link[data-hovered="true"] .link__icon {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.link:focus-visible .link__icon,
|
|
116
|
+
.link[data-focus-visible="true"] .link__icon {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.link.button {
|
|
121
|
+
gap: 0;
|
|
122
|
+
text-decoration-line: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (prefers-reduced-motion: reduce) {
|
|
126
|
+
.link,
|
|
127
|
+
.link__icon {
|
|
128
|
+
transition: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|