@aivex/ui 1.2.0-dev.59 → 1.2.0-dev.60
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 +64 -19
- package/dist/DESIGN.md +1 -1
- package/dist/components/Accordion/Accordion.cjs +2 -0
- package/dist/components/Accordion/Accordion.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.d.cts +111 -0
- package/dist/components/Accordion/Accordion.d.ts +111 -0
- package/dist/components/Accordion/Accordion.js +75 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/index.d.cts +2 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.js +11 -11
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +13 -13
- package/dist/components/BreadCrumb/BreadCrumb.cjs +1 -1
- package/dist/components/BreadCrumb/BreadCrumb.cjs.map +1 -1
- package/dist/components/BreadCrumb/BreadCrumb.js +13 -15
- package/dist/components/BreadCrumb/BreadCrumb.js.map +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.cts +6 -5
- package/dist/components/Button/Button.d.ts +6 -5
- package/dist/components/Button/Button.js +36 -33
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +27 -27
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.cts +9 -8
- package/dist/components/Card/Card.d.ts +9 -8
- package/dist/components/Card/Card.js +25 -22
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.cts +17 -18
- package/dist/components/Checkbox/Checkbox.d.ts +17 -18
- package/dist/components/Checkbox/Checkbox.js +31 -42
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.cjs +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.cjs.map +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.d.cts +10 -8
- package/dist/components/Checkbox/ChipsCheckbox.d.ts +10 -8
- package/dist/components/Checkbox/ChipsCheckbox.js +19 -37
- package/dist/components/Checkbox/ChipsCheckbox.js.map +1 -1
- package/dist/components/Coachmark/Coachmark.cjs +1 -1
- package/dist/components/Coachmark/Coachmark.cjs.map +1 -1
- package/dist/components/Coachmark/Coachmark.d.cts +29 -25
- package/dist/components/Coachmark/Coachmark.d.ts +29 -25
- package/dist/components/Coachmark/Coachmark.js +91 -83
- package/dist/components/Coachmark/Coachmark.js.map +1 -1
- package/dist/components/Coachmark/index.d.cts +1 -1
- package/dist/components/Coachmark/index.d.ts +1 -1
- package/dist/components/Comment/CommentInput.cjs +1 -1
- package/dist/components/Comment/CommentInput.js +7 -7
- package/dist/components/Comment/MentionInput.cjs +1 -1
- package/dist/components/Comment/MentionInput.cjs.map +1 -1
- package/dist/components/Comment/MentionInput.js +3 -1
- package/dist/components/Comment/MentionInput.js.map +1 -1
- package/dist/components/Comment/useMentionSuggestion.cjs +1 -1
- package/dist/components/Comment/useMentionSuggestion.cjs.map +1 -1
- package/dist/components/Comment/useMentionSuggestion.js +1 -1
- package/dist/components/Comment/useMentionSuggestion.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenu.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.cts +72 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +72 -0
- package/dist/components/ContextMenu/ContextMenu.js +56 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/ContextMenu/index.d.cts +2 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.map +1 -1
- package/dist/components/DataGrid/DataGrid.js +33 -33
- package/dist/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.cjs +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.cjs.map +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.d.cts +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.d.ts +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.js +30 -31
- package/dist/components/DataGrid/DataGridColumnSettings.js.map +1 -1
- package/dist/components/DataGrid/DataGridPrimitives.cjs +1 -1
- package/dist/components/DataGrid/DataGridPrimitives.cjs.map +1 -1
- package/dist/components/DataGrid/DataGridPrimitives.d.cts +10 -12
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +10 -12
- package/dist/components/DataGrid/DataGridPrimitives.js +43 -37
- package/dist/components/DataGrid/DataGridPrimitives.js.map +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.cts +15 -5
- package/dist/components/Dialog/Dialog.d.ts +15 -5
- package/dist/components/Dialog/Dialog.js +61 -49
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Divider/Divider.cjs +1 -1
- package/dist/components/Divider/Divider.cjs.map +1 -1
- package/dist/components/Divider/Divider.js +6 -6
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.cts +34 -22
- package/dist/components/Drawer/Drawer.d.ts +34 -22
- package/dist/components/Drawer/Drawer.js +80 -72
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.cjs +2 -0
- package/dist/components/EmptyState/EmptyState.cjs.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.cts +61 -0
- package/dist/components/EmptyState/EmptyState.d.ts +61 -0
- package/dist/components/EmptyState/EmptyState.js +50 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/EmptyState/index.d.cts +2 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/Field/Field.cjs +1 -1
- package/dist/components/Field/Field.cjs.map +1 -1
- package/dist/components/Field/Field.d.cts +45 -34
- package/dist/components/Field/Field.d.ts +45 -34
- package/dist/components/Field/Field.js +46 -65
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/Field/FieldStateContext.cjs +2 -0
- package/dist/components/Field/FieldStateContext.cjs.map +1 -0
- package/dist/components/Field/FieldStateContext.d.cts +12 -0
- package/dist/components/Field/FieldStateContext.d.ts +12 -0
- package/dist/components/Field/FieldStateContext.js +14 -0
- package/dist/components/Field/FieldStateContext.js.map +1 -0
- package/dist/components/HoverCard/HoverCard.cjs +2 -0
- package/dist/components/HoverCard/HoverCard.cjs.map +1 -0
- package/dist/components/HoverCard/HoverCard.d.cts +61 -0
- package/dist/components/HoverCard/HoverCard.d.ts +61 -0
- package/dist/components/HoverCard/HoverCard.js +44 -0
- package/dist/components/HoverCard/HoverCard.js.map +1 -0
- package/dist/components/HoverCard/index.d.cts +2 -0
- package/dist/components/HoverCard/index.d.ts +2 -0
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.cjs.map +1 -1
- package/dist/components/Icon/index.js +12 -12
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.d.cts +6 -5
- package/dist/components/IconButton/IconButton.d.ts +6 -5
- package/dist/components/IconButton/IconButton.js +31 -28
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/InputBase/InputBase.cjs +1 -1
- package/dist/components/InputBase/InputBase.cjs.map +1 -1
- package/dist/components/InputBase/InputBase.js +8 -8
- package/dist/components/Logo/index.cjs +1 -1
- package/dist/components/Logo/index.cjs.map +1 -1
- package/dist/components/Logo/index.d.cts +21 -2
- package/dist/components/Logo/index.d.ts +21 -2
- package/dist/components/Logo/index.js +487 -2
- package/dist/components/Logo/index.js.map +1 -1
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.cjs.map +1 -1
- package/dist/components/Menu/Menu.d.cts +80 -43
- package/dist/components/Menu/Menu.d.ts +80 -43
- package/dist/components/Menu/Menu.js +144 -122
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Messagebox/Messagebox.cjs +1 -1
- package/dist/components/Messagebox/Messagebox.cjs.map +1 -1
- package/dist/components/Messagebox/Messagebox.js +27 -27
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.cts +22 -9
- package/dist/components/Modal/Modal.d.ts +22 -9
- package/dist/components/Modal/Modal.js +95 -98
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalBase.cjs +1 -1
- package/dist/components/Modal/ModalBase.cjs.map +1 -1
- package/dist/components/Modal/ModalBase.d.cts +32 -23
- package/dist/components/Modal/ModalBase.d.ts +32 -23
- package/dist/components/Modal/ModalBase.js +35 -23
- package/dist/components/Modal/ModalBase.js.map +1 -1
- package/dist/components/Nav/Nav.cjs +1 -1
- package/dist/components/Nav/Nav.js +19 -19
- package/dist/components/NumberField/NumberField.cjs +2 -0
- package/dist/components/NumberField/NumberField.cjs.map +1 -0
- package/dist/components/NumberField/NumberField.d.cts +79 -0
- package/dist/components/NumberField/NumberField.d.ts +79 -0
- package/dist/components/NumberField/NumberField.js +65 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/NumberField/index.d.cts +2 -0
- package/dist/components/NumberField/index.d.ts +2 -0
- package/dist/components/Overlay/Overlay.cjs +1 -1
- package/dist/components/Overlay/Overlay.js +6 -6
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.js +20 -20
- package/dist/components/Panel/Panel.cjs +1 -1
- package/dist/components/Panel/Panel.js +25 -25
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.cts +32 -28
- package/dist/components/Popover/Popover.d.ts +32 -28
- package/dist/components/Popover/Popover.js +50 -46
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/index.d.cts +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.d.cts +47 -18
- package/dist/components/Radio/Radio.d.ts +47 -18
- package/dist/components/Radio/Radio.js +43 -33
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/index.d.cts +2 -2
- package/dist/components/Radio/index.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
- package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.cts +25 -8
- package/dist/components/ScrollArea/ScrollArea.d.ts +25 -8
- package/dist/components/ScrollArea/ScrollArea.js +50 -30
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/components/ScrollArea/index.d.cts +1 -1
- package/dist/components/ScrollArea/index.d.ts +1 -1
- package/dist/components/Segmented/Segmented.cjs +1 -1
- package/dist/components/Segmented/Segmented.cjs.map +1 -1
- package/dist/components/Segmented/Segmented.d.cts +20 -5
- package/dist/components/Segmented/Segmented.d.ts +20 -5
- package/dist/components/Segmented/Segmented.js +18 -18
- package/dist/components/Segmented/Segmented.js.map +1 -1
- package/dist/components/SelectBox/SelectBox.cjs +1 -1
- package/dist/components/SelectBox/SelectBox.cjs.map +1 -1
- package/dist/components/SelectBox/SelectBox.d.cts +13 -15
- package/dist/components/SelectBox/SelectBox.d.ts +13 -15
- package/dist/components/SelectBox/SelectBox.js +64 -56
- package/dist/components/SelectBox/SelectBox.js.map +1 -1
- package/dist/components/SelectButton/SelectButton.cjs +1 -1
- package/dist/components/SelectButton/SelectButton.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.d.cts +13 -10
- package/dist/components/SelectButton/SelectButton.d.ts +13 -10
- package/dist/components/SelectButton/SelectButton.js +6 -6
- package/dist/components/SelectButton/SelectButton.js.map +1 -1
- package/dist/components/ShapeEditor/_components/ContextMenu.cjs +1 -1
- package/dist/components/ShapeEditor/_components/ContextMenu.cjs.map +1 -1
- package/dist/components/ShapeEditor/_components/ContextMenu.d.cts +2 -2
- package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +2 -2
- package/dist/components/ShapeEditor/_components/ContextMenu.js +32 -32
- package/dist/components/ShapeEditor/_components/ContextMenu.js.map +1 -1
- package/dist/components/ShapeEditor/_components/Minimap.cjs +1 -1
- package/dist/components/ShapeEditor/_components/Minimap.cjs.map +1 -1
- package/dist/components/ShapeEditor/_components/Minimap.js +7 -10
- package/dist/components/ShapeEditor/_components/Minimap.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.cts +4 -4
- package/dist/components/Skeleton/Skeleton.d.ts +4 -4
- package/dist/components/Skeleton/Skeleton.js +12 -9
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.cts +21 -8
- package/dist/components/Slider/Slider.d.ts +21 -8
- package/dist/components/Slider/Slider.js +37 -32
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.cts +6 -4
- package/dist/components/Switch/Switch.d.ts +6 -4
- package/dist/components/Switch/Switch.js +26 -23
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tab/Tab.cjs +1 -1
- package/dist/components/Tab/Tab.cjs.map +1 -1
- package/dist/components/Tab/Tab.d.cts +47 -16
- package/dist/components/Tab/Tab.d.ts +47 -16
- package/dist/components/Tab/Tab.js +17 -13
- package/dist/components/Tab/Tab.js.map +1 -1
- package/dist/components/Tag/Tag.cjs +1 -1
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.js +16 -16
- package/dist/components/Tagbox/Tagbox.cjs +1 -1
- package/dist/components/Tagbox/Tagbox.cjs.map +1 -1
- package/dist/components/Tagbox/Tagbox.d.cts +8 -10
- package/dist/components/Tagbox/Tagbox.d.ts +8 -10
- package/dist/components/Tagbox/Tagbox.js +63 -61
- package/dist/components/Tagbox/Tagbox.js.map +1 -1
- package/dist/components/Textarea/Textarea.cjs +1 -1
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.d.cts +4 -6
- package/dist/components/Textarea/Textarea.d.ts +4 -6
- package/dist/components/Textarea/Textarea.js +44 -40
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textbox/Textbox.cjs +1 -1
- package/dist/components/Textbox/Textbox.cjs.map +1 -1
- package/dist/components/Textbox/Textbox.d.cts +4 -6
- package/dist/components/Textbox/Textbox.d.ts +4 -6
- package/dist/components/Textbox/Textbox.js +46 -44
- package/dist/components/Textbox/Textbox.js.map +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.cts +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +18 -18
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.cjs +1 -1
- package/dist/components/ToggleButton/ToggleButton.cjs.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +13 -13
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.cts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +37 -26
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/TruncatedText/TruncatedText.cjs +1 -1
- package/dist/components/TruncatedText/TruncatedText.cjs.map +1 -1
- package/dist/components/TruncatedText/TruncatedText.js +64 -51
- package/dist/components/TruncatedText/TruncatedText.js.map +1 -1
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.cjs.map +1 -1
- package/dist/components/Typography/Typography.js +5 -5
- package/dist/components/UploadArea/UploadArea.cjs +1 -1
- package/dist/components/UploadArea/UploadArea.js +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +63 -58
- package/dist/llms-full.txt +877 -290
- package/dist/llms.txt +16 -11
- package/dist/styles.css +1 -1
- package/dist/utils/PortalEventBoundary.cjs +2 -0
- package/dist/utils/PortalEventBoundary.cjs.map +1 -0
- package/dist/utils/PortalEventBoundary.d.cts +13 -0
- package/dist/utils/PortalEventBoundary.d.ts +13 -0
- package/dist/utils/PortalEventBoundary.js +12 -0
- package/dist/utils/PortalEventBoundary.js.map +1 -0
- package/dist/utils/Primitive.cjs +2 -0
- package/dist/utils/Primitive.cjs.map +1 -0
- package/dist/utils/Primitive.d.cts +9 -0
- package/dist/utils/Primitive.d.ts +9 -0
- package/dist/utils/Primitive.js +15 -0
- package/dist/utils/Primitive.js.map +1 -0
- package/dist/utils/popupArrow.cjs +2 -0
- package/dist/utils/popupArrow.cjs.map +1 -0
- package/dist/utils/popupArrow.d.cts +14 -0
- package/dist/utils/popupArrow.d.ts +14 -0
- package/dist/utils/popupArrow.js +26 -0
- package/dist/utils/popupArrow.js.map +1 -0
- package/dist/utils/popupPositioning.cjs +2 -0
- package/dist/utils/popupPositioning.cjs.map +1 -0
- package/dist/utils/popupPositioning.d.cts +11 -0
- package/dist/utils/popupPositioning.d.ts +11 -0
- package/dist/utils/popupPositioning.js +25 -0
- package/dist/utils/popupPositioning.js.map +1 -0
- package/dist/utils/useComposedRefs.cjs +2 -0
- package/dist/utils/useComposedRefs.cjs.map +1 -0
- package/dist/utils/useComposedRefs.d.cts +6 -0
- package/dist/utils/useComposedRefs.d.ts +6 -0
- package/dist/utils/useComposedRefs.js +22 -0
- package/dist/utils/useComposedRefs.js.map +1 -0
- package/dist/utils/useControllableState.cjs.map +1 -1
- package/dist/utils/useControllableState.d.cts +1 -1
- package/dist/utils/useControllableState.d.ts +1 -1
- package/dist/utils/useControllableState.js.map +1 -1
- package/dist/utils/useModalFocus.cjs +2 -0
- package/dist/utils/useModalFocus.cjs.map +1 -0
- package/dist/utils/useModalFocus.d.cts +31 -0
- package/dist/utils/useModalFocus.d.ts +31 -0
- package/dist/utils/useModalFocus.js +28 -0
- package/dist/utils/useModalFocus.js.map +1 -0
- package/package.json +2 -16
- package/dist/utils/useModalAutoFocus.cjs +0 -2
- package/dist/utils/useModalAutoFocus.cjs.map +0 -1
- package/dist/utils/useModalAutoFocus.d.cts +0 -11
- package/dist/utils/useModalAutoFocus.d.ts +0 -11
- package/dist/utils/useModalAutoFocus.js +0 -22
- package/dist/utils/useModalAutoFocus.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`../InteractionLayer/InteractionLayer.cjs`);let n=require(`
|
|
1
|
+
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`../InteractionLayer/InteractionLayer.cjs`);let n=require(`react/jsx-runtime`),r=require(`class-variance-authority`),i=require(`@base-ui/react/use-render`);var a=(0,r.cva)(`aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:transition-colors aivex:disabled:pointer-events-none aivex:disabled:opacity-disable aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,{variants:{size:{xs:`aivex:size-xl aivex:rounded-xs`,sm:`aivex:size-2xl aivex:rounded-xs`,md:`aivex:size-3xl aivex:rounded-sm`},shape:{rectangle:``,rounded:`aivex:rounded-full`}},defaultVariants:{size:`sm`,shape:`rectangle`}}),o={xs:`aivex:size-xl`,sm:`aivex:size-2xl`,md:`aivex:size-3xl`},s={xs:`aivex:-inset-2xs`,sm:`aivex:-inset-xs`,md:`aivex:-inset-xs`},c={xs:{rectangle:`aivex:rounded-xs`,rounded:`aivex:rounded-full`},sm:{rectangle:`aivex:rounded-sm`,rounded:`aivex:rounded-full`},md:{rectangle:`aivex:rounded-md`,rounded:`aivex:rounded-full`}};function l({className:r,size:l=`sm`,shape:u=`rectangle`,color:d=`primary`,error:f=!1,render:p,children:m,ref:h,...g}){let _=f?`aivex:text-icon-danger`:d===`white`?`aivex:text-static-white`:`aivex:text-icon-primary`,v=f?`danger`:d===`white`?`white`:`default`,y=l??`sm`,b=u??`rectangle`;return(0,i.useRender)({defaultTagName:`button`,render:p,ref:h,props:{type:p?void 0:`button`,...g,className:e.cn(a({size:l,shape:u}),_,r),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.InteractionLayer,{variant:v,fill:!1,interactive:!0,className:e.cn(s[y],c[y][b])}),(0,n.jsx)(`span`,{className:e.cn(`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0`,o[y]),children:m})]})}})}exports.IconButton=l,exports.iconButtonVariants=a;
|
|
2
2
|
//# sourceMappingURL=IconButton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.cjs","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"IconButton.cjs","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from \"react\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n/** IconButton의 크기(`size`)·모양(`shape`) 클래스를 만드는 cva 변형 함수. */\nconst iconButtonVariants = cva(\n \"aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:transition-colors aivex:disabled:pointer-events-none aivex:disabled:opacity-disable aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n {\n variants: {\n size: {\n xs: \"aivex:size-xl aivex:rounded-xs\",\n sm: \"aivex:size-2xl aivex:rounded-xs\",\n md: \"aivex:size-3xl aivex:rounded-sm\",\n },\n shape: {\n rectangle: \"\",\n rounded: \"aivex:rounded-full\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n shape: \"rectangle\",\n },\n },\n);\n\ntype IconButtonSize = \"xs\" | \"sm\" | \"md\";\ntype IconButtonShape = \"rectangle\" | \"rounded\";\n\nconst iconSizeClass: Record<IconButtonSize, string> = {\n xs: \"aivex:size-xl\",\n sm: \"aivex:size-2xl\",\n md: \"aivex:size-3xl\",\n};\n\nconst interactionInsetClass: Record<IconButtonSize, string> = {\n xs: \"aivex:-inset-2xs\",\n sm: \"aivex:-inset-xs\",\n md: \"aivex:-inset-xs\",\n};\n\nconst interactionRadiusClass: Record<IconButtonSize, Record<IconButtonShape, string>> = {\n xs: {\n rectangle: \"aivex:rounded-xs\",\n rounded: \"aivex:rounded-full\",\n },\n sm: {\n rectangle: \"aivex:rounded-sm\",\n rounded: \"aivex:rounded-full\",\n },\n md: {\n rectangle: \"aivex:rounded-md\",\n rounded: \"aivex:rounded-full\",\n },\n};\n\nexport interface IconButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\">,\n VariantProps<typeof iconButtonVariants> {\n /**\n * 아이콘 색상 — primary: 밝은 배경 위 기본(어두운) 아이콘, white: 어두운 배경 위 흰 아이콘\n * @default \"primary\"\n */\n color?: \"primary\" | \"white\";\n /**\n * true 이면 danger 색상 적용 (color 보다 우선)\n * @default false\n */\n error?: boolean;\n /**\n * `<button>` 대신 그릴 요소(예: `<a href=\"…\" />`) 또는 `(props) => 요소` 함수.\n * 버튼의 props·스타일이 그 요소에 합쳐지고, 아이콘은 `children`으로 그대로 넘긴다.\n */\n render?: useRender.RenderProp;\n /** 표시할 아이콘 하나 */\n children?: ReactNode;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * 배경 없이 아이콘만 보이는 작은 버튼(닫기·더보기·툴바 액션 등).\n *\n * 텍스트가 없으므로 `aria-label`을 반드시 지정한다. `type=\"button\"`으로 고정되어 폼을 제출하지 않는다.\n * `size`: xs(16px)·sm(20px, 기본)·md(24px)이며 hover 영역은 박스보다 조금 넓게 그려진다.\n * `shape`: rectangle(기본)·rounded(원형). 배경·테두리가 있는 아이콘 버튼은 `Button`의 `icon-*` 크기를 쓴다.\n *\n * @example\n * ```tsx\n * import { CloseIcon, IconButton } from \"@aivex/ui\";\n *\n * <IconButton size=\"sm\" aria-label=\"닫기\" onClick={onClose}>\n * <CloseIcon />\n * </IconButton>\n * ```\n */\nfunction IconButton({\n className,\n size = \"sm\",\n shape = \"rectangle\",\n color = \"primary\",\n error = false,\n render,\n children,\n ref,\n ...props\n}: IconButtonProps) {\n const iconColor = error\n ? \"aivex:text-icon-danger\"\n : color === \"white\"\n ? \"aivex:text-static-white\"\n : \"aivex:text-icon-primary\";\n\n const interactionVariant = error ? \"danger\" : color === \"white\" ? \"white\" : \"default\";\n const iconButtonSize = size ?? \"sm\";\n const iconButtonShape = shape ?? \"rectangle\";\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref,\n props: {\n // 링크 등 다른 요소로 그릴 때는 button 전용 속성을 붙이지 않는다.\n type: render ? undefined : \"button\",\n ...props,\n className: cn(iconButtonVariants({ size, shape }), iconColor, className),\n children: (\n <>\n <InteractionLayer\n variant={interactionVariant}\n fill={false}\n interactive\n className={cn(\n interactionInsetClass[iconButtonSize],\n interactionRadiusClass[iconButtonSize][iconButtonShape],\n )}\n />\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n iconSizeClass[iconButtonSize],\n )}\n >\n {children}\n </span>\n </>\n ),\n },\n });\n}\n\nexport { IconButton, iconButtonVariants };\n"],"mappings":"sQAOA,IAAM,GAAA,EAAA,EAAA,KACJ,wSACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iCACJ,GAAI,kCACJ,GAAI,kCACL,CACD,MAAO,CACL,UAAW,GACX,QAAS,qBACV,CACF,CACD,gBAAiB,CACf,KAAM,KACN,MAAO,YACR,CACF,CACF,CAKK,EAAgD,CACpD,GAAI,gBACJ,GAAI,iBACJ,GAAI,iBACL,CAEK,EAAwD,CAC5D,GAAI,mBACJ,GAAI,kBACJ,GAAI,kBACL,CAEK,EAAkF,CACtF,GAAI,CACF,UAAW,mBACX,QAAS,qBACV,CACD,GAAI,CACF,UAAW,mBACX,QAAS,qBACV,CACD,GAAI,CACF,UAAW,mBACX,QAAS,qBACV,CACF,CAyCD,SAAS,EAAW,CAClB,YACA,OAAO,KACP,QAAQ,YACR,QAAQ,UACR,QAAQ,GACR,SACA,WACA,MACA,GAAG,GACe,CAClB,IAAM,EAAY,EACd,yBACA,IAAU,QACR,0BACA,0BAEA,EAAqB,EAAQ,SAAW,IAAU,QAAU,QAAU,UACtE,EAAiB,GAAQ,KACzB,EAAkB,GAAS,YAEjC,OAAA,EAAA,EAAA,WAAiB,CACf,eAAgB,SAChB,SACA,MACA,MAAO,CAEL,KAAM,EAAS,IAAA,GAAY,SAC3B,GAAG,EACH,UAAW,EAAA,GAAG,EAAmB,CAAE,OAAM,QAAO,CAAC,CAAE,EAAW,EAAU,CACxE,UACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,iBAAD,CACE,QAAS,EACT,KAAM,GACN,YAAA,GACA,UAAW,EAAA,GACT,EAAsB,GACtB,EAAuB,GAAgB,GACxC,CACD,CAAA,EACF,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,EAAA,GACT,oEACA,EAAc,GACf,CAEA,WACI,CAAA,CACN,CAAA,CAAA,CAEN,CACF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
1
2
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
import {
|
|
3
|
+
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
4
|
/** IconButton의 크기(`size`)·모양(`shape`) 클래스를 만드는 cva 변형 함수. */
|
|
4
5
|
declare const iconButtonVariants: (props?: ({
|
|
5
6
|
size?: "md" | "sm" | "xs" | null | undefined;
|
|
@@ -17,10 +18,10 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
17
18
|
*/
|
|
18
19
|
error?: boolean;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* `<button>` 대신 그릴 요소(예: `<a href="…" />`) 또는 `(props) => 요소` 함수.
|
|
22
|
+
* 버튼의 props·스타일이 그 요소에 합쳐지고, 아이콘은 `children`으로 그대로 넘긴다.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
render?: useRender.RenderProp;
|
|
24
25
|
/** 표시할 아이콘 하나 */
|
|
25
26
|
children?: ReactNode;
|
|
26
27
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -41,5 +42,5 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
41
42
|
* </IconButton>
|
|
42
43
|
* ```
|
|
43
44
|
*/
|
|
44
|
-
declare function IconButton({ className, size, shape, color, error,
|
|
45
|
+
declare function IconButton({ className, size, shape, color, error, render, children, ref, ...props }: IconButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
45
46
|
export { IconButton, iconButtonVariants };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
1
2
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
import {
|
|
3
|
+
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
4
|
/** IconButton의 크기(`size`)·모양(`shape`) 클래스를 만드는 cva 변형 함수. */
|
|
4
5
|
declare const iconButtonVariants: (props?: ({
|
|
5
6
|
size?: "md" | "sm" | "xs" | null | undefined;
|
|
@@ -17,10 +18,10 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
17
18
|
*/
|
|
18
19
|
error?: boolean;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* `<button>` 대신 그릴 요소(예: `<a href="…" />`) 또는 `(props) => 요소` 함수.
|
|
22
|
+
* 버튼의 props·스타일이 그 요소에 합쳐지고, 아이콘은 `children`으로 그대로 넘긴다.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
render?: useRender.RenderProp;
|
|
24
25
|
/** 표시할 아이콘 하나 */
|
|
25
26
|
children?: ReactNode;
|
|
26
27
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -41,5 +42,5 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
41
42
|
* </IconButton>
|
|
42
43
|
* ```
|
|
43
44
|
*/
|
|
44
|
-
declare function IconButton({ className, size, shape, color, error,
|
|
45
|
+
declare function IconButton({ className, size, shape, color, error, render, children, ref, ...props }: IconButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
45
46
|
export { IconButton, iconButtonVariants };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../utils.js";
|
|
3
3
|
import { InteractionLayer as t } from "../InteractionLayer/InteractionLayer.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Slot as s, Slottable as c } from "@radix-ui/react-slot";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { cva as a } from "class-variance-authority";
|
|
6
|
+
import { useRender as o } from "@base-ui/react/use-render";
|
|
8
7
|
//#region src/components/IconButton/IconButton.tsx
|
|
9
|
-
var
|
|
8
|
+
var s = a("aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:transition-colors aivex:disabled:pointer-events-none aivex:disabled:opacity-disable aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand", {
|
|
10
9
|
variants: {
|
|
11
10
|
size: {
|
|
12
11
|
xs: "aivex:size-xl aivex:rounded-xs",
|
|
@@ -22,15 +21,15 @@ var l = n("aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aiv
|
|
|
22
21
|
size: "sm",
|
|
23
22
|
shape: "rectangle"
|
|
24
23
|
}
|
|
25
|
-
}),
|
|
24
|
+
}), c = {
|
|
26
25
|
xs: "aivex:size-xl",
|
|
27
26
|
sm: "aivex:size-2xl",
|
|
28
27
|
md: "aivex:size-3xl"
|
|
29
|
-
},
|
|
28
|
+
}, l = {
|
|
30
29
|
xs: "aivex:-inset-2xs",
|
|
31
30
|
sm: "aivex:-inset-xs",
|
|
32
31
|
md: "aivex:-inset-xs"
|
|
33
|
-
},
|
|
32
|
+
}, u = {
|
|
34
33
|
xs: {
|
|
35
34
|
rectangle: "aivex:rounded-xs",
|
|
36
35
|
rounded: "aivex:rounded-full"
|
|
@@ -44,28 +43,32 @@ var l = n("aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aiv
|
|
|
44
43
|
rounded: "aivex:rounded-full"
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
|
-
function
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
46
|
+
function d({ className: a, size: d = "sm", shape: f = "rectangle", color: p = "primary", error: m = !1, render: h, children: g, ref: _, ...v }) {
|
|
47
|
+
let y = m ? "aivex:text-icon-danger" : p === "white" ? "aivex:text-static-white" : "aivex:text-icon-primary", b = m ? "danger" : p === "white" ? "white" : "default", x = d ?? "sm", S = f ?? "rectangle";
|
|
48
|
+
return o({
|
|
49
|
+
defaultTagName: "button",
|
|
50
|
+
render: h,
|
|
51
|
+
ref: _,
|
|
52
|
+
props: {
|
|
53
|
+
type: h ? void 0 : "button",
|
|
54
|
+
...v,
|
|
55
|
+
className: e(s({
|
|
56
|
+
size: d,
|
|
57
|
+
shape: f
|
|
58
|
+
}), y, a),
|
|
59
|
+
children: /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(t, {
|
|
60
|
+
variant: b,
|
|
61
|
+
fill: !1,
|
|
62
|
+
interactive: !0,
|
|
63
|
+
className: e(l[x], u[x][S])
|
|
64
|
+
}), /* @__PURE__ */ r("span", {
|
|
65
|
+
className: e("aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0", c[x]),
|
|
66
|
+
children: g
|
|
67
|
+
})] })
|
|
68
|
+
}
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
//#endregion
|
|
69
|
-
export {
|
|
72
|
+
export { d as IconButton, s as iconButtonVariants };
|
|
70
73
|
|
|
71
74
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from \"react\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n/** IconButton의 크기(`size`)·모양(`shape`) 클래스를 만드는 cva 변형 함수. */\nconst iconButtonVariants = cva(\n \"aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:transition-colors aivex:disabled:pointer-events-none aivex:disabled:opacity-disable aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n {\n variants: {\n size: {\n xs: \"aivex:size-xl aivex:rounded-xs\",\n sm: \"aivex:size-2xl aivex:rounded-xs\",\n md: \"aivex:size-3xl aivex:rounded-sm\",\n },\n shape: {\n rectangle: \"\",\n rounded: \"aivex:rounded-full\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n shape: \"rectangle\",\n },\n },\n);\n\ntype IconButtonSize = \"xs\" | \"sm\" | \"md\";\ntype IconButtonShape = \"rectangle\" | \"rounded\";\n\nconst iconSizeClass: Record<IconButtonSize, string> = {\n xs: \"aivex:size-xl\",\n sm: \"aivex:size-2xl\",\n md: \"aivex:size-3xl\",\n};\n\nconst interactionInsetClass: Record<IconButtonSize, string> = {\n xs: \"aivex:-inset-2xs\",\n sm: \"aivex:-inset-xs\",\n md: \"aivex:-inset-xs\",\n};\n\nconst interactionRadiusClass: Record<IconButtonSize, Record<IconButtonShape, string>> = {\n xs: {\n rectangle: \"aivex:rounded-xs\",\n rounded: \"aivex:rounded-full\",\n },\n sm: {\n rectangle: \"aivex:rounded-sm\",\n rounded: \"aivex:rounded-full\",\n },\n md: {\n rectangle: \"aivex:rounded-md\",\n rounded: \"aivex:rounded-full\",\n },\n};\n\nexport interface IconButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\">,\n VariantProps<typeof iconButtonVariants> {\n /**\n * 아이콘 색상 — primary: 밝은 배경 위 기본(어두운) 아이콘, white: 어두운 배경 위 흰 아이콘\n * @default \"primary\"\n */\n color?: \"primary\" | \"white\";\n /**\n * true 이면 danger 색상 적용 (color 보다 우선)\n * @default false\n */\n error?: boolean;\n /**\n * `<button>` 대신 그릴 요소(예: `<a href=\"…\" />`) 또는 `(props) => 요소` 함수.\n * 버튼의 props·스타일이 그 요소에 합쳐지고, 아이콘은 `children`으로 그대로 넘긴다.\n */\n render?: useRender.RenderProp;\n /** 표시할 아이콘 하나 */\n children?: ReactNode;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * 배경 없이 아이콘만 보이는 작은 버튼(닫기·더보기·툴바 액션 등).\n *\n * 텍스트가 없으므로 `aria-label`을 반드시 지정한다. `type=\"button\"`으로 고정되어 폼을 제출하지 않는다.\n * `size`: xs(16px)·sm(20px, 기본)·md(24px)이며 hover 영역은 박스보다 조금 넓게 그려진다.\n * `shape`: rectangle(기본)·rounded(원형). 배경·테두리가 있는 아이콘 버튼은 `Button`의 `icon-*` 크기를 쓴다.\n *\n * @example\n * ```tsx\n * import { CloseIcon, IconButton } from \"@aivex/ui\";\n *\n * <IconButton size=\"sm\" aria-label=\"닫기\" onClick={onClose}>\n * <CloseIcon />\n * </IconButton>\n * ```\n */\nfunction IconButton({\n className,\n size = \"sm\",\n shape = \"rectangle\",\n color = \"primary\",\n error = false,\n render,\n children,\n ref,\n ...props\n}: IconButtonProps) {\n const iconColor = error\n ? \"aivex:text-icon-danger\"\n : color === \"white\"\n ? \"aivex:text-static-white\"\n : \"aivex:text-icon-primary\";\n\n const interactionVariant = error ? \"danger\" : color === \"white\" ? \"white\" : \"default\";\n const iconButtonSize = size ?? \"sm\";\n const iconButtonShape = shape ?? \"rectangle\";\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref,\n props: {\n // 링크 등 다른 요소로 그릴 때는 button 전용 속성을 붙이지 않는다.\n type: render ? undefined : \"button\",\n ...props,\n className: cn(iconButtonVariants({ size, shape }), iconColor, className),\n children: (\n <>\n <InteractionLayer\n variant={interactionVariant}\n fill={false}\n interactive\n className={cn(\n interactionInsetClass[iconButtonSize],\n interactionRadiusClass[iconButtonSize][iconButtonShape],\n )}\n />\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n iconSizeClass[iconButtonSize],\n )}\n >\n {children}\n </span>\n </>\n ),\n },\n });\n}\n\nexport { IconButton, iconButtonVariants };\n"],"mappings":";;;;;;;AAOA,IAAM,IAAqB,EACzB,ySACA;CACE,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,OAAO;GACL,WAAW;GACX,SAAS;GACV;EACF;CACD,iBAAiB;EACf,MAAM;EACN,OAAO;EACR;CACF,CACF,EAKK,IAAgD;CACpD,IAAI;CACJ,IAAI;CACJ,IAAI;CACL,EAEK,IAAwD;CAC5D,IAAI;CACJ,IAAI;CACJ,IAAI;CACL,EAEK,IAAkF;CACtF,IAAI;EACF,WAAW;EACX,SAAS;EACV;CACD,IAAI;EACF,WAAW;EACX,SAAS;EACV;CACD,IAAI;EACF,WAAW;EACX,SAAS;EACV;CACF;AAyCD,SAAS,EAAW,EAClB,cACA,UAAO,MACP,WAAQ,aACR,WAAQ,WACR,WAAQ,IACR,WACA,aACA,QACA,GAAG,KACe;CAClB,IAAM,IAAY,IACd,2BACA,MAAU,UACR,4BACA,2BAEA,IAAqB,IAAQ,WAAW,MAAU,UAAU,UAAU,WACtE,IAAiB,KAAQ,MACzB,IAAkB,KAAS;AAEjC,QAAO,EAAU;EACf,gBAAgB;EAChB;EACA;EACA,OAAO;GAEL,MAAM,IAAS,KAAA,IAAY;GAC3B,GAAG;GACH,WAAW,EAAG,EAAmB;IAAE;IAAM;IAAO,CAAC,EAAE,GAAW,EAAU;GACxE,UACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;IACE,SAAS;IACT,MAAM;IACN,aAAA;IACA,WAAW,EACT,EAAsB,IACtB,EAAuB,GAAgB,GACxC;IACD,CAAA,EACF,kBAAC,QAAD;IACE,WAAW,EACT,qEACA,EAAc,GACf;IAEA;IACI,CAAA,CACN,EAAA,CAAA;GAEN;EACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`
|
|
1
|
+
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`react/jsx-runtime`);var n=(0,require(`class-variance-authority`).cva)(`aivex:flex aivex:w-full aivex:border aivex:bg-bg-primary aivex:transition-colors`,{variants:{state:{default:`aivex:border-border-default`,filled:`aivex:border-border-default`,focused:`aivex:border-border-brand aivex:shadow-[inset_0_0_0_1px_var(--aivex-border-brand)]`,error:`aivex:border-border-danger`,disabled:`aivex:border-border-disabled aivex:bg-bg-disabled aivex:opacity-disable aivex:pointer-events-none`},size:{sm:`aivex:rounded-sm`,md:`aivex:rounded-md`},layout:{inline:`aivex:items-center aivex:px-lg aivex:gap-xs`,block:`aivex:items-start aivex:px-lg aivex:gap-xs`,wrap:`aivex:flex-wrap aivex:items-center aivex:content-center aivex:px-md aivex:gap-xs`}},compoundVariants:[{layout:`inline`,size:`sm`,class:`aivex:h-8`},{layout:`inline`,size:`md`,class:`aivex:h-10`},{layout:`block`,size:`sm`,class:`aivex:py-xs aivex:min-h-8`},{layout:`block`,size:`md`,class:`aivex:py-lg aivex:min-h-10`},{layout:`wrap`,size:`sm`,class:`aivex:py-2xs aivex:min-h-8`},{layout:`wrap`,size:`md`,class:`aivex:py-2xs aivex:min-h-10`}],defaultVariants:{state:`default`,size:`md`,layout:`inline`}});function r({error:r,disabled:i,focused:a,filled:o,size:s=`md`,layout:c=`inline`,startContent:l,endContent:u,className:d,children:f}){let p=i?`disabled`:r?`error`:a?`focused`:o?`filled`:`default`,m=e.cn(`aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center aivex:gap-xs`,s===`sm`?`aivex:size-4 aivex:[&_svg]:size-4`:`aivex:size-5 aivex:[&_svg]:size-5`,p===`disabled`?`aivex:text-text-disabled`:p===`default`?`aivex:text-icon-tertiary`:`aivex:text-icon-secondary`);return(0,t.jsxs)(`div`,{className:e.cn(n({state:p,size:s,layout:c}),d),children:[l&&(0,t.jsx)(`span`,{className:m,children:l}),f,u&&(0,t.jsx)(`span`,{className:m,children:u})]})}exports.InputBase=r,exports.inputContainerVariants=n;
|
|
2
2
|
//# sourceMappingURL=InputBase.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBase.cjs","names":[],"sources":["../../../src/components/InputBase/InputBase.tsx"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n/** 인풋 컨테이너의 상태·크기·레이아웃 클래스를 만드는 cva 변형. 커스텀 입력의 외형만 맞출 때 쓴다. */\nconst inputContainerVariants = cva(\n \"aivex:flex aivex:w-full aivex:border aivex:bg-bg-primary aivex:transition-colors\",\n {\n variants: {\n state: {\n default: \"aivex:border-border-default\",\n filled: \"aivex:border-border-default\",\n focused:\n \"aivex:border-border-brand aivex:shadow-[inset_0_0_0_1px_var(--aivex-border-brand)]\",\n error: \"aivex:border-border-danger\",\n disabled:\n \"aivex:border-border-disabled aivex:bg-bg-disabled aivex:opacity-disable aivex:pointer-events-none\",\n },\n size: {\n sm: \"aivex:rounded-sm\",\n md: \"aivex:rounded-md\",\n },\n layout: {\n /** 단일 라인 인풋 (Input, Select): 고정 높이, 수평 정렬 */\n inline: \"aivex:items-center aivex:px-lg aivex:gap-xs\",\n /** 멀티 라인 인풋 (Textarea): 상단 정렬, 세로 패딩 */\n block: \"aivex:items-start aivex:px-lg aivex:gap-xs\",\n /** 태그 인풋 (Tagbox): 줄바꿈 가능, 내부 간격 */\n wrap: \"aivex:flex-wrap aivex:items-center aivex:content-center aivex:px-md aivex:gap-xs\",\n },\n },\n compoundVariants: [\n { layout: \"inline\", size: \"sm\", class: \"aivex:h-8\" },\n { layout: \"inline\", size: \"md\", class: \"aivex:h-10\" },\n { layout: \"block\", size: \"sm\", class: \"aivex:py-xs aivex:min-h-8\" },\n { layout: \"block\", size: \"md\", class: \"aivex:py-lg aivex:min-h-10\" },\n { layout: \"wrap\", size: \"sm\", class: \"aivex:py-2xs aivex:min-h-8\" },\n { layout: \"wrap\", size: \"md\", class: \"aivex:py-2xs aivex:min-h-10\" },\n ],\n defaultVariants: {\n state: \"default\",\n size: \"md\",\n layout: \"inline\",\n },\n },\n);\n\n/** 컨테이너 레이아웃: inline(단일 라인 고정 높이)·block(멀티 라인)·wrap(태그 줄바꿈). */\nexport type InputLayout = \"inline\" | \"block\" | \"wrap\";\n/** 컨테이너 시각 상태. 우선순위는 disabled > error > focused > filled > default. */\nexport type InputState = \"default\" | \"focused\" | \"error\" | \"disabled\" | \"filled\";\n\nexport interface InputBaseProps {\n /** 에러 테두리 표시 */\n error?: boolean;\n /** 비활성 스타일(클릭 차단 포함) */\n disabled?: boolean;\n /** 포커스 테두리 표시. 내부 입력 요소의 포커스를 호출자가 추적해 넘긴다 */\n focused?: boolean;\n /** 값이 채워진 상태(슬롯 아이콘 색에 반영) */\n filled?: boolean;\n /**\n * 크기. inline 레이아웃 기준 sm 32px·md 40px 높이\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /** @default \"inline\" */\n layout?: InputLayout;\n /** 인풋 컨테이너 왼쪽 슬롯 */\n startContent?: ReactNode;\n /** 인풋 컨테이너 오른쪽 슬롯 */\n endContent?: ReactNode;\n /** 인풋 컨테이너(border 박스)에 추가할 className */\n className?: string;\n /** 컨테이너 안에 렌더할 실제 입력 요소 */\n children: ReactNode;\n}\n\n/**\n * 인풋 컨테이너(border 박스) 프리미티브. 라벨/설명/에러는\n * Field(FieldLabel/FieldDescription/FieldError) 합성으로 조합한다.\n * 일반 입력은 Textbox·Textarea·Tagbox·SelectBox를 쓰고, 이들로 안 되는 커스텀 입력의 외형을 맞출 때만 직접 쓴다.\n * 상태를 스스로 추적하지 않으므로 focused/filled/error 등은 호출자가 계산해 넘긴다.\n *\n * @example\n * ```tsx\n * import { InputBase } from \"@aivex/ui\";\n *\n * const [focused, setFocused] = useState(false);\n *\n * <InputBase focused={focused} size=\"md\" layout=\"inline\">\n * <input\n * className=\"w-full bg-transparent outline-none\"\n * onFocus={() => setFocused(true)}\n * onBlur={() => setFocused(false)}\n * />\n * </InputBase>\n * ```\n */\nfunction InputBase({\n error,\n disabled,\n focused,\n filled,\n size = \"md\",\n layout = \"inline\",\n startContent,\n endContent,\n className,\n children,\n}: InputBaseProps) {\n const state: InputState = disabled\n ? \"disabled\"\n : error\n ? \"error\"\n : focused\n ? \"focused\"\n : filled\n ? \"filled\"\n : \"default\";\n\n const iconSlotClass = cn(\n \"aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center aivex:gap-xs\",\n size === \"sm\" ? \"aivex:size-4 aivex:[&_svg]:size-4\" : \"aivex:size-5 aivex:[&_svg]:size-5\",\n state === \"disabled\"\n ? \"aivex:text-text-disabled\"\n : state === \"default\"\n ? \"aivex:text-icon-tertiary\"\n : \"aivex:text-icon-secondary\",\n );\n\n return (\n <div className={cn(inputContainerVariants({ state, size, layout }), className)}>\n {startContent && <span className={iconSlotClass}>{startContent}</span>}\n {children}\n {endContent && <span className={iconSlotClass}>{endContent}</span>}\n </div>\n );\n}\n\nexport { InputBase, inputContainerVariants };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputBase.cjs","names":[],"sources":["../../../src/components/InputBase/InputBase.tsx"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n/** 인풋 컨테이너의 상태·크기·레이아웃 클래스를 만드는 cva 변형. 커스텀 입력의 외형만 맞출 때 쓴다. */\nconst inputContainerVariants = cva(\n \"aivex:flex aivex:w-full aivex:border aivex:bg-bg-primary aivex:transition-colors\",\n {\n variants: {\n state: {\n default: \"aivex:border-border-default\",\n filled: \"aivex:border-border-default\",\n focused:\n \"aivex:border-border-brand aivex:shadow-[inset_0_0_0_1px_var(--aivex-border-brand)]\",\n error: \"aivex:border-border-danger\",\n disabled:\n \"aivex:border-border-disabled aivex:bg-bg-disabled aivex:opacity-disable aivex:pointer-events-none\",\n },\n size: {\n sm: \"aivex:rounded-sm\",\n md: \"aivex:rounded-md\",\n },\n layout: {\n /** 단일 라인 인풋 (Input, Select): 고정 높이, 수평 정렬 */\n inline: \"aivex:items-center aivex:px-lg aivex:gap-xs\",\n /** 멀티 라인 인풋 (Textarea): 상단 정렬, 세로 패딩 */\n block: \"aivex:items-start aivex:px-lg aivex:gap-xs\",\n /** 태그 인풋 (Tagbox): 줄바꿈 가능, 내부 간격 */\n wrap: \"aivex:flex-wrap aivex:items-center aivex:content-center aivex:px-md aivex:gap-xs\",\n },\n },\n compoundVariants: [\n { layout: \"inline\", size: \"sm\", class: \"aivex:h-8\" },\n { layout: \"inline\", size: \"md\", class: \"aivex:h-10\" },\n { layout: \"block\", size: \"sm\", class: \"aivex:py-xs aivex:min-h-8\" },\n { layout: \"block\", size: \"md\", class: \"aivex:py-lg aivex:min-h-10\" },\n { layout: \"wrap\", size: \"sm\", class: \"aivex:py-2xs aivex:min-h-8\" },\n { layout: \"wrap\", size: \"md\", class: \"aivex:py-2xs aivex:min-h-10\" },\n ],\n defaultVariants: {\n state: \"default\",\n size: \"md\",\n layout: \"inline\",\n },\n },\n);\n\n/** 컨테이너 레이아웃: inline(단일 라인 고정 높이)·block(멀티 라인)·wrap(태그 줄바꿈). */\nexport type InputLayout = \"inline\" | \"block\" | \"wrap\";\n/** 컨테이너 시각 상태. 우선순위는 disabled > error > focused > filled > default. */\nexport type InputState = \"default\" | \"focused\" | \"error\" | \"disabled\" | \"filled\";\n\nexport interface InputBaseProps {\n /** 에러 테두리 표시 */\n error?: boolean;\n /** 비활성 스타일(클릭 차단 포함) */\n disabled?: boolean;\n /** 포커스 테두리 표시. 내부 입력 요소의 포커스를 호출자가 추적해 넘긴다 */\n focused?: boolean;\n /** 값이 채워진 상태(슬롯 아이콘 색에 반영) */\n filled?: boolean;\n /**\n * 크기. inline 레이아웃 기준 sm 32px·md 40px 높이\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /** @default \"inline\" */\n layout?: InputLayout;\n /** 인풋 컨테이너 왼쪽 슬롯 */\n startContent?: ReactNode;\n /** 인풋 컨테이너 오른쪽 슬롯 */\n endContent?: ReactNode;\n /** 인풋 컨테이너(border 박스)에 추가할 className */\n className?: string;\n /** 컨테이너 안에 렌더할 실제 입력 요소 */\n children: ReactNode;\n}\n\n/**\n * 인풋 컨테이너(border 박스) 프리미티브. 라벨/설명/에러는\n * Field(FieldLabel/FieldDescription/FieldError) 합성으로 조합한다.\n * 일반 입력은 Textbox·Textarea·Tagbox·SelectBox를 쓰고, 이들로 안 되는 커스텀 입력의 외형을 맞출 때만 직접 쓴다.\n * 상태를 스스로 추적하지 않으므로 focused/filled/error 등은 호출자가 계산해 넘긴다.\n *\n * @example\n * ```tsx\n * import { InputBase } from \"@aivex/ui\";\n *\n * const [focused, setFocused] = useState(false);\n *\n * <InputBase focused={focused} size=\"md\" layout=\"inline\">\n * <input\n * className=\"w-full bg-transparent outline-none\"\n * onFocus={() => setFocused(true)}\n * onBlur={() => setFocused(false)}\n * />\n * </InputBase>\n * ```\n */\nfunction InputBase({\n error,\n disabled,\n focused,\n filled,\n size = \"md\",\n layout = \"inline\",\n startContent,\n endContent,\n className,\n children,\n}: InputBaseProps) {\n const state: InputState = disabled\n ? \"disabled\"\n : error\n ? \"error\"\n : focused\n ? \"focused\"\n : filled\n ? \"filled\"\n : \"default\";\n\n const iconSlotClass = cn(\n \"aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center aivex:gap-xs\",\n size === \"sm\" ? \"aivex:size-4 aivex:[&_svg]:size-4\" : \"aivex:size-5 aivex:[&_svg]:size-5\",\n state === \"disabled\"\n ? \"aivex:text-text-disabled\"\n : state === \"default\"\n ? \"aivex:text-icon-tertiary\"\n : \"aivex:text-icon-secondary\",\n );\n\n return (\n <div className={cn(inputContainerVariants({ state, size, layout }), className)}>\n {startContent && <span className={iconSlotClass}>{startContent}</span>}\n {children}\n {endContent && <span className={iconSlotClass}>{endContent}</span>}\n </div>\n );\n}\n\nexport { InputBase, inputContainerVariants };\n"],"mappings":"mIAKA,IAAM,GAAA,sCAAA,KACJ,mFACA,CACE,SAAU,CACR,MAAO,CACL,QAAS,8BACT,OAAQ,8BACR,QACE,qFACF,MAAO,6BACP,SACE,oGACH,CACD,KAAM,CACJ,GAAI,mBACJ,GAAI,mBACL,CACD,OAAQ,CAEN,OAAQ,8CAER,MAAO,6CAEP,KAAM,mFACP,CACF,CACD,iBAAkB,CAChB,CAAE,OAAQ,SAAU,KAAM,KAAM,MAAO,YAAa,CACpD,CAAE,OAAQ,SAAU,KAAM,KAAM,MAAO,aAAc,CACrD,CAAE,OAAQ,QAAS,KAAM,KAAM,MAAO,4BAA6B,CACnE,CAAE,OAAQ,QAAS,KAAM,KAAM,MAAO,6BAA8B,CACpE,CAAE,OAAQ,OAAQ,KAAM,KAAM,MAAO,6BAA8B,CACnE,CAAE,OAAQ,OAAQ,KAAM,KAAM,MAAO,8BAA+B,CACrE,CACD,gBAAiB,CACf,MAAO,UACP,KAAM,KACN,OAAQ,SACT,CACF,CACF,CAsDD,SAAS,EAAU,CACjB,QACA,WACA,UACA,SACA,OAAO,KACP,SAAS,SACT,eACA,aACA,YACA,YACiB,CACjB,IAAM,EAAoB,EACtB,WACA,EACE,QACA,EACE,UACA,EACE,SACA,UAEJ,EAAgB,EAAA,GACpB,iFACA,IAAS,KAAO,oCAAsC,oCACtD,IAAU,WACN,2BACA,IAAU,UACR,2BACA,4BACP,CAED,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,GAAG,EAAuB,CAAE,QAAO,OAAM,SAAQ,CAAC,CAAE,EAAU,UAA9E,CACG,IAAgB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,WAAgB,EAAoB,CAAA,CACrE,EACA,IAAc,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,WAAgB,EAAkB,CAAA,CAC9D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { cva as r } from "class-variance-authority";
|
|
5
5
|
//#region src/components/InputBase/InputBase.tsx
|
|
6
|
-
var i =
|
|
6
|
+
var i = r("aivex:flex aivex:w-full aivex:border aivex:bg-bg-primary aivex:transition-colors", {
|
|
7
7
|
variants: {
|
|
8
8
|
state: {
|
|
9
9
|
default: "aivex:border-border-default",
|
|
@@ -60,21 +60,21 @@ var i = t("aivex:flex aivex:w-full aivex:border aivex:bg-bg-primary aivex:transi
|
|
|
60
60
|
layout: "inline"
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
function a({ error:
|
|
64
|
-
let m = a ? "disabled" :
|
|
65
|
-
return /* @__PURE__ */
|
|
63
|
+
function a({ error: r, disabled: a, focused: o, filled: s, size: c = "md", layout: l = "inline", startContent: u, endContent: d, className: f, children: p }) {
|
|
64
|
+
let m = a ? "disabled" : r ? "error" : o ? "focused" : s ? "filled" : "default", h = e("aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center aivex:gap-xs", c === "sm" ? "aivex:size-4 aivex:[&_svg]:size-4" : "aivex:size-5 aivex:[&_svg]:size-5", m === "disabled" ? "aivex:text-text-disabled" : m === "default" ? "aivex:text-icon-tertiary" : "aivex:text-icon-secondary");
|
|
65
|
+
return /* @__PURE__ */ n("div", {
|
|
66
66
|
className: e(i({
|
|
67
67
|
state: m,
|
|
68
68
|
size: c,
|
|
69
69
|
layout: l
|
|
70
70
|
}), f),
|
|
71
71
|
children: [
|
|
72
|
-
u && /* @__PURE__ */
|
|
72
|
+
u && /* @__PURE__ */ t("span", {
|
|
73
73
|
className: h,
|
|
74
74
|
children: u
|
|
75
75
|
}),
|
|
76
76
|
p,
|
|
77
|
-
d && /* @__PURE__ */
|
|
77
|
+
d && /* @__PURE__ */ t("span", {
|
|
78
78
|
className: h,
|
|
79
79
|
children: d
|
|
80
80
|
})
|