@koide-labs/ui 0.0.0 → 0.0.2
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 +53 -3
- package/{src/-types.ts → dist/-types.d.ts} +1 -6
- package/dist/-types.js +1 -0
- package/dist/-utils.d.ts +19 -0
- package/dist/-utils.js +33 -0
- package/dist/Button-DrPFFzo7.js +31 -0
- package/dist/CompositeRoot-CVk5a-pR.js +233 -0
- package/dist/DirectionContext-C2o_MF_i.js +9 -0
- package/dist/FieldItemContext-DAvk99to.js +11 -0
- package/dist/FloatingPortal-tWyuKRSN.js +435 -0
- package/dist/FloatingPortalLite-DVyq6YhV.js +28 -0
- package/dist/InternalBackdrop-jYAiOJ8v.js +574 -0
- package/dist/LabelableContext-BMvjVwor.js +169 -0
- package/dist/ToolbarRootContext-CvvL0Tk1.js +9 -0
- package/dist/clamp-D0KDAQIz.js +6 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/accordion/index.d.ts +12 -0
- package/dist/components/accordion/index.js +699 -0
- package/dist/components/alert-dialog/index.d.ts +26 -0
- package/dist/components/alert-dialog/index.js +136 -0
- package/dist/components/anchor/index.d.ts +8 -0
- package/dist/components/anchor/index.js +38 -0
- package/dist/components/avatar/index.d.ts +21 -0
- package/dist/components/avatar/index.js +161 -0
- package/dist/components/badge/index.d.ts +16 -0
- package/dist/components/badge/index.js +40 -0
- package/dist/components/button/index.d.ts +24 -0
- package/dist/components/button/index.js +47 -0
- package/dist/components/checkbox/index.d.ts +9 -0
- package/dist/components/checkbox/index.js +269 -0
- package/dist/components/code/index.d.ts +9 -0
- package/dist/components/code/index.js +10 -0
- package/dist/components/collapse/index.d.ts +11 -0
- package/dist/components/collapse/index.js +41 -0
- package/dist/components/command/index.d.ts +14 -0
- package/dist/components/command/index.js +1695 -0
- package/dist/components/context-menu/index.d.ts +42 -0
- package/dist/components/context-menu/index.js +1444 -0
- package/dist/components/dialog/index.d.ts +48 -0
- package/dist/components/dialog/index.js +138 -0
- package/dist/components/heading/index.d.ts +44 -0
- package/dist/components/heading/index.js +56 -0
- package/dist/components/icon/icon-names.d.ts +1 -0
- package/dist/components/icon/icon-names.js +1 -0
- package/dist/components/icon/index.d.ts +24 -0
- package/dist/components/icon/index.js +43 -0
- package/dist/components/icon-button/index.d.ts +12 -0
- package/dist/components/icon-button/index.js +45 -0
- package/dist/components/inline-code/index.d.ts +6 -0
- package/dist/components/inline-code/index.js +22 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +119 -0
- package/dist/components/meter/index.d.ts +18 -0
- package/dist/components/meter/index.js +165 -0
- package/dist/components/multiline-input/index.d.ts +6 -0
- package/dist/components/multiline-input/index.js +100 -0
- package/dist/components/number-input/index.d.ts +10 -0
- package/dist/components/number-input/index.js +1169 -0
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/password-input/index.js +29 -0
- package/dist/components/pill/index.d.ts +13 -0
- package/dist/components/pill/index.js +38 -0
- package/dist/components/popover/index.d.ts +21 -0
- package/dist/components/popover/index.js +636 -0
- package/dist/components/preview-card/index.d.ts +17 -0
- package/dist/components/preview-card/index.js +402 -0
- package/dist/components/radio/index.d.ts +13 -0
- package/dist/components/radio/index.js +404 -0
- package/dist/components/search-bar/index.d.ts +12 -0
- package/dist/components/search-bar/index.js +48 -0
- package/dist/components/select/index.d.ts +16 -0
- package/dist/components/select/index.js +1263 -0
- package/dist/components/separator/index.d.ts +7 -0
- package/dist/components/separator/index.js +6 -0
- package/dist/components/slider/index.d.ts +5 -0
- package/dist/components/slider/index.js +902 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.js +13 -0
- package/dist/components/stacked-avatars/index.d.ts +14 -0
- package/dist/components/stacked-avatars/index.js +92 -0
- package/dist/components/status-banner/index.d.ts +17 -0
- package/dist/components/status-banner/index.js +69 -0
- package/dist/components/surface/index.d.ts +27 -0
- package/dist/components/surface/index.js +41 -0
- package/dist/components/switch/index.d.ts +5 -0
- package/dist/components/switch/index.js +196 -0
- package/dist/components/tabs/index.d.ts +18 -0
- package/dist/components/tabs/index.js +509 -0
- package/dist/components/text/index.d.ts +26 -0
- package/dist/components/text/index.js +51 -0
- package/dist/components/theme-provider/index.d.ts +2 -0
- package/dist/components/theme-provider/index.js +6 -0
- package/dist/components/theme-provider/theme-context.d.ts +9 -0
- package/dist/components/theme-provider/theme-context.js +13 -0
- package/dist/components/theme-provider/theme-provider.d.ts +17 -0
- package/dist/components/theme-provider/theme-provider.js +30 -0
- package/dist/components/timestamp/index.d.ts +23 -0
- package/dist/components/timestamp/index.js +1392 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +7 -0
- package/dist/components/toast/toast.d.ts +2 -0
- package/dist/components/toast/toast.js +878 -0
- package/dist/components/toast/use-toast-manager.d.ts +27 -0
- package/dist/components/toast/use-toast-manager.js +4 -0
- package/dist/components/tooltip/index.d.ts +14 -0
- package/dist/components/tooltip/index.js +712 -0
- package/dist/components/tooltip/tooltip-arrow.d.ts +3 -0
- package/dist/components/tooltip/tooltip-arrow.js +6 -0
- package/dist/components/view/index.d.ts +30 -0
- package/dist/components/view/index.js +84 -0
- package/dist/components/visually-hidden/index.d.ts +1 -0
- package/dist/components/visually-hidden/index.js +4 -0
- package/dist/composite-Bx7Szd_T.js +208 -0
- package/dist/composite-C9L5QmZL.js +66 -0
- package/dist/createBaseUIEventDetails-D8M2Yl-a.js +59 -0
- package/dist/detectBrowser-I-s3yzIE.js +43 -0
- package/dist/dialog.css +1 -0
- package/dist/dialog.module-BeF-6XAo.js +415 -0
- package/dist/element-CZEOj04G.js +80 -0
- package/dist/event-CKoGyQEJ.js +30 -0
- package/dist/floating-ui.utils-C7pRWMZ_.js +128 -0
- package/dist/floating-ui.utils.dom-C7FS5id0.js +135 -0
- package/dist/formatErrorMessage-BqPuTBN-.js +7 -0
- package/dist/formatNumber-1UNwjeqf.js +25 -0
- package/dist/getDisabledMountTransitionStyles-YfHPge6T.js +1510 -0
- package/dist/index-BX1XbbRk.js +1206 -0
- package/dist/index-CeuccO-T.js +109 -0
- package/dist/index-DN9Bn1qm.js +29 -0
- package/dist/index-FMoPxlJ2.js +52 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +108 -0
- package/dist/index10.css +1 -0
- package/dist/index11.css +1 -0
- package/dist/index12.css +1 -0
- package/dist/index13.css +1 -0
- package/dist/index14.css +1 -0
- package/dist/index15.css +1 -0
- package/dist/index16.css +1 -0
- package/dist/index17.css +1 -0
- package/dist/index18.css +1 -0
- package/dist/index19.css +1 -0
- package/dist/index2.css +1 -0
- package/dist/index20.css +1 -0
- package/dist/index21.css +1 -0
- package/dist/index22.css +1 -0
- package/dist/index23.css +1 -0
- package/dist/index24.css +1 -0
- package/dist/index25.css +1 -0
- package/dist/index26.css +1 -0
- package/dist/index27.css +1 -0
- package/dist/index28.css +1 -0
- package/dist/index29.css +1 -0
- package/dist/index3.css +1 -0
- package/dist/index30.css +1 -0
- package/dist/index31.css +1 -0
- package/dist/index32.css +1 -0
- package/dist/index33.css +1 -0
- package/dist/index34.css +1 -0
- package/dist/index35.css +1 -0
- package/dist/index36.css +1 -0
- package/dist/index37.css +1 -0
- package/dist/index4.css +1 -0
- package/dist/index5.css +1 -0
- package/dist/index6.css +1 -0
- package/dist/index7.css +1 -0
- package/dist/index8.css +1 -0
- package/dist/index9.css +1 -0
- package/dist/inertValue-BCYGsdmf.js +7 -0
- package/dist/input.css +1 -0
- package/dist/input.module-DDQY_Ij6.js +7 -0
- package/dist/integrations/react-markdown/index.d.ts +5 -0
- package/dist/integrations/react-markdown/index.js +6895 -0
- package/dist/integrations/remix/index.d.ts +9 -0
- package/{src/integrations/remix.ts → dist/integrations/remix/index.js} +7 -4
- package/dist/integrations/tailwind.css +1 -0
- package/dist/integrations/twemoij/index.d.ts +3 -0
- package/dist/integrations/twemoij/index.js +18 -0
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/safePolygon-DWy1dGKJ.js +308 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/tokens.d.ts +400 -0
- package/{src/styles/tokens.ts → dist/styles/tokens.js} +54 -96
- package/dist/toast.css +1 -0
- package/dist/tooltip-arrow-C1qXdi5T.js +24 -0
- package/dist/tooltip-arrow.css +1 -0
- package/dist/transitions.css +1 -0
- package/dist/transitions.module-CWX8e5cx.js +1343 -0
- package/dist/use-toast-manager-Dq-44AuW.js +37 -0
- package/dist/useAnimationFrame-451ugS_6.js +68 -0
- package/dist/useBaseUiId-B7WyxtIE.js +7 -0
- package/dist/useButton-DfIwsdb8.js +127 -0
- package/dist/useCompositeListItem-OkcAim_1.js +148 -0
- package/dist/useControlled-Du4sJyMj.js +31 -0
- package/dist/useHoverReferenceInteraction-SfOBPoXM.js +264 -0
- package/dist/useId-C5kyn6tA.js +22 -0
- package/dist/useIsoLayoutEffect-CIDbvm3Q.js +6 -0
- package/dist/useLabelableId-Ci_jDvmv.js +29 -0
- package/dist/useOnMount-VRW6CK2u.js +8 -0
- package/dist/useOpenChangeComplete-Dse9kY9E.js +61 -0
- package/dist/usePopupAutoResize-CNR6Ekmx.js +85 -0
- package/dist/useRender-CLx7dR_1.js +7 -0
- package/dist/useRenderElement-DwToLA61.js +244 -0
- package/dist/useRole-oDBdbuwQ.js +77 -0
- package/dist/useStableCallback-CkTrVkNX.js +29 -0
- package/dist/useSyncedFloatingRootContext-Dorsv-jf.js +167 -0
- package/dist/useTimeout-CflX-kz3.js +32 -0
- package/dist/useTransitionStatus-CUfcuGAV.js +42 -0
- package/dist/useTypeahead-D85V2IUx.js +333 -0
- package/dist/useValueAsRef-HURLzret.js +19 -0
- package/dist/useValueChanged-DL757-yD.js +14 -0
- package/dist/valueToPercent-DaP9qN4u.js +6 -0
- package/dist/view.css +1 -0
- package/dist/view.module-DfDLgJE0.js +6 -0
- package/dist/visuallyHidden-CpJ-mhai.js +16 -0
- package/dist/warn-CKtX8MLJ.js +11 -0
- package/package.json +18 -2
- package/.husky/pre-commit +0 -1
- package/.storybook/main.ts +0 -25
- package/.storybook/preview-head.html +0 -6
- package/.storybook/preview.tsx +0 -48
- package/.storybook/vitest.setup.ts +0 -8
- package/eslint.config.mjs +0 -29
- package/lint-staged.config.js +0 -15
- package/pnpm-workspace.yaml +0 -2
- package/postcss.config.mjs +0 -7
- package/prettier.config.mjs +0 -24
- package/scripts/build-icon-types.ts +0 -38
- package/src/-utils.tsx +0 -64
- package/src/components/accordion/accordion.module.css +0 -44
- package/src/components/accordion/accordion.stories.tsx +0 -36
- package/src/components/accordion/index.tsx +0 -67
- package/src/components/alert-dialog/alert-dialog.module.css +0 -5
- package/src/components/alert-dialog/alert-dialog.stories.tsx +0 -53
- package/src/components/alert-dialog/index.tsx +0 -138
- package/src/components/anchor/anchor.module.css +0 -18
- package/src/components/anchor/anchor.stories.tsx +0 -28
- package/src/components/anchor/index.tsx +0 -45
- package/src/components/avatar/avatar.module.css +0 -56
- package/src/components/avatar/avatar.stories.tsx +0 -61
- package/src/components/avatar/index.tsx +0 -82
- package/src/components/badge/badge.module.css +0 -35
- package/src/components/badge/badge.stories.tsx +0 -60
- package/src/components/badge/index.tsx +0 -71
- package/src/components/button/button.module.css +0 -42
- package/src/components/button/button.stories.tsx +0 -108
- package/src/components/button/index.tsx +0 -63
- package/src/components/checkbox/checkbox.module.css +0 -36
- package/src/components/checkbox/checkbox.stories.tsx +0 -21
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/code/code.module.css +0 -20
- package/src/components/code/code.stories.tsx +0 -42
- package/src/components/code/index.tsx +0 -73
- package/src/components/collapse/collapse.module.css +0 -27
- package/src/components/collapse/collapse.stories.tsx +0 -27
- package/src/components/collapse/index.tsx +0 -59
- package/src/components/command/command.module.css +0 -95
- package/src/components/command/command.stories.tsx +0 -38
- package/src/components/command/index.tsx +0 -108
- package/src/components/context-menu/context-menu.module.css +0 -36
- package/src/components/context-menu/context-menu.stories.tsx +0 -99
- package/src/components/context-menu/index.tsx +0 -242
- package/src/components/dialog/dialog.module.css +0 -71
- package/src/components/dialog/dialog.stories.tsx +0 -29
- package/src/components/dialog/index.tsx +0 -148
- package/src/components/heading/heading.module.css +0 -3
- package/src/components/heading/heading.stories.tsx +0 -52
- package/src/components/heading/index.tsx +0 -112
- package/src/components/icon/icon-names.ts +0 -3189
- package/src/components/icon/icon.module.css +0 -36
- package/src/components/icon/icon.stories.tsx +0 -40
- package/src/components/icon/index.tsx +0 -60
- package/src/components/icon-button/icon-button.module.css +0 -33
- package/src/components/icon-button/icon-button.stories.tsx +0 -59
- package/src/components/icon-button/index.tsx +0 -48
- package/src/components/inline-code/index.tsx +0 -29
- package/src/components/inline-code/inline-code.module.css +0 -13
- package/src/components/inline-code/inline-code.stories.tsx +0 -31
- package/src/components/input/index.tsx +0 -22
- package/src/components/input/input.module.css +0 -23
- package/src/components/input/input.stories.tsx +0 -52
- package/src/components/meter/index.tsx +0 -55
- package/src/components/meter/meter.module.css +0 -23
- package/src/components/meter/meter.stories.tsx +0 -31
- package/src/components/multiline-input/index.tsx +0 -58
- package/src/components/multiline-input/multiline-input.stories.tsx +0 -26
- package/src/components/number-input/index.tsx +0 -74
- package/src/components/number-input/number-input.module.css +0 -41
- package/src/components/number-input/number-input.stories.tsx +0 -24
- package/src/components/password-input/index.tsx +0 -24
- package/src/components/password-input/password-input.module.css +0 -10
- package/src/components/password-input/password-input.stories.tsx +0 -24
- package/src/components/pill/index.tsx +0 -45
- package/src/components/pill/pill.module.css +0 -22
- package/src/components/pill/pill.stories.tsx +0 -83
- package/src/components/popover/index.tsx +0 -94
- package/src/components/popover/popover.module.css +0 -8
- package/src/components/popover/popover.stories.tsx +0 -53
- package/src/components/preview-card/index.tsx +0 -68
- package/src/components/preview-card/preview-card.module.css +0 -5
- package/src/components/preview-card/preview-card.stories.tsx +0 -58
- package/src/components/radio/index.tsx +0 -67
- package/src/components/radio/radio-group.module.css +0 -5
- package/src/components/radio/radio.module.css +0 -36
- package/src/components/radio/radio.stories.tsx +0 -27
- package/src/components/search-bar/index.tsx +0 -60
- package/src/components/search-bar/search-bar.module.css +0 -29
- package/src/components/search-bar/search-bar.stories.tsx +0 -37
- package/src/components/select/index.tsx +0 -132
- package/src/components/select/select.module.css +0 -63
- package/src/components/select/select.stories.tsx +0 -49
- package/src/components/separator/index.tsx +0 -28
- package/src/components/separator/separator.module.css +0 -24
- package/src/components/separator/separator.stories.tsx +0 -40
- package/src/components/slider/index.tsx +0 -28
- package/src/components/slider/slider.module.css +0 -52
- package/src/components/slider/slider.stories.tsx +0 -53
- package/src/components/spinner/index.tsx +0 -14
- package/src/components/spinner/spinner.module.css +0 -13
- package/src/components/spinner/spinner.stories.tsx +0 -17
- package/src/components/stacked-avatars/index.tsx +0 -88
- package/src/components/stacked-avatars/stacked-avatars.module.css +0 -79
- package/src/components/stacked-avatars/stacked-avatars.stories.tsx +0 -48
- package/src/components/status-banner/index.tsx +0 -96
- package/src/components/status-banner/status-banner.module.css +0 -52
- package/src/components/status-banner/status-banner.stories.tsx +0 -44
- package/src/components/surface/index.tsx +0 -83
- package/src/components/surface/surface.module.css +0 -35
- package/src/components/surface/surface.stories.tsx +0 -84
- package/src/components/switch/index.tsx +0 -23
- package/src/components/switch/switch.module.css +0 -45
- package/src/components/switch/switch.stories.tsx +0 -48
- package/src/components/tabs/index.tsx +0 -126
- package/src/components/tabs/tabs.module.css +0 -134
- package/src/components/tabs/tabs.stories.tsx +0 -88
- package/src/components/text/index.tsx +0 -69
- package/src/components/text/text.module.css +0 -76
- package/src/components/text/text.stories.tsx +0 -107
- package/src/components/theme-provider/index.ts +0 -2
- package/src/components/theme-provider/theme-context.tsx +0 -18
- package/src/components/theme-provider/theme-provider.stories.tsx +0 -47
- package/src/components/theme-provider/theme-provider.tsx +0 -77
- package/src/components/timestamp/index.tsx +0 -131
- package/src/components/timestamp/timestamp.module.css +0 -8
- package/src/components/timestamp/timestamp.stories.tsx +0 -37
- package/src/components/toast/index.ts +0 -2
- package/src/components/toast/toast.module.css +0 -163
- package/src/components/toast/toast.stories.tsx +0 -53
- package/src/components/toast/toast.tsx +0 -104
- package/src/components/toast/use-toast-manager.ts +0 -63
- package/src/components/tooltip/index.tsx +0 -61
- package/src/components/tooltip/tooltip-arrow.tsx +0 -17
- package/src/components/tooltip/tooltip.module.css +0 -44
- package/src/components/tooltip/tooltip.stories.tsx +0 -76
- package/src/components/view/index.tsx +0 -137
- package/src/components/view/view.module.css +0 -11
- package/src/components/view/view.stories.tsx +0 -131
- package/src/components/view/view_colorway.module.css +0 -280
- package/src/components/view/view_interactive.module.css +0 -127
- package/src/components/view/view_loading.module.css +0 -58
- package/src/components/visually-hidden/index.ts +0 -1
- package/src/index.ts +0 -49
- package/src/integrations/react-markdown/index.tsx +0 -134
- package/src/integrations/react-markdown/react-markdown.module.css +0 -62
- package/src/integrations/react-markdown/react-markdown.stories.tsx +0 -31
- package/src/integrations/tailwind.css +0 -173
- package/src/integrations/twemoij/index.tsx +0 -13
- package/src/integrations/twemoij/twemoji.module.css +0 -7
- package/src/integrations/twemoij/twemoji.stories.tsx +0 -40
- package/src/stories/components/all-variants.tsx +0 -40
- package/src/stories/data.ts +0 -72
- package/src/stories/utils.ts +0 -20
- package/src/styles/core.css +0 -153
- package/src/styles/themes/dark.css +0 -86
- package/src/styles/themes/light.css +0 -86
- package/src/styles/transitions.module.css +0 -31
- package/stylelint.config.mjs +0 -29
- package/tsconfig.app.json +0 -35
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -103
- package/vitest.shims.d.ts +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Size } from '../../styles/tokens';
|
|
2
|
+
import { IconName } from '../icon/icon-names';
|
|
3
|
+
import { ViewProps } from '../view';
|
|
4
|
+
export type IconButtonProps = ViewProps<"button"> & {
|
|
5
|
+
/** Icon to display. */
|
|
6
|
+
icon: IconName;
|
|
7
|
+
/** Explain what the button does. Required for accessibility. */
|
|
8
|
+
alt: string;
|
|
9
|
+
/** What size should the IconButton be. Defaults to "md". */
|
|
10
|
+
size?: Size;
|
|
11
|
+
};
|
|
12
|
+
export declare function IconButton({ icon, alt, size, render, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import "../../styles/tokens.js";
|
|
4
|
+
import { Icon as u } from "../icon/index.js";
|
|
5
|
+
import { View as b } from "../view/index.js";
|
|
6
|
+
import { B as m } from "../../Button-DrPFFzo7.js";
|
|
7
|
+
import '../../index11.css';const n = {
|
|
8
|
+
"icon-button": "_icon-button_1xtat_1",
|
|
9
|
+
"icon-button_size_sm": "_icon-button_size_sm_1xtat_11",
|
|
10
|
+
"icon-button_size_md": "_icon-button_size_md_1xtat_15",
|
|
11
|
+
"icon-button_size_lg": "_icon-button_size_lg_1xtat_19",
|
|
12
|
+
"icon-button_size_xl": "_icon-button_size_xl_1xtat_23",
|
|
13
|
+
"icon-button_size_2xl": "_icon-button_size_2xl_1xtat_27",
|
|
14
|
+
"icon-button_size_3xl": "_icon-button_size_3xl_1xtat_31"
|
|
15
|
+
};
|
|
16
|
+
function f({
|
|
17
|
+
icon: i,
|
|
18
|
+
alt: e,
|
|
19
|
+
size: o = "md",
|
|
20
|
+
render: c,
|
|
21
|
+
..._
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ t(
|
|
24
|
+
b,
|
|
25
|
+
{
|
|
26
|
+
interactive: !0,
|
|
27
|
+
render: /* @__PURE__ */ t(
|
|
28
|
+
m,
|
|
29
|
+
{
|
|
30
|
+
className: s(
|
|
31
|
+
n["icon-button"],
|
|
32
|
+
n[`icon-button_size_${o}`]
|
|
33
|
+
),
|
|
34
|
+
focusableWhenDisabled: !!_.loading,
|
|
35
|
+
render: c
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
..._,
|
|
39
|
+
children: /* @__PURE__ */ t(u, { name: i, size: o, alt: e })
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
f as IconButton
|
|
45
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react';
|
|
2
|
+
import { Color } from '../view';
|
|
3
|
+
export interface InlineCodeProps extends useRender.ComponentProps<"span"> {
|
|
4
|
+
color?: Color;
|
|
5
|
+
}
|
|
6
|
+
export declare const InlineCode: ({ color, ...props }: InlineCodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { c as r } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Surface as c } from "../surface/index.js";
|
|
4
|
+
import { Text as l } from "../text/index.js";
|
|
5
|
+
import '../../index12.css';const i = {
|
|
6
|
+
"inline-code": "_inline-code_ai49m_1",
|
|
7
|
+
"inline-code_colorway": "_inline-code_colorway_ai49m_11"
|
|
8
|
+
}, a = ({ color: o, ...n }) => /* @__PURE__ */ e(
|
|
9
|
+
c,
|
|
10
|
+
{
|
|
11
|
+
elevated: !0,
|
|
12
|
+
className: r(
|
|
13
|
+
i["inline-code"],
|
|
14
|
+
o && i["inline-code_colorway"]
|
|
15
|
+
),
|
|
16
|
+
color: o,
|
|
17
|
+
children: /* @__PURE__ */ e(l, { size: "sm", color: "inherit", children: /* @__PURE__ */ e("code", { ...n }) })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
export {
|
|
21
|
+
a as InlineCode
|
|
22
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as O } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { View as S } from "../view/index.js";
|
|
4
|
+
import { s as U } from "../../input.module-DDQY_Ij6.js";
|
|
5
|
+
import * as d from "react";
|
|
6
|
+
import { u as _ } from "../../useStableCallback-CkTrVkNX.js";
|
|
7
|
+
import { u as j } from "../../useControlled-Du4sJyMj.js";
|
|
8
|
+
import { u as A } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
9
|
+
import { a as g, u as K, b as $, f as q } from "../../LabelableContext-BMvjVwor.js";
|
|
10
|
+
import { u as z } from "../../useLabelableId-Ci_jDvmv.js";
|
|
11
|
+
import { u as G } from "../../useRenderElement-DwToLA61.js";
|
|
12
|
+
import { c as H, n as J } from "../../createBaseUIEventDetails-D8M2Yl-a.js";
|
|
13
|
+
const V = /* @__PURE__ */ d.forwardRef(function(a, i) {
|
|
14
|
+
const {
|
|
15
|
+
render: Q,
|
|
16
|
+
className: W,
|
|
17
|
+
id: R,
|
|
18
|
+
name: y,
|
|
19
|
+
value: o,
|
|
20
|
+
disabled: E = !1,
|
|
21
|
+
onValueChange: F,
|
|
22
|
+
defaultValue: f,
|
|
23
|
+
...I
|
|
24
|
+
} = a, {
|
|
25
|
+
state: c,
|
|
26
|
+
name: D,
|
|
27
|
+
disabled: P
|
|
28
|
+
} = g(), s = P || E, m = D ?? y, T = d.useMemo(() => ({
|
|
29
|
+
...c,
|
|
30
|
+
disabled: s
|
|
31
|
+
}), [c, s]), {
|
|
32
|
+
setTouched: p,
|
|
33
|
+
setDirty: h,
|
|
34
|
+
validityData: w,
|
|
35
|
+
setFocused: b,
|
|
36
|
+
setFilled: r,
|
|
37
|
+
validationMode: x,
|
|
38
|
+
validation: t
|
|
39
|
+
} = g(), {
|
|
40
|
+
labelId: M
|
|
41
|
+
} = K(), v = z({
|
|
42
|
+
id: R
|
|
43
|
+
});
|
|
44
|
+
A(() => {
|
|
45
|
+
const e = o != null;
|
|
46
|
+
t.inputRef.current?.value || e && o !== "" ? r(!0) : e && o === "" && r(!1);
|
|
47
|
+
}, [t.inputRef, r, o]);
|
|
48
|
+
const [C, L] = j({
|
|
49
|
+
controlled: o,
|
|
50
|
+
default: f,
|
|
51
|
+
name: "FieldControl",
|
|
52
|
+
state: "value"
|
|
53
|
+
}), k = o !== void 0, B = _((e, n) => {
|
|
54
|
+
F?.(e, n), !n.isCanceled && L(e);
|
|
55
|
+
});
|
|
56
|
+
return $({
|
|
57
|
+
id: v,
|
|
58
|
+
name: m,
|
|
59
|
+
commit: t.commit,
|
|
60
|
+
value: C,
|
|
61
|
+
getValue: () => t.inputRef.current?.value,
|
|
62
|
+
controlRef: t.inputRef
|
|
63
|
+
}), G("input", a, {
|
|
64
|
+
ref: i,
|
|
65
|
+
state: T,
|
|
66
|
+
props: [{
|
|
67
|
+
id: v,
|
|
68
|
+
disabled: s,
|
|
69
|
+
name: m,
|
|
70
|
+
ref: t.inputRef,
|
|
71
|
+
"aria-labelledby": M,
|
|
72
|
+
...k ? {
|
|
73
|
+
value: C
|
|
74
|
+
} : {
|
|
75
|
+
defaultValue: f
|
|
76
|
+
},
|
|
77
|
+
onChange(e) {
|
|
78
|
+
const n = e.currentTarget.value;
|
|
79
|
+
B(n, H(J, e.nativeEvent)), h(n !== w.initialValue), r(n !== "");
|
|
80
|
+
},
|
|
81
|
+
onFocus() {
|
|
82
|
+
b(!0);
|
|
83
|
+
},
|
|
84
|
+
onBlur(e) {
|
|
85
|
+
p(!0), b(!1), x === "onBlur" && t.commit(e.currentTarget.value);
|
|
86
|
+
},
|
|
87
|
+
onKeyDown(e) {
|
|
88
|
+
e.currentTarget.tagName === "INPUT" && e.key === "Enter" && (p(!0), t.commit(e.currentTarget.value));
|
|
89
|
+
}
|
|
90
|
+
}, t.getInputValidationProps(), I],
|
|
91
|
+
stateAttributesMapping: q
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "FieldControl");
|
|
95
|
+
const N = /* @__PURE__ */ d.forwardRef(function(a, i) {
|
|
96
|
+
return /* @__PURE__ */ u(V, {
|
|
97
|
+
ref: i,
|
|
98
|
+
...a
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
process.env.NODE_ENV !== "production" && (N.displayName = "Input");
|
|
102
|
+
function ue({ className: l, ...a }) {
|
|
103
|
+
return /* @__PURE__ */ u(
|
|
104
|
+
S,
|
|
105
|
+
{
|
|
106
|
+
interactive: "fill-outline",
|
|
107
|
+
render: /* @__PURE__ */ u(
|
|
108
|
+
N,
|
|
109
|
+
{
|
|
110
|
+
className: O(U.input, l),
|
|
111
|
+
...a
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
ue as Input
|
|
119
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meter as MeterPrimitive } from '@base-ui/react/meter';
|
|
2
|
+
import { Color } from '../view';
|
|
3
|
+
export type MeterProps = MeterPrimitive.Root.Props & {
|
|
4
|
+
/**
|
|
5
|
+
* What is this meter even for bro?
|
|
6
|
+
* If one is not provided, we render a standard meter (no label, no value).
|
|
7
|
+
* You can still provide one yourself through children.
|
|
8
|
+
* @example
|
|
9
|
+
* <Meter value={24}>
|
|
10
|
+
* <MeterPrimitive.Label render={<Text />} />
|
|
11
|
+
* <MeterPrimitive.Value render={<Text />} />
|
|
12
|
+
* </Meter>
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Communicate purpose with color. Defaults to "primary". */
|
|
16
|
+
color?: Color;
|
|
17
|
+
};
|
|
18
|
+
export declare function Meter({ label, color, className, children, ...props }: MeterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as m, jsxs as M, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { c as j } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Text as h } from "../text/index.js";
|
|
4
|
+
import { View as C } from "../view/index.js";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { f as L } from "../../formatErrorMessage-BqPuTBN-.js";
|
|
7
|
+
import { f as x } from "../../formatNumber-1UNwjeqf.js";
|
|
8
|
+
import { u } from "../../useRenderElement-DwToLA61.js";
|
|
9
|
+
import { u as T } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
10
|
+
import { u as P } from "../../useBaseUiId-B7WyxtIE.js";
|
|
11
|
+
import { v as z } from "../../valueToPercent-DaP9qN4u.js";
|
|
12
|
+
import '../../index25.css';const _ = /* @__PURE__ */ i.createContext(void 0);
|
|
13
|
+
process.env.NODE_ENV !== "production" && (_.displayName = "MeterRootContext");
|
|
14
|
+
function N() {
|
|
15
|
+
const t = i.useContext(_);
|
|
16
|
+
if (t === void 0)
|
|
17
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>." : L(38));
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
function B(t, e, r) {
|
|
21
|
+
return r ? x(t, e, r) : x(t / 100, e, {
|
|
22
|
+
style: "percent"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const E = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
26
|
+
const {
|
|
27
|
+
format: c,
|
|
28
|
+
getAriaValueText: l,
|
|
29
|
+
locale: s,
|
|
30
|
+
max: n = 100,
|
|
31
|
+
min: a = 0,
|
|
32
|
+
value: o,
|
|
33
|
+
render: F,
|
|
34
|
+
className: W,
|
|
35
|
+
...I
|
|
36
|
+
} = e, [b, v] = i.useState(), d = B(o, s, c);
|
|
37
|
+
let p = `${o}%`;
|
|
38
|
+
l ? p = l(d, o) : c && (p = d);
|
|
39
|
+
const k = {
|
|
40
|
+
"aria-labelledby": b,
|
|
41
|
+
"aria-valuemax": n,
|
|
42
|
+
"aria-valuemin": a,
|
|
43
|
+
"aria-valuenow": o,
|
|
44
|
+
"aria-valuetext": p,
|
|
45
|
+
role: "meter"
|
|
46
|
+
}, D = i.useMemo(() => ({
|
|
47
|
+
formattedValue: d,
|
|
48
|
+
max: n,
|
|
49
|
+
min: a,
|
|
50
|
+
setLabelId: v,
|
|
51
|
+
value: o
|
|
52
|
+
}), [d, n, a, v, o]), O = u("div", e, {
|
|
53
|
+
ref: r,
|
|
54
|
+
props: [k, I]
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ m(_.Provider, {
|
|
57
|
+
value: D,
|
|
58
|
+
children: O
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
process.env.NODE_ENV !== "production" && (E.displayName = "MeterRoot");
|
|
62
|
+
const V = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
63
|
+
const {
|
|
64
|
+
render: c,
|
|
65
|
+
className: l,
|
|
66
|
+
...s
|
|
67
|
+
} = e;
|
|
68
|
+
return u("div", e, {
|
|
69
|
+
ref: r,
|
|
70
|
+
props: s
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "MeterTrack");
|
|
74
|
+
const R = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
75
|
+
const {
|
|
76
|
+
render: c,
|
|
77
|
+
className: l,
|
|
78
|
+
...s
|
|
79
|
+
} = e, n = N(), a = z(n.value, n.min, n.max);
|
|
80
|
+
return u("div", e, {
|
|
81
|
+
ref: r,
|
|
82
|
+
props: [{
|
|
83
|
+
style: {
|
|
84
|
+
insetInlineStart: 0,
|
|
85
|
+
height: "inherit",
|
|
86
|
+
width: `${a}%`
|
|
87
|
+
}
|
|
88
|
+
}, s]
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
process.env.NODE_ENV !== "production" && (R.displayName = "MeterIndicator");
|
|
92
|
+
const y = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
93
|
+
const {
|
|
94
|
+
className: c,
|
|
95
|
+
render: l,
|
|
96
|
+
children: s,
|
|
97
|
+
...n
|
|
98
|
+
} = e, {
|
|
99
|
+
value: a,
|
|
100
|
+
formattedValue: o
|
|
101
|
+
} = N();
|
|
102
|
+
return u("span", e, {
|
|
103
|
+
ref: r,
|
|
104
|
+
props: [{
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
children: typeof s == "function" ? s(o, a) : (o || a) ?? ""
|
|
107
|
+
}, n]
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
process.env.NODE_ENV !== "production" && (y.displayName = "MeterValue");
|
|
111
|
+
const w = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
112
|
+
const {
|
|
113
|
+
render: c,
|
|
114
|
+
className: l,
|
|
115
|
+
id: s,
|
|
116
|
+
...n
|
|
117
|
+
} = e, a = P(s), {
|
|
118
|
+
setLabelId: o
|
|
119
|
+
} = N();
|
|
120
|
+
return T(() => (o(a), () => o(void 0)), [a, o]), u("span", e, {
|
|
121
|
+
ref: r,
|
|
122
|
+
props: [{
|
|
123
|
+
id: a
|
|
124
|
+
}, n]
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "MeterLabel");
|
|
128
|
+
const S = "_meter_ejhiz_1", U = "_meter__value_ejhiz_7", $ = "_meter__track_ejhiz_13", A = "_meter__indicator_ejhiz_20", f = {
|
|
129
|
+
meter: S,
|
|
130
|
+
meter__value: U,
|
|
131
|
+
meter__track: $,
|
|
132
|
+
meter__indicator: A
|
|
133
|
+
};
|
|
134
|
+
function re({
|
|
135
|
+
label: t,
|
|
136
|
+
color: e = "primary",
|
|
137
|
+
className: r,
|
|
138
|
+
children: c,
|
|
139
|
+
...l
|
|
140
|
+
}) {
|
|
141
|
+
return /* @__PURE__ */ m(C, { color: e, children: /* @__PURE__ */ M(
|
|
142
|
+
E,
|
|
143
|
+
{
|
|
144
|
+
className: j(f.meter, r),
|
|
145
|
+
...l,
|
|
146
|
+
children: [
|
|
147
|
+
t ? /* @__PURE__ */ M(g, { children: [
|
|
148
|
+
/* @__PURE__ */ m(h, { render: /* @__PURE__ */ m(w, {}), children: t }),
|
|
149
|
+
/* @__PURE__ */ m(
|
|
150
|
+
h,
|
|
151
|
+
{
|
|
152
|
+
className: f.meter__value,
|
|
153
|
+
render: /* @__PURE__ */ m(y, {})
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] }) : null,
|
|
157
|
+
c,
|
|
158
|
+
/* @__PURE__ */ m(V, { className: f.meter__track, children: /* @__PURE__ */ m(R, { className: f.meter__indicator }) })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
) });
|
|
162
|
+
}
|
|
163
|
+
export {
|
|
164
|
+
re as Meter
|
|
165
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react';
|
|
2
|
+
export interface MultilineInputProps extends useRender.ComponentProps<"textarea"> {
|
|
3
|
+
/** Automatically resize textarea. Defaults to false. */
|
|
4
|
+
autosize?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function MultilineInput({ autosize, className, ref, ...props }: MultilineInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { c as R } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { useRef as W, useEffect as Y } from "react";
|
|
4
|
+
import { mergeRefs as B } from "../../-utils.js";
|
|
5
|
+
import { View as X } from "../view/index.js";
|
|
6
|
+
import { s as b } from "../../input.module-DDQY_Ij6.js";
|
|
7
|
+
var c = /* @__PURE__ */ new Map();
|
|
8
|
+
function j(t) {
|
|
9
|
+
var o = c.get(t);
|
|
10
|
+
o && o.destroy();
|
|
11
|
+
}
|
|
12
|
+
function k(t) {
|
|
13
|
+
var o = c.get(t);
|
|
14
|
+
o && o.update();
|
|
15
|
+
}
|
|
16
|
+
var f = null;
|
|
17
|
+
typeof window > "u" ? ((f = function(t) {
|
|
18
|
+
return t;
|
|
19
|
+
}).destroy = function(t) {
|
|
20
|
+
return t;
|
|
21
|
+
}, f.update = function(t) {
|
|
22
|
+
return t;
|
|
23
|
+
}) : ((f = function(t, o) {
|
|
24
|
+
return t && Array.prototype.forEach.call(t.length ? t : [t], function(i) {
|
|
25
|
+
return (function(e) {
|
|
26
|
+
if (e && e.nodeName && e.nodeName === "TEXTAREA" && !c.has(e)) {
|
|
27
|
+
var l, g = null, r = window.getComputedStyle(e), m = (l = e.value, function() {
|
|
28
|
+
v({ testForHeightReduction: l === "" || !e.value.startsWith(l), restoreTextAlign: null }), l = e.value;
|
|
29
|
+
}), p = (function(d) {
|
|
30
|
+
e.removeEventListener("autosize:destroy", p), e.removeEventListener("autosize:update", s), e.removeEventListener("input", m), window.removeEventListener("resize", s), Object.keys(d).forEach(function(a) {
|
|
31
|
+
return e.style[a] = d[a];
|
|
32
|
+
}), c.delete(e);
|
|
33
|
+
}).bind(e, { height: e.style.height, resize: e.style.resize, textAlign: e.style.textAlign, overflowY: e.style.overflowY, overflowX: e.style.overflowX, wordWrap: e.style.wordWrap });
|
|
34
|
+
e.addEventListener("autosize:destroy", p), e.addEventListener("autosize:update", s), e.addEventListener("input", m), window.addEventListener("resize", s), e.style.overflowX = "hidden", e.style.wordWrap = "break-word", c.set(e, { destroy: p, update: s }), s();
|
|
35
|
+
}
|
|
36
|
+
function v(d) {
|
|
37
|
+
var a, u, w = d.restoreTextAlign, h = w === void 0 ? null : w, x = d.testForHeightReduction, H = x === void 0 || x, N = r.overflowY;
|
|
38
|
+
if (e.scrollHeight !== 0 && (r.resize === "vertical" ? e.style.resize = "none" : r.resize === "both" && (e.style.resize = "horizontal"), H && (a = (function(n) {
|
|
39
|
+
for (var E = []; n && n.parentNode && n.parentNode instanceof Element; ) n.parentNode.scrollTop && E.push([n.parentNode, n.parentNode.scrollTop]), n = n.parentNode;
|
|
40
|
+
return function() {
|
|
41
|
+
return E.forEach(function(A) {
|
|
42
|
+
var y = A[0], L = A[1];
|
|
43
|
+
y.style.scrollBehavior = "auto", y.scrollTop = L, y.style.scrollBehavior = null;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
})(e), e.style.height = ""), u = r.boxSizing === "content-box" ? e.scrollHeight - (parseFloat(r.paddingTop) + parseFloat(r.paddingBottom)) : e.scrollHeight + parseFloat(r.borderTopWidth) + parseFloat(r.borderBottomWidth), r.maxHeight !== "none" && u > parseFloat(r.maxHeight) ? (r.overflowY === "hidden" && (e.style.overflow = "scroll"), u = parseFloat(r.maxHeight)) : r.overflowY !== "hidden" && (e.style.overflow = "hidden"), e.style.height = u + "px", h && (e.style.textAlign = h), a && a(), g !== u && (e.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), g = u), N !== r.overflow && !h)) {
|
|
47
|
+
var z = r.textAlign;
|
|
48
|
+
r.overflow === "hidden" && (e.style.textAlign = z === "start" ? "end" : "start"), v({ restoreTextAlign: z, testForHeightReduction: !0 });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function s() {
|
|
52
|
+
v({ testForHeightReduction: !0, restoreTextAlign: null });
|
|
53
|
+
}
|
|
54
|
+
})(i);
|
|
55
|
+
}), t;
|
|
56
|
+
}).destroy = function(t) {
|
|
57
|
+
return t && Array.prototype.forEach.call(t.length ? t : [t], j), t;
|
|
58
|
+
}, f.update = function(t) {
|
|
59
|
+
return t && Array.prototype.forEach.call(t.length ? t : [t], k), t;
|
|
60
|
+
});
|
|
61
|
+
var F = f;
|
|
62
|
+
function q({
|
|
63
|
+
autosize: t = !1,
|
|
64
|
+
className: o,
|
|
65
|
+
ref: i,
|
|
66
|
+
...e
|
|
67
|
+
}) {
|
|
68
|
+
const l = M(t);
|
|
69
|
+
return /* @__PURE__ */ T(
|
|
70
|
+
X,
|
|
71
|
+
{
|
|
72
|
+
interactive: "fill-outline",
|
|
73
|
+
render: /* @__PURE__ */ T(
|
|
74
|
+
"textarea",
|
|
75
|
+
{
|
|
76
|
+
className: R(
|
|
77
|
+
b.input,
|
|
78
|
+
t && b.input_autosize,
|
|
79
|
+
o
|
|
80
|
+
),
|
|
81
|
+
ref: B(i, l),
|
|
82
|
+
...e
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function M(t) {
|
|
89
|
+
const o = W(null);
|
|
90
|
+
return Y(() => {
|
|
91
|
+
const i = o.current;
|
|
92
|
+
if (!(!i || !t))
|
|
93
|
+
return F(i), () => {
|
|
94
|
+
F.destroy(i);
|
|
95
|
+
};
|
|
96
|
+
}, [t]), o;
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
q as MultilineInput
|
|
100
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NumberField } from '@base-ui/react/number-field';
|
|
2
|
+
export type NumberInputProps = NumberField.Root.Props & {
|
|
3
|
+
/** Optional label, includes scrub area */
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function NumberInput({ label,
|
|
7
|
+
/** Apply className to NumberField.Input */
|
|
8
|
+
className,
|
|
9
|
+
/** Apply style to NumberField.Input */
|
|
10
|
+
style, ...props }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|