@pathscale/ui 1.2.6 → 1.2.8
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 +1 -3
- package/dist/components/_shared/overlayPosition.js +6 -6
- package/dist/components/accordion/Accordion.css +158 -158
- package/dist/components/accordion/Accordion.js +46 -45
- package/dist/components/accordion/index.js +3 -9
- package/dist/components/alert/Alert.css +116 -116
- package/dist/components/alert/Alert.js +34 -33
- package/dist/components/alert/index.js +1 -8
- package/dist/components/auth-card/AuthCard.js +21 -21
- package/dist/components/auth-card/index.js +1 -3
- package/dist/components/auth-error-message/AuthErrorMessage.js +10 -10
- package/dist/components/auth-error-message/index.js +1 -3
- package/dist/components/auth-field-group/AuthFieldGroup.js +9 -9
- package/dist/components/auth-field-group/index.js +1 -3
- package/dist/components/auth-footer-links/AuthFooterLinks.js +21 -21
- package/dist/components/auth-footer-links/index.js +1 -3
- package/dist/components/auth-form/AuthForm.js +11 -11
- package/dist/components/auth-form/index.js +1 -3
- package/dist/components/auth-powered-by/AuthPoweredBy.js +15 -15
- package/dist/components/auth-powered-by/index.js +1 -3
- package/dist/components/auth-submit-button/AuthSubmitButton.js +10 -10
- package/dist/components/auth-submit-button/index.js +1 -3
- package/dist/components/auth-success-message/AuthSuccessMessage.js +12 -12
- package/dist/components/auth-success-message/index.js +1 -3
- package/dist/components/avatar/Avatar.css +124 -124
- package/dist/components/avatar/Avatar.js +28 -27
- package/dist/components/avatar/AvatarGroup.js +11 -11
- package/dist/components/avatar/index.js +1 -6
- package/dist/components/badge/Badge.css +164 -164
- package/dist/components/badge/Badge.js +19 -19
- package/dist/components/badge/index.js +7 -9
- package/dist/components/breadcrumbs/Breadcrumbs.css +63 -63
- package/dist/components/breadcrumbs/Breadcrumbs.js +27 -26
- package/dist/components/breadcrumbs/index.js +1 -5
- package/dist/components/button/Button.css +194 -194
- package/dist/components/button/Button.js +23 -23
- package/dist/components/button/index.js +1 -3
- package/dist/components/button-group/ButtonGroup.css +117 -117
- package/dist/components/button-group/ButtonGroup.js +16 -15
- package/dist/components/button-group/context.js +2 -2
- package/dist/components/button-group/index.js +3 -6
- package/dist/components/calendar/Calendar.css +258 -258
- package/dist/components/calendar/Calendar.js +88 -88
- package/dist/components/calendar/index.js +1 -3
- package/dist/components/card/Card.css +110 -110
- package/dist/components/card/Card.js +23 -22
- package/dist/components/card/index.js +3 -8
- package/dist/components/chatbubble/ChatBubble.css +164 -164
- package/dist/components/chatbubble/ChatBubble.js +20 -20
- package/dist/components/chatbubble/ChatBubbleAvatar.js +9 -9
- package/dist/components/chatbubble/ChatBubbleFooter.js +9 -9
- package/dist/components/chatbubble/ChatBubbleHeader.js +11 -11
- package/dist/components/chatbubble/ChatBubbleMessage.js +12 -12
- package/dist/components/chatbubble/ChatBubbleTime.js +9 -9
- package/dist/components/chatbubble/index.js +1 -3
- package/dist/components/checkbox/Checkbox.css +183 -183
- package/dist/components/checkbox/Checkbox.js +32 -32
- package/dist/components/checkbox/index.js +1 -3
- package/dist/components/checkbox-group/CheckboxGroup.css +10 -10
- package/dist/components/checkbox-group/CheckboxGroup.js +14 -14
- package/dist/components/checkbox-group/context.js +2 -2
- package/dist/components/checkbox-group/index.js +4 -4
- package/dist/components/chip/Chip.css +197 -197
- package/dist/components/chip/Chip.js +32 -32
- package/dist/components/chip/index.js +6 -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 +1 -3
- package/dist/components/color-area/ColorArea.css +54 -54
- package/dist/components/color-area/ColorArea.js +16 -16
- package/dist/components/color-area/index.js +3 -3
- package/dist/components/color-field/ColorField.css +88 -88
- package/dist/components/color-field/ColorField.js +21 -21
- package/dist/components/color-field/index.js +3 -3
- package/dist/components/color-picker/ColorPicker.css +28 -28
- package/dist/components/color-picker/ColorPicker.js +46 -45
- package/dist/components/color-picker/index.js +3 -8
- package/dist/components/color-slider/ColorSlider.css +57 -57
- package/dist/components/color-slider/ColorSlider.js +19 -19
- package/dist/components/color-slider/index.js +3 -3
- package/dist/components/color-swatch/ColorSwatch.css +84 -84
- package/dist/components/color-swatch/ColorSwatch.js +12 -12
- package/dist/components/color-swatch/index.js +3 -3
- package/dist/components/color-swatch-picker/ColorSwatchPicker.css +12 -12
- package/dist/components/color-swatch-picker/ColorSwatchPicker.js +16 -15
- package/dist/components/color-swatch-picker/index.js +1 -5
- package/dist/components/color-wheel-flower/ColorWheelFlower.css +147 -147
- package/dist/components/color-wheel-flower/ColorWheelFlower.js +84 -84
- package/dist/components/color-wheel-flower/colorWheelFlowerContext.js +3 -3
- package/dist/components/color-wheel-flower/index.js +2 -6
- package/dist/components/combo-box/ComboBox.css +344 -344
- package/dist/components/combo-box/ComboBox.js +92 -91
- package/dist/components/combo-box/index.js +3 -10
- package/dist/components/date-field/DateField.css +215 -215
- package/dist/components/date-field/DateField.js +45 -44
- package/dist/components/date-field/index.js +3 -11
- package/dist/components/date-picker/DatePicker.css +143 -143
- package/dist/components/date-picker/DatePicker.js +38 -38
- package/dist/components/date-picker/index.js +1 -3
- package/dist/components/date-range-picker/DateRangePicker.css +149 -149
- package/dist/components/date-range-picker/DateRangePicker.js +53 -53
- package/dist/components/date-range-picker/index.js +1 -3
- package/dist/components/description/Description.css +10 -10
- package/dist/components/description/Description.js +11 -10
- package/dist/components/description/index.js +3 -5
- package/dist/components/disclosure/Disclosure.css +84 -84
- package/dist/components/disclosure/Disclosure.js +44 -43
- package/dist/components/disclosure/index.js +4 -9
- package/dist/components/disclosure-group/DisclosureGroup.css +9 -9
- package/dist/components/disclosure-group/DisclosureGroup.js +15 -14
- package/dist/components/disclosure-group/index.js +5 -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 +109 -108
- package/dist/components/drawer/index.js +1 -15
- package/dist/components/dropdown/Dropdown.css +211 -211
- package/dist/components/dropdown/Dropdown.js +68 -67
- package/dist/components/dropdown/index.js +3 -4
- package/dist/components/empty-state/EmptyState.css +39 -39
- package/dist/components/empty-state/EmptyState.js +27 -26
- package/dist/components/empty-state/index.js +1 -8
- package/dist/components/error-message/ErrorMessage.css +20 -20
- package/dist/components/error-message/ErrorMessage.js +13 -12
- package/dist/components/error-message/index.js +1 -5
- package/dist/components/field-error/FieldError.css +27 -27
- package/dist/components/field-error/FieldError.js +18 -17
- package/dist/components/field-error/index.js +1 -5
- package/dist/components/fieldset/Fieldset.css +30 -30
- package/dist/components/fieldset/Fieldset.js +23 -22
- package/dist/components/fieldset/index.js +3 -8
- package/dist/components/flex/Flex.css +5 -5
- package/dist/components/flex/Flex.js +14 -14
- package/dist/components/flex/index.js +1 -3
- package/dist/components/floating-dock/FloatingDock.css +208 -208
- package/dist/components/floating-dock/FloatingDock.js +78 -78
- package/dist/components/floating-dock/index.js +1 -3
- package/dist/components/footer/Footer.js +12 -12
- package/dist/components/footer/FooterTitle.js +9 -9
- package/dist/components/footer/footer.css +51 -51
- package/dist/components/footer/index.js +1 -3
- package/dist/components/form/FieldErrorMessage.js +10 -9
- package/dist/components/form/Form.css +5 -5
- package/dist/components/form/Form.js +18 -17
- package/dist/components/form/FormField.js +21 -20
- package/dist/components/form/FormSubmitButton.js +12 -11
- package/dist/components/form/index.js +6 -12
- package/dist/components/glass-panel/GlassPanel.classes.d.ts +3 -0
- package/dist/components/glass-panel/GlassPanel.classes.js +3 -0
- package/dist/components/glass-panel/GlassPanel.css +359 -282
- package/dist/components/glass-panel/GlassPanel.d.ts +3 -0
- package/dist/components/glass-panel/GlassPanel.js +30 -27
- package/dist/components/glass-panel/index.js +1 -3
- package/dist/components/glow-card/GlowCard.css +100 -100
- package/dist/components/glow-card/GlowCard.js +11 -11
- package/dist/components/glow-card/index.js +1 -3
- package/dist/components/grid/Grid.css +5 -5
- package/dist/components/grid/Grid.js +15 -15
- package/dist/components/grid/index.js +1 -3
- package/dist/components/header/Header.css +13 -13
- package/dist/components/header/Header.js +11 -10
- package/dist/components/header/index.js +3 -5
- package/dist/components/icon/Icon.css +10 -10
- package/dist/components/icon/Icon.js +9 -9
- package/dist/components/icon/index.js +1 -3
- package/dist/components/immersive-landing/ImmersiveLanding.css +565 -565
- package/dist/components/immersive-landing/ImmersiveLanding.js +45 -45
- package/dist/components/immersive-landing/ImmersiveLandingArrows.js +18 -18
- package/dist/components/immersive-landing/ImmersiveLandingContext.js +3 -3
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.js +34 -34
- package/dist/components/immersive-landing/ImmersiveLandingPage.js +16 -16
- 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 +6 -14
- package/dist/components/immersive-landing/useImmersiveLanding.js +8 -8
- package/dist/components/input/Input.css +155 -155
- package/dist/components/input/Input.js +46 -46
- package/dist/components/input/index.js +3 -3
- package/dist/components/input-group/InputGroup.css +172 -172
- package/dist/components/input-group/InputGroup.js +32 -31
- package/dist/components/input-group/index.js +3 -9
- package/dist/components/input-otp/InputOTP.css +170 -170
- package/dist/components/input-otp/InputOTP.js +52 -51
- package/dist/components/input-otp/index.js +1 -11
- package/dist/components/join/Join.js +15 -15
- package/dist/components/join/index.js +1 -3
- package/dist/components/kbd/Kbd.css +60 -60
- package/dist/components/kbd/Kbd.js +39 -38
- package/dist/components/kbd/index.js +1 -8
- package/dist/components/label/Label.css +30 -30
- package/dist/components/label/Label.js +11 -10
- package/dist/components/label/index.js +3 -5
- package/dist/components/language-switcher/LanguageSwitcher.css +56 -56
- package/dist/components/language-switcher/LanguageSwitcher.js +24 -24
- package/dist/components/language-switcher/createI18n.js +10 -10
- package/dist/components/language-switcher/index.js +2 -8
- package/dist/components/link/Link.css +131 -131
- package/dist/components/link/Link.js +21 -20
- package/dist/components/link/index.js +1 -5
- package/dist/components/list-box/ListBox.css +148 -148
- package/dist/components/list-box/ListBox.js +19 -18
- package/dist/components/list-box/ListBoxItem.js +31 -30
- package/dist/components/list-box/ListBoxSection.js +15 -14
- package/dist/components/list-box/context.js +2 -2
- package/dist/components/list-box/index.js +11 -16
- package/dist/components/live-chat/LiveChat.css +324 -324
- package/dist/components/live-chat/LiveChatBubble.js +28 -28
- package/dist/components/live-chat/LiveChatPanel.js +67 -67
- package/dist/components/live-chat/index.js +2 -5
- package/dist/components/menu/Menu.css +199 -199
- package/dist/components/menu/Menu.js +24 -28
- package/dist/components/menu/MenuItem.js +37 -36
- package/dist/components/menu/MenuSection.js +15 -14
- package/dist/components/menu/context.js +2 -2
- package/dist/components/menu/index.js +4 -12
- package/dist/components/meter/Meter.css +89 -89
- package/dist/components/meter/Meter.js +35 -34
- package/dist/components/meter/index.js +1 -8
- package/dist/components/modal/Modal.css +320 -320
- package/dist/components/modal/Modal.js +79 -78
- package/dist/components/modal/index.js +1 -13
- package/dist/components/navbar/Navbar.classes.d.ts +9 -0
- package/dist/components/navbar/Navbar.classes.js +9 -0
- package/dist/components/navbar/Navbar.css +110 -110
- package/dist/components/navbar/Navbar.js +16 -16
- package/dist/components/navbar/NavbarRow.js +11 -11
- package/dist/components/navbar/NavbarSection.js +10 -10
- package/dist/components/navbar/NavbarStack.js +11 -11
- package/dist/components/navbar/index.js +1 -3
- package/dist/components/noise-background/NoiseBackground.css +66 -66
- package/dist/components/noise-background/NoiseBackground.js +33 -33
- package/dist/components/noise-background/index.js +1 -3
- package/dist/components/number-field/NumberField.css +198 -198
- package/dist/components/number-field/NumberField.js +43 -42
- package/dist/components/number-field/index.js +1 -9
- package/dist/components/pagination/Pagination.css +121 -121
- package/dist/components/pagination/Pagination.js +32 -32
- package/dist/components/pagination/index.js +1 -3
- package/dist/components/password-field/PasswordField.js +18 -17
- package/dist/components/password-field/index.js +1 -3
- package/dist/components/password-requirements/PasswordRequirements.js +22 -22
- package/dist/components/password-requirements/index.js +1 -3
- package/dist/components/password-rules/index.js +1 -4
- package/dist/components/popover/Popover.css +117 -117
- package/dist/components/popover/Popover.js +52 -51
- package/dist/components/popover/index.js +4 -9
- package/dist/components/progress-bar/ProgressBar.css +104 -104
- package/dist/components/progress-bar/ProgressBar.js +28 -28
- package/dist/components/progress-bar/index.js +1 -3
- package/dist/components/progress-circle/ProgressCircle.css +82 -82
- package/dist/components/progress-circle/ProgressCircle.js +30 -30
- package/dist/components/progress-circle/index.js +1 -3
- package/dist/components/radio/Radio.css +129 -129
- package/dist/components/radio/Radio.js +28 -28
- package/dist/components/radio/index.js +1 -3
- package/dist/components/radio-group/RadioGroup.css +58 -58
- package/dist/components/radio-group/RadioGroup.js +31 -31
- package/dist/components/radio-group/context.js +2 -2
- package/dist/components/radio-group/index.js +4 -4
- package/dist/components/range-calendar/RangeCalendar.css +51 -51
- package/dist/components/range-calendar/RangeCalendar.js +18 -18
- package/dist/components/range-calendar/index.js +1 -3
- package/dist/components/scroll-shadow/ScrollShadow.css +93 -93
- package/dist/components/scroll-shadow/ScrollShadow.js +17 -17
- package/dist/components/scroll-shadow/index.js +1 -3
- package/dist/components/scroll-shadow/useScrollShadow.js +4 -4
- package/dist/components/search-field/SearchField.css +183 -183
- package/dist/components/search-field/SearchField.js +42 -41
- package/dist/components/search-field/index.js +1 -9
- package/dist/components/select/Select.css +284 -284
- package/dist/components/select/Select.js +130 -130
- package/dist/components/select/index.js +1 -3
- package/dist/components/separator/Separator.css +35 -35
- package/dist/components/separator/Separator.js +12 -11
- package/dist/components/separator/index.js +1 -4
- package/dist/components/size-picker/SizePicker.js +17 -17
- package/dist/components/size-picker/index.js +2 -6
- package/dist/components/size-picker/sizeStore.js +5 -5
- package/dist/components/skeleton/Skeleton.css +95 -95
- package/dist/components/skeleton/Skeleton.js +9 -9
- package/dist/components/skeleton/index.js +1 -3
- package/dist/components/slider/Slider.css +122 -122
- package/dist/components/slider/Slider.js +27 -27
- package/dist/components/slider/index.js +1 -3
- package/dist/components/spinner/Spinner.css +131 -131
- package/dist/components/spinner/Spinner.js +17 -17
- package/dist/components/spinner/index.js +1 -5
- package/dist/components/surface/Surface.css +37 -37
- package/dist/components/surface/Surface.js +11 -10
- package/dist/components/surface/index.js +1 -4
- package/dist/components/table/ExpandToggle.js +14 -14
- package/dist/components/table/InlineConfirm.js +12 -12
- package/dist/components/table/MobileListView.js +24 -24
- package/dist/components/table/SortIcon.js +11 -11
- package/dist/components/table/Table.css +426 -426
- package/dist/components/table/Table.js +82 -81
- package/dist/components/table/VirtualSpacerRow.js +9 -9
- package/dist/components/table/index.js +7 -38
- package/dist/components/tabs/Tabs.css +203 -203
- package/dist/components/tabs/Tabs.js +62 -61
- package/dist/components/tabs/index.js +1 -4
- package/dist/components/tag/Tag.css +121 -121
- package/dist/components/tag/Tag.js +41 -40
- package/dist/components/tag/index.js +3 -6
- package/dist/components/tag-group/TagGroup.css +22 -22
- package/dist/components/tag-group/TagGroup.js +24 -23
- package/dist/components/tag-group/context.js +2 -2
- package/dist/components/tag-group/index.js +1 -6
- package/dist/components/text/Text.css +66 -66
- package/dist/components/text/Text.js +11 -10
- package/dist/components/text/index.js +1 -5
- package/dist/components/text-area/TextArea.css +95 -95
- package/dist/components/text-area/TextArea.js +14 -13
- package/dist/components/text-area/index.js +1 -5
- package/dist/components/text-field/TextField.css +33 -33
- package/dist/components/text-field/TextField.js +14 -13
- package/dist/components/text-field/index.js +3 -7
- package/dist/components/textarea/Textarea.js +10 -11
- package/dist/components/textarea/index.js +1 -6
- package/dist/components/theme-color-picker/ThemeColorPicker.js +52 -52
- package/dist/components/theme-color-picker/hueShift.js +8 -8
- package/dist/components/theme-color-picker/index.js +2 -7
- package/dist/components/time-field/TimeField.css +215 -215
- package/dist/components/time-field/TimeField.js +43 -42
- package/dist/components/time-field/index.js +3 -11
- package/dist/components/toast/Toast.css +344 -344
- package/dist/components/toast/Toast.js +101 -100
- package/dist/components/toast/index.js +1 -19
- package/dist/components/toggle/Toggle.css +237 -237
- package/dist/components/toggle/Toggle.js +31 -31
- package/dist/components/toggle/index.js +1 -3
- package/dist/components/toolbar/Toolbar.css +55 -55
- package/dist/components/toolbar/Toolbar.js +12 -11
- package/dist/components/toolbar/index.js +1 -5
- package/dist/components/tooltip/Tooltip.css +153 -153
- package/dist/components/tooltip/Tooltip.js +40 -39
- package/dist/components/tooltip/index.js +1 -7
- package/dist/components/utils.js +6 -7
- package/dist/components/video-preview/VideoPreview.js +14 -13
- package/dist/components/video-preview/index.js +1 -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 +4 -10
- package/dist/hooks/form/useFieldNew.js +10 -10
- package/dist/hooks/layout/index.js +1 -3
- package/dist/hooks/layout/useDesktop.js +4 -4
- package/dist/hooks/table/index.js +8 -18
- package/dist/hooks/table/useAnchoredOverlayPosition.js +5 -5
- 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 +1 -3
- package/dist/lib/refs/mergeRefs.js +2 -2
- package/dist/lib/style/index.js +1 -4
- package/dist/lib/tag/createIsButton.js +4 -4
- package/dist/lib/tag/createTagName.js +2 -2
- package/dist/lib/tag/index.js +2 -7
- package/dist/motion/engine.js +4 -4
- package/dist/motion/index.js +10 -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 -26
- package/dist/motion/solid/MotionDiv.js +17 -16
- package/dist/motion/solid/Presence.js +13 -12
- package/dist/motion/solid/index.js +3 -10
- package/dist/motion/system.js +9 -9
- package/dist/primitives/streaming/index.js +2 -5
- package/dist/primitives/streaming/useStreamingBuffer.js +2 -2
- package/dist/primitives/streaming/useStreamingSubscription.js +7 -7
- package/dist/primitives/virtualizer/index.js +1 -3
- package/dist/primitives/virtualizer/useVirtualRows.js +7 -7
- package/dist/purge-manifest.json +15350 -15141
- package/dist/styles/base/index.css +43 -43
- package/dist/styles/icons/generated-icons.css +1 -173
- package/dist/styles/themes/dark.css +141 -141
- package/dist/styles/themes/light.css +143 -143
- package/package.json +31 -31
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Tag.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { Show, children, createContext, createMemo, createUniqueId, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import close_button from "../close-button/index.js";
|
|
6
|
+
import { TagGroupContext } from "../tag-group/context.js";
|
|
7
|
+
import { CLASSES } from "./Tag.classes.js";
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<span>");
|
|
9
9
|
const invokeEventHandler = (handler, event)=>{
|
|
10
10
|
if ("function" == typeof handler) return void handler(event);
|
|
11
11
|
if (Array.isArray(handler) && "function" == typeof handler[0]) handler[0](handler[1], event);
|
|
@@ -17,11 +17,11 @@ const extractTextValue = (nodes)=>{
|
|
|
17
17
|
if ("number" == typeof node) return String(node);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const TagContext =
|
|
20
|
+
const TagContext = createContext();
|
|
21
21
|
const TagRoot = (props)=>{
|
|
22
|
-
const fallbackKey =
|
|
23
|
-
const group =
|
|
24
|
-
const [local, others] =
|
|
22
|
+
const fallbackKey = createUniqueId();
|
|
23
|
+
const group = useContext(TagGroupContext);
|
|
24
|
+
const [local, others] = splitProps(props, [
|
|
25
25
|
"children",
|
|
26
26
|
"class",
|
|
27
27
|
"className",
|
|
@@ -39,10 +39,10 @@ const TagRoot = (props)=>{
|
|
|
39
39
|
"role",
|
|
40
40
|
"tabIndex"
|
|
41
41
|
]);
|
|
42
|
-
const resolvedChildren =
|
|
42
|
+
const resolvedChildren = children(()=>local.children);
|
|
43
43
|
const isRenderFnChild = ()=>"function" == typeof local.children;
|
|
44
|
-
const derivedText =
|
|
45
|
-
const tagKey =
|
|
44
|
+
const derivedText = createMemo(()=>isRenderFnChild() ? void 0 : extractTextValue(resolvedChildren.toArray()));
|
|
45
|
+
const tagKey = createMemo(()=>{
|
|
46
46
|
if (null != local.id) return String(local.id);
|
|
47
47
|
if (local.textValue) return toSlug(local.textValue);
|
|
48
48
|
if (derivedText()) return toSlug(derivedText());
|
|
@@ -54,7 +54,7 @@ const TagRoot = (props)=>{
|
|
|
54
54
|
const isSelected = ()=>Boolean(group?.selectedKeys().has(tagKey()));
|
|
55
55
|
const isDisabled = ()=>Boolean(local.isDisabled) || Boolean(group?.isDisabled()) || Boolean(group?.disabledKeys().has(tagKey()));
|
|
56
56
|
const allowsRemoving = ()=>Boolean(group?.allowsRemoving()) && Boolean(tagKey());
|
|
57
|
-
const renderState =
|
|
57
|
+
const renderState = createMemo(()=>({
|
|
58
58
|
isSelected: isSelected(),
|
|
59
59
|
isDisabled: isDisabled(),
|
|
60
60
|
allowsRemoving: allowsRemoving()
|
|
@@ -83,7 +83,7 @@ const TagRoot = (props)=>{
|
|
|
83
83
|
event.stopPropagation();
|
|
84
84
|
group.removeKey(tagKey(), event);
|
|
85
85
|
};
|
|
86
|
-
return
|
|
86
|
+
return createComponent(TagContext.Provider, {
|
|
87
87
|
value: {
|
|
88
88
|
allowsRemoving,
|
|
89
89
|
isDisabled,
|
|
@@ -92,8 +92,8 @@ const TagRoot = (props)=>{
|
|
|
92
92
|
},
|
|
93
93
|
get children () {
|
|
94
94
|
var _el$ = _tmpl$();
|
|
95
|
-
|
|
96
|
-
class:
|
|
95
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
96
|
+
class: twMerge(CLASSES.Root.base, CLASSES.Root.size[size()], CLASSES.Root.variant[variant()], local.class, local.className)
|
|
97
97
|
}), {
|
|
98
98
|
"data-slot": "tag",
|
|
99
99
|
get ["data-theme"] () {
|
|
@@ -115,7 +115,7 @@ const TagRoot = (props)=>{
|
|
|
115
115
|
return tagKey();
|
|
116
116
|
},
|
|
117
117
|
get ["aria-selected"] () {
|
|
118
|
-
return
|
|
118
|
+
return memo(()=>!!isSelectable())() ? isSelected() ? "true" : "false" : void 0;
|
|
119
119
|
},
|
|
120
120
|
get ["aria-disabled"] () {
|
|
121
121
|
return isDisabled() ? "true" : "false";
|
|
@@ -132,52 +132,52 @@ const TagRoot = (props)=>{
|
|
|
132
132
|
onClick: handleClick,
|
|
133
133
|
onKeyDown: handleKeyDown
|
|
134
134
|
}), false, true);
|
|
135
|
-
|
|
135
|
+
insert(_el$, createComponent(Show, {
|
|
136
136
|
get when () {
|
|
137
137
|
return isRenderFnChild();
|
|
138
138
|
},
|
|
139
139
|
get fallback () {
|
|
140
140
|
return [
|
|
141
|
-
|
|
141
|
+
createComponent(Show, {
|
|
142
142
|
get when () {
|
|
143
143
|
return local.startIcon;
|
|
144
144
|
},
|
|
145
145
|
get children () {
|
|
146
146
|
var _el$2 = _tmpl$2();
|
|
147
|
-
|
|
148
|
-
class:
|
|
147
|
+
spread(_el$2, mergeProps(()=>({
|
|
148
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
149
149
|
}), {
|
|
150
150
|
"data-slot": "tag-start-icon"
|
|
151
151
|
}), false, true);
|
|
152
|
-
|
|
152
|
+
insert(_el$2, ()=>local.startIcon);
|
|
153
153
|
return _el$2;
|
|
154
154
|
}
|
|
155
155
|
}),
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
memo(resolvedChildren),
|
|
157
|
+
createComponent(Show, {
|
|
158
158
|
get when () {
|
|
159
|
-
return allowsRemoving() && local.endIcon;
|
|
159
|
+
return memo(()=>!!allowsRemoving())() && local.endIcon;
|
|
160
160
|
},
|
|
161
161
|
get children () {
|
|
162
|
-
return
|
|
162
|
+
return createComponent(TagRemoveButton, {
|
|
163
163
|
get children () {
|
|
164
164
|
return local.endIcon;
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
}),
|
|
169
|
-
|
|
169
|
+
createComponent(Show, {
|
|
170
170
|
get when () {
|
|
171
|
-
return
|
|
171
|
+
return memo(()=>!allowsRemoving())() && local.endIcon;
|
|
172
172
|
},
|
|
173
173
|
get children () {
|
|
174
174
|
var _el$3 = _tmpl$2();
|
|
175
|
-
|
|
176
|
-
class:
|
|
175
|
+
spread(_el$3, mergeProps(()=>({
|
|
176
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
177
177
|
}), {
|
|
178
178
|
"data-slot": "tag-end-icon"
|
|
179
179
|
}), false, true);
|
|
180
|
-
|
|
180
|
+
insert(_el$3, ()=>local.endIcon);
|
|
181
181
|
return _el$3;
|
|
182
182
|
}
|
|
183
183
|
})
|
|
@@ -192,9 +192,9 @@ const TagRoot = (props)=>{
|
|
|
192
192
|
});
|
|
193
193
|
};
|
|
194
194
|
const TagRemoveButton = (props)=>{
|
|
195
|
-
const context =
|
|
195
|
+
const context = useContext(TagContext);
|
|
196
196
|
const hasIcon = ()=>null != props.children || null != props.startIcon || null != props.endIcon || context?.removeIcon() != null;
|
|
197
|
-
const [local, others] =
|
|
197
|
+
const [local, others] = splitProps(props, [
|
|
198
198
|
"children",
|
|
199
199
|
"class",
|
|
200
200
|
"className",
|
|
@@ -211,12 +211,12 @@ const TagRemoveButton = (props)=>{
|
|
|
211
211
|
};
|
|
212
212
|
if (!context?.allowsRemoving()) return null;
|
|
213
213
|
if (!hasIcon()) return null;
|
|
214
|
-
return
|
|
214
|
+
return createComponent(close_button, mergeProps(others, {
|
|
215
215
|
get ["aria-label"] () {
|
|
216
216
|
return local["aria-label"] ?? "Remove tag";
|
|
217
217
|
}
|
|
218
218
|
}, ()=>({
|
|
219
|
-
class:
|
|
219
|
+
class: twMerge(CLASSES.slot.removeButton, local.class, local.className)
|
|
220
220
|
}), {
|
|
221
221
|
"data-slot": "tag-remove-button",
|
|
222
222
|
get ["data-theme"] () {
|
|
@@ -234,9 +234,10 @@ const TagRemoveButton = (props)=>{
|
|
|
234
234
|
}
|
|
235
235
|
}));
|
|
236
236
|
};
|
|
237
|
-
const
|
|
237
|
+
const Tag = Object.assign(TagRoot, {
|
|
238
238
|
Root: TagRoot,
|
|
239
239
|
RemoveButton: TagRemoveButton
|
|
240
240
|
});
|
|
241
|
-
const
|
|
242
|
-
export
|
|
241
|
+
const tag_Tag = Tag;
|
|
242
|
+
export default tag_Tag;
|
|
243
|
+
export { Tag, TagRemoveButton, TagRoot };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __webpack_exports__TagRoot = __WEBPACK_EXTERNAL_MODULE__Tag_js_f7333ee7__.TagRoot;
|
|
5
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Tag_js_f7333ee7__["default"];
|
|
6
|
-
export { __webpack_exports__Tag as Tag, __webpack_exports__TagRemoveButton as TagRemoveButton, __webpack_exports__TagRoot as TagRoot, __webpack_exports__default as default };
|
|
1
|
+
import { Tag as external_Tag_js_Tag, TagRemoveButton, TagRoot } from "./Tag.js";
|
|
2
|
+
export default external_Tag_js_Tag;
|
|
3
|
+
export { TagRemoveButton, TagRoot, external_Tag_js_Tag as Tag };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.tag-group {
|
|
3
|
-
position: relative;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 0.25rem;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.tag-group__list {
|
|
10
|
-
position: relative;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-wrap: wrap;
|
|
13
|
-
gap: 0.375rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.tag-group [slot="description"],
|
|
17
|
-
.tag-group [data-slot="description"],
|
|
18
|
-
.tag-group [slot="errorMessage"],
|
|
19
|
-
.tag-group [data-slot="error-message"] {
|
|
20
|
-
padding: 0.25rem;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.tag-group {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0.25rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tag-group__list {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
gap: 0.375rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tag-group [slot="description"],
|
|
17
|
+
.tag-group [data-slot="description"],
|
|
18
|
+
.tag-group [slot="errorMessage"],
|
|
19
|
+
.tag-group [data-slot="error-message"] {
|
|
20
|
+
padding: 0.25rem;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./TagGroup.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { For, createMemo, createSignal, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./TagGroup.classes.js";
|
|
6
|
+
import { TagGroupContext } from "./context.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
8
8
|
const normalizeKeys = (keys)=>{
|
|
9
9
|
if (!keys) return new Set();
|
|
10
10
|
return new Set(Array.from(keys, (key)=>String(key)));
|
|
11
11
|
};
|
|
12
12
|
const TagGroupRoot = (props)=>{
|
|
13
|
-
const [local, others] =
|
|
13
|
+
const [local, others] = splitProps(props, [
|
|
14
14
|
"children",
|
|
15
15
|
"class",
|
|
16
16
|
"className",
|
|
@@ -28,14 +28,14 @@ const TagGroupRoot = (props)=>{
|
|
|
28
28
|
"disabled",
|
|
29
29
|
"role"
|
|
30
30
|
]);
|
|
31
|
-
const [internalSelectedKeys, setInternalSelectedKeys] =
|
|
31
|
+
const [internalSelectedKeys, setInternalSelectedKeys] = createSignal(normalizeKeys(local.defaultSelectedKeys));
|
|
32
32
|
const selectionMode = ()=>local.selectionMode ?? "none";
|
|
33
33
|
const size = ()=>local.size ?? "md";
|
|
34
34
|
const variant = ()=>local.variant ?? "default";
|
|
35
35
|
const isControlled = ()=>void 0 !== local.selectedKeys;
|
|
36
36
|
const isDisabled = ()=>Boolean(local.isDisabled) || Boolean(local.disabled);
|
|
37
|
-
const selectedKeys =
|
|
38
|
-
const disabledKeys =
|
|
37
|
+
const selectedKeys = createMemo(()=>isControlled() ? normalizeKeys(local.selectedKeys) : internalSelectedKeys());
|
|
38
|
+
const disabledKeys = createMemo(()=>normalizeKeys(local.disabledKeys));
|
|
39
39
|
const allowsRemoving = ()=>"function" == typeof local.onRemove;
|
|
40
40
|
const updateSelection = (nextKeys)=>{
|
|
41
41
|
if (!isControlled()) setInternalSelectedKeys(nextKeys);
|
|
@@ -69,7 +69,7 @@ const TagGroupRoot = (props)=>{
|
|
|
69
69
|
updateSelection(next);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return createComponent(TagGroupContext.Provider, {
|
|
73
73
|
value: {
|
|
74
74
|
size,
|
|
75
75
|
variant,
|
|
@@ -83,7 +83,7 @@ const TagGroupRoot = (props)=>{
|
|
|
83
83
|
},
|
|
84
84
|
get children () {
|
|
85
85
|
var _el$ = _tmpl$();
|
|
86
|
-
|
|
86
|
+
spread(_el$, mergeProps(others, {
|
|
87
87
|
get role () {
|
|
88
88
|
return local.role ?? "group";
|
|
89
89
|
},
|
|
@@ -107,20 +107,20 @@ const TagGroupRoot = (props)=>{
|
|
|
107
107
|
return isDisabled() ? "true" : void 0;
|
|
108
108
|
}
|
|
109
109
|
}, ()=>({
|
|
110
|
-
class:
|
|
110
|
+
class: twMerge(CLASSES.Root.base, local.class, local.className)
|
|
111
111
|
}), {
|
|
112
112
|
get style () {
|
|
113
113
|
return local.style;
|
|
114
114
|
}
|
|
115
115
|
}), false, true);
|
|
116
|
-
|
|
116
|
+
insert(_el$, ()=>local.children);
|
|
117
117
|
return _el$;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
121
|
const TagGroupList = (props)=>{
|
|
122
|
-
const group =
|
|
123
|
-
const [local, others] =
|
|
122
|
+
const group = useContext(TagGroupContext);
|
|
123
|
+
const [local, others] = splitProps(props, [
|
|
124
124
|
"children",
|
|
125
125
|
"class",
|
|
126
126
|
"className",
|
|
@@ -135,7 +135,7 @@ const TagGroupList = (props)=>{
|
|
|
135
135
|
if (0 === local.items.length) return local.renderEmptyState?.() ?? null;
|
|
136
136
|
if ("function" == typeof local.children) {
|
|
137
137
|
const renderItem = local.children;
|
|
138
|
-
return
|
|
138
|
+
return createComponent(For, {
|
|
139
139
|
get each () {
|
|
140
140
|
return local.items;
|
|
141
141
|
},
|
|
@@ -148,7 +148,7 @@ const TagGroupList = (props)=>{
|
|
|
148
148
|
};
|
|
149
149
|
return (()=>{
|
|
150
150
|
var _el$2 = _tmpl$();
|
|
151
|
-
|
|
151
|
+
spread(_el$2, mergeProps(others, {
|
|
152
152
|
get role () {
|
|
153
153
|
return local.role ?? (group?.selectionMode() === "none" ? "list" : "listbox");
|
|
154
154
|
},
|
|
@@ -160,19 +160,20 @@ const TagGroupList = (props)=>{
|
|
|
160
160
|
return local.dataTheme;
|
|
161
161
|
}
|
|
162
162
|
}, ()=>({
|
|
163
|
-
class:
|
|
163
|
+
class: twMerge(CLASSES.List.base, local.class, local.className)
|
|
164
164
|
}), {
|
|
165
165
|
get style () {
|
|
166
166
|
return local.style;
|
|
167
167
|
}
|
|
168
168
|
}), false, true);
|
|
169
|
-
|
|
169
|
+
insert(_el$2, renderChildren);
|
|
170
170
|
return _el$2;
|
|
171
171
|
})();
|
|
172
172
|
};
|
|
173
|
-
const
|
|
173
|
+
const TagGroup = Object.assign(TagGroupRoot, {
|
|
174
174
|
Root: TagGroupRoot,
|
|
175
175
|
List: TagGroupList
|
|
176
176
|
});
|
|
177
|
-
const
|
|
178
|
-
export
|
|
177
|
+
const tag_group_TagGroup = TagGroup;
|
|
178
|
+
export default tag_group_TagGroup;
|
|
179
|
+
export { TagGroup, TagGroupList, TagGroupRoot };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const TagGroupContext =
|
|
1
|
+
import { createContext } from "solid-js";
|
|
2
|
+
const TagGroupContext = createContext();
|
|
3
3
|
export { TagGroupContext };
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __webpack_exports__TagGroup = __WEBPACK_EXTERNAL_MODULE__TagGroup_js_6bd6ff12__.TagGroup;
|
|
3
|
-
var __webpack_exports__TagGroupList = __WEBPACK_EXTERNAL_MODULE__TagGroup_js_6bd6ff12__.TagGroupList;
|
|
4
|
-
var __webpack_exports__TagGroupRoot = __WEBPACK_EXTERNAL_MODULE__TagGroup_js_6bd6ff12__.TagGroupRoot;
|
|
5
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__TagGroup_js_6bd6ff12__["default"];
|
|
6
|
-
export { __webpack_exports__TagGroup as TagGroup, __webpack_exports__TagGroupList as TagGroupList, __webpack_exports__TagGroupRoot as TagGroupRoot, __webpack_exports__default as default };
|
|
1
|
+
export { TagGroup, TagGroupList, TagGroupRoot, default } from "./TagGroup.js";
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.text {
|
|
3
|
-
--text-color-default: var(--color-foreground);
|
|
4
|
-
--text-color-muted: var(
|
|
5
|
-
--color-muted,
|
|
6
|
-
color-mix(in oklab, var(--color-base-content) 55%, transparent)
|
|
7
|
-
);
|
|
8
|
-
--text-color-success: var(--color-success);
|
|
9
|
-
--text-color-warning: var(--color-warning);
|
|
10
|
-
--text-color-danger: var(--color-danger);
|
|
11
|
-
--text-color: var(--text-color-default);
|
|
12
|
-
--text-font-size: 1rem;
|
|
13
|
-
--text-line-height: 1.5rem;
|
|
14
|
-
|
|
15
|
-
color: var(--text-color);
|
|
16
|
-
font-size: var(--text-font-size);
|
|
17
|
-
line-height: var(--text-line-height);
|
|
18
|
-
transition-property: color;
|
|
19
|
-
transition-duration: 200ms;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.text[data-size="xs"] {
|
|
23
|
-
--text-font-size: 0.75rem;
|
|
24
|
-
--text-line-height: 1rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.text[data-size="sm"] {
|
|
28
|
-
--text-font-size: 0.875rem;
|
|
29
|
-
--text-line-height: 1.25rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.text[data-size="base"] {
|
|
33
|
-
--text-font-size: 1rem;
|
|
34
|
-
--text-line-height: 1.5rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.text[data-size="lg"] {
|
|
38
|
-
--text-font-size: 1.125rem;
|
|
39
|
-
--text-line-height: 1.75rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.text[data-size="xl"] {
|
|
43
|
-
--text-font-size: 1.25rem;
|
|
44
|
-
--text-line-height: 1.75rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.text[data-variant="default"] {
|
|
48
|
-
--text-color: var(--text-color-default);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.text[data-variant="muted"] {
|
|
52
|
-
--text-color: var(--text-color-muted);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.text[data-variant="success"] {
|
|
56
|
-
--text-color: var(--text-color-success);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.text[data-variant="warning"] {
|
|
60
|
-
--text-color: var(--text-color-warning);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.text[data-variant="danger"] {
|
|
64
|
-
--text-color: var(--text-color-danger);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.text {
|
|
3
|
+
--text-color-default: var(--color-foreground);
|
|
4
|
+
--text-color-muted: var(
|
|
5
|
+
--color-muted,
|
|
6
|
+
color-mix(in oklab, var(--color-base-content) 55%, transparent)
|
|
7
|
+
);
|
|
8
|
+
--text-color-success: var(--color-success);
|
|
9
|
+
--text-color-warning: var(--color-warning);
|
|
10
|
+
--text-color-danger: var(--color-danger);
|
|
11
|
+
--text-color: var(--text-color-default);
|
|
12
|
+
--text-font-size: 1rem;
|
|
13
|
+
--text-line-height: 1.5rem;
|
|
14
|
+
|
|
15
|
+
color: var(--text-color);
|
|
16
|
+
font-size: var(--text-font-size);
|
|
17
|
+
line-height: var(--text-line-height);
|
|
18
|
+
transition-property: color;
|
|
19
|
+
transition-duration: 200ms;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.text[data-size="xs"] {
|
|
23
|
+
--text-font-size: 0.75rem;
|
|
24
|
+
--text-line-height: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.text[data-size="sm"] {
|
|
28
|
+
--text-font-size: 0.875rem;
|
|
29
|
+
--text-line-height: 1.25rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.text[data-size="base"] {
|
|
33
|
+
--text-font-size: 1rem;
|
|
34
|
+
--text-line-height: 1.5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text[data-size="lg"] {
|
|
38
|
+
--text-font-size: 1.125rem;
|
|
39
|
+
--text-line-height: 1.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.text[data-size="xl"] {
|
|
43
|
+
--text-font-size: 1.25rem;
|
|
44
|
+
--text-line-height: 1.75rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.text[data-variant="default"] {
|
|
48
|
+
--text-color: var(--text-color-default);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.text[data-variant="muted"] {
|
|
52
|
+
--text-color: var(--text-color-muted);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.text[data-variant="success"] {
|
|
56
|
+
--text-color: var(--text-color-success);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.text[data-variant="warning"] {
|
|
60
|
+
--text-color: var(--text-color-warning);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.text[data-variant="danger"] {
|
|
64
|
+
--text-color: var(--text-color-danger);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Text.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 "./Text.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>");
|
|
7
7
|
const TextRoot = (props)=>{
|
|
8
|
-
const [local, others] =
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
9
|
"children",
|
|
10
10
|
"class",
|
|
11
11
|
"className",
|
|
@@ -18,8 +18,8 @@ const TextRoot = (props)=>{
|
|
|
18
18
|
const variant = ()=>local.variant ?? "default";
|
|
19
19
|
return (()=>{
|
|
20
20
|
var _el$ = _tmpl$();
|
|
21
|
-
|
|
22
|
-
class:
|
|
21
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
22
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
23
23
|
}), {
|
|
24
24
|
"data-slot": "text",
|
|
25
25
|
get ["data-size"] () {
|
|
@@ -35,7 +35,7 @@ const TextRoot = (props)=>{
|
|
|
35
35
|
return local.style;
|
|
36
36
|
}
|
|
37
37
|
}), false, true);
|
|
38
|
-
|
|
38
|
+
insert(_el$, ()=>local.children);
|
|
39
39
|
return _el$;
|
|
40
40
|
})();
|
|
41
41
|
};
|
|
@@ -43,4 +43,5 @@ const Text = Object.assign(TextRoot, {
|
|
|
43
43
|
Root: TextRoot
|
|
44
44
|
});
|
|
45
45
|
const text_Text = Text;
|
|
46
|
-
export
|
|
46
|
+
export default text_Text;
|
|
47
|
+
export { Text, TextRoot };
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __webpack_exports__Text = __WEBPACK_EXTERNAL_MODULE__Text_js_c8b03c82__.Text;
|
|
3
|
-
var __webpack_exports__TextRoot = __WEBPACK_EXTERNAL_MODULE__Text_js_c8b03c82__.TextRoot;
|
|
4
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__Text_js_c8b03c82__["default"];
|
|
5
|
-
export { __webpack_exports__Text as Text, __webpack_exports__TextRoot as TextRoot, __webpack_exports__default as default };
|
|
1
|
+
export { Text, TextRoot, default } from "./Text.js";
|