plass-ui 0.0.1 โ 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/PlAccordion.d.ts +98 -0
- package/dist/components/accordion/PlAccordion.js +131 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/PlAlert.d.ts +50 -0
- package/dist/components/alert/PlAlert.js +109 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/animate-appear/PlAnimateAppear.d.ts +55 -0
- package/dist/components/animate-appear/PlAnimateAppear.js +71 -0
- package/dist/components/animate-appear/index.d.ts +2 -0
- package/dist/components/animate-appear/index.js +1 -0
- package/dist/components/animate-blink/PlAnimateBlink.d.ts +30 -0
- package/dist/components/animate-blink/PlAnimateBlink.js +47 -0
- package/dist/components/animate-blink/index.d.ts +2 -0
- package/dist/components/animate-blink/index.js +1 -0
- package/dist/components/animate-fade/PlAnimateFade.d.ts +35 -0
- package/dist/components/animate-fade/PlAnimateFade.js +48 -0
- package/dist/components/animate-fade/index.d.ts +2 -0
- package/dist/components/animate-fade/index.js +1 -0
- package/dist/components/animate-grow/PlAnimateGrow.d.ts +45 -0
- package/dist/components/animate-grow/PlAnimateGrow.js +49 -0
- package/dist/components/animate-grow/index.d.ts +2 -0
- package/dist/components/animate-grow/index.js +1 -0
- package/dist/components/animate-headline/PlAnimateHeadline.d.ts +55 -0
- package/dist/components/animate-headline/PlAnimateHeadline.js +120 -0
- package/dist/components/animate-headline/index.d.ts +2 -0
- package/dist/components/animate-headline/index.js +1 -0
- package/dist/components/animate-lighting/PlAnimateLighting.d.ts +67 -0
- package/dist/components/animate-lighting/PlAnimateLighting.js +65 -0
- package/dist/components/animate-lighting/index.d.ts +2 -0
- package/dist/components/animate-lighting/index.js +1 -0
- package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +65 -0
- package/dist/components/animate-marquee/PlAnimateMarquee.js +94 -0
- package/dist/components/animate-marquee/index.d.ts +2 -0
- package/dist/components/animate-marquee/index.js +1 -0
- package/dist/components/animate-rotate/PlAnimateRotate.d.ts +52 -0
- package/dist/components/animate-rotate/PlAnimateRotate.js +50 -0
- package/dist/components/animate-rotate/index.d.ts +2 -0
- package/dist/components/animate-rotate/index.js +1 -0
- package/dist/components/animate-slide/PlAnimateSlide.d.ts +47 -0
- package/dist/components/animate-slide/PlAnimateSlide.js +49 -0
- package/dist/components/animate-slide/index.d.ts +2 -0
- package/dist/components/animate-slide/index.js +1 -0
- package/dist/components/animate-typing/PlAnimateTyping.d.ts +56 -0
- package/dist/components/animate-typing/PlAnimateTyping.js +177 -0
- package/dist/components/animate-typing/index.d.ts +2 -0
- package/dist/components/animate-typing/index.js +1 -0
- package/dist/components/animate-zoom/PlAnimateZoom.d.ts +37 -0
- package/dist/components/animate-zoom/PlAnimateZoom.js +45 -0
- package/dist/components/animate-zoom/index.d.ts +2 -0
- package/dist/components/animate-zoom/index.js +1 -0
- package/dist/components/aspect-ratio/PlAspectRatio.d.ts +64 -0
- package/dist/components/aspect-ratio/PlAspectRatio.js +58 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/PlAvatar.d.ts +102 -0
- package/dist/components/avatar/PlAvatar.js +121 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/PlBadge.d.ts +86 -0
- package/dist/components/badge/PlBadge.js +168 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/blockquote/PlBlockquote.d.ts +64 -0
- package/dist/components/blockquote/PlBlockquote.js +112 -0
- package/dist/components/blockquote/index.d.ts +2 -0
- package/dist/components/blockquote/index.js +1 -0
- package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +111 -0
- package/dist/components/bottom-navigation/PlBottomNavigation.js +141 -0
- package/dist/components/bottom-navigation/index.d.ts +2 -0
- package/dist/components/bottom-navigation/index.js +1 -0
- package/dist/components/box/PlBox.d.ts +50 -0
- package/dist/components/box/PlBox.js +46 -0
- package/dist/components/box/index.d.ts +2 -0
- package/dist/components/box/index.js +1 -0
- package/dist/components/breadcrumb/PlBreadcrumb.d.ts +138 -0
- package/dist/components/breadcrumb/PlBreadcrumb.js +201 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/{Button.d.ts โ PlButton.d.ts} +3 -3
- package/dist/components/button/PlButton.js +196 -0
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/PlButtonGroup.d.ts +32 -0
- package/dist/components/button-group/PlButtonGroup.js +64 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card/PlCard.d.ts +81 -0
- package/dist/components/card/PlCard.js +102 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/carousel/PlCarousel.d.ts +78 -0
- package/dist/components/carousel/PlCarousel.js +177 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/chat-bubble/PlChatBubble.d.ts +127 -0
- package/dist/components/chat-bubble/PlChatBubble.js +206 -0
- package/dist/components/chat-bubble/index.d.ts +2 -0
- package/dist/components/chat-bubble/index.js +1 -0
- package/dist/components/checkbox/PlCheckbox.d.ts +39 -0
- package/dist/components/checkbox/PlCheckbox.js +100 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/PlChip.d.ts +55 -0
- package/dist/components/chip/PlChip.js +144 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/collapsible/PlCollapsible.d.ts +84 -0
- package/dist/components/collapsible/PlCollapsible.js +65 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/combobox/PlCombobox.d.ts +140 -0
- package/dist/components/combobox/PlCombobox.js +199 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/container/PlContainer.d.ts +66 -0
- package/dist/components/container/PlContainer.js +47 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/date-picker/PlDatePicker.d.ts +73 -0
- package/dist/components/date-picker/PlDatePicker.js +87 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-range-picker/PlDateRangePicker.d.ts +91 -0
- package/dist/components/date-range-picker/PlDateRangePicker.js +152 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-time-picker/PlDateTimePicker.d.ts +74 -0
- package/dist/components/date-time-picker/PlDateTimePicker.js +106 -0
- package/dist/components/date-time-picker/index.d.ts +2 -0
- package/dist/components/date-time-picker/index.js +1 -0
- package/dist/components/divider/PlDivider.d.ts +73 -0
- package/dist/components/divider/PlDivider.js +107 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/PlDrawer.d.ts +144 -0
- package/dist/components/drawer/PlDrawer.js +190 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/file-picker/PlFilePicker.d.ts +105 -0
- package/dist/components/file-picker/PlFilePicker.js +274 -0
- package/dist/components/file-picker/index.d.ts +2 -0
- package/dist/components/file-picker/index.js +1 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +118 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +291 -0
- package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
- package/dist/components/floating-bottom-navigation/index.js +1 -0
- package/dist/components/grid/PlGrid.d.ts +67 -0
- package/dist/components/grid/PlGrid.js +51 -0
- package/dist/components/grid/PlGridItem.d.ts +50 -0
- package/dist/components/grid/PlGridItem.js +34 -0
- package/dist/components/grid/index.d.ts +4 -0
- package/dist/components/grid/index.js +2 -0
- package/dist/components/highlight/PlHighlight.d.ts +90 -0
- package/dist/components/highlight/PlHighlight.js +185 -0
- package/dist/components/highlight/index.d.ts +2 -0
- package/dist/components/highlight/index.js +1 -0
- package/dist/components/hot-keys/PlHotKeys.d.ts +93 -0
- package/dist/components/hot-keys/PlHotKeys.js +294 -0
- package/dist/components/hot-keys/index.d.ts +2 -0
- package/dist/components/hot-keys/index.js +1 -0
- package/dist/components/icon/PlIcon.d.ts +62 -0
- package/dist/components/icon/PlIcon.js +58 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon-button/PlIconButton.d.ts +39 -0
- package/dist/components/icon-button/PlIconButton.js +37 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/list/PlList.d.ts +82 -0
- package/dist/components/list/PlList.js +160 -0
- package/dist/components/list/index.d.ts +2 -0
- package/dist/components/list/index.js +1 -0
- package/dist/components/menu/PlMenu.d.ts +210 -0
- package/dist/components/menu/PlMenu.js +209 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/PlModal.d.ts +112 -0
- package/dist/components/modal/PlModal.js +150 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/number-field/PlNumberField.d.ts +133 -0
- package/dist/components/number-field/PlNumberField.js +111 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/otp-field/PlOtpField.d.ts +82 -0
- package/dist/components/otp-field/PlOtpField.js +109 -0
- package/dist/components/otp-field/index.d.ts +2 -0
- package/dist/components/otp-field/index.js +1 -0
- package/dist/components/overlay/PlOverlay.d.ts +96 -0
- package/dist/components/overlay/PlOverlay.js +77 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.js +1 -0
- package/dist/components/pagination/PlPagination.d.ts +88 -0
- package/dist/components/pagination/PlPagination.js +159 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/panes/PlPanes.d.ts +79 -0
- package/dist/components/panes/PlPanes.js +324 -0
- package/dist/components/panes/index.d.ts +2 -0
- package/dist/components/panes/index.js +1 -0
- package/dist/components/pill/PlPill.d.ts +81 -0
- package/dist/components/pill/PlPill.js +154 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/index.js +1 -0
- package/dist/components/popover/PlPopover.d.ts +107 -0
- package/dist/components/popover/PlPopover.js +113 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/progress-box/PlProgressBox.d.ts +32 -0
- package/dist/components/progress-box/PlProgressBox.js +34 -0
- package/dist/components/progress-box/index.d.ts +2 -0
- package/dist/components/progress-box/index.js +1 -0
- package/dist/components/progress-circular/PlProgressCircular.d.ts +22 -0
- package/dist/components/progress-circular/PlProgressCircular.js +47 -0
- package/dist/components/progress-circular/index.d.ts +2 -0
- package/dist/components/progress-circular/index.js +1 -0
- package/dist/components/progress-linear/PlProgressLinear.d.ts +31 -0
- package/dist/components/progress-linear/PlProgressLinear.js +40 -0
- package/dist/components/progress-linear/index.d.ts +2 -0
- package/dist/components/progress-linear/index.js +1 -0
- package/dist/components/radio-group/PlRadioGroup.d.ts +54 -0
- package/dist/components/radio-group/PlRadioGroup.js +99 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/rating/PlRating.d.ts +90 -0
- package/dist/components/rating/PlRating.js +101 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.js +1 -0
- package/dist/components/scroll-zone/PlScrollZone.d.ts +132 -0
- package/dist/components/scroll-zone/PlScrollZone.js +411 -0
- package/dist/components/scroll-zone/index.d.ts +2 -0
- package/dist/components/scroll-zone/index.js +1 -0
- package/dist/components/segmented-button/PlSegmentedButton.d.ts +79 -0
- package/dist/components/segmented-button/PlSegmentedButton.js +206 -0
- package/dist/components/segmented-button/index.d.ts +2 -0
- package/dist/components/segmented-button/index.js +1 -0
- package/dist/components/select/PlSelect.d.ts +77 -0
- package/dist/components/select/PlSelect.js +115 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/skeleton/PlSkeleton.d.ts +73 -0
- package/dist/components/skeleton/PlSkeleton.js +142 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/slider/PlSlider.d.ts +44 -0
- package/dist/components/slider/PlSlider.js +132 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/spoiler/PlSpoiler.d.ts +84 -0
- package/dist/components/spoiler/PlSpoiler.js +74 -0
- package/dist/components/spoiler/index.d.ts +2 -0
- package/dist/components/spoiler/index.js +1 -0
- package/dist/components/switch/PlSwitch.d.ts +42 -0
- package/dist/components/switch/PlSwitch.js +131 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/PlTable.d.ts +112 -0
- package/dist/components/table/PlTable.js +210 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/tabs/PlTabs.d.ts +94 -0
- package/dist/components/tabs/PlTabs.js +182 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/text-field/{TextField.d.ts โ PlTextField.d.ts} +5 -5
- package/dist/components/text-field/PlTextField.js +126 -0
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-link/PlTextLink.d.ts +80 -0
- package/dist/components/text-link/PlTextLink.js +136 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/time-picker/PlTimePicker.d.ts +88 -0
- package/dist/components/time-picker/PlTimePicker.js +97 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.js +1 -0
- package/dist/components/timeline/PlTimeline.d.ts +98 -0
- package/dist/components/timeline/PlTimeline.js +207 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/timeline/index.js +1 -0
- package/dist/components/toast/PlToast.d.ts +122 -0
- package/dist/components/toast/PlToast.js +174 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toolbar/PlToolbar.d.ts +68 -0
- package/dist/components/toolbar/PlToolbar.js +65 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/tooltip/PlTooltip.d.ts +92 -0
- package/dist/components/tooltip/PlTooltip.js +117 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/typography/PlTypography.d.ts +66 -0
- package/dist/components/typography/PlTypography.js +143 -0
- package/dist/components/typography/index.d.ts +2 -0
- package/dist/components/typography/index.js +1 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/animate-appear.css +2 -0
- package/dist/css/animate-blink.css +2 -0
- package/dist/css/animate-fade.css +2 -0
- package/dist/css/animate-grow.css +2 -0
- package/dist/css/animate-headline.css +2 -0
- package/dist/css/animate-lighting.css +2 -0
- package/dist/css/animate-marquee.css +2 -0
- package/dist/css/animate-rotate.css +2 -0
- package/dist/css/animate-slide.css +2 -0
- package/dist/css/animate-typing.css +2 -0
- package/dist/css/animate-zoom.css +2 -0
- package/dist/css/aspect-ratio.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/base.css +4 -0
- package/dist/css/blockquote.css +2 -0
- package/dist/css/bottom-navigation.css +2 -0
- package/dist/css/box.css +2 -0
- package/dist/css/breadcrumb.css +2 -0
- package/dist/css/button-group.css +2 -0
- package/dist/css/button.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/chat-bubble.css +2 -0
- package/dist/css/checkbox.css +2 -0
- package/dist/css/chip.css +2 -0
- package/dist/css/collapsible.css +2 -0
- package/dist/css/combobox.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/date-picker.css +2 -0
- package/dist/css/date-range-picker.css +2 -0
- package/dist/css/date-time-picker.css +2 -0
- package/dist/css/divider.css +2 -0
- package/dist/css/drawer.css +2 -0
- package/dist/css/file-picker.css +2 -0
- package/dist/css/floating-bottom-navigation.css +2 -0
- package/dist/css/grid.css +2 -0
- package/dist/css/highlight.css +2 -0
- package/dist/css/hot-keys.css +2 -0
- package/dist/css/icon-button.css +2 -0
- package/dist/css/icon.css +2 -0
- package/dist/css/list.css +2 -0
- package/dist/css/menu.css +2 -0
- package/dist/css/modal.css +2 -0
- package/dist/css/number-field.css +2 -0
- package/dist/css/otp-field.css +2 -0
- package/dist/css/overlay.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/panes.css +2 -0
- package/dist/css/pill.css +2 -0
- package/dist/css/popover.css +2 -0
- package/dist/css/progress-box.css +2 -0
- package/dist/css/progress-circular.css +2 -0
- package/dist/css/progress-linear.css +2 -0
- package/dist/css/radio-group.css +2 -0
- package/dist/css/rating.css +2 -0
- package/dist/css/scroll-zone.css +2 -0
- package/dist/css/segmented-button.css +2 -0
- package/dist/css/select.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +2 -0
- package/dist/css/spoiler.css +2 -0
- package/dist/css/switch.css +2 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +2 -0
- package/dist/css/text-field.css +2 -0
- package/dist/css/text-link.css +2 -0
- package/dist/css/time-picker.css +2 -0
- package/dist/css/timeline.css +2 -0
- package/dist/css/toast.css +2 -0
- package/dist/css/toolbar.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/typography.css +2 -0
- package/dist/index.d.ts +75 -3
- package/dist/index.js +75 -1
- package/dist/internal/animate.d.ts +161 -0
- package/dist/internal/animate.js +318 -0
- package/dist/internal/button-group.d.ts +27 -0
- package/dist/internal/button-group.js +19 -0
- package/dist/internal/calendar.d.ts +148 -0
- package/dist/internal/calendar.js +501 -0
- package/dist/internal/date.d.ts +173 -0
- package/dist/internal/date.js +353 -0
- package/dist/internal/format.d.ts +24 -0
- package/dist/internal/format.js +41 -0
- package/dist/internal/grid.d.ts +67 -0
- package/dist/internal/grid.js +143 -0
- package/dist/internal/icons.d.ts +86 -1
- package/dist/internal/icons.js +138 -1
- package/dist/internal/menu.d.ts +20 -0
- package/dist/internal/menu.js +18 -0
- package/dist/internal/picker.d.ts +118 -0
- package/dist/internal/picker.js +139 -0
- package/dist/internal/progress.d.ts +145 -0
- package/dist/internal/progress.js +167 -0
- package/dist/internal/sizer.d.ts +32 -0
- package/dist/internal/sizer.js +35 -0
- package/dist/internal/styles.d.ts +198 -8
- package/dist/internal/styles.js +636 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +899 -125
- package/dist/tokens.css +1275 -0
- package/dist/types.d.ts +150 -8
- package/dist/types.js +1 -1
- package/package.json +31 -27
- package/README.md +0 -111
- package/dist/components/button/Button.js +0 -1
- package/dist/components/text-field/TextField.js +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared prop vocabulary for every Plass component.
|
|
3
3
|
*
|
|
4
4
|
* These names and values are deliberately generic: a `size` of `md` or a
|
|
5
|
-
* `color` of `primary` has to mean the same thing on a
|
|
5
|
+
* `color` of `primary` has to mean the same thing on a PlButton, a PlTextField, a
|
|
6
6
|
* Card or a Dialog. Components pick the subset they need from here and never
|
|
7
7
|
* invent a parallel spelling of the same idea.
|
|
8
8
|
*/
|
|
@@ -36,15 +36,87 @@ export type PlassSide = 'top' | 'right' | 'bottom' | 'left';
|
|
|
36
36
|
* is the whole reason the library never says `left`.
|
|
37
37
|
*/
|
|
38
38
|
export type PlassAlign = 'start' | 'center' | 'end';
|
|
39
|
+
/**
|
|
40
|
+
* A day of the week, as `Date.getDay()` counts them: Sunday is `0`.
|
|
41
|
+
*
|
|
42
|
+
* `Date`'s own numbering rather than CLDR's, which starts the week on Monday at
|
|
43
|
+
* `1`. Every comparison a calendar makes is against `getDay()`, and a second
|
|
44
|
+
* numbering in the same file is a numbering somebody will subtract from the
|
|
45
|
+
* wrong one.
|
|
46
|
+
*/
|
|
47
|
+
export type PlassWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
48
|
+
/**
|
|
49
|
+
* A width the layout answers to.
|
|
50
|
+
*
|
|
51
|
+
* The same five names as `PlassSize`, and deliberately so: a reader who has
|
|
52
|
+
* learned the ladder once should not have to learn a second set of words for
|
|
53
|
+
* where a page changes shape. They are not the same ladder โ a `size` is how
|
|
54
|
+
* tall a control is and a breakpoint is how wide the window is โ but they run
|
|
55
|
+
* in the same direction and they are used in the same sentence often enough
|
|
56
|
+
* that two vocabularies would only ever get mixed up.
|
|
57
|
+
*
|
|
58
|
+
* The widths are Tailwind's own โ `sm` 40rem, `md` 48rem, `lg` 64rem, `xl`
|
|
59
|
+
* 80rem, with `xs` meaning "from zero up" โ so a Plass layout and an `sm:`
|
|
60
|
+
* utility change at the same moment.
|
|
61
|
+
*/
|
|
62
|
+
export type PlassBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
63
|
+
/**
|
|
64
|
+
* A value that may change with the width of the window.
|
|
65
|
+
*
|
|
66
|
+
* A bare value applies everywhere: `span={6}` is six columns at every width.
|
|
67
|
+
* A map applies each entry **from its own breakpoint up**, so
|
|
68
|
+
* `span={{ xs: 12, md: 6 }}` is a full width on a phone and a half from 48rem โ
|
|
69
|
+
* two entries usually describe a whole layout.
|
|
70
|
+
*
|
|
71
|
+
* There is no `xs` fallback to write out: an entry cascades to the widths above
|
|
72
|
+
* it, which is what keeps a responsive prop to the breakpoints it actually
|
|
73
|
+
* names.
|
|
74
|
+
*/
|
|
75
|
+
export type PlassResponsive<T> = T | Partial<Record<PlassBreakpoint, T>>;
|
|
76
|
+
/**
|
|
77
|
+
* How a row distributes the space its content did not use, along the axis the
|
|
78
|
+
* content runs on.
|
|
79
|
+
*
|
|
80
|
+
* The three positional values are the library's own `start`/`center`/`end`
|
|
81
|
+
* rather than `left`/`right`, for the reason `PlassAlign` gives: they flip
|
|
82
|
+
* under RTL. The four distributions keep CSS's own hyphenated names, because
|
|
83
|
+
* `space-between` is a word every reader already knows and `spread` would be a
|
|
84
|
+
* word they had to look up.
|
|
85
|
+
*/
|
|
86
|
+
export type PlassJustify = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch';
|
|
87
|
+
/** How content sits across the axis it does not run on. */
|
|
88
|
+
export type PlassAlignItems = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
89
|
+
/** The same, for one member overriding the set it is in. */
|
|
90
|
+
export type PlassAlignSelf = 'auto' | 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
91
|
+
/**
|
|
92
|
+
* How a component sits in the page's scroll, spelled the way CSS spells it.
|
|
93
|
+
*
|
|
94
|
+
* These are `position`'s own values rather than a nicer set of words, for the
|
|
95
|
+
* reason `PlAspectRatio` keeps `object-fit`'s: inventing `pinned` would only
|
|
96
|
+
* make a reader look up which CSS it maps to. `absolute` and `relative` are
|
|
97
|
+
* deliberately absent โ a component that offers those is a component being used
|
|
98
|
+
* as a `<div>`.
|
|
99
|
+
*/
|
|
100
|
+
export type PlassPosition = 'static' | 'sticky' | 'fixed';
|
|
101
|
+
/**
|
|
102
|
+
* Which corner of a box something is pinned to. `PlBadge` reads this.
|
|
103
|
+
*
|
|
104
|
+
* Deliberately one word built out of the two the library already has โ
|
|
105
|
+
* `top`/`bottom` from `PlassSide`, `start`/`end` from `PlassAlign` โ rather than
|
|
106
|
+
* a pair of props. A corner is one decision, and splitting it into two would let
|
|
107
|
+
* a caller spell `{ vertical: 'left' }`.
|
|
108
|
+
*/
|
|
109
|
+
export type PlassCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
39
110
|
/**
|
|
40
111
|
* What a surface is made of. This is the library's own name, and the two
|
|
41
112
|
* materials in it are the whole design language.
|
|
42
113
|
*
|
|
43
|
-
* - `solid` โ **
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
114
|
+
* - `solid` โ **tinted glass.** A gradient that sweeps between two ends of the
|
|
115
|
+
* colour family at one lightness, and a drop shadow tinted with that family.
|
|
116
|
+
* No highlight over the top of it: the sweep is the form. One per view, for
|
|
117
|
+
* the action the screen is about.
|
|
118
|
+
* - `glass` โ **clear glass.** A translucent sheet over a blurred backdrop with
|
|
119
|
+
* a white hairline around it. Secondary actions, and the default for anything
|
|
48
120
|
* that *holds* content rather than being pressed.
|
|
49
121
|
* - `ghost` โ neither. No surface at all until the pointer is on it.
|
|
50
122
|
* Tertiary and inline actions.
|
|
@@ -53,9 +125,10 @@ export type PlassVariant = 'solid' | 'glass' | 'ghost';
|
|
|
53
125
|
/**
|
|
54
126
|
* How far a surface sits off the page, as a drop shadow.
|
|
55
127
|
*
|
|
56
|
-
* A
|
|
128
|
+
* A control rests **on** the sheet rather than flush with it, so a PlButton
|
|
57
129
|
* defaults to `1` and not to `0`. Hovering adds a level and pressing removes
|
|
58
|
-
* one, which is what puts
|
|
130
|
+
* one, which is what puts it down against the sheet under the finger. The
|
|
131
|
+
* ladder is neutral and faint; a control's shadow is mostly the tint below it.
|
|
59
132
|
*
|
|
60
133
|
* `0` is flat, and it is the right default for anything a reader looks *into*
|
|
61
134
|
* rather than presses โ a field, a well, a panel behind other content.
|
|
@@ -72,3 +145,72 @@ export interface PlassStyleProps {
|
|
|
72
145
|
/** @default 'default' */
|
|
73
146
|
density?: PlassDensity;
|
|
74
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* The six effects the `PlAnimate*` components are built out of.
|
|
150
|
+
*
|
|
151
|
+
* Named after what a reader sees rather than after the CSS property
|
|
152
|
+
* underneath: `zoom` and `grow` are both a change of scale, and they are two
|
|
153
|
+
* words because they are two *gestures* โ one arrives from the middle of where
|
|
154
|
+
* it will end up, the other unfolds from an edge.
|
|
155
|
+
*
|
|
156
|
+
* Everything past these six is a component rather than a value. A typewriter, a
|
|
157
|
+
* marquee and a headline reel have to know what their children *are*, and a
|
|
158
|
+
* name that only picks a keyframe cannot.
|
|
159
|
+
*/
|
|
160
|
+
export type PlassAnimation = 'fade' | 'grow' | 'slide' | 'zoom' | 'rotate' | 'blink';
|
|
161
|
+
/**
|
|
162
|
+
* What makes an animation run.
|
|
163
|
+
*
|
|
164
|
+
* - `mount` โ as soon as it is on the page. The default, and the only one that
|
|
165
|
+
* needs nothing from the caller.
|
|
166
|
+
* - `visible` โ when it is scrolled into view. Once, unless `once` is off.
|
|
167
|
+
* - `hover` โ while the pointer is on it, starting again on each entry.
|
|
168
|
+
* Keyboard focus counts, or the effect would be unreachable without a mouse.
|
|
169
|
+
* - `manual` โ never on its own. `play` is what runs it.
|
|
170
|
+
*/
|
|
171
|
+
export type PlassAnimateTrigger = 'mount' | 'visible' | 'hover' | 'manual';
|
|
172
|
+
/** Whether an effect brings its content in or takes it away. */
|
|
173
|
+
export type PlassAnimateMode = 'in' | 'out';
|
|
174
|
+
/**
|
|
175
|
+
* How many times an animation runs. `'infinite'` rather than `Infinity`,
|
|
176
|
+
* because it is written into CSS as that word and a caller who typed the number
|
|
177
|
+
* would be surprised by which one worked.
|
|
178
|
+
*/
|
|
179
|
+
export type PlassAnimateRepeat = number | 'infinite';
|
|
180
|
+
/**
|
|
181
|
+
* The settings every `PlAnimate*` component takes.
|
|
182
|
+
*
|
|
183
|
+
* Durations and delays are milliseconds โ numbers, not CSS strings. A prop
|
|
184
|
+
* typed `string` invites `'0.4s'`, and then two components on one screen are
|
|
185
|
+
* written in two units.
|
|
186
|
+
*/
|
|
187
|
+
export interface PlassAnimateProps {
|
|
188
|
+
/** How long one run takes, in milliseconds. */
|
|
189
|
+
duration?: number;
|
|
190
|
+
/** How long before it starts, in milliseconds. @default 0 */
|
|
191
|
+
delay?: number;
|
|
192
|
+
/** The easing curve, as CSS writes it. @default the house curve */
|
|
193
|
+
easing?: string;
|
|
194
|
+
/** How many times it runs. @default 1 */
|
|
195
|
+
repeat?: PlassAnimateRepeat;
|
|
196
|
+
/** Runs every other pass backwards, so a repeat returns instead of jumping. */
|
|
197
|
+
alternate?: boolean;
|
|
198
|
+
/** Holds the animation where it is. @default false */
|
|
199
|
+
paused?: boolean;
|
|
200
|
+
/** What starts it. @default 'mount' */
|
|
201
|
+
trigger?: PlassAnimateTrigger;
|
|
202
|
+
/** Runs it, when `trigger` is `manual`. Each `false` โ `true` starts it over. */
|
|
203
|
+
play?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* With `trigger="visible"`, whether it runs only the first time. Off, it runs
|
|
206
|
+
* again every time the element comes back into view.
|
|
207
|
+
* @default true
|
|
208
|
+
*/
|
|
209
|
+
once?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* With `trigger="visible"`, how much of the element has to be on screen
|
|
212
|
+
* before it counts as visible, from `0` to `1`.
|
|
213
|
+
* @default 0.2
|
|
214
|
+
*/
|
|
215
|
+
threshold?: number;
|
|
216
|
+
}
|
package/dist/types.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared prop vocabulary for every Plass component.
|
|
3
3
|
*
|
|
4
4
|
* These names and values are deliberately generic: a `size` of `md` or a
|
|
5
|
-
* `color` of `primary` has to mean the same thing on a
|
|
5
|
+
* `color` of `primary` has to mean the same thing on a PlButton, a PlTextField, a
|
|
6
6
|
* Card or a Dialog. Components pick the subset they need from here and never
|
|
7
7
|
* invent a parallel spelling of the same idea.
|
|
8
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plass-ui",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "A React UI component library
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A React UI component library made of glass and gradients โ smooth tinted surfaces, shadows in their own colour, and light that follows the pointer. Accessible and themeable, ESM only, types included, dark mode built in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"sideEffects": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"author": "CDGet <jooy2.contact@gmail.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"homepage": "https://plass
|
|
12
|
+
"homepage": "https://plass.cdget.com",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/jooy2/plass-ui"
|
|
@@ -18,20 +18,16 @@
|
|
|
18
18
|
"url": "https://github.com/jooy2/plass-ui/issues"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "npm run format:fix && tsc --project tsconfig.prod.json &&
|
|
21
|
+
"build": "npm run format:fix && tsc --project tsconfig.prod.json && node scripts/build-styles.mjs",
|
|
22
22
|
"lint": "eslint . --report-unused-disable-directives",
|
|
23
23
|
"lint:fix": "eslint . --report-unused-disable-directives --fix",
|
|
24
|
-
"minify": "terser-glob 'dist/**/*.js' --config-file terser.config.json",
|
|
25
24
|
"prepare": "npm run build",
|
|
25
|
+
"size": "node scripts/size.mjs",
|
|
26
26
|
"format": "prettier .",
|
|
27
27
|
"format:fix": "prettier . --write",
|
|
28
|
-
"docs:changelog": "node scripts/copy-changelog.mjs",
|
|
29
|
-
"docs:dev": "npm run docs:changelog && vitepress dev docs",
|
|
30
|
-
"docs:build": "npm run docs:changelog && vitepress build docs",
|
|
31
|
-
"docs:serve": "npm run docs:build && vitepress serve docs",
|
|
32
28
|
"test": "vitest run",
|
|
33
29
|
"test:watch": "vitest",
|
|
34
|
-
"typecheck": "tsc --project tsconfig.prod.json --noEmit && tsc --project test/tsconfig.json
|
|
30
|
+
"typecheck": "tsc --project tsconfig.prod.json --noEmit && tsc --project test/tsconfig.json"
|
|
35
31
|
},
|
|
36
32
|
"engines": {
|
|
37
33
|
"node": ">=20.19.0"
|
|
@@ -49,12 +45,23 @@
|
|
|
49
45
|
"default": "./dist/types.js"
|
|
50
46
|
},
|
|
51
47
|
"./styles.css": "./dist/styles.css",
|
|
52
|
-
"./tailwind.css": "./dist/tailwind.css"
|
|
48
|
+
"./tailwind.css": "./dist/tailwind.css",
|
|
49
|
+
"./tokens.css": "./dist/tokens.css",
|
|
50
|
+
"./css/*.css": "./dist/css/*.css",
|
|
51
|
+
"./package.json": "./package.json",
|
|
52
|
+
"./*": {
|
|
53
|
+
"types": "./dist/components/*/index.d.ts",
|
|
54
|
+
"module": "./dist/components/*/index.js",
|
|
55
|
+
"default": "./dist/components/*/index.js"
|
|
56
|
+
}
|
|
53
57
|
},
|
|
54
58
|
"typesVersions": {
|
|
55
59
|
"*": {
|
|
56
|
-
"
|
|
57
|
-
"dist/
|
|
60
|
+
"types": [
|
|
61
|
+
"dist/types.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"*": [
|
|
64
|
+
"dist/components/*/index.d.ts"
|
|
58
65
|
]
|
|
59
66
|
}
|
|
60
67
|
},
|
|
@@ -95,18 +102,19 @@
|
|
|
95
102
|
"devDependencies": {
|
|
96
103
|
"@eslint/js": "^9.39.1",
|
|
97
104
|
"@tailwindcss/postcss": "^4.3.3",
|
|
98
|
-
"@types/node": "^26.
|
|
105
|
+
"@types/node": "^26.3.0",
|
|
99
106
|
"@types/react": "^19.2.18",
|
|
100
|
-
"@types/react-dom": "^19.2.
|
|
101
|
-
"@typescript-eslint/parser": "^8.
|
|
102
|
-
"@vitejs/plugin-react": "^6.0
|
|
103
|
-
"@vitest/browser": "^4.1.
|
|
104
|
-
"@vitest/browser-playwright": "^4.1.
|
|
107
|
+
"@types/react-dom": "^19.2.5",
|
|
108
|
+
"@typescript-eslint/parser": "^8.68.0",
|
|
109
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
110
|
+
"@vitest/browser": "^4.1.11",
|
|
111
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
112
|
+
"esbuild": "^0.28.2",
|
|
105
113
|
"eslint": "^9.39.1",
|
|
106
114
|
"eslint-config-prettier": "^10.1.8",
|
|
107
115
|
"eslint-plugin-n": "^18.3.0",
|
|
108
116
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
109
|
-
"globals": "^17.
|
|
117
|
+
"globals": "^17.11.0",
|
|
110
118
|
"jiti": "^2.7.0",
|
|
111
119
|
"playwright": "^1.62.1",
|
|
112
120
|
"postcss": "^8.5.26",
|
|
@@ -115,14 +123,10 @@
|
|
|
115
123
|
"react": "^19.2.8",
|
|
116
124
|
"react-dom": "^19.2.8",
|
|
117
125
|
"tailwindcss": "^4.3.3",
|
|
118
|
-
"terser-glob": "^1.2.1",
|
|
119
126
|
"typescript": "^6.0.3",
|
|
120
|
-
"typescript-eslint": "^8.
|
|
121
|
-
"vite": "^8.2.
|
|
122
|
-
"
|
|
123
|
-
"vitepress-i18n": "^1.3.5",
|
|
124
|
-
"vitepress-sidebar": "^1.38.0",
|
|
125
|
-
"vitest": "^4.1.10",
|
|
127
|
+
"typescript-eslint": "^8.68.0",
|
|
128
|
+
"vite": "^8.2.2",
|
|
129
|
+
"vitest": "^4.1.11",
|
|
126
130
|
"vitest-browser-react": "^2.2.0"
|
|
127
131
|
},
|
|
128
132
|
"dependencies": {
|
package/README.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Plass UI
|
|
2
|
-
|
|
3
|
-
[](https://github.com/jooy2/plass-ui/blob/main/LICENSE) [](https://www.npmjs.com/package/plass-ui) [](https://www.npmjs.com/package/plass-ui)
|
|
4
|
-
|
|
5
|
-
### ๐ [**plass-ui.cdget.com**](https://plass-ui.cdget.com)
|
|
6
|
-
|
|
7
|
-
Live previews and full props for every component. This README is just the quick start.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
**Plass UI is a React component library with a material rather than a theme.** Every surface answers one question โ is this pressed, or does it hold something? โ and the answer decides everything else.
|
|
12
|
-
|
|
13
|
-
A thing that is pressed is **plastic**: a gradient fill at 135ยฐ, a specular highlight along its top edge, and a drop shadow tinted with its own colour. A thing that holds something is **glass**: translucent, heavily blurred, a white hairline round it, and never dyed. There is no third answer.
|
|
14
|
-
|
|
15
|
-
- **Two materials, one language** โ `solid`, `glass`, `ghost`. Not `filled`, `outlined`, `text`.
|
|
16
|
-
- **One shared vocabulary** โ `size`, `color`, `variant`, `density`, `elevation`. An `md` is 40px on every control; `primary` is the same family everywhere.
|
|
17
|
-
- **Accessible by construction** โ real roles, labels, focus management and keyboard support, not `div`s with click handlers.
|
|
18
|
-
- **Contrast that was checked** โ every gradient stop clears 4.5:1 against its own label, the lightest corner included.
|
|
19
|
-
- **Dark mode with no work** โ follows the system, and can be forced either way per subtree.
|
|
20
|
-
- **ESM only**, TypeScript declarations included, tree-shakeable.
|
|
21
|
-
- **One runtime dependency.** React 18 or 19, Node.js 20.19 or later.
|
|
22
|
-
|
|
23
|
-
> **0.0.1 is a preview.** Two components are released โ `Button` and `TextField`. The prop vocabulary, the tokens and the build are the shape everything after this will be poured into; the component list is not yet worth building a product on.
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
| Page | What you will find |
|
|
28
|
-
| --- | --- |
|
|
29
|
-
| [**Getting started**](https://plass-ui.cdget.com/guide/getting-started) | Install and setup, end to end. |
|
|
30
|
-
| [**All components**](https://plass-ui.cdget.com/components/) | Every component, one page each: live previews and the full props table. |
|
|
31
|
-
| [**Design language**](https://plass-ui.cdget.com/design/design-language) | Why a Plass surface looks and behaves the way it does. |
|
|
32
|
-
| [**Prop conventions**](https://plass-ui.cdget.com/design/prop-conventions) | The shared vocabulary every component draws from. |
|
|
33
|
-
| [**Colour**](https://plass-ui.cdget.com/design/color) | The token families, the measured contrast, and how to theme them. |
|
|
34
|
-
| [**Changelog**](https://plass-ui.cdget.com/changelog) | What changed in each release. |
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install plass-ui
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
`react` and `react-dom` are peer dependencies โ React 18 or 19.
|
|
43
|
-
|
|
44
|
-
### Setup
|
|
45
|
-
|
|
46
|
-
Add one line to your app's CSS entry point:
|
|
47
|
-
|
|
48
|
-
```css
|
|
49
|
-
@import 'plass-ui/styles.css';
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
`plass-ui/styles.css` is finished CSS โ the design tokens, the compiled rules for every utility class the components use, and a small reset whose every rule is specificity 0 so your own styles always win. [Tailwind CSS](https://tailwindcss.com) v4 builds this package; it does not have to be installed in yours.
|
|
53
|
-
|
|
54
|
-
If your project already runs Tailwind v4, import the token sheet instead:
|
|
55
|
-
|
|
56
|
-
```css
|
|
57
|
-
@import 'tailwindcss';
|
|
58
|
-
@import 'plass-ui/tailwind.css';
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### One more line, and it matters here
|
|
62
|
-
|
|
63
|
-
Plass does not paint your `<body>`, but a sheet of glass over a flat white page has nothing to be in front of. Two tokens exist for exactly this:
|
|
64
|
-
|
|
65
|
-
```css
|
|
66
|
-
body {
|
|
67
|
-
background: linear-gradient(160deg, var(--plass-bg-from) 0%, var(--plass-bg-to) 100%);
|
|
68
|
-
background-attachment: fixed;
|
|
69
|
-
color: var(--plass-fg);
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Usage
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
import { Button, TextField } from 'plass-ui';
|
|
77
|
-
|
|
78
|
-
export default function SignIn() {
|
|
79
|
-
return (
|
|
80
|
-
<form onSubmit={submit}>
|
|
81
|
-
<TextField label="Email" type="email" fullWidth />
|
|
82
|
-
<Button type="submit">Sign in</Button>
|
|
83
|
-
<Button variant="glass" color="secondary">
|
|
84
|
-
Cancel
|
|
85
|
-
</Button>
|
|
86
|
-
</form>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Components
|
|
92
|
-
|
|
93
|
-
### Inputs
|
|
94
|
-
|
|
95
|
-
`Button` ยท `TextField`
|
|
96
|
-
|
|
97
|
-
## Development
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
npm test # Vitest, single run (headless Chromium)
|
|
101
|
-
npm run typecheck # tsc --noEmit over all three TS projects
|
|
102
|
-
npm run docs:dev # VitePress docs site โ the develop-and-eyeball loop
|
|
103
|
-
npm run build # tsc + terser + build-styles โ dist/
|
|
104
|
-
npm run lint # ESLint
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
The docs render the real components from `src/` through a Vite alias, so `npm run docs:dev` is the develop-and-eyeball loop; there is no separate demo app.
|
|
108
|
-
|
|
109
|
-
## License
|
|
110
|
-
|
|
111
|
-
MIT ยฉ [CDGet](https://cdget.com)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as s,Fragment as o,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{Button as e}from"@base-ui/react/button";import{useRender as l}from"@base-ui/react/use-render";import{Spinner as t}from"../../internal/icons";import{controlHeightClasses as i,controlSlots as n,controlSquareClasses as d,controlTextClasses as p,disabledClasses as g,focusRingClasses as v,gapClasses as c,glassClasses as m,hasContent as x,iconClasses as b,paddingXClasses as h,radiusClasses as f,readOnlyFilterClasses as $,transitionClasses as u}from"../../internal/styles";const w={xs:`${i.xs} ${c.xs} ${f.xs} ${p.xs}`,sm:`${i.sm} ${c.sm} ${f.sm} ${p.sm}`,md:`${i.md} ${c.md} ${f.md} ${p.md}`,lg:`${i.lg} ${c.lg} ${f.lg} ${p.lg}`,xl:`${i.xl} ${c.xl} ${f.xl} ${p.xl}`},j={xs:`${d.xs} px-0`,sm:`${d.sm} px-0`,md:`${d.md} px-0`,lg:`${d.lg} px-0`,xl:`${d.xl} px-0`},y=["relative inline-flex shrink-0 select-none items-center justify-center","whitespace-nowrap align-middle font-semibold leading-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",u,v,b].join(" "),k={solid:["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift),var(--plass-gloss-solid)]"].join(" "),glass:[m,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-transparent"},B={solid:["hover:brightness-105","hover:[box-shadow:var(--p-elev-hover),var(--p-lift-hover),var(--plass-gloss-solid)]","active:brightness-95","active:[box-shadow:var(--p-elev-press),var(--p-lift-press),var(--plass-gloss-solid)]"].join(" "),glass:["hover:bg-(--plass-glass-hover) hover:[border-color:var(--p-line)]","hover:[box-shadow:var(--p-elev-hover),var(--plass-gloss-glass)]","active:bg-(--plass-glass-press)","active:[box-shadow:var(--p-elev-press),var(--plass-gloss-glass)]"].join(" "),ghost:"hover:bg-(--p-soft) active:bg-(--p-soft-hover)"},C={solid:["cursor-default text-(--p-on-solid) [background-image:var(--p-fill)]",`[box-shadow:var(--plass-gloss-solid)] ${$}`].join(" "),glass:[m,"cursor-default border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-glass-line)]",`[box-shadow:var(--plass-gloss-glass)] ${$}`].join(" "),ghost:`cursor-default text-(--p-accent) bg-transparent ${$}`};export const Button=r.forwardRef(function({variant:r="solid",size:i="md",color:d="primary",density:p="default",elevation:v=1,startIcon:c,endIcon:m,loading:b=!1,readOnly:f=!1,fullWidth:$=!1,disabled:u=!1,render:I,className:N,style:z,children:D,onClick:F,...O},P){const R=!x(D),W=b||f,q=!u&&!W,A=[y,w[i],R?j[i]:h[p][i],u?g[r]:f?C[r]:k[r],q?`${B[r]} cursor-pointer`:"",q&&"solid"===r?"plass-gloss":"",b?"cursor-progress":"",$?"w-full":"",N??""].filter(Boolean).join(" ");return l({render:I??s(e,{disabled:u}),ref:P,props:{className:A,style:{...n(d,v),...z},"aria-disabled":W||void 0,"aria-busy":b||void 0,"data-loading":b||void 0,"data-readonly":f||void 0,onClick:s=>{if(W)return s.preventDefault(),void s.stopPropagation();F?.(s)},...O,children:a(o,{children:[b?s(t,{}):c,D,m]})}})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{Field as n}from"@base-ui/react/field";import{Input as r}from"@base-ui/react/input";import{Spinner as s}from"../../internal/icons";import{controlHeightClasses as i,controlTextLeadingClasses as a,disabledClasses as o,fieldReadOnlyClasses as c,fieldRestClasses as m,focusWithinRingClasses as d,gapClasses as p,hasContent as u,iconClasses as f,metaTextClasses as x,paddingXClasses as h,radiusClasses as g,stackGapClasses as $,surfaceSlots as y,transitionClasses as b}from"../../internal/styles";const j={xs:`${p.xs} ${g.xs} ${a.xs}`,sm:`${p.sm} ${g.sm} ${a.sm}`,md:`${p.md} ${g.md} ${a.md}`,lg:`${p.lg} ${g.lg} ${a.lg}`,xl:`${p.xl} ${g.xl} ${a.xl}`},v={xs:"min-h-6 py-[3px]",sm:"min-h-8 py-[6px]",md:"min-h-10 py-[9px]",lg:"min-h-12 py-[11px]",xl:"min-h-14 py-[13px]"},w={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},N=["group relative flex w-full cursor-text","[-webkit-tap-highlight-color:transparent]",b,d,f].join(" "),z=m,k=c;export const TextField=l.forwardRef(function({variant:a="glass",size:c="md",color:m="primary",density:d="default",elevation:p=0,multiline:f=!1,rows:g=3,resize:b="vertical",label:D,description:R,error:B,invalid:I,startIcon:O,endIcon:T,loading:C=!1,fullWidth:E=!1,readOnly:F=!1,disabled:L=!1,type:P="text",className:W,style:q,...A},G){const H=u(B),J=I??H,K=J?"danger":m,M=l.useRef(null),Q=l.useCallback(e=>{M.current=e,"function"==typeof G?G(e):G&&(G.current=e)},[G]),S=[N,j[c],f?`${v[c]} items-start`:`${i[c]} items-center`,h[d][c],L?o[a]:F?k[a]:z[a]].filter(Boolean).join(" "),U=["min-w-0 flex-1 bg-transparent [font:inherit] text-inherit","[outline:none]","placeholder:text-(--plass-muted-fg)","caret-(--p-accent) selection:bg-(--p-soft-press)","disabled:cursor-not-allowed",f?`block ${w[b]}`:"self-stretch"].join(" "),V="inline-flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg) transition-[color] duration-(--plass-duration) group-focus-within:text-(--p-accent)";return t(n.Root,{disabled:L,invalid:J,className:["flex-col align-top",$[c],E?"flex w-full":"inline-flex",W??""].filter(Boolean).join(" "),style:{...y(K,p),...q},children:[D?e(n.Label,{className:[x[c],"font-semibold",L?"text-(--plass-muted-fg)":"text-(--plass-fg)"].join(" "),children:D}):null,t("span",{className:S,onPointerDown:e=>{e.target!==e.currentTarget||L||(e.preventDefault(),M.current?.focus())},children:[O?e("span",{className:V,children:O}):null,e(r,{ref:Q,className:U,disabled:L,readOnly:F,"aria-busy":C||void 0,"data-loading":C||void 0,...f?{render:e("textarea",{rows:g})}:{type:P},...A}),C?e("span",{className:V,children:e(s,{})}):T?e("span",{className:V,children:T}):null]}),R?e(n.Description,{className:[x[c],"text-(--plass-muted-fg)"].join(" "),children:R}):null,H?e(n.Error,{match:!0,className:[x[c],"text-(--p-accent)"].join(" "),children:B}):null]})});
|