@koide-labs/ui 0.0.0 → 0.0.1
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 +23 -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,26 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ButtonProps } from '../button';
|
|
4
|
+
import { BaseDialogProps } from '../dialog';
|
|
5
|
+
/**
|
|
6
|
+
* General guidance:
|
|
7
|
+
*
|
|
8
|
+
* Should you have nested modals? Absolutely not. It's confusing to navigate and
|
|
9
|
+
* obliterates the stacking context by putting multiple root surfaces on top of
|
|
10
|
+
* each other.
|
|
11
|
+
*
|
|
12
|
+
* Should you have payloads? Probably not... Currently unsupported but that
|
|
13
|
+
* style of generalization feels kind of anti-composition
|
|
14
|
+
*/
|
|
15
|
+
export type AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root> & BaseDialogProps & {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* The actions to display in the alert dialog. You must have at least two
|
|
19
|
+
* actions. By default, actions will be `interactive` and the last action will
|
|
20
|
+
* have `colorway` "negative_fill".
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
actions: Array<ButtonProps>;
|
|
24
|
+
};
|
|
25
|
+
export declare function AlertDialog({ title, description, children, actions, trigger, width, background, centered, className, ...props }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function AlertDialogClose(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Button as v } from "../button/index.js";
|
|
4
|
+
import { Surface as y } from "../surface/index.js";
|
|
5
|
+
import { Text as h } from "../text/index.js";
|
|
6
|
+
import { View as C } from "../view/index.js";
|
|
7
|
+
import { t as D } from "../../transitions.module-CWX8e5cx.js";
|
|
8
|
+
import { u as R, a as I, D as T, b, c as w, d as N, e as O, f as S, s as n, g as k, h as B, i as j } from "../../dialog.module-BeF-6XAo.js";
|
|
9
|
+
import * as A from "react";
|
|
10
|
+
import { a as V } from "../../useRenderElement-DwToLA61.js";
|
|
11
|
+
import '../../index17.css';function $(t) {
|
|
12
|
+
const {
|
|
13
|
+
children: r,
|
|
14
|
+
open: i,
|
|
15
|
+
defaultOpen: a = !1,
|
|
16
|
+
onOpenChange: s,
|
|
17
|
+
onOpenChangeComplete: p,
|
|
18
|
+
actionsRef: m,
|
|
19
|
+
handle: f,
|
|
20
|
+
triggerId: l,
|
|
21
|
+
defaultTriggerId: c = null
|
|
22
|
+
} = t, d = R(), u = !!d, e = V(() => f?.store ?? new b({
|
|
23
|
+
open: i ?? a,
|
|
24
|
+
activeTriggerId: l !== void 0 ? l : c,
|
|
25
|
+
modal: !0,
|
|
26
|
+
disablePointerDismissal: !0,
|
|
27
|
+
nested: u,
|
|
28
|
+
role: "alertdialog"
|
|
29
|
+
})).current;
|
|
30
|
+
e.useControlledProp("open", i, a), e.useControlledProp("activeTriggerId", l, c), e.useSyncedValue("nested", u), e.useContextCallback("onOpenChange", s), e.useContextCallback("onOpenChangeComplete", p);
|
|
31
|
+
const x = e.useState("payload");
|
|
32
|
+
I({
|
|
33
|
+
store: e,
|
|
34
|
+
actionsRef: m,
|
|
35
|
+
parentContext: d?.store.context
|
|
36
|
+
});
|
|
37
|
+
const P = A.useMemo(() => ({
|
|
38
|
+
store: e
|
|
39
|
+
}), [e]);
|
|
40
|
+
return /* @__PURE__ */ o(T.Provider, {
|
|
41
|
+
value: P,
|
|
42
|
+
children: typeof r == "function" ? r({
|
|
43
|
+
payload: x
|
|
44
|
+
}) : r
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const z = {
|
|
48
|
+
"alert-dialog__actions": "_alert-dialog__actions_f5jwc_1"
|
|
49
|
+
};
|
|
50
|
+
function Q({
|
|
51
|
+
title: t,
|
|
52
|
+
description: r,
|
|
53
|
+
children: i,
|
|
54
|
+
actions: a,
|
|
55
|
+
trigger: s,
|
|
56
|
+
width: p = "md",
|
|
57
|
+
background: m = "root",
|
|
58
|
+
centered: f = !1,
|
|
59
|
+
className: l,
|
|
60
|
+
...c
|
|
61
|
+
}) {
|
|
62
|
+
return a.length < 2 && console.error("You must have at least two actions."), /* @__PURE__ */ g($, { ...c, children: [
|
|
63
|
+
s ? /* @__PURE__ */ o(w, { render: s }) : null,
|
|
64
|
+
/* @__PURE__ */ g(N, { children: [
|
|
65
|
+
/* @__PURE__ */ o(
|
|
66
|
+
O,
|
|
67
|
+
{
|
|
68
|
+
className: _(
|
|
69
|
+
n.dialog__backdrop,
|
|
70
|
+
D.transition_opacity
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ o(
|
|
75
|
+
S,
|
|
76
|
+
{
|
|
77
|
+
className: _(
|
|
78
|
+
n.dialog__popup,
|
|
79
|
+
f && n.dialog__popup_centered,
|
|
80
|
+
D.transition_scale
|
|
81
|
+
),
|
|
82
|
+
children: /* @__PURE__ */ g(
|
|
83
|
+
y,
|
|
84
|
+
{
|
|
85
|
+
background: m,
|
|
86
|
+
className: _(
|
|
87
|
+
n.dialog__content,
|
|
88
|
+
n[`dialog__content_width_${p}`],
|
|
89
|
+
l
|
|
90
|
+
),
|
|
91
|
+
children: [
|
|
92
|
+
t || r ? /* @__PURE__ */ g(C, { className: n.dialog__header, children: [
|
|
93
|
+
t ? /* @__PURE__ */ o(h, { render: /* @__PURE__ */ o(k, {}), size: "2xl", children: t }) : null,
|
|
94
|
+
r ? /* @__PURE__ */ o(
|
|
95
|
+
h,
|
|
96
|
+
{
|
|
97
|
+
multiline: !0,
|
|
98
|
+
color: "dimmer",
|
|
99
|
+
render: /* @__PURE__ */ o(B, {}),
|
|
100
|
+
children: r
|
|
101
|
+
}
|
|
102
|
+
) : null
|
|
103
|
+
] }) : null,
|
|
104
|
+
i,
|
|
105
|
+
/* @__PURE__ */ o(C, { className: z["alert-dialog__actions"], children: a.map(({ children: d, ...u }, e) => /* @__PURE__ */ o(
|
|
106
|
+
M,
|
|
107
|
+
{
|
|
108
|
+
...W(u, e + 1 === a.length),
|
|
109
|
+
children: d
|
|
110
|
+
},
|
|
111
|
+
e
|
|
112
|
+
)) })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
] })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
function M(t) {
|
|
122
|
+
return /* @__PURE__ */ o(j, { render: /* @__PURE__ */ o(v, { ...t }) });
|
|
123
|
+
}
|
|
124
|
+
function W(t, r) {
|
|
125
|
+
return r ? {
|
|
126
|
+
interactive: "negative_fill",
|
|
127
|
+
...t
|
|
128
|
+
} : {
|
|
129
|
+
interactive: !0,
|
|
130
|
+
...t
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
Q as AlertDialog,
|
|
135
|
+
M as AlertDialogClose
|
|
136
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react';
|
|
2
|
+
export type AnchorProps = useRender.ComponentProps<"a"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Open this link in a new tab
|
|
5
|
+
*/
|
|
6
|
+
external?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function Anchor({ external, render, children, ...props }: AnchorProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as c, Fragment as s, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as t } from "../icon/index.js";
|
|
3
|
+
import { u as _ } from "../../useRender-CLx7dR_1.js";
|
|
4
|
+
import { m as i } from "../../useRenderElement-DwToLA61.js";
|
|
5
|
+
import '../../index6.css';const l = "_anchor_71aa4_1", h = "_anchor__icon_71aa4_14", r = {
|
|
6
|
+
anchor: l,
|
|
7
|
+
anchor__icon: h
|
|
8
|
+
};
|
|
9
|
+
function x({ external: n, render: o, children: e, ...a }) {
|
|
10
|
+
return _({
|
|
11
|
+
defaultTagName: "a",
|
|
12
|
+
render: o,
|
|
13
|
+
props: i(
|
|
14
|
+
{
|
|
15
|
+
className: r.anchor,
|
|
16
|
+
...n ? {
|
|
17
|
+
target: "_blank",
|
|
18
|
+
rel: "noreferrer"
|
|
19
|
+
} : {},
|
|
20
|
+
children: /* @__PURE__ */ c(s, { children: [
|
|
21
|
+
e,
|
|
22
|
+
n ? /* @__PURE__ */ m(
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
name: "external-link-line",
|
|
26
|
+
size: "sm",
|
|
27
|
+
className: r.anchor__icon
|
|
28
|
+
}
|
|
29
|
+
) : null
|
|
30
|
+
] })
|
|
31
|
+
},
|
|
32
|
+
a
|
|
33
|
+
)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
x as Anchor
|
|
38
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
|
|
2
|
+
import { Size } from '../../styles/tokens';
|
|
3
|
+
export interface AvatarProps extends AvatarPrimitive.Root.Props {
|
|
4
|
+
/**
|
|
5
|
+
* Avatar url; if not provided, uses fallback based on username or fullName.
|
|
6
|
+
*/
|
|
7
|
+
image?: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Used for initials if avatar image is not provided.
|
|
10
|
+
*/
|
|
11
|
+
username: string;
|
|
12
|
+
/**
|
|
13
|
+
* User's first & last name. Used for initials, takes precedence over username.
|
|
14
|
+
*/
|
|
15
|
+
fullName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Size of the avatar, defaults to "md".
|
|
18
|
+
*/
|
|
19
|
+
size?: Size;
|
|
20
|
+
}
|
|
21
|
+
export declare function Avatar({ image, username, fullName, size, className, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsx as m, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { c as R } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { u as f, N as h } from "../../useRenderElement-DwToLA61.js";
|
|
5
|
+
import { f as k } from "../../formatErrorMessage-BqPuTBN-.js";
|
|
6
|
+
import { u as C } from "../../useStableCallback-CkTrVkNX.js";
|
|
7
|
+
import { u as N } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
8
|
+
import { u as M } from "../../useTimeout-CflX-kz3.js";
|
|
9
|
+
import '../../index23.css';const g = /* @__PURE__ */ o.createContext(void 0);
|
|
10
|
+
process.env.NODE_ENV !== "production" && (g.displayName = "AvatarRootContext");
|
|
11
|
+
function b() {
|
|
12
|
+
const e = o.useContext(g);
|
|
13
|
+
if (e === void 0)
|
|
14
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>." : k(13));
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
const p = {
|
|
18
|
+
imageLoadingStatus: () => null
|
|
19
|
+
}, z = /* @__PURE__ */ o.forwardRef(function(a, s) {
|
|
20
|
+
const {
|
|
21
|
+
className: c,
|
|
22
|
+
render: i,
|
|
23
|
+
...r
|
|
24
|
+
} = a, [t, l] = o.useState("idle"), _ = o.useMemo(() => ({
|
|
25
|
+
imageLoadingStatus: t
|
|
26
|
+
}), [t]), u = o.useMemo(() => ({
|
|
27
|
+
imageLoadingStatus: t,
|
|
28
|
+
setImageLoadingStatus: l
|
|
29
|
+
}), [t, l]), n = f("span", a, {
|
|
30
|
+
state: _,
|
|
31
|
+
ref: s,
|
|
32
|
+
props: r,
|
|
33
|
+
stateAttributesMapping: p
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ m(g.Provider, {
|
|
36
|
+
value: u,
|
|
37
|
+
children: n
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "AvatarRoot");
|
|
41
|
+
function w(e, {
|
|
42
|
+
referrerPolicy: a,
|
|
43
|
+
crossOrigin: s
|
|
44
|
+
}) {
|
|
45
|
+
const [c, i] = o.useState("idle");
|
|
46
|
+
return N(() => {
|
|
47
|
+
if (!e)
|
|
48
|
+
return i("error"), h;
|
|
49
|
+
let r = !0;
|
|
50
|
+
const t = new window.Image(), l = (_) => () => {
|
|
51
|
+
r && i(_);
|
|
52
|
+
};
|
|
53
|
+
return i("loading"), t.onload = l("loaded"), t.onerror = l("error"), a && (t.referrerPolicy = a), t.crossOrigin = s ?? null, t.src = e, () => {
|
|
54
|
+
r = !1;
|
|
55
|
+
};
|
|
56
|
+
}, [e, s, a]), c;
|
|
57
|
+
}
|
|
58
|
+
const S = /* @__PURE__ */ o.forwardRef(function(a, s) {
|
|
59
|
+
const {
|
|
60
|
+
className: c,
|
|
61
|
+
render: i,
|
|
62
|
+
onLoadingStatusChange: r,
|
|
63
|
+
referrerPolicy: t,
|
|
64
|
+
crossOrigin: l,
|
|
65
|
+
..._
|
|
66
|
+
} = a, u = b(), n = w(a.src, {
|
|
67
|
+
referrerPolicy: t,
|
|
68
|
+
crossOrigin: l
|
|
69
|
+
}), d = C((x) => {
|
|
70
|
+
r?.(x), u.setImageLoadingStatus(x);
|
|
71
|
+
});
|
|
72
|
+
N(() => {
|
|
73
|
+
n !== "idle" && d(n);
|
|
74
|
+
}, [n, d]);
|
|
75
|
+
const A = o.useMemo(() => ({
|
|
76
|
+
imageLoadingStatus: n
|
|
77
|
+
}), [n]);
|
|
78
|
+
return f("img", a, {
|
|
79
|
+
state: A,
|
|
80
|
+
ref: s,
|
|
81
|
+
props: _,
|
|
82
|
+
stateAttributesMapping: p,
|
|
83
|
+
enabled: n === "loaded"
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
process.env.NODE_ENV !== "production" && (S.displayName = "AvatarImage");
|
|
87
|
+
const E = /* @__PURE__ */ o.forwardRef(function(a, s) {
|
|
88
|
+
const {
|
|
89
|
+
className: c,
|
|
90
|
+
render: i,
|
|
91
|
+
delay: r,
|
|
92
|
+
...t
|
|
93
|
+
} = a, {
|
|
94
|
+
imageLoadingStatus: l
|
|
95
|
+
} = b(), [_, u] = o.useState(r === void 0), n = M();
|
|
96
|
+
o.useEffect(() => (r !== void 0 && n.start(r, () => u(!0)), n.clear), [n, r]);
|
|
97
|
+
const d = o.useMemo(() => ({
|
|
98
|
+
imageLoadingStatus: l
|
|
99
|
+
}), [l]);
|
|
100
|
+
return f("span", a, {
|
|
101
|
+
state: d,
|
|
102
|
+
ref: s,
|
|
103
|
+
props: t,
|
|
104
|
+
stateAttributesMapping: p,
|
|
105
|
+
enabled: l !== "loaded" && _
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
process.env.NODE_ENV !== "production" && (E.displayName = "AvatarFallback");
|
|
109
|
+
const y = "_avatar_2v9li_1", I = "_avatar__image_2v9li_15", O = "_avatar__fallback_2v9li_21", D = "_avatar_size_sm_2v9li_34", V = "_avatar_size_md_2v9li_38", F = "_avatar_size_lg_2v9li_42", P = "_avatar_size_xl_2v9li_46", j = "_avatar_size_2xl_2v9li_50", U = "_avatar_size_3xl_2v9li_54", v = {
|
|
110
|
+
avatar: y,
|
|
111
|
+
avatar__image: I,
|
|
112
|
+
avatar__fallback: O,
|
|
113
|
+
avatar_size_sm: D,
|
|
114
|
+
avatar_size_md: V,
|
|
115
|
+
avatar_size_lg: F,
|
|
116
|
+
avatar_size_xl: P,
|
|
117
|
+
avatar_size_2xl: j,
|
|
118
|
+
avatar_size_3xl: U
|
|
119
|
+
};
|
|
120
|
+
function W({
|
|
121
|
+
image: e,
|
|
122
|
+
username: a,
|
|
123
|
+
fullName: s,
|
|
124
|
+
size: c = "md",
|
|
125
|
+
className: i,
|
|
126
|
+
...r
|
|
127
|
+
}) {
|
|
128
|
+
const t = B(a, s);
|
|
129
|
+
return /* @__PURE__ */ L(
|
|
130
|
+
z,
|
|
131
|
+
{
|
|
132
|
+
className: R(
|
|
133
|
+
v.avatar,
|
|
134
|
+
v[`avatar_size_${c}`],
|
|
135
|
+
i
|
|
136
|
+
),
|
|
137
|
+
...r,
|
|
138
|
+
children: [
|
|
139
|
+
e ? /* @__PURE__ */ m(
|
|
140
|
+
S,
|
|
141
|
+
{
|
|
142
|
+
src: e,
|
|
143
|
+
className: v.avatar__image
|
|
144
|
+
}
|
|
145
|
+
) : null,
|
|
146
|
+
/* @__PURE__ */ m(E, { className: v.avatar__fallback, children: t })
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
function B(e, a) {
|
|
152
|
+
let s = e.substring(0, 2);
|
|
153
|
+
if (a) {
|
|
154
|
+
const [c, i] = a.split(" ");
|
|
155
|
+
s = c && i ? c.charAt(0) + i.charAt(0) : a.substring(0, 2);
|
|
156
|
+
}
|
|
157
|
+
return s.toLocaleUpperCase();
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
W as Avatar
|
|
161
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react';
|
|
2
|
+
import { IconName } from '../icon/icon-names';
|
|
3
|
+
import { Color } from '../view';
|
|
4
|
+
export interface BadgeProps extends Omit<useRender.ComponentProps<"span">, "children"> {
|
|
5
|
+
/** Optional icon, goes before name */
|
|
6
|
+
icon?: IconName;
|
|
7
|
+
/** Name of badge to be displayed, goes after icon */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Communicate purpose with color. Defaults to "primary". */
|
|
10
|
+
color?: Color;
|
|
11
|
+
/** Add shiny hover effect. */
|
|
12
|
+
shiny?: boolean;
|
|
13
|
+
/** Tagline of badge. */
|
|
14
|
+
tagline?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function Badge({ icon, name, color, shiny, tagline, render, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as e, jsxs as g, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Icon as f } from "../icon/index.js";
|
|
4
|
+
import { Text as _ } from "../text/index.js";
|
|
5
|
+
import { Tooltip as b } from "../tooltip/index.js";
|
|
6
|
+
import { View as h } from "../view/index.js";
|
|
7
|
+
import { u } from "../../useRender-CLx7dR_1.js";
|
|
8
|
+
import { m as x } from "../../useRenderElement-DwToLA61.js";
|
|
9
|
+
import '../../index7.css';const y = "_badge_sf2gl_1", T = "_badge_shiny_sf2gl_16", m = {
|
|
10
|
+
badge: y,
|
|
11
|
+
badge_shiny: T
|
|
12
|
+
};
|
|
13
|
+
function R({
|
|
14
|
+
icon: r,
|
|
15
|
+
name: t,
|
|
16
|
+
color: n,
|
|
17
|
+
shiny: i,
|
|
18
|
+
tagline: s,
|
|
19
|
+
render: a,
|
|
20
|
+
...l
|
|
21
|
+
}) {
|
|
22
|
+
const d = u({
|
|
23
|
+
defaultTagName: "span",
|
|
24
|
+
render: a,
|
|
25
|
+
props: x(
|
|
26
|
+
{
|
|
27
|
+
className: p(m.badge, i && m.badge_shiny),
|
|
28
|
+
children: /* @__PURE__ */ g(c, { children: [
|
|
29
|
+
r ? /* @__PURE__ */ e(f, { name: r }) : null,
|
|
30
|
+
t
|
|
31
|
+
] })
|
|
32
|
+
},
|
|
33
|
+
l
|
|
34
|
+
)
|
|
35
|
+
}), o = /* @__PURE__ */ e(h, { color: n, children: d });
|
|
36
|
+
return s ? /* @__PURE__ */ e(b, { trigger: o, children: /* @__PURE__ */ e(_, { size: "sm", multiline: !0, children: s }) }) : o;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
R as Badge
|
|
40
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Size } from '../../styles/tokens';
|
|
3
|
+
import { IconName } from '../icon/icon-names';
|
|
4
|
+
import { ViewProps } from '../view';
|
|
5
|
+
export type ButtonProps = ComponentProps<"button"> & ViewProps<"button"> & {
|
|
6
|
+
/**
|
|
7
|
+
* Size of the button
|
|
8
|
+
*/
|
|
9
|
+
size?: Size;
|
|
10
|
+
/**
|
|
11
|
+
* Icon to display on the left side of the button content
|
|
12
|
+
*/
|
|
13
|
+
leftIcon?: IconName;
|
|
14
|
+
/**
|
|
15
|
+
* Icon to display on the right side of the button content
|
|
16
|
+
*/
|
|
17
|
+
rightIcon?: IconName;
|
|
18
|
+
/**
|
|
19
|
+
* The button can remain keyboard accessible while being rendered as another tag
|
|
20
|
+
* {@link https://base-ui.com/react/components/button}
|
|
21
|
+
*/
|
|
22
|
+
nativeButton?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function Button({ size, leftIcon, rightIcon, children, render, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as b, jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { textify as g } from "../../-utils.js";
|
|
4
|
+
import { Icon as e } from "../icon/index.js";
|
|
5
|
+
import { View as m } from "../view/index.js";
|
|
6
|
+
import { B as r } from "../../Button-DrPFFzo7.js";
|
|
7
|
+
import '../../index8.css';const a = "_button_14saj_1", c = "_button_height_sm_14saj_14", x = "_button_height_md_14saj_19", j = "_button_height_lg_14saj_24", d = "_button_height_xl_14saj_29", f = "_button_height_2xl_14saj_34", p = "_button_height_3xl_14saj_39", i = {
|
|
8
|
+
button: a,
|
|
9
|
+
button_height_sm: c,
|
|
10
|
+
button_height_md: x,
|
|
11
|
+
button_height_lg: j,
|
|
12
|
+
button_height_xl: d,
|
|
13
|
+
button_height_2xl: f,
|
|
14
|
+
button_height_3xl: p
|
|
15
|
+
};
|
|
16
|
+
function N({
|
|
17
|
+
size: t = "md",
|
|
18
|
+
leftIcon: o,
|
|
19
|
+
rightIcon: n,
|
|
20
|
+
children: u,
|
|
21
|
+
render: s,
|
|
22
|
+
...h
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ b(
|
|
25
|
+
m,
|
|
26
|
+
{
|
|
27
|
+
interactive: !0,
|
|
28
|
+
render: /* @__PURE__ */ _(
|
|
29
|
+
r,
|
|
30
|
+
{
|
|
31
|
+
className: l(i.button, i[`button_height_${t}`]),
|
|
32
|
+
focusableWhenDisabled: !!h.loading,
|
|
33
|
+
render: s
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
...h,
|
|
37
|
+
children: [
|
|
38
|
+
o ? /* @__PURE__ */ _(e, { name: o, size: t }) : null,
|
|
39
|
+
g(u, { size: t, color: "inherit" }),
|
|
40
|
+
n ? /* @__PURE__ */ _(e, { name: n, size: t }) : null
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
N as Button
|
|
47
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
|
+
import { Color } from '../view';
|
|
3
|
+
export interface CheckboxProps extends CheckboxPrimitive.Root.Props {
|
|
4
|
+
/** Optional color for checkbox. Defaults to "primary". */
|
|
5
|
+
color?: Color;
|
|
6
|
+
/** Optional label. If one is provided, we wrap radio in a label element. Otherwise, we just return a standard radio. */
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function Checkbox({ color, label, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|