@plexui/ui 0.19.0 → 0.20.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/README.md +1 -3
- package/dist/es/components/Accordion/Accordion.js +2 -2
- package/dist/es/components/Accordion/Accordion.js.map +1 -1
- package/dist/es/components/Accordion/index.js +1 -1
- package/dist/es/components/Alert/Alert.js +6 -6
- package/dist/es/components/Alert/Alert.js.map +1 -1
- package/dist/es/components/Alert/index.js +1 -1
- package/dist/es/components/Avatar/Avatar.js +12 -5
- package/dist/es/components/Avatar/Avatar.js.map +1 -1
- package/dist/es/components/Avatar/AvatarGroup.js +2 -2
- package/dist/es/components/Avatar/AvatarGroup.js.map +1 -1
- package/dist/es/components/Avatar/index.js +2 -2
- package/dist/es/components/Badge/index.js +3 -3
- package/dist/es/components/Badge/index.js.map +1 -1
- package/dist/es/components/Breadcrumb/Breadcrumb.js +34 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/es/components/Breadcrumb/index.js +2 -0
- package/dist/es/components/Breadcrumb/index.js.map +1 -0
- package/dist/es/components/Button/Button.js +7 -7
- package/dist/es/components/Button/Button.js.map +1 -1
- package/dist/es/components/Button/CopyButton.js +25 -13
- package/dist/es/components/Button/CopyButton.js.map +1 -1
- package/dist/es/components/Button/index.js +2 -2
- package/dist/es/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js +1 -1
- package/dist/es/components/Card/Card.js +4 -3
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/index.js +1 -1
- package/dist/es/components/Checkbox/Checkbox.js +12 -6
- package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/es/components/Checkbox/index.js +1 -1
- package/dist/es/components/CodeBlock/CodeBlock.js +25 -25
- package/dist/es/components/CodeBlock/CodeBlock.js.map +1 -1
- package/dist/es/components/CodeBlock/CollapsibleCodeBlock.js +6 -4
- package/dist/es/components/CodeBlock/CollapsibleCodeBlock.js.map +1 -1
- package/dist/es/components/CodeBlock/index.js +2 -2
- package/dist/es/components/DataTable/DataTable.js +108 -27
- package/dist/es/components/DataTable/DataTable.js.map +1 -1
- package/dist/es/components/DataTable/DataTableColumnHeader.js +2 -2
- package/dist/es/components/DataTable/DataTableColumnHeader.js.map +1 -1
- package/dist/es/components/DataTable/DataTablePagination.js +8 -4
- package/dist/es/components/DataTable/DataTablePagination.js.map +1 -1
- package/dist/es/components/DataTable/columnHelpers.js +3 -3
- package/dist/es/components/DataTable/index.js +4 -4
- package/dist/es/components/DateInput/DateInput.js +21 -13
- package/dist/es/components/DateInput/DateInput.js.map +1 -1
- package/dist/es/components/DateInput/index.js +1 -1
- package/dist/es/components/DatePicker/Calendar.js +136 -32
- package/dist/es/components/DatePicker/Calendar.js.map +1 -1
- package/dist/es/components/DatePicker/DatePicker.js +15 -11
- package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/es/components/DatePicker/index.js +1 -1
- package/dist/es/components/DateRangePicker/Calendar.js +125 -22
- package/dist/es/components/DateRangePicker/Calendar.js.map +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js +10 -9
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/DateRangePicker/Trigger.js +12 -9
- package/dist/es/components/DateRangePicker/Trigger.js.map +1 -1
- package/dist/es/components/DateRangePicker/index.js +2 -2
- package/dist/es/components/Dialog/Dialog.js +11 -6
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/EmptyMessage/EmptyMessage.js +4 -4
- package/dist/es/components/EmptyMessage/EmptyMessage.js.map +1 -1
- package/dist/es/components/EmptyMessage/index.js +1 -1
- package/dist/es/components/Field/Field.js +22 -7
- package/dist/es/components/Field/Field.js.map +1 -1
- package/dist/es/components/Field/index.js +1 -1
- package/dist/es/components/FieldError/FieldError.js +4 -4
- package/dist/es/components/FieldError/FieldError.js.map +1 -1
- package/dist/es/components/FieldError/index.js +1 -1
- package/dist/es/components/FileUpload/FileUpload.js +12 -9
- package/dist/es/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/es/components/FileUpload/index.js +1 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +31 -4
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
- package/dist/es/components/FloatingLabelInput/index.js +1 -1
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js +28 -8
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js.map +1 -1
- package/dist/es/components/FloatingLabelSelect/index.js +1 -1
- package/dist/es/components/Icon/aliases.js +20 -20
- package/dist/es/components/Icon/index.js +653 -653
- package/dist/es/components/Image/Image.js +19 -7
- package/dist/es/components/Image/Image.js.map +1 -1
- package/dist/es/components/Image/index.js +1 -1
- package/dist/es/components/Indicator/CircularProgress.js +3 -3
- package/dist/es/components/Indicator/CircularProgress.js.map +1 -1
- package/dist/es/components/Indicator/LoadingDots.js +1 -1
- package/dist/es/components/Indicator/LoadingDots.js.map +1 -1
- package/dist/es/components/Indicator/LoadingIndicator.js +2 -2
- package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
- package/dist/es/components/Indicator/index.js +3 -3
- package/dist/es/components/Input/Input.js +16 -5
- package/dist/es/components/Input/Input.js.map +1 -1
- package/dist/es/components/Input/index.js +1 -1
- package/dist/es/components/InputGroup/InputGroup.js +60 -0
- package/dist/es/components/InputGroup/InputGroup.js.map +1 -0
- package/dist/es/components/InputGroup/index.js +2 -0
- package/dist/es/components/InputGroup/index.js.map +1 -0
- package/dist/es/components/Kbd/Kbd.js +13 -0
- package/dist/es/components/Kbd/Kbd.js.map +1 -0
- package/dist/es/components/Kbd/index.js +2 -0
- package/dist/es/components/Kbd/index.js.map +1 -0
- package/dist/es/components/Label/Label.js +1 -1
- package/dist/es/components/Label/Label.js.map +1 -1
- package/dist/es/components/Label/index.js +1 -1
- package/dist/es/components/Markdown/Markdown.js +8 -8
- package/dist/es/components/Markdown/Markdown.js.map +1 -1
- package/dist/es/components/Markdown/directives.js +2 -2
- package/dist/es/components/Markdown/index.js +4 -5
- package/dist/es/components/Markdown/index.js.map +1 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +35 -11
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/MarkdownEditor/index.js +1 -1
- package/dist/es/components/Menu/Menu.js +26 -18
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Menu/index.js +1 -1
- package/dist/es/components/OTPInput/OTPInput.js +51 -34
- package/dist/es/components/OTPInput/OTPInput.js.map +1 -1
- package/dist/es/components/OTPInput/index.js +1 -1
- package/dist/es/components/PlexUIProvider/PlexUIProvider.js +3 -1
- package/dist/es/components/PlexUIProvider/PlexUIProvider.js.map +1 -1
- package/dist/es/components/PlexUIProvider/index.js +1 -1
- package/dist/es/components/PlexUIProvider/internal.js +1 -1
- package/dist/es/components/Popover/Popover.js +7 -7
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Popover/index.js +2 -3
- package/dist/es/components/Popover/index.js.map +1 -1
- package/dist/es/components/Popover/usePopoverController.js +2 -2
- package/dist/es/components/Progress/Progress.js +1 -1
- package/dist/es/components/Progress/Progress.js.map +1 -1
- package/dist/es/components/Progress/index.js +1 -1
- package/dist/es/components/ProgressSteps/ProgressSteps.js +6 -4
- package/dist/es/components/ProgressSteps/ProgressSteps.js.map +1 -1
- package/dist/es/components/ProgressSteps/index.js +1 -1
- package/dist/es/components/RadioGroup/RadioGroup.js +10 -6
- package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es/components/RadioGroup/index.js +1 -1
- package/dist/es/components/SegmentedControl/index.js +1 -1
- package/dist/es/components/Select/Select.js +104 -67
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/Select/index.js +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +10 -5
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/SelectControl/index.js +1 -1
- package/dist/es/components/Separator/Separator.js +1 -1
- package/dist/es/components/Separator/Separator.js.map +1 -1
- package/dist/es/components/Separator/index.js +1 -1
- package/dist/es/components/ShimmerText/ShimmerText.js +1 -1
- package/dist/es/components/ShimmerText/ShimmerText.js.map +1 -1
- package/dist/es/components/ShimmerText/index.js +1 -1
- package/dist/es/components/Sidebar/Sidebar.js +37 -29
- package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/es/components/Sidebar/index.js +2 -2
- package/dist/es/components/Sidebar/useSidebarContext.js +17 -19
- package/dist/es/components/Sidebar/useSidebarContext.js.map +1 -1
- package/dist/es/components/Skeleton/index.js +1 -1
- package/dist/es/components/Skeleton/index.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +48 -19
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Slider/index.js +1 -1
- package/dist/es/components/StatCard/StatCard.js +5 -5
- package/dist/es/components/StatCard/StatCard.js.map +1 -1
- package/dist/es/components/StatCard/index.js +1 -1
- package/dist/es/components/Switch/Switch.js +7 -3
- package/dist/es/components/Switch/Switch.js.map +1 -1
- package/dist/es/components/Switch/index.js +1 -1
- package/dist/es/components/Table/Table.js +1 -1
- package/dist/es/components/Table/Table.js.map +1 -1
- package/dist/es/components/Table/index.js +1 -1
- package/dist/es/components/Tabs/Tabs.js +154 -6
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/Tabs/index.js +1 -1
- package/dist/es/components/Tabs/overflow.js +44 -0
- package/dist/es/components/Tabs/overflow.js.map +1 -0
- package/dist/es/components/TagInput/TagInput.js +47 -23
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/TagInput/index.js +1 -1
- package/dist/es/components/TextLink/TextLink.js +16 -5
- package/dist/es/components/TextLink/TextLink.js.map +1 -1
- package/dist/es/components/TextLink/index.js +1 -1
- package/dist/es/components/Textarea/Textarea.js +4 -4
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Textarea/index.js +1 -1
- package/dist/es/components/Toast/Toaster.js +2 -2
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/index.js +1 -1
- package/dist/es/components/Tooltip/CopyTooltip.js +30 -9
- package/dist/es/components/Tooltip/CopyTooltip.js.map +1 -1
- package/dist/es/components/Tooltip/Tooltip.js +3 -3
- package/dist/es/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/es/components/Tooltip/index.js +2 -2
- package/dist/es/components/Transition/Animate.js +4 -4
- package/dist/es/components/Transition/Animate.js.map +1 -1
- package/dist/es/components/Transition/AnimateLayout.js +4 -4
- package/dist/es/components/Transition/AnimateLayout.js.map +1 -1
- package/dist/es/components/Transition/AnimateLayoutGroup.js +12 -8
- package/dist/es/components/Transition/AnimateLayoutGroup.js.map +1 -1
- package/dist/es/components/Transition/SlotTransitionGroup.js +4 -4
- package/dist/es/components/Transition/TransitionGroup.js +5 -5
- package/dist/es/components/Transition/TransitionGroup.js.map +1 -1
- package/dist/es/components/Transition/getDisableAnimations.js +1 -1
- package/dist/es/components/Transition/index.js +5 -5
- package/dist/es/components/Transition/shared.js +7 -5
- package/dist/es/components/Transition/shared.js.map +1 -1
- package/dist/es/components/UIProvider/UIProvider.js +1 -1
- package/dist/es/components/UIProvider/index.js +1 -1
- package/dist/es/components/UIProvider/internal.js +1 -1
- package/dist/es/hooks/useAnimatedScrollTo.js +1 -1
- package/dist/es/hooks/useBreakpoints.js +8 -2
- package/dist/es/hooks/useBreakpoints.js.map +1 -1
- package/dist/es/hooks/useEscCloseStack.js +1 -1
- package/dist/es/hooks/usePrevious.js +7 -5
- package/dist/es/hooks/usePrevious.js.map +1 -1
- package/dist/es/hooks/useTextSelection.js +2 -2
- package/dist/es/hooks/useTrailingValue.js +1 -1
- package/dist/es/lib/constants.js +1 -1
- package/dist/es/lib/helpers.js +1 -1
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/renderHelpers.js +15 -6
- package/dist/es/lib/renderHelpers.js.map +1 -1
- package/dist/es/lib/theme.js +16 -16
- package/dist/es/lib/theme.js.map +1 -1
- package/dist/es/lib/userAgent.js +3 -2
- package/dist/es/lib/userAgent.js.map +1 -1
- package/dist/es/styles/base.css +1 -102
- package/dist/es/styles/globals.css +1 -50
- package/dist/es/styles/index.css +1 -25
- package/dist/es/styles/katex.min.css +1 -1296
- package/dist/es/styles/tailwind-utilities.css +1 -1316
- package/dist/es/styles/variables-components.css +1 -626
- package/dist/es/styles/variables-primitive.css +1 -327
- package/dist/es/styles/variables-semantic.css +1 -609
- package/dist/es/styles/variables-tailwind-theme.css +1 -34
- package/dist/es/styles/variables-tokens-root.css +1 -41
- package/dist/es/types.js +1 -1
- package/dist/es/types.js.map +1 -1
- package/dist/es/vite/index.js +3 -53
- package/dist/es/vite/index.js.map +1 -1
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Alert/Alert.d.ts +8 -2
- package/dist/types/components/Alert/index.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/types/components/Avatar/index.d.ts +2 -2
- package/dist/types/components/Badge/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +34 -0
- package/dist/types/components/Breadcrumb/index.d.ts +1 -0
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Button/CopyButton.d.ts +9 -4
- package/dist/types/components/Button/index.d.ts +2 -2
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +3 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/CodeBlock/index.d.ts +2 -2
- package/dist/types/components/DataTable/DataTable.d.ts +3 -2
- package/dist/types/components/DataTable/index.d.ts +4 -4
- package/dist/types/components/DateInput/DateInput.d.ts +1 -1
- package/dist/types/components/DateInput/index.d.ts +1 -1
- package/dist/types/components/DatePicker/DatePicker.d.ts +7 -6
- package/dist/types/components/DatePicker/context.d.ts +1 -1
- package/dist/types/components/DatePicker/index.d.ts +2 -2
- package/dist/types/components/DateRangePicker/Calendar.d.ts +1 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +5 -5
- package/dist/types/components/DateRangePicker/context.d.ts +2 -2
- package/dist/types/components/DateRangePicker/index.d.ts +2 -2
- package/dist/types/components/Dialog/Dialog.d.ts +19 -1
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/EmptyMessage/EmptyMessage.d.ts +15 -3
- package/dist/types/components/EmptyMessage/index.d.ts +1 -1
- package/dist/types/components/Field/Field.d.ts +14 -4
- package/dist/types/components/Field/index.d.ts +1 -1
- package/dist/types/components/FieldError/FieldError.d.ts +7 -1
- package/dist/types/components/FieldError/index.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +1 -1
- package/dist/types/components/FloatingLabelInput/index.d.ts +1 -1
- package/dist/types/components/FloatingLabelSelect/index.d.ts +1 -1
- package/dist/types/components/Icon/aliases.d.ts +20 -20
- package/dist/types/components/Icon/index.d.ts +653 -653
- package/dist/types/components/Image/Image.d.ts +1 -1
- package/dist/types/components/Image/index.d.ts +1 -1
- package/dist/types/components/Indicator/index.d.ts +3 -3
- package/dist/types/components/Input/Input.d.ts +2 -2
- package/dist/types/components/Input/index.d.ts +1 -1
- package/dist/types/components/InputGroup/InputGroup.d.ts +78 -0
- package/dist/types/components/InputGroup/index.d.ts +1 -0
- package/dist/types/components/Kbd/Kbd.d.ts +20 -0
- package/dist/types/components/Kbd/index.d.ts +1 -0
- package/dist/types/components/Label/index.d.ts +1 -1
- package/dist/types/components/Markdown/Markdown.d.ts +1 -1
- package/dist/types/components/Markdown/index.d.ts +4 -4
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts +6 -2
- package/dist/types/components/MarkdownEditor/index.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +11 -3
- package/dist/types/components/Menu/index.d.ts +1 -1
- package/dist/types/components/OTPInput/index.d.ts +1 -1
- package/dist/types/components/PlexUIProvider/PlexUIProvider.d.ts +0 -11
- package/dist/types/components/PlexUIProvider/index.d.ts +1 -1
- package/dist/types/components/Popover/index.d.ts +2 -2
- package/dist/types/components/Progress/index.d.ts +1 -1
- package/dist/types/components/ProgressSteps/ProgressSteps.d.ts +1 -1
- package/dist/types/components/ProgressSteps/index.d.ts +1 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/types/components/RadioGroup/index.d.ts +1 -1
- package/dist/types/components/SegmentedControl/index.d.ts +2 -2
- package/dist/types/components/Select/Select.d.ts +8 -1
- package/dist/types/components/Select/index.d.ts +1 -1
- package/dist/types/components/SelectControl/SelectControl.d.ts +1 -1
- package/dist/types/components/SelectControl/index.d.ts +1 -1
- package/dist/types/components/Separator/index.d.ts +1 -1
- package/dist/types/components/ShimmerText/index.d.ts +1 -1
- package/dist/types/components/Sidebar/Sidebar.d.ts +4 -8
- package/dist/types/components/Sidebar/index.d.ts +4 -4
- package/dist/types/components/Slider/Slider.d.ts +8 -0
- package/dist/types/components/Slider/index.d.ts +2 -2
- package/dist/types/components/StatCard/index.d.ts +1 -1
- package/dist/types/components/Switch/index.d.ts +1 -1
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +15 -2
- package/dist/types/components/Tabs/index.d.ts +2 -2
- package/dist/types/components/Tabs/overflow.d.ts +17 -0
- package/dist/types/components/TagInput/TagInput.d.ts +1 -1
- package/dist/types/components/TagInput/index.d.ts +1 -1
- package/dist/types/components/TextLink/index.d.ts +1 -1
- package/dist/types/components/Textarea/Textarea.d.ts +1 -1
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Tooltip/CopyTooltip.d.ts +6 -1
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Transition/Animate.d.ts +2 -2
- package/dist/types/components/Transition/AnimateLayout.d.ts +2 -2
- package/dist/types/components/Transition/AnimateLayoutGroup.d.ts +2 -2
- package/dist/types/components/Transition/SlotTransitionGroup.d.ts +1 -1
- package/dist/types/components/Transition/TransitionGroup.d.ts +1 -1
- package/dist/types/components/Transition/index.d.ts +5 -5
- package/dist/types/components/UIProvider/index.d.ts +1 -1
- package/dist/types/global.d.ts +5 -1
- package/dist/types/lib/constants.d.ts +1 -1
- package/dist/types/lib/helpers.d.ts +4 -4
- package/dist/types/lib/theme.d.ts +1 -1
- package/dist/types/types.d.ts +2 -15
- package/dist/types/vite/index.d.ts +2 -55
- package/package.json +10 -18
- package/dist/es/components/Accordion/Accordion.module.css +0 -89
- package/dist/es/components/Alert/Alert.module.css +0 -187
- package/dist/es/components/Avatar/Avatar.module.css +0 -168
- package/dist/es/components/Avatar/AvatarGroup.module.css +0 -26
- package/dist/es/components/Badge/Badge.module.css +0 -196
- package/dist/es/components/Button/Button.module.css +0 -859
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +0 -159
- package/dist/es/components/Card/Card.module.css +0 -125
- package/dist/es/components/Checkbox/Checkbox.module.css +0 -198
- package/dist/es/components/CodeBlock/CodeBlock.module.css +0 -137
- package/dist/es/components/DataTable/DataTable.module.css +0 -108
- package/dist/es/components/DatePicker/Calendar.module.css +0 -271
- package/dist/es/components/DateRangePicker/Calendar.module.css +0 -295
- package/dist/es/components/DateRangePicker/Trigger.module.css +0 -25
- package/dist/es/components/Dialog/Dialog.module.css +0 -133
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +0 -82
- package/dist/es/components/Field/Field.module.css +0 -137
- package/dist/es/components/FieldError/FieldError.module.css +0 -22
- package/dist/es/components/FileUpload/FileUpload.module.css +0 -133
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +0 -220
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +0 -146
- package/dist/es/components/Image/Image.module.css +0 -9
- package/dist/es/components/Indicator/CircularProgress.module.css +0 -28
- package/dist/es/components/Indicator/LoadingDots.module.css +0 -35
- package/dist/es/components/Indicator/LoadingIndicator.module.css +0 -41
- package/dist/es/components/Input/Input.module.css +0 -507
- package/dist/es/components/Label/Label.module.css +0 -16
- package/dist/es/components/Markdown/Markdown.module.css +0 -233
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +0 -297
- package/dist/es/components/Menu/Menu.module.css +0 -377
- package/dist/es/components/OTPInput/OTPInput.module.css +0 -66
- package/dist/es/components/Popover/Popover.module.css +0 -82
- package/dist/es/components/Progress/Progress.module.css +0 -34
- package/dist/es/components/ProgressSteps/ProgressSteps.module.css +0 -246
- package/dist/es/components/RadioGroup/RadioGroup.module.css +0 -137
- package/dist/es/components/Select/Select.module.css +0 -310
- package/dist/es/components/SelectControl/SelectControl.module.css +0 -558
- package/dist/es/components/Separator/Separator.module.css +0 -16
- package/dist/es/components/ShimmerText/ShimmerText.module.css +0 -43
- package/dist/es/components/Sidebar/Sidebar.module.css +0 -909
- package/dist/es/components/Skeleton/Skeleton.module.css +0 -17
- package/dist/es/components/Slider/Slider.module.css +0 -203
- package/dist/es/components/StatCard/StatCard.module.css +0 -234
- package/dist/es/components/Switch/Switch.module.css +0 -121
- package/dist/es/components/Table/Table.module.css +0 -56
- package/dist/es/components/Tabs/Tabs.module.css +0 -672
- package/dist/es/components/TagInput/TagInput.module.css +0 -320
- package/dist/es/components/TextLink/TextLink.module.css +0 -50
- package/dist/es/components/Textarea/Textarea.module.css +0 -272
- package/dist/es/components/Toast/Toast.module.css +0 -84
- package/dist/es/components/Tooltip/Tooltip.module.css +0 -91
- package/dist/es/components/Transition/Animate.module.css +0 -54
- package/dist/es/components/Transition/AnimateLayout.module.css +0 -101
- package/dist/es/components/Transition/AnimateLayoutGroup.module.css +0 -72
- package/dist/es/components/Transition/TransitionGroup.module.css +0 -4
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
|
+
// The value before the latest change of `value`; renders that keep `value`
|
|
3
|
+
// return the same previous value
|
|
2
4
|
export function usePrevious(value) {
|
|
3
|
-
const ref = useRef(value);
|
|
5
|
+
const ref = useRef({ value, previous: value });
|
|
4
6
|
useEffect(() => {
|
|
5
|
-
|
|
6
|
-
ref.current = value;
|
|
7
|
-
}
|
|
7
|
+
if (!Object.is(ref.current.value, value)) {
|
|
8
|
+
ref.current = { value, previous: ref.current.value };
|
|
9
|
+
}
|
|
8
10
|
}, [value]);
|
|
9
|
-
return ref.current;
|
|
11
|
+
return Object.is(ref.current.value, value) ? ref.current.previous : ref.current.value;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=usePrevious.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrevious.js","sourceRoot":"","sources":["../../../src/hooks/usePrevious.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEzC,MAAM,UAAU,WAAW,CAAI,KAAQ;IACrC,MAAM,GAAG,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"usePrevious.js","sourceRoot":"","sources":["../../../src/hooks/usePrevious.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEzC,2EAA2E;AAC3E,iCAAiC;AACjC,MAAM,UAAU,WAAW,CAAI,KAAQ;IACrC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAA;IAE9C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QACtD,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAA;AACvF,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\"\n\n// The value before the latest change of `value`; renders that keep `value`\n// return the same previous value\nexport function usePrevious<T>(value: T): T {\n const ref = useRef({ value, previous: value })\n\n useEffect(() => {\n if (!Object.is(ref.current.value, value)) {\n ref.current = { value, previous: ref.current.value }\n }\n }, [value])\n\n return Object.is(ref.current.value, value) ? ref.current.previous : ref.current.value\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useId } from "react";
|
|
2
|
-
import { canUseDOM } from "../lib/environment";
|
|
3
|
-
import { useLatestValue } from "./useLatestValue";
|
|
2
|
+
import { canUseDOM } from "../lib/environment.js";
|
|
3
|
+
import { useLatestValue } from "./useLatestValue.js";
|
|
4
4
|
let handlers = [];
|
|
5
5
|
let listenerBound = false;
|
|
6
6
|
const handleSelectionChange = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useLatestValue } from "./useLatestValue";
|
|
2
|
+
import { useLatestValue } from "./useLatestValue.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns a version of `value` that updates to the latest `value` after `delay`
|
|
5
5
|
* milliseconds. Useful for holding on to a previous value for a short time
|
package/dist/es/lib/constants.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { isDev, isTest } from "./environment";
|
|
1
|
+
export { isDev, isTest } from "./environment.js";
|
|
2
2
|
export const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
3
3
|
//# sourceMappingURL=constants.js.map
|
package/dist/es/lib/helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {} from "react";
|
|
2
|
-
import { canUseDOM, hasDocument, hasWindow } from "./environment";
|
|
2
|
+
import { canUseDOM, hasDocument, hasWindow } from "./environment.js";
|
|
3
3
|
export const prefersReducedMotion = () => {
|
|
4
4
|
if (!hasWindow || typeof window.matchMedia !== "function") {
|
|
5
5
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,IAAI,CAAC,SAAS,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAA;AACtE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAqB,EAAE,EAAE;IACjE,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAA;IAEhC,wEAAwE;IACxE,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,EAAE,CAAC;QACrC,OAAM;IACR,CAAC;IAED,MAAM,YAAY,GAAG,MAAM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jC,SAAQ;QACV,CAAC;QAED,mBAAmB;QACnB,MAAM,KAAK,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAsC,CAAA;QACjF,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;QAClC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { type CSSProperties } from \"react\"\nimport { canUseDOM, hasDocument, hasWindow } from \"./environment\"\nimport type { Pretty } from \"./utilityTypes\"\n\nexport const prefersReducedMotion = () => {\n if (!hasWindow || typeof window.matchMedia !== \"function\") {\n return false\n }\n\n return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n}\n\nexport const handlePressableMouseEnter = (evt: React.MouseEvent) => {\n const target = evt.currentTarget\n\n // Safely coerce type to HTMLElement so TS is peaceful with `evt.target`\n if (!(target instanceof HTMLElement)) {\n return\n }\n\n const elementWidth = target.offsetWidth\n\n let scale = 0.985\n\n if (elementWidth <= 80) {\n scale = 0.96\n } else if (elementWidth <= 150) {\n scale = 0.97\n } else if (elementWidth <= 220) {\n scale = 0.98\n } else if (elementWidth > 600) {\n scale = 0.995\n }\n\n target.style.setProperty(\"--scale\", scale.toString())\n}\n\ninterface CancelAnimationFrame {\n (): void\n}\n\nexport const waitForAnimationFrame = (\n cb: () => void,\n options?: { frames: number },\n): CancelAnimationFrame => {\n const runAfterTick = () => {\n const id = setTimeout(cb)\n return () => {\n clearTimeout(id)\n }\n }\n\n if (!canUseDOM || typeof window.requestAnimationFrame !== \"function\") {\n return runAfterTick()\n }\n\n const visibilityHidden = hasDocument && document.visibilityState === \"hidden\"\n if (visibilityHidden) {\n return runAfterTick()\n }\n\n let frames = options?.frames ?? 2\n let animationFrame = window.requestAnimationFrame(function recurse() {\n frames -= 1\n if (frames === 0) {\n cb()\n } else {\n animationFrame = window.requestAnimationFrame(recurse)\n }\n })\n\n return () => {\n if (typeof window.cancelAnimationFrame === \"function\") {\n window.cancelAnimationFrame(animationFrame)\n }\n }\n}\n\nexport const toCssVariables = (\n variables: Record<string, string | number | undefined>,\n): CSSProperties => {\n const formattedVariables = Object.keys(variables).reduce(\n (acc, variable) => {\n // Ensure value is truthy\n const value = variables[variable]\n // Accept 0 as a valid value\n if (value || value === 0) {\n // Add the prefix if it wasn't already provided\n const prefix = variable.startsWith(\"--\") ? \"\" : \"--\"\n const formattedValue = typeof value === \"number\" ? `${value}px` : value\n\n acc[`${prefix}${variable}`] = formattedValue\n }\n\n return acc\n },\n {} as Record<string, string>,\n )\n\n // Safe casting because we know we've formatted an object of CSS Variable strings\n return formattedVariables as CSSProperties\n}\n\nexport const toAngle = (value: number | string): string =>\n typeof value === \"number\" ? `${value}deg` : value\n\nexport const toOpacityProperty = (opacity: number): string => String(opacity)\n\nexport const toMsDurationProperty = (duration: number): string => `${duration}ms`\n\nexport const toTransformProperty = ({\n x,\n y,\n scale,\n rotate,\n skewX,\n skewY,\n}: {\n x?: number\n y?: number\n scale?: number\n rotate?: number | string\n skewX?: number | string\n skewY?: number | string\n} = {}): string => {\n const transforms = [\n x == null ? null : `translateX(${x}px)`,\n y == null ? null : `translateY(${y}px)`,\n scale == null ? null : `scale(${scale})`,\n rotate == null ? null : `rotate(${toAngle(rotate)})`,\n skewX == null ? null : `skewX(${toAngle(skewX)})`,\n skewY == null ? null : `skewY(${toAngle(skewY)})`,\n ].filter(Boolean)\n\n return transforms.length ? transforms.join(\" \") : \"none\"\n}\n\nexport const toFilterProperty = ({ blur }: { blur?: number | undefined } = {}) => {\n // Maybe add more support in the future\n const filters = [blur == null ? null : `blur(${blur}px)`].filter(Boolean)\n\n return filters.length ? filters.join(\" \") : \"none\"\n}\n\nexport const preventDefaultHandler = (evt: Event) => {\n evt.preventDefault()\n}\n\n/*\n * Intentionally simple selector string. Purposeful exclusions: (for now)\n * - select, because our selects are better recognized as button\n * - unused selectors like iframe, object, .etc.\n * - states like [inert]\n */\nexport const focusableElements = (element: HTMLElement) =>\n element.querySelectorAll<HTMLElement>(\n 'a[href], input:not([disabled]):not([type=\"hidden\"]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex^=\"-\"]), [contenteditable]',\n )\n\nexport const sleep = (ms: number): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * Group an array of objects by a property, preserving the *first-seen* order\n * of each group.\n *\n * @example\n * groupByOrdered(people, \"team\")\n * // => [ { team: \"infra\", items:[...] }, { team:\"design\", items:[...] }, ... ]\n */\nexport function groupByProperty<T extends object, K extends keyof T, F = T[K]>(\n items: T[],\n key: K,\n format: (raw: T[K], item: T) => F = (raw) => raw as F,\n) {\n const groups: Pretty<{ [P in K]: F } & { items: T[] }>[] = []\n const indexMap = new Map<unknown, number>() // maps group value -> index in groups array\n\n for (const item of items) {\n const value = format(item[key], item)\n\n // Add to existing group\n const existing = indexMap.get(value)\n if (existing !== undefined) {\n groups[existing].items.push(item)\n continue\n }\n\n // Create new group\n const group = { [key]: value, items: [item] } as { [P in K]: F } & { items: T[] }\n indexMap.set(value, groups.length)\n groups.push(group)\n }\n\n return groups\n}\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,IAAI,CAAC,SAAS,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAA;AACtE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,y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AAA;QAErC,wBAAwB;QACxB,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACjC,SAAQ;QACV,CAAC;QAED,mBAAmB;QACnB,MAAM,KAAK,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAsC,CAAA;QACjF,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;QAClC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { type CSSProperties } from \"react\"\nimport { canUseDOM, hasDocument, hasWindow } from \"./environment\"\nimport type { Pretty } from \"./utilityTypes\"\n\nexport const prefersReducedMotion = () => {\n if (!hasWindow || typeof window.matchMedia !== \"function\") {\n return false\n }\n\n return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n}\n\nexport const handlePressableMouseEnter = (evt: React.MouseEvent) => {\n const target = evt.currentTarget\n\n // Safely coerce type to HTMLElement so TS is peaceful with `evt.target`\n if (!(target instanceof HTMLElement)) {\n return\n }\n\n const elementWidth = target.offsetWidth\n\n let scale = 0.985\n\n if (elementWidth <= 80) {\n scale = 0.96\n } else if (elementWidth <= 150) {\n scale = 0.97\n } else if (elementWidth <= 220) {\n scale = 0.98\n } else if (elementWidth > 600) {\n scale = 0.995\n }\n\n target.style.setProperty(\"--scale\", scale.toString())\n}\n\ninterface CancelAnimationFrame {\n (): void\n}\n\nexport const waitForAnimationFrame = (\n cb: () => void,\n options?: { frames: number },\n): CancelAnimationFrame => {\n const runAfterTick = () => {\n const id = setTimeout(cb)\n return () => {\n clearTimeout(id)\n }\n }\n\n if (!canUseDOM || typeof window.requestAnimationFrame !== \"function\") {\n return runAfterTick()\n }\n\n const visibilityHidden = hasDocument && document.visibilityState === \"hidden\"\n if (visibilityHidden) {\n return runAfterTick()\n }\n\n let frames = options?.frames ?? 2\n let animationFrame = window.requestAnimationFrame(function recurse() {\n frames -= 1\n if (frames === 0) {\n cb()\n } else {\n animationFrame = window.requestAnimationFrame(recurse)\n }\n })\n\n return () => {\n if (typeof window.cancelAnimationFrame === \"function\") {\n window.cancelAnimationFrame(animationFrame)\n }\n }\n}\n\nexport const toCssVariables = (\n variables: Record<string, string | number | undefined>,\n): CSSProperties => {\n const formattedVariables = Object.keys(variables).reduce(\n (acc, variable) => {\n // Ensure value is truthy\n const value = variables[variable]\n // Accept 0 as a valid value\n if (value || value === 0) {\n // Add the prefix if it wasn't already provided\n const prefix = variable.startsWith(\"--\") ? \"\" : \"--\"\n const formattedValue = typeof value === \"number\" ? `${value}px` : value\n\n acc[`${prefix}${variable}`] = formattedValue\n }\n\n return acc\n },\n {} as Record<string, string>,\n )\n\n // Safe casting because we know we've formatted an object of CSS Variable strings\n return formattedVariables as CSSProperties\n}\n\nexport const toAngle = (value: number | string): string =>\n typeof value === \"number\" ? `${value}deg` : value\n\nexport const toOpacityProperty = (opacity: number): string => String(opacity)\n\nexport const toMsDurationProperty = (duration: number): string => `${duration}ms`\n\nexport const toTransformProperty = ({\n x,\n y,\n scale,\n rotate,\n skewX,\n skewY,\n}: {\n x?: number\n y?: number\n scale?: number\n rotate?: number | string\n skewX?: number | string\n skewY?: number | string\n} = {}): string => {\n const transforms = [\n x == null ? null : `translateX(${x}px)`,\n y == null ? null : `translateY(${y}px)`,\n scale == null ? null : `scale(${scale})`,\n rotate == null ? null : `rotate(${toAngle(rotate)})`,\n skewX == null ? null : `skewX(${toAngle(skewX)})`,\n skewY == null ? null : `skewY(${toAngle(skewY)})`,\n ].filter(Boolean)\n\n return transforms.length ? transforms.join(\" \") : \"none\"\n}\n\nexport const toFilterProperty = ({ blur }: { blur?: number | undefined } = {}) => {\n // Maybe add more support in the future\n const filters = [blur == null ? null : `blur(${blur}px)`].filter(Boolean)\n\n return filters.length ? filters.join(\" \") : \"none\"\n}\n\nexport const preventDefaultHandler = (evt: Event) => {\n evt.preventDefault()\n}\n\n/*\n * Intentionally simple selector string. Purposeful exclusions: (for now)\n * - select, because our selects are better recognized as button\n * - unused selectors like iframe, object, .etc.\n * - states like [inert]\n */\nexport const focusableElements = (element: HTMLElement) =>\n element.querySelectorAll<HTMLElement>(\n 'a[href], input:not([disabled]):not([type=\"hidden\"]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex^=\"-\"]), [contenteditable]',\n )\n\nexport const sleep = (ms: number): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * Group an array of objects by a property, preserving the *first-seen* order\n * of each group.\n *\n * @example\n * groupByOrdered(people, \"team\")\n * // => [ { team: \"infra\", items:[...] }, { team:\"design\", items:[...] }, ... ]\n */\nexport function groupByProperty<T extends object, K extends keyof T, F = T[K]>(\n items: T[],\n key: K,\n format: (raw: T[K], item: T) => F = (raw) => raw as F,\n // Explicit: the inferred `Pretty<...>` is expanded in the published\n // declaration into a form consumers' type checks reject (TS2536)\n): ({ [P in K]: F } & { items: T[] })[] {\n const groups: Pretty<{ [P in K]: F } & { items: T[] }>[] = []\n const indexMap = new Map<unknown, number>() // maps group value -> index in groups array\n\n for (const item of items) {\n const value = format(item[key], item)\n\n // Add to existing group\n const existing = indexMap.get(value)\n if (existing !== undefined) {\n groups[existing].items.push(item)\n continue\n }\n\n // Create new group\n const group = { [key]: value, items: [item] } as { [P in K]: F } & { items: T[] }\n indexMap.set(value, groups.length)\n groups.push(group)\n }\n\n return groups\n}\n"]}
|
|
@@ -25,6 +25,20 @@ const flattenTextNodes = (children) => {
|
|
|
25
25
|
flush();
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
|
+
// Wraps the text inside an element's children. The children keep their shape:
|
|
29
|
+
// a single element stays one element (Radix's Slot, as in a Tooltip trigger,
|
|
30
|
+
// needs exactly one), and children that are not a list of nodes (a lone
|
|
31
|
+
// string, a render-prop function) are returned untouched.
|
|
32
|
+
const wrapElementChildren = (element) => {
|
|
33
|
+
const innerChildren = element.props.children;
|
|
34
|
+
if (isValidElement(innerChildren)) {
|
|
35
|
+
return cloneElement(element, undefined, wrapElementChildren(innerChildren));
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(innerChildren)) {
|
|
38
|
+
return cloneElement(element, undefined, wrapTextNodeSiblings(innerChildren));
|
|
39
|
+
}
|
|
40
|
+
return element;
|
|
41
|
+
};
|
|
28
42
|
// Helper to wrap text node siblings of other elements in a tag,
|
|
29
43
|
// which enables sibling selectors to behave as expected for certain conditions
|
|
30
44
|
export const wrapTextNodeSiblings = (children) => {
|
|
@@ -41,12 +55,7 @@ export const wrapTextNodeSiblings = (children) => {
|
|
|
41
55
|
}
|
|
42
56
|
// For valid elements, recursively render to capture wrapped children
|
|
43
57
|
if (isValidElement(child)) {
|
|
44
|
-
|
|
45
|
-
const { children: innerChildren, ...restProps } = element.props;
|
|
46
|
-
if (innerChildren != null) {
|
|
47
|
-
return cloneElement(element, restProps, wrapTextNodeSiblings(innerChildren));
|
|
48
|
-
}
|
|
49
|
-
return element;
|
|
58
|
+
return wrapElementChildren(child);
|
|
50
59
|
}
|
|
51
60
|
return child;
|
|
52
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderHelpers.js","sourceRoot":"","sources":["../../../src/lib/renderHelpers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAqC,MAAM,OAAO,CAAA;AAEjG,MAAM,gBAAgB,GAAG,CAAC,QAAmB,EAAe,EAAE;IAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACxC,MAAM,MAAM,GAAgB,EAAE,CAAA;IAC9B,IAAI,MAAM,GAAG,EAAE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O,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAA;IAC7E,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,OAAO,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAA;IAC9E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,gEAAgE;AAChE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAmB,EAAa,EAAE;IACrE,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAEvD,OAAO,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE;QAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YAChD,mDAAmD;YACnD,IAAI,aAAa,IAAI,CAAC,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAA;YACd,CAAC;YAED,qCAAqC;YACrC,OAAO,yBAAO,KAAK,GAAQ,CAAA;QAC7B,CAAC;QAED,qEAAqE;QACrE,IAAI,cAAc,CAA2B,KAAK,CAAC,EAAE,CAAC;YACpD,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAA;QACnC,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { Children, cloneElement, isValidElement, type ReactElement, type ReactNode } from \"react\"\n\nconst flattenTextNodes = (children: ReactNode): ReactNode[] => {\n const nodes = Children.toArray(children)\n const result: ReactNode[] = []\n let buffer = \"\"\n\n const flush = () => {\n if (buffer !== \"\") {\n result.push(buffer)\n buffer = \"\"\n }\n }\n\n for (const node of nodes) {\n if (node == null || typeof node === \"boolean\") {\n continue\n }\n\n if (typeof node === \"string\" || typeof node === \"number\") {\n buffer += String(node)\n continue\n }\n\n // Boundary encountered: output any accumulated text, then the node\n flush()\n result.push(node)\n }\n\n flush()\n return result\n}\n\n// Wraps the text inside an element's children. The children keep their shape:\n// a single element stays one element (Radix's Slot, as in a Tooltip trigger,\n// needs exactly one), and children that are not a list of nodes (a lone\n// string, a render-prop function) are returned untouched.\nconst wrapElementChildren = (element: ReactElement<{ children?: ReactNode }>): ReactElement => {\n const innerChildren = element.props.children\n\n if (isValidElement<{ children?: ReactNode }>(innerChildren)) {\n return cloneElement(element, undefined, wrapElementChildren(innerChildren))\n }\n\n if (Array.isArray(innerChildren)) {\n return cloneElement(element, undefined, wrapTextNodeSiblings(innerChildren))\n }\n\n return element\n}\n\n// Helper to wrap text node siblings of other elements in a tag,\n// which enables sibling selectors to behave as expected for certain conditions\nexport const wrapTextNodeSiblings = (children: ReactNode): ReactNode => {\n const flattenedChildren = flattenTextNodes(children)\n const childrenCount = Children.count(flattenedChildren)\n\n return Children.map(flattenedChildren, (child) => {\n if (typeof child === \"string\" && !!child.trim()) {\n // Children with no siblings can immediately return\n if (childrenCount <= 1) {\n return child\n }\n\n // Wrap text nodes that have siblings\n return <span>{child}</span>\n }\n\n // For valid elements, recursively render to capture wrapped children\n if (isValidElement<{ children?: ReactNode }>(child)) {\n return wrapElementChildren(child)\n }\n\n return child\n })\n}\n"]}
|
package/dist/es/lib/theme.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
attributeFilter: ["data-theme", "class"],
|
|
11
|
-
characterData: false,
|
|
12
|
-
childList: false,
|
|
13
|
-
subtree: false,
|
|
14
|
-
});
|
|
15
|
-
return () => observer.disconnect();
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
const subscribeToDocumentTheme = (onChange) => {
|
|
3
|
+
const observer = new MutationObserver(onChange);
|
|
4
|
+
observer.observe(document.documentElement, {
|
|
5
|
+
attributes: true,
|
|
6
|
+
attributeFilter: ["data-theme", "class"],
|
|
7
|
+
characterData: false,
|
|
8
|
+
childList: false,
|
|
9
|
+
subtree: false,
|
|
16
10
|
});
|
|
17
|
-
return
|
|
11
|
+
return () => observer.disconnect();
|
|
12
|
+
};
|
|
13
|
+
// The server has no document: it renders "light", and hydration starts from
|
|
14
|
+
// it before reading the document's theme
|
|
15
|
+
const getServerDocumentTheme = () => "light";
|
|
16
|
+
export function useDocumentTheme() {
|
|
17
|
+
return useSyncExternalStore(subscribeToDocumentTheme, getDocumentTheme, getServerDocumentTheme);
|
|
18
18
|
}
|
|
19
19
|
export function getDocumentTheme() {
|
|
20
20
|
const theme = document.documentElement.getAttribute("data-theme");
|
package/dist/es/lib/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/lib/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/lib/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAI5C,MAAM,wBAAwB,GAAG,CAAC,QAAoB,EAAE,EAAE;IACxD,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IAE/C,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE;QACzC,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;QACxC,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,KAAK;KACf,CAAC,CAAA;IAEF,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;AACpC,CAAC,CAAA;AAED,4EAA4E;AAC5E,yCAAyC;AACzC,MAAM,sBAAsB,GAAG,GAAkB,EAAE,CAAC,OAAO,CAAA;AAE3D,MAAM,UAAU,gBAAgB;IAC9B,OAAO,oBAAoB,CAAC,wBAAwB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC,CAAA;AACjG,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAEjE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAEpE,OAAO,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;AACpC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAuB;IACxD,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAA;IACxC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAA;IACzC,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAA;AACnC,CAAC","sourcesContent":["import { useSyncExternalStore } from \"react\"\n\nexport type DocumentTheme = \"light\" | \"dark\"\n\nconst subscribeToDocumentTheme = (onChange: () => void) => {\n const observer = new MutationObserver(onChange)\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\", \"class\"],\n characterData: false,\n childList: false,\n subtree: false,\n })\n\n return () => observer.disconnect()\n}\n\n// The server has no document: it renders \"light\", and hydration starts from\n// it before reading the document's theme\nconst getServerDocumentTheme = (): DocumentTheme => \"light\"\n\nexport function useDocumentTheme() {\n return useSyncExternalStore(subscribeToDocumentTheme, getDocumentTheme, getServerDocumentTheme)\n}\n\nexport function getDocumentTheme() {\n const theme = document.documentElement.getAttribute(\"data-theme\")\n\n if (theme === \"dark\" || theme === \"light\") {\n return theme\n }\n\n const darkMode = document.documentElement.classList.contains(\"dark\")\n\n return darkMode ? \"dark\" : \"light\"\n}\n\nexport function applyDocumentTheme(theme: \"light\" | \"dark\") {\n const htmlTag = document.documentElement\n htmlTag.setAttribute(\"data-theme\", theme)\n htmlTag.style.colorScheme = theme\n}\n"]}
|
package/dist/es/lib/userAgent.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Empty where there is no navigator (server rendering): every check is false
|
|
2
|
+
const userAgent = typeof navigator === "undefined" ? "" : navigator.userAgent;
|
|
2
3
|
export function isIosBrowser() {
|
|
3
4
|
return /iPad|iPhone|iPod/.test(userAgent);
|
|
4
5
|
}
|
|
@@ -6,7 +7,7 @@ export function isAndroidBrowser() {
|
|
|
6
7
|
return /Android/.test(userAgent);
|
|
7
8
|
}
|
|
8
9
|
export function isIosChromeBrowser() {
|
|
9
|
-
return isIosBrowser() &&
|
|
10
|
+
return isIosBrowser() && userAgent.includes("CriOS");
|
|
10
11
|
}
|
|
11
12
|
export function isMobileDevice() {
|
|
12
13
|
return isIosBrowser() || isAndroidBrowser() || isIosChromeBrowser();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../../src/lib/userAgent.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../../src/lib/userAgent.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,SAAS,GAAG,OAAO,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAA;AAE7E,MAAM,UAAU,YAAY;IAC1B,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAClC,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,YAAY,EAAE,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,YAAY,EAAE,IAAI,gBAAgB,EAAE,IAAI,kBAAkB,EAAE,CAAA;AACrE,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,gCAAgC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AACzD,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,gBAAgB,EAAE,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AACvC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AACzC,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AACjF,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;AACtC,CAAC","sourcesContent":["// Empty where there is no navigator (server rendering): every check is false\nconst userAgent = typeof navigator === \"undefined\" ? \"\" : navigator.userAgent\n\nexport function isIosBrowser() {\n return /iPad|iPhone|iPod/.test(userAgent)\n}\n\nexport function isAndroidBrowser() {\n return /Android/.test(userAgent)\n}\n\nexport function isIosChromeBrowser() {\n return isIosBrowser() && userAgent.includes(\"CriOS\")\n}\n\nexport function isMobileDevice() {\n return isIosBrowser() || isAndroidBrowser() || isIosChromeBrowser()\n}\n\nexport function isSafariBrowser() {\n return /^((?!chrome|android).)*safari/i.test(userAgent)\n}\n\nexport function isAndroidChromeBrowser() {\n return isAndroidBrowser() && userAgent.includes(\"Chrome\")\n}\n\nexport function isMacDevice() {\n return userAgent.includes(\"Mac OS X\")\n}\n\nexport function isWindowsDevice() {\n return userAgent.includes(\"Windows_NT\")\n}\n\nexport function isChromeDesktopBrowser() {\n return userAgent.includes(\"Chrome/\") && !/Android|iPhone|iPad/i.test(userAgent)\n}\n\nexport function isFirefoxBrowser() {\n return userAgent.includes(\"Firefox\")\n}\n"]}
|
package/dist/es/styles/base.css
CHANGED
|
@@ -1,102 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Opinionated resets
|
|
3
|
-
============================================= */
|
|
4
|
-
@layer base {
|
|
5
|
-
html,
|
|
6
|
-
:host {
|
|
7
|
-
/* Disallow browsers from synthesizing bold weights when missing */
|
|
8
|
-
font-synthesis-weight: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
textarea {
|
|
12
|
-
/* Prevent resizing by default */
|
|
13
|
-
resize: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
img,
|
|
17
|
-
svg {
|
|
18
|
-
flex-grow: 0;
|
|
19
|
-
/* Prevent flexbox from forcing visual assets to shrink/grow size unintentionally */
|
|
20
|
-
flex-shrink: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
input,
|
|
24
|
-
textarea,
|
|
25
|
-
select,
|
|
26
|
-
optgroup {
|
|
27
|
-
/* Normalize mobile Safari styles */
|
|
28
|
-
-webkit-appearance: none;
|
|
29
|
-
-moz-appearance: none;
|
|
30
|
-
appearance: none;
|
|
31
|
-
box-shadow: none;
|
|
32
|
-
/* Prevent Firefox autofill coloring (preview and confirmed modes) */
|
|
33
|
-
filter: none;
|
|
34
|
-
/* Normalize default outline offset and width in Safari */
|
|
35
|
-
outline-offset: 0;
|
|
36
|
-
outline-width: 2px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
* Prevent non-standard gestures on interactive Elements, like double-tap to zoom.
|
|
41
|
-
* Single taps will be dispatched immediately, instead of delayed.
|
|
42
|
-
*/
|
|
43
|
-
a,
|
|
44
|
-
button,
|
|
45
|
-
input,
|
|
46
|
-
label,
|
|
47
|
-
select,
|
|
48
|
-
textarea,
|
|
49
|
-
:where([aria-role="button"]) {
|
|
50
|
-
touch-action: manipulation;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
button {
|
|
54
|
-
/* Reset default transform */
|
|
55
|
-
text-transform: none;
|
|
56
|
-
/* Remove gap below button in certain conditions where inline-block is used */
|
|
57
|
-
vertical-align: middle;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
button:not(:disabled),
|
|
61
|
-
[role="button"]:not(:disabled) {
|
|
62
|
-
/* Normalize cursor to pointer type */
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
pre {
|
|
67
|
-
/* Avoid overflow by default in preformatted text */
|
|
68
|
-
white-space: pre-wrap;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
table {
|
|
72
|
-
/* Remove gaps between table borders by default */
|
|
73
|
-
border-spacing: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Remove default quote elements */
|
|
77
|
-
blockquote,
|
|
78
|
-
q {
|
|
79
|
-
quotes: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
blockquote::before,
|
|
83
|
-
blockquote::after,
|
|
84
|
-
q::before,
|
|
85
|
-
q::after {
|
|
86
|
-
content: none;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* =============================================
|
|
91
|
-
Directives
|
|
92
|
-
============================================= */
|
|
93
|
-
@custom-variant hover {
|
|
94
|
-
@media (hover: hover) and (pointer: fine) {
|
|
95
|
-
&:hover {
|
|
96
|
-
@slot;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
|
|
102
|
-
@custom-variant light (&:where([data-theme=light], [data-theme=light] *));
|
|
1
|
+
@import "@plexui/styles/styles/base.css";
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Opinionated globals
|
|
3
|
-
============================================= */
|
|
4
|
-
@layer base {
|
|
5
|
-
html,
|
|
6
|
-
:host {
|
|
7
|
-
/* Apply default color */
|
|
8
|
-
color: var(--color-text);
|
|
9
|
-
/* Smooth font rendering by default */
|
|
10
|
-
-webkit-font-smoothing: antialiased;
|
|
11
|
-
-moz-osx-font-smoothing: grayscale;
|
|
12
|
-
/* Apply default letter-spacing */
|
|
13
|
-
letter-spacing: var(--tracking-normal);
|
|
14
|
-
/* Prevent rubber-band / bounce overscroll */
|
|
15
|
-
overscroll-behavior: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[data-theme="light"] {
|
|
19
|
-
color-scheme: light;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
[data-theme="dark"] {
|
|
23
|
-
color-scheme: dark;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
* {
|
|
27
|
-
/* Aesthetic scrollbar defaults */
|
|
28
|
-
scrollbar-color: var(--scrollbar-color) transparent;
|
|
29
|
-
scrollbar-width: thin;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* All exiting <TransitionGroup> components should be non-interactive */
|
|
33
|
-
[data-exiting] {
|
|
34
|
-
pointer-events: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Default placeholder text color */
|
|
38
|
-
::-moz-placeholder {
|
|
39
|
-
color: var(--color-text-tertiary);
|
|
40
|
-
}
|
|
41
|
-
::placeholder {
|
|
42
|
-
color: var(--color-text-tertiary);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Use semibold weight as the defacto bold */
|
|
46
|
-
b,
|
|
47
|
-
strong {
|
|
48
|
-
font-weight: var(--font-weight-semibold);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
@import "@plexui/styles/styles/globals.css";
|
package/dist/es/styles/index.css
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
@import "./base";
|
|
3
|
-
/* Tier 0 — radius / font / font-weight tokens, declared in :root so
|
|
4
|
-
semantic and components tiers can reference `var(--radius-*)`,
|
|
5
|
-
`var(--font-sans)`, `var(--font-weight-*)`. We deliberately do NOT
|
|
6
|
-
use `@theme static {…}` here: that would write into Tailwind's theme
|
|
7
|
-
layer, reset Tailwind's own `--radius-*` defaults via `--radius-*:
|
|
8
|
-
initial`, and break consumer-side Tailwind utilities like
|
|
9
|
-
`rounded-md`, `rounded-full`, `text-sm`. The standalone
|
|
10
|
-
`@plexui/ui/styles/variables-tailwind-theme.css` sub-export remains
|
|
11
|
-
for consumers who explicitly want Plex's scale to power their
|
|
12
|
-
Tailwind utilities. */
|
|
13
|
-
@import "./variables-tokens-root";
|
|
14
|
-
/* Tier 1 tokens: Primitives */
|
|
15
|
-
@import "./variables-primitive";
|
|
16
|
-
/* Tier 2 tokens: Semantic */
|
|
17
|
-
@import "./variables-semantic";
|
|
18
|
-
/* Tier 3 tokens: Components */
|
|
19
|
-
@import "./variables-components";
|
|
20
|
-
/* Tailwind-only variables for utility classes */
|
|
21
|
-
@import "./tailwind-utilities";
|
|
22
|
-
/* Opinionated globals */
|
|
23
|
-
@import "./globals";
|
|
24
|
-
/* Katex bundled global CSS */
|
|
25
|
-
@import "./katex.min.css" layer(base);
|
|
1
|
+
@import "@plexui/styles/styles/index.css";
|