@aivex/ui 1.2.0-dev.6 → 1.2.0-dev.61
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 +195 -1
- package/dist/DESIGN.md +241 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/comment.cjs +1 -114
- package/dist/comment.js +4 -13623
- 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/Autocomplete/Autocomplete.cjs +2 -0
- package/dist/components/Autocomplete/Autocomplete.cjs.map +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.cts +157 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +157 -0
- package/dist/components/Autocomplete/Autocomplete.js +192 -0
- package/dist/components/Autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/Autocomplete/index.d.cts +2 -0
- package/dist/components/Autocomplete/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.cjs +2 -0
- package/dist/components/Avatar/Avatar.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.d.cts +42 -0
- package/dist/components/Avatar/Avatar.d.ts +26 -4
- package/dist/components/Avatar/Avatar.js +107 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/index.d.cts +2 -0
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Badge/Badge.cjs +2 -0
- package/dist/components/Badge/Badge.cjs.map +1 -0
- package/dist/components/Badge/Badge.d.cts +93 -0
- package/dist/components/Badge/Badge.d.ts +66 -1
- package/dist/components/Badge/Badge.js +232 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/index.d.cts +2 -0
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/BreadCrumb/BreadCrumb.cjs +2 -0
- package/dist/components/BreadCrumb/BreadCrumb.cjs.map +1 -0
- package/dist/components/BreadCrumb/BreadCrumb.d.cts +57 -0
- package/dist/components/BreadCrumb/BreadCrumb.d.ts +34 -2
- package/dist/components/BreadCrumb/BreadCrumb.js +98 -0
- package/dist/components/BreadCrumb/BreadCrumb.js.map +1 -0
- package/dist/components/BreadCrumb/index.d.cts +2 -0
- package/dist/components/BreadCrumb/index.d.ts +2 -2
- package/dist/components/Button/Button.cjs +2 -0
- package/dist/components/Button/Button.cjs.map +1 -0
- package/dist/components/Button/Button.d.cts +51 -0
- package/dist/components/Button/Button.d.ts +33 -2
- package/dist/components/Button/Button.js +127 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/index.d.cts +2 -0
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Calendar/Calendar.cjs +2 -0
- package/dist/components/Calendar/Calendar.cjs.map +1 -0
- package/dist/components/Calendar/Calendar.d.cts +81 -0
- package/dist/components/Calendar/Calendar.d.ts +81 -0
- package/dist/components/Calendar/Calendar.js +150 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Calendar/date.cjs +2 -0
- package/dist/components/Calendar/date.cjs.map +1 -0
- package/dist/components/Calendar/date.d.cts +35 -0
- package/dist/components/Calendar/date.d.ts +35 -0
- package/dist/components/Calendar/date.js +54 -0
- package/dist/components/Calendar/date.js.map +1 -0
- package/dist/components/Calendar/index.d.cts +2 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/Card.cjs +2 -0
- package/dist/components/Card/Card.cjs.map +1 -0
- package/dist/components/Card/Card.d.cts +47 -0
- package/dist/components/Card/Card.d.ts +38 -6
- package/dist/components/Card/Card.js +33 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/index.d.cts +2 -0
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.cjs +2 -0
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.cts +36 -0
- package/dist/components/Checkbox/Checkbox.d.ts +30 -7
- package/dist/components/Checkbox/Checkbox.js +49 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/ChipsCheckbox.cjs +2 -0
- package/dist/components/Checkbox/ChipsCheckbox.cjs.map +1 -0
- package/dist/components/Checkbox/ChipsCheckbox.d.cts +26 -0
- package/dist/components/Checkbox/ChipsCheckbox.d.ts +24 -5
- package/dist/components/Checkbox/ChipsCheckbox.js +27 -0
- package/dist/components/Checkbox/ChipsCheckbox.js.map +1 -0
- package/dist/components/Checkbox/index.d.cts +4 -0
- package/dist/components/Checkbox/index.d.ts +4 -4
- package/dist/components/Coachmark/Coachmark.cjs +2 -0
- package/dist/components/Coachmark/Coachmark.cjs.map +1 -0
- package/dist/components/Coachmark/Coachmark.d.cts +92 -0
- package/dist/components/Coachmark/Coachmark.d.ts +58 -20
- package/dist/components/Coachmark/Coachmark.js +110 -0
- package/dist/components/Coachmark/Coachmark.js.map +1 -0
- package/dist/components/Coachmark/index.d.cts +2 -0
- package/dist/components/Coachmark/index.d.ts +2 -2
- package/dist/components/Comment/CommentInput.cjs +2 -0
- package/dist/components/Comment/CommentInput.cjs.map +1 -0
- package/dist/components/Comment/CommentInput.d.cts +75 -0
- package/dist/components/Comment/CommentInput.d.ts +51 -6
- package/dist/components/Comment/CommentInput.js +76 -0
- package/dist/components/Comment/CommentInput.js.map +1 -0
- package/dist/components/Comment/CommentPin.cjs +2 -0
- package/dist/components/Comment/CommentPin.cjs.map +1 -0
- package/dist/components/Comment/CommentPin.d.cts +48 -0
- package/dist/components/Comment/CommentPin.d.ts +35 -4
- package/dist/components/Comment/CommentPin.js +40 -0
- package/dist/components/Comment/CommentPin.js.map +1 -0
- package/dist/components/Comment/MentionInput.cjs +2 -0
- package/dist/components/Comment/MentionInput.cjs.map +1 -0
- package/dist/components/Comment/MentionInput.d.cts +45 -0
- package/dist/components/Comment/MentionInput.d.ts +19 -4
- package/dist/components/Comment/MentionInput.js +93 -0
- package/dist/components/Comment/MentionInput.js.map +1 -0
- package/dist/components/Comment/MentionList.cjs +2 -0
- package/dist/components/Comment/MentionList.cjs.map +1 -0
- package/dist/components/Comment/MentionList.d.cts +19 -0
- package/dist/components/Comment/MentionList.d.ts +9 -4
- package/dist/components/Comment/MentionList.js +97 -0
- package/dist/components/Comment/MentionList.js.map +1 -0
- package/dist/components/Comment/index.d.cts +4 -0
- package/dist/components/Comment/index.d.ts +4 -4
- package/dist/components/Comment/mentionContent.cjs +5 -0
- package/dist/components/Comment/mentionContent.cjs.map +1 -0
- package/dist/components/Comment/mentionContent.d.cts +5 -0
- package/dist/components/Comment/mentionContent.d.ts +5 -0
- package/dist/components/Comment/mentionContent.js +40 -0
- package/dist/components/Comment/mentionContent.js.map +1 -0
- package/dist/components/Comment/types.d.cts +16 -0
- package/dist/components/Comment/types.d.ts +6 -2
- package/dist/components/Comment/useMentionSuggestion.cjs +2 -0
- package/dist/components/Comment/useMentionSuggestion.cjs.map +1 -0
- package/dist/components/Comment/useMentionSuggestion.d.cts +19 -0
- package/dist/components/Comment/useMentionSuggestion.d.ts +6 -2
- package/dist/components/Comment/useMentionSuggestion.js +78 -0
- package/dist/components/Comment/useMentionSuggestion.js.map +1 -0
- 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 +2 -0
- package/dist/components/DataGrid/DataGrid.cjs.map +1 -0
- package/dist/components/DataGrid/DataGrid.d.cts +136 -0
- package/dist/components/DataGrid/DataGrid.d.ts +114 -70
- package/dist/components/DataGrid/DataGrid.js +188 -0
- package/dist/components/DataGrid/DataGrid.js.map +1 -0
- package/dist/components/DataGrid/DataGridColumnSettings.cjs +2 -0
- package/dist/components/DataGrid/DataGridColumnSettings.cjs.map +1 -0
- package/dist/components/DataGrid/DataGridColumnSettings.d.cts +41 -0
- package/dist/components/DataGrid/DataGridColumnSettings.d.ts +41 -0
- package/dist/components/DataGrid/DataGridColumnSettings.js +199 -0
- package/dist/components/DataGrid/DataGridColumnSettings.js.map +1 -0
- package/dist/components/DataGrid/DataGridPrimitives.cjs +2 -0
- package/dist/components/DataGrid/DataGridPrimitives.cjs.map +1 -0
- package/dist/components/DataGrid/DataGridPrimitives.d.cts +165 -0
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +165 -0
- package/dist/components/DataGrid/DataGridPrimitives.js +141 -0
- package/dist/components/DataGrid/DataGridPrimitives.js.map +1 -0
- package/dist/components/DataGrid/DataGridRows.cjs +2 -0
- package/dist/components/DataGrid/DataGridRows.cjs.map +1 -0
- package/dist/components/DataGrid/DataGridRows.d.cts +66 -0
- package/dist/components/DataGrid/DataGridRows.d.ts +66 -0
- package/dist/components/DataGrid/DataGridRows.js +108 -0
- package/dist/components/DataGrid/DataGridRows.js.map +1 -0
- package/dist/components/DataGrid/index.d.cts +8 -0
- package/dist/components/DataGrid/index.d.ts +6 -2
- package/dist/components/DataGrid/index.js +6 -0
- package/dist/components/Dialog/Dialog.cjs +2 -0
- package/dist/components/Dialog/Dialog.cjs.map +1 -0
- package/dist/components/Dialog/Dialog.d.cts +77 -0
- package/dist/components/Dialog/Dialog.d.ts +63 -6
- package/dist/components/Dialog/Dialog.js +109 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/index.d.cts +2 -0
- package/dist/components/Dialog/index.d.ts +2 -2
- package/dist/components/Divider/Divider.cjs +2 -0
- package/dist/components/Divider/Divider.cjs.map +1 -0
- package/dist/components/Divider/Divider.d.cts +30 -0
- package/dist/components/Divider/Divider.d.ts +19 -0
- package/dist/components/Divider/Divider.js +58 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Divider/index.d.cts +2 -0
- package/dist/components/Divider/index.d.ts +2 -2
- package/dist/components/DraggableScroll/DraggableScroll.cjs +2 -0
- package/dist/components/DraggableScroll/DraggableScroll.cjs.map +1 -0
- package/dist/components/DraggableScroll/DraggableScroll.d.cts +47 -0
- package/dist/components/DraggableScroll/DraggableScroll.d.ts +38 -2
- package/dist/components/DraggableScroll/DraggableScroll.js +45 -0
- package/dist/components/DraggableScroll/DraggableScroll.js.map +1 -0
- package/dist/components/DraggableScroll/index.d.cts +2 -0
- package/dist/components/DraggableScroll/index.d.ts +2 -2
- package/dist/components/Drawer/Drawer.cjs +2 -0
- package/dist/components/Drawer/Drawer.cjs.map +1 -0
- package/dist/components/Drawer/Drawer.d.cts +161 -0
- package/dist/components/Drawer/Drawer.d.ts +161 -0
- package/dist/components/Drawer/Drawer.js +110 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/index.d.cts +2 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- 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 +2 -0
- package/dist/components/Field/Field.cjs.map +1 -0
- package/dist/components/Field/Field.d.cts +111 -0
- package/dist/components/Field/Field.d.ts +85 -20
- package/dist/components/Field/Field.js +78 -0
- package/dist/components/Field/Field.js.map +1 -0
- 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/Field/index.d.cts +1 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/FilterModal/FilterModal.cjs +2 -0
- package/dist/components/FilterModal/FilterModal.cjs.map +1 -0
- package/dist/components/FilterModal/FilterModal.d.cts +83 -0
- package/dist/components/FilterModal/FilterModal.d.ts +52 -1
- package/dist/components/FilterModal/FilterModal.js +120 -0
- package/dist/components/FilterModal/FilterModal.js.map +1 -0
- package/dist/components/FilterModal/index.d.cts +2 -0
- package/dist/components/FilterModal/index.d.ts +2 -2
- 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 +2 -0
- package/dist/components/Icon/index.cjs.map +1 -0
- package/dist/components/Icon/index.d.cts +2105 -0
- package/dist/components/Icon/index.d.ts +2093 -275
- package/dist/components/Icon/index.js +4490 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Icon/svgA11y.cjs +2 -0
- package/dist/components/Icon/svgA11y.cjs.map +1 -0
- package/dist/components/Icon/svgA11y.d.cts +10 -0
- package/dist/components/Icon/svgA11y.d.ts +10 -0
- package/dist/components/Icon/svgA11y.js +9 -0
- package/dist/components/Icon/svgA11y.js.map +1 -0
- package/dist/components/Icon/uniqueSvgIds.cjs +2 -0
- package/dist/components/Icon/uniqueSvgIds.cjs.map +1 -0
- package/dist/components/Icon/uniqueSvgIds.d.cts +8 -0
- package/dist/components/Icon/uniqueSvgIds.d.ts +8 -0
- package/dist/components/Icon/uniqueSvgIds.js +42 -0
- package/dist/components/Icon/uniqueSvgIds.js.map +1 -0
- package/dist/components/IconButton/IconButton.cjs +2 -0
- package/dist/components/IconButton/IconButton.cjs.map +1 -0
- package/dist/components/IconButton/IconButton.d.cts +46 -0
- package/dist/components/IconButton/IconButton.d.ts +33 -4
- package/dist/components/IconButton/IconButton.js +74 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconButton/index.d.cts +2 -0
- package/dist/components/IconButton/index.d.ts +2 -2
- package/dist/components/Illustration/Illustration.cjs +2 -0
- package/dist/components/Illustration/Illustration.cjs.map +1 -0
- package/dist/components/Illustration/Illustration.d.cts +37 -0
- package/dist/components/Illustration/Illustration.d.ts +37 -0
- package/dist/components/Illustration/Illustration.js +40 -0
- package/dist/components/Illustration/Illustration.js.map +1 -0
- package/dist/components/Illustration/assets/box-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/box-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/box-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/box-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/box-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/box-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/box-light.webp.js +7 -0
- package/dist/components/Illustration/assets/box-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/equipment-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/equipment-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/equipment-light.webp.js +7 -0
- package/dist/components/Illustration/assets/equipment-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/failed-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/failed-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/failed-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/failed-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/failed-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/failed-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/failed-light.webp.js +7 -0
- package/dist/components/Illustration/assets/failed-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/file-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/file-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/file-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/file-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/file-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/file-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/file-light.webp.js +7 -0
- package/dist/components/Illustration/assets/file-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/images-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/images-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/images-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/images-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/images-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/images-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/images-light.webp.js +7 -0
- package/dist/components/Illustration/assets/images-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/letter-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/letter-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/letter-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/letter-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/letter-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/letter-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/letter-light.webp.js +7 -0
- package/dist/components/Illustration/assets/letter-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/message-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/message-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/message-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/message-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/message-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/message-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/message-light.webp.js +7 -0
- package/dist/components/Illustration/assets/message-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/network-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/network-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/network-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/network-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/network-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/network-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/network-light.webp.js +7 -0
- package/dist/components/Illustration/assets/network-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/no-data-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/no-data-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/no-data-light.webp.js +7 -0
- package/dist/components/Illustration/assets/no-data-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/paper-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/paper-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/paper-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/paper-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/paper-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/paper-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/paper-light.webp.js +7 -0
- package/dist/components/Illustration/assets/paper-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/success-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/success-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/success-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/success-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/success-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/success-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/success-light.webp.js +7 -0
- package/dist/components/Illustration/assets/success-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/warning-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/warning-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/warning-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/warning-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/warning-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/warning-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/warning-light.webp.js +7 -0
- package/dist/components/Illustration/assets/warning-light.webp.js.map +1 -0
- package/dist/components/Illustration/illustrations.cjs +2 -0
- package/dist/components/Illustration/illustrations.cjs.map +1 -0
- package/dist/components/Illustration/illustrations.d.cts +81 -0
- package/dist/components/Illustration/illustrations.d.ts +81 -0
- package/dist/components/Illustration/illustrations.js +104 -0
- package/dist/components/Illustration/illustrations.js.map +1 -0
- package/dist/components/Illustration/index.d.cts +1 -0
- package/dist/components/Illustration/index.d.ts +1 -0
- package/dist/components/InputBase/InputBase.cjs +2 -0
- package/dist/components/InputBase/InputBase.cjs.map +1 -0
- package/dist/components/InputBase/InputBase.d.cts +59 -0
- package/dist/components/InputBase/InputBase.d.ts +35 -7
- package/dist/components/InputBase/InputBase.js +87 -0
- package/dist/components/InputBase/InputBase.js.map +1 -0
- package/dist/components/InputBase/index.d.cts +1 -0
- package/dist/components/InputBase/index.d.ts +1 -1
- package/dist/components/InputBase/useInputState.cjs +2 -0
- package/dist/components/InputBase/useInputState.cjs.map +1 -0
- package/dist/components/InputBase/useInputState.d.cts +19 -0
- package/dist/components/InputBase/useInputState.d.ts +19 -0
- package/dist/components/InputBase/useInputState.js +25 -0
- package/dist/components/InputBase/useInputState.js.map +1 -0
- package/dist/components/InteractionLayer/InteractionLayer.cjs +2 -0
- package/dist/components/InteractionLayer/InteractionLayer.cjs.map +1 -0
- package/dist/components/InteractionLayer/InteractionLayer.d.cts +43 -0
- package/dist/components/InteractionLayer/InteractionLayer.d.ts +34 -0
- package/dist/components/InteractionLayer/InteractionLayer.js +17 -0
- package/dist/components/InteractionLayer/InteractionLayer.js.map +1 -0
- package/dist/components/InteractionLayer/index.d.cts +1 -0
- package/dist/components/InteractionLayer/index.d.ts +1 -1
- package/dist/components/Logo/index.cjs +2 -0
- package/dist/components/Logo/index.cjs.map +1 -0
- package/dist/components/Logo/index.d.cts +92 -0
- package/dist/components/Logo/index.d.ts +88 -13
- package/dist/components/Logo/index.js +1949 -0
- package/dist/components/Logo/index.js.map +1 -0
- package/dist/components/Menu/Menu.cjs +2 -0
- package/dist/components/Menu/Menu.cjs.map +1 -0
- package/dist/components/Menu/Menu.d.cts +183 -0
- package/dist/components/Menu/Menu.d.ts +126 -27
- package/dist/components/Menu/Menu.js +216 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/index.d.cts +2 -0
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Messagebox/Messagebox.cjs +2 -0
- package/dist/components/Messagebox/Messagebox.cjs.map +1 -0
- package/dist/components/Messagebox/Messagebox.d.cts +50 -0
- package/dist/components/Messagebox/Messagebox.d.ts +39 -3
- package/dist/components/Messagebox/Messagebox.js +84 -0
- package/dist/components/Messagebox/Messagebox.js.map +1 -0
- package/dist/components/Messagebox/index.d.cts +2 -0
- package/dist/components/Messagebox/index.d.ts +2 -2
- package/dist/components/Modal/Modal.cjs +2 -0
- package/dist/components/Modal/Modal.cjs.map +1 -0
- package/dist/components/Modal/Modal.d.cts +161 -0
- package/dist/components/Modal/Modal.d.ts +131 -7
- package/dist/components/Modal/Modal.js +195 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/ModalBase.cjs +2 -0
- package/dist/components/Modal/ModalBase.cjs.map +1 -0
- package/dist/components/Modal/ModalBase.d.cts +80 -0
- package/dist/components/Modal/ModalBase.d.ts +80 -0
- package/dist/components/Modal/ModalBase.js +44 -0
- package/dist/components/Modal/ModalBase.js.map +1 -0
- package/dist/components/Modal/index.d.cts +4 -0
- package/dist/components/Modal/index.d.ts +4 -2
- package/dist/components/Nav/Nav.cjs +2 -0
- package/dist/components/Nav/Nav.cjs.map +1 -0
- package/dist/components/Nav/Nav.d.cts +69 -0
- package/dist/components/Nav/Nav.d.ts +46 -0
- package/dist/components/Nav/Nav.js +73 -0
- package/dist/components/Nav/Nav.js.map +1 -0
- package/dist/components/Nav/index.d.cts +2 -0
- package/dist/components/Nav/index.d.ts +2 -2
- 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 +2 -0
- package/dist/components/Overlay/Overlay.cjs.map +1 -0
- package/dist/components/Overlay/Overlay.d.cts +36 -0
- package/dist/components/Overlay/Overlay.d.ts +30 -4
- package/dist/components/Overlay/Overlay.js +24 -0
- package/dist/components/Overlay/Overlay.js.map +1 -0
- package/dist/components/Overlay/index.d.cts +2 -0
- package/dist/components/Overlay/index.d.ts +2 -2
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.d.cts +68 -0
- package/dist/components/Pagination/Pagination.d.ts +45 -2
- package/dist/components/Pagination/Pagination.js +127 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/index.d.cts +2 -0
- package/dist/components/Pagination/index.d.ts +2 -2
- package/dist/components/Panel/Panel.cjs +2 -0
- package/dist/components/Panel/Panel.cjs.map +1 -0
- package/dist/components/Panel/Panel.d.cts +124 -0
- package/dist/components/Panel/Panel.d.ts +119 -8
- package/dist/components/Panel/Panel.js +92 -0
- package/dist/components/Panel/Panel.js.map +1 -0
- package/dist/components/Panel/index.d.cts +2 -0
- package/dist/components/Panel/index.d.ts +2 -2
- package/dist/components/Popover/Popover.cjs +2 -0
- package/dist/components/Popover/Popover.cjs.map +1 -0
- package/dist/components/Popover/Popover.d.cts +105 -0
- package/dist/components/Popover/Popover.d.ts +72 -14
- package/dist/components/Popover/Popover.js +79 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Popover/index.d.cts +2 -0
- package/dist/components/Popover/index.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.cjs +2 -0
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.cts +45 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +32 -0
- package/dist/components/ProgressBar/ProgressBar.js +41 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/ProgressBar/index.d.cts +2 -0
- package/dist/components/ProgressBar/index.d.ts +2 -2
- package/dist/components/Radio/Radio.cjs +2 -0
- package/dist/components/Radio/Radio.cjs.map +1 -0
- package/dist/components/Radio/Radio.d.cts +61 -0
- package/dist/components/Radio/Radio.d.ts +56 -6
- package/dist/components/Radio/Radio.js +62 -0
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/Radio/index.d.cts +2 -0
- package/dist/components/Radio/index.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.cjs +2 -0
- package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.cts +59 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +51 -6
- package/dist/components/ScrollArea/ScrollArea.js +62 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/components/ScrollArea/index.d.cts +2 -0
- package/dist/components/ScrollArea/index.d.ts +2 -2
- package/dist/components/Segmented/Segmented.cjs +2 -0
- package/dist/components/Segmented/Segmented.cjs.map +1 -0
- package/dist/components/Segmented/Segmented.d.cts +56 -0
- package/dist/components/Segmented/Segmented.d.ts +45 -4
- package/dist/components/Segmented/Segmented.js +61 -0
- package/dist/components/Segmented/Segmented.js.map +1 -0
- package/dist/components/Segmented/index.d.cts +2 -0
- package/dist/components/Segmented/index.d.ts +2 -2
- package/dist/components/SelectBox/SelectBox.cjs +2 -0
- package/dist/components/SelectBox/SelectBox.cjs.map +1 -0
- package/dist/components/SelectBox/SelectBox.d.cts +93 -0
- package/dist/components/SelectBox/SelectBox.d.ts +62 -5
- package/dist/components/SelectBox/SelectBox.js +85 -0
- package/dist/components/SelectBox/SelectBox.js.map +1 -0
- package/dist/components/SelectBox/index.d.cts +2 -0
- package/dist/components/SelectBox/index.d.ts +2 -2
- package/dist/components/SelectButton/SelectButton.cjs +2 -0
- package/dist/components/SelectButton/SelectButton.cjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.d.cts +57 -0
- package/dist/components/SelectButton/SelectButton.d.ts +57 -0
- package/dist/components/SelectButton/SelectButton.js +43 -0
- package/dist/components/SelectButton/SelectButton.js.map +1 -0
- package/dist/components/SelectButton/index.d.cts +2 -0
- package/dist/components/SelectButton/index.d.ts +2 -0
- package/dist/components/ShapeEditor/ShapeEditor.cjs +2 -0
- package/dist/components/ShapeEditor/ShapeEditor.cjs.map +1 -0
- package/dist/components/ShapeEditor/ShapeEditor.d.cts +40 -0
- package/dist/components/ShapeEditor/ShapeEditor.d.ts +38 -7
- package/dist/components/ShapeEditor/ShapeEditor.js +564 -0
- package/dist/components/ShapeEditor/ShapeEditor.js.map +1 -0
- package/dist/components/ShapeEditor/ShapeViewer.cjs +2 -0
- package/dist/components/ShapeEditor/ShapeViewer.cjs.map +1 -0
- package/dist/components/ShapeEditor/ShapeViewer.d.cts +92 -0
- package/dist/components/ShapeEditor/ShapeViewer.d.ts +57 -7
- package/dist/components/ShapeEditor/ShapeViewer.js +303 -0
- package/dist/components/ShapeEditor/ShapeViewer.js.map +1 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.cjs +2 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.d.cts +17 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.d.ts +2 -2
- package/dist/components/ShapeEditor/_components/AssistantOverlay.js +64 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.js.map +1 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.cjs +2 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.d.cts +13 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +3 -3
- package/dist/components/ShapeEditor/_components/ContextMenu.js +67 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.js.map +1 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.cjs +2 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.d.cts +8 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.js +56 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.js.map +1 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.cjs +2 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.cts +17 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +9 -3
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.js +101 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.js.map +1 -0
- package/dist/components/ShapeEditor/_components/Minimap.cjs +2 -0
- package/dist/components/ShapeEditor/_components/Minimap.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/Minimap.d.cts +46 -0
- package/dist/components/ShapeEditor/_components/Minimap.d.ts +17 -16
- package/dist/components/ShapeEditor/_components/Minimap.js +172 -0
- package/dist/components/ShapeEditor/_components/Minimap.js.map +1 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.cjs +2 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.d.cts +6 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +3 -3
- package/dist/components/ShapeEditor/_components/MinimapShape.js +55 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.js.map +1 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.cjs +2 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.d.cts +16 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.d.ts +16 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.js +41 -0
- package/dist/components/ShapeEditor/_components/OverlayMarkers.js.map +1 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.cjs +2 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.d.cts +21 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/RegionOverlay.js +59 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.js.map +1 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.cjs +2 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.cts +20 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +10 -3
- package/dist/components/ShapeEditor/_components/SelectionInfo.js +115 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.js.map +1 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.cjs +2 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.cjs.map +1 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.cts +28 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +18 -5
- package/dist/components/ShapeEditor/_components/SettingsPanel.js +167 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.js.map +1 -0
- package/dist/components/ShapeEditor/_constants.cjs +2 -0
- package/dist/components/ShapeEditor/_constants.cjs.map +1 -0
- package/dist/components/ShapeEditor/_constants.d.cts +15 -0
- package/dist/components/ShapeEditor/_constants.d.ts +7 -25
- package/dist/components/ShapeEditor/_constants.js +7 -0
- package/dist/components/ShapeEditor/_constants.js.map +1 -0
- package/dist/components/ShapeEditor/_model/brush.cjs +2 -0
- package/dist/components/ShapeEditor/_model/brush.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/brush.d.cts +3 -0
- package/dist/components/ShapeEditor/_model/brush.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/brush.js +27 -0
- package/dist/components/ShapeEditor/_model/brush.js.map +1 -0
- package/dist/components/ShapeEditor/_model/clipboard.cjs +2 -0
- package/dist/components/ShapeEditor/_model/clipboard.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/clipboard.d.cts +22 -0
- package/dist/components/ShapeEditor/_model/clipboard.d.ts +22 -0
- package/dist/components/ShapeEditor/_model/clipboard.js +85 -0
- package/dist/components/ShapeEditor/_model/clipboard.js.map +1 -0
- package/dist/components/ShapeEditor/_model/cursors.cjs +2 -0
- package/dist/components/ShapeEditor/_model/cursors.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/cursors.d.cts +23 -0
- package/dist/components/ShapeEditor/_model/cursors.d.ts +7 -2
- package/dist/components/ShapeEditor/_model/cursors.js +52 -0
- package/dist/components/ShapeEditor/_model/cursors.js.map +1 -0
- package/dist/components/ShapeEditor/_model/geometry.cjs +2 -0
- package/dist/components/ShapeEditor/_model/geometry.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/geometry.d.cts +182 -0
- package/dist/components/ShapeEditor/_model/geometry.d.ts +54 -2
- package/dist/components/ShapeEditor/_model/geometry.js +431 -0
- package/dist/components/ShapeEditor/_model/geometry.js.map +1 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.cjs +2 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.cts +38 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.ts +38 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.js +358 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.js.map +1 -0
- package/dist/components/ShapeEditor/_model/imageLoad.cjs +2 -0
- package/dist/components/ShapeEditor/_model/imageLoad.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/imageLoad.d.cts +29 -0
- package/dist/components/ShapeEditor/_model/imageLoad.d.ts +29 -0
- package/dist/components/ShapeEditor/_model/imageLoad.js +88 -0
- package/dist/components/ShapeEditor/_model/imageLoad.js.map +1 -0
- package/dist/components/ShapeEditor/_model/imageSignature.cjs +2 -0
- package/dist/components/ShapeEditor/_model/imageSignature.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/imageSignature.d.cts +18 -0
- package/dist/components/ShapeEditor/_model/imageSignature.d.ts +18 -0
- package/dist/components/ShapeEditor/_model/imageSignature.js +196 -0
- package/dist/components/ShapeEditor/_model/imageSignature.js.map +1 -0
- package/dist/components/ShapeEditor/_model/imageTiles.cjs +2 -0
- package/dist/components/ShapeEditor/_model/imageTiles.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/imageTiles.d.cts +11 -0
- package/dist/components/ShapeEditor/_model/imageTiles.js +28 -0
- package/dist/components/ShapeEditor/_model/imageTiles.js.map +1 -0
- package/dist/components/ShapeEditor/_model/keymap.cjs +2 -0
- package/dist/components/ShapeEditor/_model/keymap.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/keymap.d.cts +17 -0
- package/dist/components/ShapeEditor/_model/keymap.d.ts +2 -0
- package/dist/components/ShapeEditor/_model/keymap.js +75 -0
- package/dist/components/ShapeEditor/_model/keymap.js.map +1 -0
- package/dist/components/ShapeEditor/_model/overlays.cjs +2 -0
- package/dist/components/ShapeEditor/_model/overlays.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/overlays.d.cts +108 -0
- package/dist/components/ShapeEditor/_model/overlays.d.ts +11 -25
- package/dist/components/ShapeEditor/_model/overlays.js +186 -0
- package/dist/components/ShapeEditor/_model/overlays.js.map +1 -0
- package/dist/components/ShapeEditor/_model/pinIcon.cjs +2 -0
- package/dist/components/ShapeEditor/_model/pinIcon.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/pinIcon.d.cts +13 -0
- package/dist/components/ShapeEditor/_model/pinIcon.js +10 -0
- package/dist/components/ShapeEditor/_model/pinIcon.js.map +1 -0
- package/dist/components/ShapeEditor/_model/polygonFill.cjs +2 -0
- package/dist/components/ShapeEditor/_model/polygonFill.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/polygonFill.d.cts +2 -0
- package/dist/components/ShapeEditor/_model/polygonFill.d.ts +2 -0
- package/dist/components/ShapeEditor/_model/polygonFill.js +12 -0
- package/dist/components/ShapeEditor/_model/polygonFill.js.map +1 -0
- package/dist/components/ShapeEditor/_model/props.d.cts +13 -0
- package/dist/components/ShapeEditor/_model/props.d.ts +11 -443
- package/dist/components/ShapeEditor/_model/scalarMask.cjs +2 -0
- package/dist/components/ShapeEditor/_model/scalarMask.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/scalarMask.d.cts +21 -0
- package/dist/components/ShapeEditor/_model/scalarMask.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/scalarMask.js +188 -0
- package/dist/components/ShapeEditor/_model/scalarMask.js.map +1 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.cjs +2 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.d.cts +14 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.d.ts +14 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.js +38 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.js.map +1 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.cjs +2 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.cts +16 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.js +19 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.js.map +1 -0
- package/dist/components/ShapeEditor/_model/strings.cjs +2 -0
- package/dist/components/ShapeEditor/_model/strings.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/strings.d.cts +62 -0
- package/dist/components/ShapeEditor/_model/strings.d.ts +10 -1
- package/dist/components/ShapeEditor/_model/strings.js +130 -0
- package/dist/components/ShapeEditor/_model/strings.js.map +1 -0
- package/dist/components/ShapeEditor/_model/tools.cjs +2 -0
- package/dist/components/ShapeEditor/_model/tools.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/tools.d.cts +29 -0
- package/dist/components/ShapeEditor/_model/tools.d.ts +4 -2
- package/dist/components/ShapeEditor/_model/tools.js +19 -0
- package/dist/components/ShapeEditor/_model/tools.js.map +1 -0
- package/dist/components/ShapeEditor/_model/types/assistant.d.cts +37 -0
- package/dist/components/ShapeEditor/_model/types/assistant.d.ts +37 -0
- package/dist/components/ShapeEditor/_model/types/handle.d.cts +124 -0
- package/dist/components/ShapeEditor/_model/types/handle.d.ts +124 -0
- package/dist/components/ShapeEditor/_model/types/props.d.cts +432 -0
- package/dist/components/ShapeEditor/_model/types/props.d.ts +432 -0
- package/dist/components/ShapeEditor/_model/viewSettings.cjs +2 -0
- package/dist/components/ShapeEditor/_model/viewSettings.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/viewSettings.d.cts +73 -0
- package/dist/components/ShapeEditor/_model/viewSettings.d.ts +60 -2
- package/dist/components/ShapeEditor/_model/viewSettings.js +57 -0
- package/dist/components/ShapeEditor/_model/viewSettings.js.map +1 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.cjs +2 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.d.cts +60 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.d.ts +60 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.js +57 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.js.map +1 -0
- package/dist/components/ShapeEditor/_model/viewport.cjs +2 -0
- package/dist/components/ShapeEditor/_model/viewport.cjs.map +1 -0
- package/dist/components/ShapeEditor/_model/viewport.d.cts +36 -0
- package/dist/components/ShapeEditor/_model/viewport.d.ts +10 -2
- package/dist/components/ShapeEditor/_model/viewport.js +79 -0
- package/dist/components/ShapeEditor/_model/viewport.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.cts +121 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +28 -76
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.js +305 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.d.cts +35 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.d.ts +35 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.js +59 -0
- package/dist/components/ShapeEditor/_renderers/imageLayer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.d.cts +36 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.d.ts +36 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.js +65 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.d.cts +34 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.d.ts +34 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.js +112 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.d.cts +49 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.d.ts +49 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.js +94 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.d.cts +27 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.d.ts +27 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.js +166 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.d.cts +55 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.d.ts +55 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.js +94 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.d.cts +74 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +11 -5
- package/dist/components/ShapeEditor/_renderers/transformSession.js +135 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.cjs +2 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.cjs.map +1 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.d.cts +69 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.d.ts +69 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.js +248 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.js.map +1 -0
- package/dist/components/ShapeEditor/_renderers/types.d.cts +129 -0
- package/dist/components/ShapeEditor/_renderers/types.d.ts +50 -27
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.cjs +2 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.d.cts +26 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.d.ts +26 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.js +118 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.js.map +1 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.cjs +2 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.d.cts +42 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.d.ts +42 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.js +86 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.js.map +1 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.cjs +2 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.d.cts +73 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +30 -11
- package/dist/components/ShapeEditor/_state/createInteractionController.js +398 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.js.map +1 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.cjs +2 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.d.cts +6 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.d.ts +2 -2
- package/dist/components/ShapeEditor/_state/drawSessionState.js +21 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useAssistant.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useAssistant.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useAssistant.d.cts +49 -0
- package/dist/components/ShapeEditor/_state/useAssistant.d.ts +4 -3
- package/dist/components/ShapeEditor/_state/useAssistant.js +178 -0
- package/dist/components/ShapeEditor/_state/useAssistant.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.d.cts +64 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.d.ts +9 -6
- package/dist/components/ShapeEditor/_state/useDrawSession.js +372 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.d.cts +30 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.d.ts +8 -1
- package/dist/components/ShapeEditor/_state/useEditorDocument.js +173 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.d.cts +34 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.d.ts +34 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.js +95 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.cts +25 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +5 -5
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.js +44 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorView.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useEditorView.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useEditorView.d.cts +15 -0
- package/dist/components/ShapeEditor/_state/useEditorView.d.ts +15 -0
- package/dist/components/ShapeEditor/_state/useEditorView.js +45 -0
- package/dist/components/ShapeEditor/_state/useEditorView.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.cts +89 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +48 -17
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.js +126 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.d.cts +7 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.d.ts +7 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.js +13 -0
- package/dist/components/ShapeEditor/_state/useLatestRef.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.cts +27 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.ts +1 -1
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.js +118 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.d.cts +26 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.d.ts +6 -4
- package/dist/components/ShapeEditor/_state/useMinimapSync.js +69 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.cts +31 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +9 -6
- package/dist/components/ShapeEditor/_state/useSelectionActions.js +151 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.d.cts +32 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.d.ts +32 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.js +64 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.d.cts +24 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.d.ts +24 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.js +65 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.js.map +1 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.cjs +2 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.cjs.map +1 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.d.cts +23 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.d.ts +3 -3
- package/dist/components/ShapeEditor/_state/useViewportControls.js +79 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.js.map +1 -0
- package/dist/components/ShapeEditor/index.d.cts +13 -0
- package/dist/components/ShapeEditor/index.d.ts +13 -8
- package/dist/components/Shortcut/Shortcut.cjs +2 -0
- package/dist/components/Shortcut/Shortcut.cjs.map +1 -0
- package/dist/components/Shortcut/Shortcut.d.cts +24 -0
- package/dist/components/Shortcut/Shortcut.d.ts +16 -0
- package/dist/components/Shortcut/Shortcut.js +22 -0
- package/dist/components/Shortcut/Shortcut.js.map +1 -0
- package/dist/components/Shortcut/index.d.cts +2 -0
- package/dist/components/Shortcut/index.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.cjs +2 -0
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.cts +26 -0
- package/dist/components/Skeleton/Skeleton.d.ts +21 -2
- package/dist/components/Skeleton/Skeleton.js +20 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/index.d.cts +2 -0
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/Slider/Slider.cjs +2 -0
- package/dist/components/Slider/Slider.cjs.map +1 -0
- package/dist/components/Slider/Slider.d.cts +58 -0
- package/dist/components/Slider/Slider.d.ts +52 -5
- package/dist/components/Slider/Slider.js +78 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Slider/index.d.cts +2 -0
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/Spinner/Spinner.cjs +2 -0
- package/dist/components/Spinner/Spinner.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.d.cts +32 -0
- package/dist/components/Spinner/Spinner.d.ts +32 -0
- package/dist/components/Spinner/Spinner.js +27 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/index.d.cts +2 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Switch/Switch.cjs +2 -0
- package/dist/components/Switch/Switch.cjs.map +1 -0
- package/dist/components/Switch/Switch.d.cts +31 -0
- package/dist/components/Switch/Switch.d.ts +22 -3
- package/dist/components/Switch/Switch.js +48 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/index.d.cts +2 -0
- package/dist/components/Switch/index.d.ts +2 -2
- package/dist/components/Tab/Tab.cjs +2 -0
- package/dist/components/Tab/Tab.cjs.map +1 -0
- package/dist/components/Tab/Tab.d.cts +76 -0
- package/dist/components/Tab/Tab.d.ts +70 -13
- package/dist/components/Tab/Tab.js +43 -0
- package/dist/components/Tab/Tab.js.map +1 -0
- package/dist/components/Tab/index.d.cts +2 -0
- package/dist/components/Tab/index.d.ts +2 -2
- package/dist/components/Tag/Tag.cjs +2 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.d.cts +50 -0
- package/dist/components/Tag/Tag.d.ts +37 -3
- package/dist/components/Tag/Tag.js +60 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/index.d.cts +2 -0
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tagbox/Tagbox.cjs +2 -0
- package/dist/components/Tagbox/Tagbox.cjs.map +1 -0
- package/dist/components/Tagbox/Tagbox.d.cts +65 -0
- package/dist/components/Tagbox/Tagbox.d.ts +48 -8
- package/dist/components/Tagbox/Tagbox.js +89 -0
- package/dist/components/Tagbox/Tagbox.js.map +1 -0
- package/dist/components/Tagbox/index.d.cts +2 -0
- package/dist/components/Tagbox/index.d.ts +2 -2
- package/dist/components/Textarea/Textarea.cjs +2 -0
- package/dist/components/Textarea/Textarea.cjs.map +1 -0
- package/dist/components/Textarea/Textarea.d.cts +49 -0
- package/dist/components/Textarea/Textarea.d.ts +36 -6
- package/dist/components/Textarea/Textarea.js +60 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/index.d.cts +2 -0
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/Textbox/Textbox.cjs +2 -0
- package/dist/components/Textbox/Textbox.cjs.map +1 -0
- package/dist/components/Textbox/Textbox.d.cts +47 -0
- package/dist/components/Textbox/Textbox.d.ts +36 -8
- package/dist/components/Textbox/Textbox.js +61 -0
- package/dist/components/Textbox/Textbox.js.map +1 -0
- package/dist/components/Textbox/index.d.cts +2 -0
- package/dist/components/Textbox/index.d.ts +2 -2
- package/dist/components/Toast/Toast.cjs +2 -0
- package/dist/components/Toast/Toast.cjs.map +1 -0
- package/dist/components/Toast/Toast.d.cts +100 -0
- package/dist/components/Toast/Toast.d.ts +88 -5
- package/dist/components/Toast/Toast.js +82 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/index.d.cts +2 -0
- package/dist/components/Toast/index.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.cjs +2 -0
- package/dist/components/ToggleButton/ToggleButton.cjs.map +1 -0
- package/dist/components/ToggleButton/ToggleButton.d.cts +41 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +26 -2
- package/dist/components/ToggleButton/ToggleButton.js +117 -0
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -0
- package/dist/components/ToggleButton/index.d.cts +2 -0
- package/dist/components/ToggleButton/index.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.cjs +2 -0
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.cts +40 -0
- package/dist/components/Tooltip/Tooltip.d.ts +28 -1
- package/dist/components/Tooltip/Tooltip.js +62 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.d.cts +2 -0
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/TruncatedText/TruncatedText.cjs +2 -0
- package/dist/components/TruncatedText/TruncatedText.cjs.map +1 -0
- package/dist/components/TruncatedText/TruncatedText.d.cts +44 -0
- package/dist/components/TruncatedText/TruncatedText.d.ts +44 -0
- package/dist/components/TruncatedText/TruncatedText.js +84 -0
- package/dist/components/TruncatedText/TruncatedText.js.map +1 -0
- package/dist/components/TruncatedText/index.d.cts +2 -0
- package/dist/components/TruncatedText/index.d.ts +2 -0
- package/dist/components/Typography/Typography.cjs +2 -0
- package/dist/components/Typography/Typography.cjs.map +1 -0
- package/dist/components/Typography/Typography.d.cts +33 -0
- package/dist/components/Typography/Typography.d.ts +21 -0
- package/dist/components/Typography/Typography.js +59 -0
- package/dist/components/Typography/Typography.js.map +1 -0
- package/dist/components/Typography/index.d.cts +2 -0
- package/dist/components/Typography/index.d.ts +2 -2
- package/dist/components/UploadArea/UploadArea.cjs +2 -0
- package/dist/components/UploadArea/UploadArea.cjs.map +1 -0
- package/dist/components/UploadArea/UploadArea.d.cts +82 -0
- package/dist/components/UploadArea/UploadArea.d.ts +66 -1
- package/dist/components/UploadArea/UploadArea.js +121 -0
- package/dist/components/UploadArea/UploadArea.js.map +1 -0
- package/dist/components/UploadArea/index.d.cts +2 -0
- package/dist/components/UploadArea/index.d.ts +2 -2
- package/dist/fonts.css +4 -0
- package/dist/illustration.cjs +1 -0
- package/dist/illustration.js +3 -0
- package/dist/index.cjs +1 -15
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +58 -49
- package/dist/index.js +65 -8751
- package/dist/llms-full.txt +6663 -0
- package/dist/llms.txt +125 -0
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +10 -5732
- package/dist/shape-editor.js.map +1 -1
- package/dist/styles.css +5 -2
- package/dist/tailwind.css +434 -0
- package/dist/tokens/tokens.css +629 -611
- 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/cn.d.cts +12 -0
- package/dist/utils/cn.d.ts +10 -0
- package/dist/utils/dataAttributes.d.cts +7 -0
- package/dist/utils/dataAttributes.d.ts +7 -0
- package/dist/utils/keyboard.cjs +2 -0
- package/dist/utils/keyboard.cjs.map +1 -0
- package/dist/utils/keyboard.d.cts +3 -0
- package/dist/utils/keyboard.d.ts +3 -0
- package/dist/utils/keyboard.js +14 -0
- package/dist/utils/keyboard.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/sheet.cjs +2 -0
- package/dist/utils/sheet.cjs.map +1 -0
- package/dist/utils/sheet.d.cts +17 -0
- package/dist/utils/sheet.d.ts +17 -0
- package/dist/utils/sheet.js +7 -0
- package/dist/utils/sheet.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 +2 -0
- package/dist/utils/useControllableState.cjs.map +1 -0
- package/dist/utils/useControllableState.d.cts +17 -0
- package/dist/utils/useControllableState.d.ts +17 -0
- package/dist/utils/useControllableState.js +13 -0
- package/dist/utils/useControllableState.js.map +1 -0
- 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/dist/utils/useResizableWidth.cjs +2 -0
- package/dist/utils/useResizableWidth.cjs.map +1 -0
- package/dist/utils/useResizableWidth.d.cts +30 -0
- package/dist/utils/useResizableWidth.d.ts +30 -0
- package/dist/utils/useResizableWidth.js +32 -0
- package/dist/utils/useResizableWidth.js.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.js +59 -0
- package/dist/utils.js.map +1 -0
- package/package.json +68 -28
- package/dist/Button-C_GP2mJ-.cjs +0 -2
- package/dist/Button-C_GP2mJ-.cjs.map +0 -1
- package/dist/Button-CzqDPqUT.js +0 -8600
- package/dist/Button-CzqDPqUT.js.map +0 -1
- package/dist/IconButton-B-MspnYP.cjs +0 -2
- package/dist/IconButton-B-MspnYP.cjs.map +0 -1
- package/dist/IconButton-DTGSfJme.js +0 -560
- package/dist/IconButton-DTGSfJme.js.map +0 -1
- package/dist/Switch-B2irM7Pp.js +0 -2656
- package/dist/Switch-B2irM7Pp.js.map +0 -1
- package/dist/Switch-CMKBdqkX.cjs +0 -42
- package/dist/Switch-CMKBdqkX.cjs.map +0 -1
- package/dist/comment.cjs.map +0 -1
- package/dist/comment.js.map +0 -1
- package/dist/components/Chips/index.d.ts +0 -19
- package/dist/components/DatePicker/Calendar.d.ts +0 -27
- package/dist/components/DatePicker/DatePicker.d.ts +0 -119
- package/dist/components/DatePicker/date.d.ts +0 -24
- package/dist/components/DatePicker/index.d.ts +0 -4
- package/dist/components/ShapeEditor/_model/imageFetch.d.ts +0 -9
- package/dist/components/ShapeEditor/_model/konva.d.ts +0 -4
- package/dist/components/ShapeEditor/_model/overlays.test.d.ts +0 -1
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +0 -124
- package/dist/components/Table/Table.d.ts +0 -61
- package/dist/components/Table/index.d.ts +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CloseIcon as e } from "../Icon/index.js";
|
|
3
|
+
import { cn as t } from "../../utils.js";
|
|
4
|
+
import { useControllableState as n } from "../../utils/useControllableState.js";
|
|
5
|
+
import { useFieldState as r } from "../Field/FieldStateContext.js";
|
|
6
|
+
import { IconButton as i } from "../IconButton/IconButton.js";
|
|
7
|
+
import { InputBase as a } from "../InputBase/InputBase.js";
|
|
8
|
+
import { resolveInputError as o, useInputFocus as s } from "../InputBase/useInputState.js";
|
|
9
|
+
import { useComposedRefs as c } from "../../utils/useComposedRefs.js";
|
|
10
|
+
import { useRef as l } from "react";
|
|
11
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { Input as p } from "@base-ui/react/input";
|
|
13
|
+
//#region src/components/Textbox/Textbox.tsx
|
|
14
|
+
function m({ className: m, error: h, disabled: g, clearable: _, clearAriaLabel: v = "입력값 삭제", startContent: y, endContent: b, size: x = "md", id: S, ref: C, value: w, defaultValue: T, onValueChange: E, onChange: D, onFocus: O, onBlur: k, ...A }) {
|
|
15
|
+
let j = s({
|
|
16
|
+
onFocus: O,
|
|
17
|
+
onBlur: k
|
|
18
|
+
}), M = r(), N = l(null), P = w !== void 0, [F, I] = n({
|
|
19
|
+
value: P ? String(w ?? "") : void 0,
|
|
20
|
+
defaultValue: typeof T == "string" ? T : T?.toString() ?? "",
|
|
21
|
+
onChange: E
|
|
22
|
+
}), L = _ && F.length > 0, R = (e) => {
|
|
23
|
+
I(e.target.value), D?.(e);
|
|
24
|
+
}, z = c(C, N), B = /* @__PURE__ */ f(u, { children: [b, L && /* @__PURE__ */ d(i, {
|
|
25
|
+
size: x === "sm" ? "xs" : "sm",
|
|
26
|
+
onClick: () => {
|
|
27
|
+
I(""), N.current?.focus();
|
|
28
|
+
},
|
|
29
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
30
|
+
tabIndex: -1,
|
|
31
|
+
className: "aivex:shrink-0",
|
|
32
|
+
"aria-label": v,
|
|
33
|
+
children: /* @__PURE__ */ d(e, { size: x === "sm" ? 14 : 16 })
|
|
34
|
+
})] }), V = b || L;
|
|
35
|
+
return /* @__PURE__ */ d(a, {
|
|
36
|
+
error: o(h, A["aria-invalid"]) || M.invalid,
|
|
37
|
+
disabled: !!g || M.disabled,
|
|
38
|
+
focused: j.focused,
|
|
39
|
+
filled: F.length > 0,
|
|
40
|
+
size: x,
|
|
41
|
+
layout: "inline",
|
|
42
|
+
startContent: y,
|
|
43
|
+
endContent: V ? B : void 0,
|
|
44
|
+
children: /* @__PURE__ */ d(p, {
|
|
45
|
+
ref: z,
|
|
46
|
+
id: S,
|
|
47
|
+
disabled: g,
|
|
48
|
+
value: _ ? F : w,
|
|
49
|
+
defaultValue: _ ? void 0 : T,
|
|
50
|
+
onChange: _ || P || E ? R : D,
|
|
51
|
+
className: t("aivex:m-0 aivex:w-full aivex:min-w-0 aivex:appearance-none aivex:border-0 aivex:bg-transparent aivex:p-0 aivex:text-text-primary aivex:placeholder:text-text-tertiary aivex:outline-none", x === "sm" ? "aivex:text-body-md-regular" : "aivex:text-body-lg-regular", m),
|
|
52
|
+
onFocus: j.onFocus,
|
|
53
|
+
onBlur: j.onBlur,
|
|
54
|
+
...A
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { m as Textbox };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=Textbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textbox.js","names":[],"sources":["../../../src/components/Textbox/Textbox.tsx"],"sourcesContent":["import { Input } from \"@base-ui/react/input\";\nimport type { ChangeEventHandler, InputHTMLAttributes, ReactNode, Ref } from \"react\";\nimport { useRef } from \"react\";\nimport { useFieldState } from \"@/components/Field/FieldStateContext\";\nimport { CloseIcon } from \"@/components/Icon\";\nimport { IconButton } from \"@/components/IconButton\";\nimport { InputBase } from \"@/components/InputBase\";\nimport { resolveInputError, useInputFocus } from \"@/components/InputBase/useInputState\";\nimport { cn } from \"@/utils/cn\";\nimport { useComposedRefs } from \"@/utils/useComposedRefs\";\nimport { useControllableState } from \"@/utils/useControllableState\";\n\nexport interface TextboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n /**\n * 높이 sm 32px·md 40px\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /** 에러 상태. Field 안에서는 Field의 invalid로도 켜진다 */\n error?: boolean;\n /** 입력값 전체 삭제 버튼 표시 여부 */\n clearable?: boolean;\n /** 인풋 좌측 슬롯 */\n startContent?: ReactNode;\n /** 인풋 우측 슬롯 (clearable=true 이고 값이 있으면 삭제 버튼이 추가됨) */\n endContent?: ReactNode;\n /**\n * clearable 삭제 버튼의 aria-label\n * @default \"입력값 삭제\"\n */\n clearAriaLabel?: string;\n /** 입력값이 바뀔 때(타이핑·clearable 삭제 모두) 새 문자열로 호출된다. */\n onValueChange?: (value: string) => void;\n /** 네이티브 change 이벤트. clearable 삭제는 이벤트가 없으므로 `onValueChange`로만 알린다. */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /** 내부 input 요소 ref */\n ref?: Ref<HTMLInputElement>;\n}\n\n/**\n * 한 줄 텍스트를 입력하는 기본 텍스트 인풋.\n * 제어는 value + onValueChange(문자열)를 권장한다. onChange는 네이티브 이벤트라 clearable 삭제 버튼으로 지울 때는\n * 호출되지 않는다. 비제어는 defaultValue. 여러 줄은 Textarea, 태그 목록 입력은 Tagbox.\n * 라벨·설명·에러는 Field 안에 넣으면 자동으로 연결되고, 라벨이 없으면 aria-label을 지정한다.\n *\n * @example\n * ```tsx\n * import { Field, FieldLabel, Textbox } from \"@aivex/ui\";\n *\n * const [name, setName] = useState(\"\");\n *\n * <Field>\n * <FieldLabel>이름</FieldLabel>\n * <Textbox value={name} onValueChange={setName} clearable placeholder=\"이름을 입력하세요\" />\n * </Field>\n * ```\n */\nfunction Textbox({\n className,\n error,\n disabled,\n clearable,\n clearAriaLabel = \"입력값 삭제\",\n startContent,\n endContent,\n size = \"md\",\n id,\n ref,\n value,\n defaultValue,\n onValueChange,\n onChange,\n onFocus,\n onBlur,\n ...props\n}: TextboxProps) {\n const focus = useInputFocus({ onFocus, onBlur });\n const field = useFieldState();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const isControlled = value !== undefined;\n const [currentValue, setCurrentValue] = useControllableState({\n value: isControlled ? String(value ?? \"\") : undefined,\n defaultValue:\n typeof defaultValue === \"string\" ? defaultValue : (defaultValue?.toString() ?? \"\"),\n onChange: onValueChange,\n });\n const showClearButton = clearable && currentValue.length > 0;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setCurrentValue(e.target.value);\n onChange?.(e);\n };\n\n const composedRef = useComposedRefs(ref, inputRef);\n\n const handleClear = () => {\n setCurrentValue(\"\");\n // 버튼이 언마운트되며 포커스가 붕 뜨지 않게 — 지운 뒤엔 이어서 입력한다.\n inputRef.current?.focus();\n };\n\n const resolvedEndContent = (\n <>\n {endContent}\n {showClearButton && (\n <IconButton\n size={size === \"sm\" ? \"xs\" : \"sm\"}\n onClick={handleClear}\n onMouseDown={(event) => event.preventDefault()}\n tabIndex={-1}\n className=\"aivex:shrink-0\"\n aria-label={clearAriaLabel}\n >\n <CloseIcon size={size === \"sm\" ? 14 : 16} />\n </IconButton>\n )}\n </>\n );\n\n const hasEndContent = endContent || showClearButton;\n\n // Field의 invalid·disabled는 Base UI가 input에 직접 전달한다. 테두리 박스는 여기서 맞춘다.\n const isError = resolveInputError(error, props[\"aria-invalid\"]) || field.invalid;\n const isDisabled = Boolean(disabled) || field.disabled;\n\n return (\n <InputBase\n error={isError}\n disabled={isDisabled}\n focused={focus.focused}\n filled={currentValue.length > 0}\n size={size}\n layout=\"inline\"\n startContent={startContent}\n endContent={hasEndContent ? resolvedEndContent : undefined}\n >\n {/* Base UI Input — Field 안에서는 라벨·설명·에러·invalid·disabled가 자동으로 연결되고, 밖에서는 일반 input이다. */}\n <Input\n ref={composedRef as Ref<HTMLElement>}\n id={id}\n disabled={disabled}\n value={clearable ? currentValue : value}\n defaultValue={clearable ? undefined : defaultValue}\n onChange={clearable || isControlled || onValueChange ? handleChange : onChange}\n className={cn(\n \"aivex:m-0 aivex:w-full aivex:min-w-0 aivex:appearance-none aivex:border-0 aivex:bg-transparent aivex:p-0 aivex:text-text-primary aivex:placeholder:text-text-tertiary aivex:outline-none\",\n size === \"sm\" ? \"aivex:text-body-md-regular\" : \"aivex:text-body-lg-regular\",\n className,\n )}\n onFocus={focus.onFocus}\n onBlur={focus.onBlur}\n {...props}\n />\n </InputBase>\n );\n}\n\nexport { Textbox };\n"],"mappings":";;;;;;;;;;;;;AAyDA,SAAS,EAAQ,EACf,cACA,UACA,aACA,cACA,oBAAiB,UACjB,iBACA,eACA,UAAO,MACP,OACA,QACA,UACA,iBACA,kBACA,aACA,YACA,WACA,GAAG,KACY;CACf,IAAM,IAAQ,EAAc;EAAE;EAAS;EAAQ,CAAC,EAC1C,IAAQ,GAAe,EACvB,IAAW,EAAgC,KAAK,EAChD,IAAe,MAAU,KAAA,GACzB,CAAC,GAAc,KAAmB,EAAqB;EAC3D,OAAO,IAAe,OAAO,KAAS,GAAG,GAAG,KAAA;EAC5C,cACE,OAAO,KAAiB,WAAW,IAAgB,GAAc,UAAU,IAAI;EACjF,UAAU;EACX,CAAC,EACI,IAAkB,KAAa,EAAa,SAAS,GAErD,KAAgB,MAA2C;AAE/D,EADA,EAAgB,EAAE,OAAO,MAAM,EAC/B,IAAW,EAAE;IAGT,IAAc,EAAgB,GAAK,EAAS,EAQ5C,IACJ,kBAAA,GAAA,EAAA,UAAA,CACG,GACA,KACC,kBAAC,GAAD;EACE,MAAM,MAAS,OAAO,OAAO;EAC7B,eAZkB;AAGxB,GAFA,EAAgB,GAAG,EAEnB,EAAS,SAAS,OAAO;;EAUnB,cAAc,MAAU,EAAM,gBAAgB;EAC9C,UAAU;EACV,WAAU;EACV,cAAY;YAEZ,kBAAC,GAAD,EAAW,MAAM,MAAS,OAAO,KAAK,IAAM,CAAA;EACjC,CAAA,CAEd,EAAA,CAAA,EAGC,IAAgB,KAAc;AAMpC,QACE,kBAAC,GAAD;EACE,OALY,EAAkB,GAAO,EAAM,gBAAgB,IAAI,EAAM;EAMrE,UALe,EAAQ,KAAa,EAAM;EAM1C,SAAS,EAAM;EACf,QAAQ,EAAa,SAAS;EACxB;EACN,QAAO;EACO;EACd,YAAY,IAAgB,IAAqB,KAAA;YAGjD,kBAAC,GAAD;GACE,KAAK;GACD;GACM;GACV,OAAO,IAAY,IAAe;GAClC,cAAc,IAAY,KAAA,IAAY;GACtC,UAAU,KAAa,KAAgB,IAAgB,IAAe;GACtE,WAAW,EACT,4LACA,MAAS,OAAO,+BAA+B,8BAC/C,EACD;GACD,SAAS,EAAM;GACf,QAAQ,EAAM;GACd,GAAI;GACJ,CAAA;EACQ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { TextboxProps } from "./Textbox";
|
|
2
|
-
export {
|
|
1
|
+
export type { TextboxProps } from "./Textbox.js";
|
|
2
|
+
export { Textbox } from "./Textbox.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Icon/index.cjs`),t=require(`../../utils.cjs`),n=require(`../IconButton/IconButton.cjs`),r=require(`../Button/Button.cjs`);let i=require(`react/jsx-runtime`),a=require(`class-variance-authority`),o=require(`sonner`);var s=(0,a.cva)(`aivex:inline-flex aivex:min-h-10 aivex:w-fit aivex:items-center aivex:justify-center aivex:gap-md aivex:rounded-xs aivex:bg-static-gray aivex:px-xl aivex:py-xs`,{variants:{variant:{default:``,success:``,danger:``}},defaultVariants:{variant:`default`}});function c({className:a,variant:o,open:c=!0,message:l,action:u,onClose:d,closeAriaLabel:f=`닫기`,ref:p,...m}){if(!c)return null;let{children:h,...g}=u??{};return(0,i.jsxs)(`div`,{ref:p,role:o===`danger`?`alert`:`status`,"aria-live":o===`danger`?`assertive`:`polite`,"data-variant":o??`default`,className:t.cn(s({variant:o??`default`}),a),...m,children:[(0,i.jsx)(`p`,{className:`aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white`,children:l}),u&&(0,i.jsx)(r.Button,{variant:`ghost`,color:`primary`,size:`md`,className:`aivex:shrink-0`,...g,children:h}),d&&(0,i.jsx)(n.IconButton,{"aria-label":f,color:`white`,size:`sm`,className:`aivex:shrink-0`,onClick:d,children:(0,i.jsx)(e.CloseIcon,{size:20})})]})}function l({position:e=`bottom-center`,duration:n=4e3,visibleToasts:r=3,gap:a=8,style:c,toastOptions:l,...u}){let d=e.endsWith(`center`);return(0,i.jsx)(o.Toaster,{position:e,duration:n,visibleToasts:r,gap:a,style:{"--width":`720px`,...c},toastOptions:{...l,unstyled:!0,className:t.cn(s({variant:`default`}),d&&`aivex:inset-x-0 aivex:mx-auto`,l?.className),classNames:{title:`aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white`,description:`aivex:mt-xs aivex:max-w-[720px] aivex:text-center aivex:text-body-md-regular aivex:text-static-white aivex:opacity-80`,actionButton:`aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-text-brand aivex:transition-colors aivex:hover:bg-static-white/8`,cancelButton:`aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8`,closeButton:`aivex:order-last aivex:inline-flex aivex:size-2xl aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:rounded-xs aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8`,...l?.classNames}},...u})}exports.Toast=c,exports.ToastToaster=l,exports.toastVariants=s;
|
|
2
|
+
//# sourceMappingURL=Toast.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.cjs","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { CSSProperties, HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { type ExternalToast, Toaster as SonnerToaster, type ToasterProps, toast } from \"sonner\";\nimport { Button, type ButtonProps } from \"@/components/Button\";\nimport { CloseIcon } from \"@/components/Icon\";\nimport { IconButton } from \"@/components/IconButton\";\nimport { cn } from \"@/utils/cn\";\nimport type { DataAttributes } from \"@/utils/dataAttributes\";\n\n// py는 xs(4px) — 액션 버튼(32px)이 들어가도 전체 높이가 40px로 유지된다.\n/** 토스트 표면 클래스(cva) — 같은 모양의 커스텀 토스트를 만들 때 쓴다. */\nconst toastVariants = cva(\n \"aivex:inline-flex aivex:min-h-10 aivex:w-fit aivex:items-center aivex:justify-center aivex:gap-md aivex:rounded-xs aivex:bg-static-gray aivex:px-xl aivex:py-xs\",\n {\n variants: {\n variant: {\n default: \"\",\n success: \"\",\n danger: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\n/**\n * Toast의 의미 톤 — default·success·danger. 시각적으로는 같은 어두운 표면이고,\n * danger는 스크린리더가 즉시 읽도록 role=\"alert\"로 알린다. 루트에 `data-variant`가 붙는다.\n */\nexport type ToastVariant = NonNullable<VariantProps<typeof toastVariants>[\"variant\"]>;\n\n/** 액션 버튼은 라벨을 children으로 받고, 스타일은 Toast가 고정한다. */\nexport interface ToastActionProps\n extends Omit<\n ButtonProps,\n \"render\" | \"children\" | \"className\" | \"color\" | \"ref\" | \"size\" | \"style\" | \"variant\"\n >,\n DataAttributes {\n /** 버튼 라벨 */\n children: ReactNode;\n}\n\nexport interface ToastProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * 의미 톤. 기본 \"default\".\n * @default \"default\"\n */\n variant?: ToastVariant;\n /**\n * false면 아무것도 렌더하지 않는다.\n * @default true\n */\n open?: boolean;\n /** 표시할 메시지(필수). 최대 720px 폭에서 가운데 정렬로 줄바꿈된다. */\n message: string;\n /** 메시지 우측 액션 버튼(예: 실행 취소). */\n action?: ToastActionProps;\n /** 지정하면 우측 끝에 닫기(X) 버튼을 렌더한다. */\n onClose?: () => void;\n /**\n * 닫기 버튼 aria-label. 기본 \"닫기\".\n * @default \"닫기\"\n */\n closeAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** ToastToaster props — sonner `Toaster` props 그대로(position·duration·visibleToasts·gap 등). */\nexport type ToastToasterProps = ToasterProps;\n/** `toast(message, options)`의 옵션 — sonner `ExternalToast` 그대로(description·action·closeButton·duration 등). */\nexport type ToastOptions = ExternalToast;\n\n/**\n * 토스트 모양만 그리는 정적 프리미티브 — 위치·자동 사라짐·쌓임 관리가 없다.\n *\n * 일반적인 알림은 이 컴포넌트 대신 `toast(\"메시지\")` 함수를 호출한다(ToastToaster가 앱에\n * 마운트돼 있어야 함). Toast는 직접 위치·표시를 제어해야 하는 특수한 경우나 미리보기용이다.\n * 계속 보여야 하는 화면 내 안내는 Messagebox를 쓴다. role=\"status\"·aria-live=\"polite\"로 읽힌다.\n *\n * @example\n * ```tsx\n * import { Toast } from \"@aivex/ui\";\n *\n * <Toast\n * message=\"파일을 삭제했습니다\"\n * action={{ children: \"실행 취소\", onClick: undo }}\n * onClose={() => setOpen(false)}\n * open={open}\n * />\n * ```\n */\nfunction Toast({\n className,\n variant,\n open = true,\n message,\n action,\n onClose,\n closeAriaLabel = \"닫기\",\n ref,\n ...props\n}: ToastProps) {\n if (!open) return null;\n\n const { children: actionLabel, ...actionProps } = action ?? {};\n\n return (\n <div\n ref={ref}\n // 실패 알림은 읽던 내용을 끊고 바로 알린다. 나머지는 끝난 뒤에 읽는다.\n role={variant === \"danger\" ? \"alert\" : \"status\"}\n aria-live={variant === \"danger\" ? \"assertive\" : \"polite\"}\n data-variant={variant ?? \"default\"}\n className={cn(toastVariants({ variant: variant ?? \"default\" }), className)}\n {...props}\n >\n <p className=\"aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white\">\n {message}\n </p>\n {action && (\n <Button\n variant=\"ghost\"\n color=\"primary\"\n size=\"md\"\n className=\"aivex:shrink-0\"\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n {onClose && (\n <IconButton\n aria-label={closeAriaLabel}\n color=\"white\"\n size=\"sm\"\n className=\"aivex:shrink-0\"\n onClick={onClose}\n >\n <CloseIcon size={20} />\n </IconButton>\n )}\n </div>\n );\n}\n\n/**\n * `toast()` 호출을 받아 화면에 토스트를 쌓아 보여 주는 컨테이너(sonner Toaster 래퍼).\n *\n * 앱 루트(레이아웃)에 한 번만 마운트한다 — 없으면 `toast()`를 호출해도 아무것도 보이지 않는다.\n * 그 뒤 어디서든 `@aivex/ui`의 `toast()`를 호출한다(sonner를 직접 import하지 않는다).\n * 기본값: position \"bottom-center\", duration 4000ms, visibleToasts 3, gap 8.\n *\n * @example\n * ```tsx\n * import { Button, ToastToaster, toast } from \"@aivex/ui\";\n *\n * // 앱 루트\n * <>\n * <App />\n * <ToastToaster />\n * </>\n *\n * // 어디서든\n * <Button onClick={() => toast(\"저장했습니다\")}>저장</Button>\n * <Button\n * onClick={() =>\n * toast(\"파일을 삭제했습니다\", {\n * action: { label: \"실행 취소\", onClick: undo },\n * closeButton: true,\n * })\n * }\n * >\n * 삭제\n * </Button>\n * ```\n */\nfunction ToastToaster({\n position = \"bottom-center\",\n duration = 4000,\n visibleToasts = 3,\n gap = 8,\n style,\n toastOptions,\n ...props\n}: ToastToasterProps) {\n const horizontallyCentered = position.endsWith(\"center\");\n\n return (\n <SonnerToaster\n position={position}\n duration={duration}\n visibleToasts={visibleToasts}\n gap={gap}\n // 토스트는 내용만큼 넓어진다(w-fit). 그런데 sonner는 감싸는 목록에\n // --width(기본 356px)를 박고 width: var(--width)를 걸어서, 자식의\n // fit-content가 356px에 갇혀 긴 문구가 접혔다. 목록 폭을 본문 최대\n // 폭(title의 max-w-720)까지 열어 두어, 토스트가 720px까지는 한 줄로\n // 늘어나고 그 뒤에야 접히게 한다.\n // (목록은 fixed + 자식이 absolute라 fit-content로 두면 0px로 무너진다.)\n style={{ \"--width\": \"720px\", ...style } as CSSProperties}\n toastOptions={{\n ...toastOptions,\n unstyled: true,\n // 토스트는 내용만큼 넓고(w-fit) 목록은 그보다 넓다 — sonner가 토스트를\n // 목록 왼쪽 끝(left:0)에 절대배치하므로 그대로 두면 왼쪽으로 치우친다.\n // 세로 위치는 sonner가 transform으로 잡으므로 건드리지 않고, 좌우만\n // inset-x-0 + mx-auto로 가운데 맞춘다.\n className: cn(\n toastVariants({ variant: \"default\" }),\n horizontallyCentered && \"aivex:inset-x-0 aivex:mx-auto\",\n toastOptions?.className,\n ),\n classNames: {\n title:\n \"aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white\",\n description:\n \"aivex:mt-xs aivex:max-w-[720px] aivex:text-center aivex:text-body-md-regular aivex:text-static-white aivex:opacity-80\",\n // 스탠드얼론 Toast의 Button(ghost/primary/md)·IconButton(white/sm)과 같은 서식.\n actionButton:\n \"aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-text-brand aivex:transition-colors aivex:hover:bg-static-white/8\",\n cancelButton:\n \"aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8\",\n // sonner는 닫기 버튼을 DOM 맨 앞에 렌더한다. 시안은 우측 끝이라 order로 옮긴다.\n closeButton:\n \"aivex:order-last aivex:inline-flex aivex:size-2xl aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:rounded-xs aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8\",\n ...toastOptions?.classNames,\n },\n }}\n {...props}\n />\n );\n}\n\nexport { Toast, ToastToaster, toast, toastVariants };\n"],"mappings":"wSAWA,IAAM,GAAA,EAAA,EAAA,KACJ,kKACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,QAAS,GACT,OAAQ,GACT,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CACF,CAoED,SAAS,EAAM,CACb,YACA,UACA,OAAO,GACP,UACA,SACA,UACA,iBAAiB,KACjB,MACA,GAAG,GACU,CACb,GAAI,CAAC,EAAM,OAAO,KAElB,GAAM,CAAE,SAAU,EAAa,GAAG,GAAgB,GAAU,EAAE,CAE9D,OACE,EAAA,EAAA,MAAC,MAAD,CACO,MAEL,KAAM,IAAY,SAAW,QAAU,SACvC,YAAW,IAAY,SAAW,YAAc,SAChD,eAAc,GAAW,UACzB,UAAW,EAAA,GAAG,EAAc,CAAE,QAAS,GAAW,UAAW,CAAC,CAAE,EAAU,CAC1E,GAAI,WAPN,EASE,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,oGACV,EACC,CAAA,CACH,IACC,EAAA,EAAA,KAAC,EAAA,OAAD,CACE,QAAQ,QACR,MAAM,UACN,KAAK,KACL,UAAU,iBACV,GAAI,WAEH,EACM,CAAA,CAEV,IACC,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,aAAY,EACZ,MAAM,QACN,KAAK,KACL,UAAU,iBACV,QAAS,YAET,EAAA,EAAA,KAAC,EAAA,UAAD,CAAW,KAAM,GAAM,CAAA,CACZ,CAAA,CAEX,GAmCV,SAAS,EAAa,CACpB,WAAW,gBACX,WAAW,IACX,gBAAgB,EAChB,MAAM,EACN,QACA,eACA,GAAG,GACiB,CACpB,IAAM,EAAuB,EAAS,SAAS,SAAS,CAExD,OACE,EAAA,EAAA,KAAC,EAAA,QAAD,CACY,WACA,WACK,gBACV,MAOL,MAAO,CAAE,UAAW,QAAS,GAAG,EAAO,CACvC,aAAc,CACZ,GAAG,EACH,SAAU,GAKV,UAAW,EAAA,GACT,EAAc,CAAE,QAAS,UAAW,CAAC,CACrC,GAAwB,gCACxB,GAAc,UACf,CACD,WAAY,CACV,MACE,2FACF,YACE,wHAEF,aACE,qPACF,aACE,uPAEF,YACE,+NACF,GAAG,GAAc,WAClB,CACF,CACD,GAAI,EACJ,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
3
|
+
import { type ExternalToast, type ToasterProps, toast } from "sonner";
|
|
4
|
+
import { type ButtonProps } from "../Button/index.cjs";
|
|
5
|
+
import type { DataAttributes } from "../../utils/dataAttributes.cjs";
|
|
6
|
+
/** 토스트 표면 클래스(cva) — 같은 모양의 커스텀 토스트를 만들 때 쓴다. */
|
|
7
|
+
declare const toastVariants: (props?: ({
|
|
8
|
+
variant?: "danger" | "default" | "success" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Toast의 의미 톤 — default·success·danger. 시각적으로는 같은 어두운 표면이고,
|
|
12
|
+
* danger는 스크린리더가 즉시 읽도록 role="alert"로 알린다. 루트에 `data-variant`가 붙는다.
|
|
13
|
+
*/
|
|
14
|
+
export type ToastVariant = NonNullable<VariantProps<typeof toastVariants>["variant"]>;
|
|
15
|
+
/** 액션 버튼은 라벨을 children으로 받고, 스타일은 Toast가 고정한다. */
|
|
16
|
+
export interface ToastActionProps extends Omit<ButtonProps, "render" | "children" | "className" | "color" | "ref" | "size" | "style" | "variant">, DataAttributes {
|
|
17
|
+
/** 버튼 라벨 */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
/**
|
|
22
|
+
* 의미 톤. 기본 "default".
|
|
23
|
+
* @default "default"
|
|
24
|
+
*/
|
|
25
|
+
variant?: ToastVariant;
|
|
26
|
+
/**
|
|
27
|
+
* false면 아무것도 렌더하지 않는다.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
open?: boolean;
|
|
31
|
+
/** 표시할 메시지(필수). 최대 720px 폭에서 가운데 정렬로 줄바꿈된다. */
|
|
32
|
+
message: string;
|
|
33
|
+
/** 메시지 우측 액션 버튼(예: 실행 취소). */
|
|
34
|
+
action?: ToastActionProps;
|
|
35
|
+
/** 지정하면 우측 끝에 닫기(X) 버튼을 렌더한다. */
|
|
36
|
+
onClose?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* 닫기 버튼 aria-label. 기본 "닫기".
|
|
39
|
+
* @default "닫기"
|
|
40
|
+
*/
|
|
41
|
+
closeAriaLabel?: string;
|
|
42
|
+
ref?: Ref<HTMLDivElement>;
|
|
43
|
+
}
|
|
44
|
+
/** ToastToaster props — sonner `Toaster` props 그대로(position·duration·visibleToasts·gap 등). */
|
|
45
|
+
export type ToastToasterProps = ToasterProps;
|
|
46
|
+
/** `toast(message, options)`의 옵션 — sonner `ExternalToast` 그대로(description·action·closeButton·duration 등). */
|
|
47
|
+
export type ToastOptions = ExternalToast;
|
|
48
|
+
/**
|
|
49
|
+
* 토스트 모양만 그리는 정적 프리미티브 — 위치·자동 사라짐·쌓임 관리가 없다.
|
|
50
|
+
*
|
|
51
|
+
* 일반적인 알림은 이 컴포넌트 대신 `toast("메시지")` 함수를 호출한다(ToastToaster가 앱에
|
|
52
|
+
* 마운트돼 있어야 함). Toast는 직접 위치·표시를 제어해야 하는 특수한 경우나 미리보기용이다.
|
|
53
|
+
* 계속 보여야 하는 화면 내 안내는 Messagebox를 쓴다. role="status"·aria-live="polite"로 읽힌다.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* import { Toast } from "@aivex/ui";
|
|
58
|
+
*
|
|
59
|
+
* <Toast
|
|
60
|
+
* message="파일을 삭제했습니다"
|
|
61
|
+
* action={{ children: "실행 취소", onClick: undo }}
|
|
62
|
+
* onClose={() => setOpen(false)}
|
|
63
|
+
* open={open}
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function Toast({ className, variant, open, message, action, onClose, closeAriaLabel, ref, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element | null;
|
|
68
|
+
/**
|
|
69
|
+
* `toast()` 호출을 받아 화면에 토스트를 쌓아 보여 주는 컨테이너(sonner Toaster 래퍼).
|
|
70
|
+
*
|
|
71
|
+
* 앱 루트(레이아웃)에 한 번만 마운트한다 — 없으면 `toast()`를 호출해도 아무것도 보이지 않는다.
|
|
72
|
+
* 그 뒤 어디서든 `@aivex/ui`의 `toast()`를 호출한다(sonner를 직접 import하지 않는다).
|
|
73
|
+
* 기본값: position "bottom-center", duration 4000ms, visibleToasts 3, gap 8.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```tsx
|
|
77
|
+
* import { Button, ToastToaster, toast } from "@aivex/ui";
|
|
78
|
+
*
|
|
79
|
+
* // 앱 루트
|
|
80
|
+
* <>
|
|
81
|
+
* <App />
|
|
82
|
+
* <ToastToaster />
|
|
83
|
+
* </>
|
|
84
|
+
*
|
|
85
|
+
* // 어디서든
|
|
86
|
+
* <Button onClick={() => toast("저장했습니다")}>저장</Button>
|
|
87
|
+
* <Button
|
|
88
|
+
* onClick={() =>
|
|
89
|
+
* toast("파일을 삭제했습니다", {
|
|
90
|
+
* action: { label: "실행 취소", onClick: undo },
|
|
91
|
+
* closeButton: true,
|
|
92
|
+
* })
|
|
93
|
+
* }
|
|
94
|
+
* >
|
|
95
|
+
* 삭제
|
|
96
|
+
* </Button>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function ToastToaster({ position, duration, visibleToasts, gap, style, toastOptions, ...props }: ToastToasterProps): import("react/jsx-runtime").JSX.Element;
|
|
100
|
+
export { Toast, ToastToaster, toast, toastVariants };
|
|
@@ -1,17 +1,100 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
import type { HTMLAttributes, Ref } from "react";
|
|
2
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
3
3
|
import { type ExternalToast, type ToasterProps, toast } from "sonner";
|
|
4
|
+
import { type ButtonProps } from "../Button/index.js";
|
|
5
|
+
import type { DataAttributes } from "../../utils/dataAttributes.js";
|
|
6
|
+
/** 토스트 표면 클래스(cva) — 같은 모양의 커스텀 토스트를 만들 때 쓴다. */
|
|
4
7
|
declare const toastVariants: (props?: ({
|
|
5
|
-
|
|
8
|
+
variant?: "danger" | "default" | "success" | null | undefined;
|
|
6
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Toast의 의미 톤 — default·success·danger. 시각적으로는 같은 어두운 표면이고,
|
|
12
|
+
* danger는 스크린리더가 즉시 읽도록 role="alert"로 알린다. 루트에 `data-variant`가 붙는다.
|
|
13
|
+
*/
|
|
14
|
+
export type ToastVariant = NonNullable<VariantProps<typeof toastVariants>["variant"]>;
|
|
15
|
+
/** 액션 버튼은 라벨을 children으로 받고, 스타일은 Toast가 고정한다. */
|
|
16
|
+
export interface ToastActionProps extends Omit<ButtonProps, "render" | "children" | "className" | "color" | "ref" | "size" | "style" | "variant">, DataAttributes {
|
|
17
|
+
/** 버튼 라벨 */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
/**
|
|
22
|
+
* 의미 톤. 기본 "default".
|
|
23
|
+
* @default "default"
|
|
24
|
+
*/
|
|
25
|
+
variant?: ToastVariant;
|
|
26
|
+
/**
|
|
27
|
+
* false면 아무것도 렌더하지 않는다.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
8
30
|
open?: boolean;
|
|
31
|
+
/** 표시할 메시지(필수). 최대 720px 폭에서 가운데 정렬로 줄바꿈된다. */
|
|
9
32
|
message: string;
|
|
33
|
+
/** 메시지 우측 액션 버튼(예: 실행 취소). */
|
|
34
|
+
action?: ToastActionProps;
|
|
35
|
+
/** 지정하면 우측 끝에 닫기(X) 버튼을 렌더한다. */
|
|
10
36
|
onClose?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* 닫기 버튼 aria-label. 기본 "닫기".
|
|
39
|
+
* @default "닫기"
|
|
40
|
+
*/
|
|
41
|
+
closeAriaLabel?: string;
|
|
11
42
|
ref?: Ref<HTMLDivElement>;
|
|
12
43
|
}
|
|
44
|
+
/** ToastToaster props — sonner `Toaster` props 그대로(position·duration·visibleToasts·gap 등). */
|
|
13
45
|
export type ToastToasterProps = ToasterProps;
|
|
46
|
+
/** `toast(message, options)`의 옵션 — sonner `ExternalToast` 그대로(description·action·closeButton·duration 등). */
|
|
14
47
|
export type ToastOptions = ExternalToast;
|
|
15
|
-
|
|
16
|
-
|
|
48
|
+
/**
|
|
49
|
+
* 토스트 모양만 그리는 정적 프리미티브 — 위치·자동 사라짐·쌓임 관리가 없다.
|
|
50
|
+
*
|
|
51
|
+
* 일반적인 알림은 이 컴포넌트 대신 `toast("메시지")` 함수를 호출한다(ToastToaster가 앱에
|
|
52
|
+
* 마운트돼 있어야 함). Toast는 직접 위치·표시를 제어해야 하는 특수한 경우나 미리보기용이다.
|
|
53
|
+
* 계속 보여야 하는 화면 내 안내는 Messagebox를 쓴다. role="status"·aria-live="polite"로 읽힌다.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* import { Toast } from "@aivex/ui";
|
|
58
|
+
*
|
|
59
|
+
* <Toast
|
|
60
|
+
* message="파일을 삭제했습니다"
|
|
61
|
+
* action={{ children: "실행 취소", onClick: undo }}
|
|
62
|
+
* onClose={() => setOpen(false)}
|
|
63
|
+
* open={open}
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function Toast({ className, variant, open, message, action, onClose, closeAriaLabel, ref, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element | null;
|
|
68
|
+
/**
|
|
69
|
+
* `toast()` 호출을 받아 화면에 토스트를 쌓아 보여 주는 컨테이너(sonner Toaster 래퍼).
|
|
70
|
+
*
|
|
71
|
+
* 앱 루트(레이아웃)에 한 번만 마운트한다 — 없으면 `toast()`를 호출해도 아무것도 보이지 않는다.
|
|
72
|
+
* 그 뒤 어디서든 `@aivex/ui`의 `toast()`를 호출한다(sonner를 직접 import하지 않는다).
|
|
73
|
+
* 기본값: position "bottom-center", duration 4000ms, visibleToasts 3, gap 8.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```tsx
|
|
77
|
+
* import { Button, ToastToaster, toast } from "@aivex/ui";
|
|
78
|
+
*
|
|
79
|
+
* // 앱 루트
|
|
80
|
+
* <>
|
|
81
|
+
* <App />
|
|
82
|
+
* <ToastToaster />
|
|
83
|
+
* </>
|
|
84
|
+
*
|
|
85
|
+
* // 어디서든
|
|
86
|
+
* <Button onClick={() => toast("저장했습니다")}>저장</Button>
|
|
87
|
+
* <Button
|
|
88
|
+
* onClick={() =>
|
|
89
|
+
* toast("파일을 삭제했습니다", {
|
|
90
|
+
* action: { label: "실행 취소", onClick: undo },
|
|
91
|
+
* closeButton: true,
|
|
92
|
+
* })
|
|
93
|
+
* }
|
|
94
|
+
* >
|
|
95
|
+
* 삭제
|
|
96
|
+
* </Button>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function ToastToaster({ position, duration, visibleToasts, gap, style, toastOptions, ...props }: ToastToasterProps): import("react/jsx-runtime").JSX.Element;
|
|
17
100
|
export { Toast, ToastToaster, toast, toastVariants };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CloseIcon as e } from "../Icon/index.js";
|
|
3
|
+
import { cn as t } from "../../utils.js";
|
|
4
|
+
import { IconButton as n } from "../IconButton/IconButton.js";
|
|
5
|
+
import { Button as r } from "../Button/Button.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { cva as o } from "class-variance-authority";
|
|
8
|
+
import { Toaster as s, toast as c } from "sonner";
|
|
9
|
+
//#region src/components/Toast/Toast.tsx
|
|
10
|
+
var l = o("aivex:inline-flex aivex:min-h-10 aivex:w-fit aivex:items-center aivex:justify-center aivex:gap-md aivex:rounded-xs aivex:bg-static-gray aivex:px-xl aivex:py-xs", {
|
|
11
|
+
variants: { variant: {
|
|
12
|
+
default: "",
|
|
13
|
+
success: "",
|
|
14
|
+
danger: ""
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { variant: "default" }
|
|
17
|
+
});
|
|
18
|
+
function u({ className: o, variant: s, open: c = !0, message: u, action: d, onClose: f, closeAriaLabel: p = "닫기", ref: m, ...h }) {
|
|
19
|
+
if (!c) return null;
|
|
20
|
+
let { children: g, ..._ } = d ?? {};
|
|
21
|
+
return /* @__PURE__ */ a("div", {
|
|
22
|
+
ref: m,
|
|
23
|
+
role: s === "danger" ? "alert" : "status",
|
|
24
|
+
"aria-live": s === "danger" ? "assertive" : "polite",
|
|
25
|
+
"data-variant": s ?? "default",
|
|
26
|
+
className: t(l({ variant: s ?? "default" }), o),
|
|
27
|
+
...h,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ i("p", {
|
|
30
|
+
className: "aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white",
|
|
31
|
+
children: u
|
|
32
|
+
}),
|
|
33
|
+
d && /* @__PURE__ */ i(r, {
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
color: "primary",
|
|
36
|
+
size: "md",
|
|
37
|
+
className: "aivex:shrink-0",
|
|
38
|
+
..._,
|
|
39
|
+
children: g
|
|
40
|
+
}),
|
|
41
|
+
f && /* @__PURE__ */ i(n, {
|
|
42
|
+
"aria-label": p,
|
|
43
|
+
color: "white",
|
|
44
|
+
size: "sm",
|
|
45
|
+
className: "aivex:shrink-0",
|
|
46
|
+
onClick: f,
|
|
47
|
+
children: /* @__PURE__ */ i(e, { size: 20 })
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function d({ position: e = "bottom-center", duration: n = 4e3, visibleToasts: r = 3, gap: a = 8, style: o, toastOptions: c, ...u }) {
|
|
53
|
+
let d = e.endsWith("center");
|
|
54
|
+
return /* @__PURE__ */ i(s, {
|
|
55
|
+
position: e,
|
|
56
|
+
duration: n,
|
|
57
|
+
visibleToasts: r,
|
|
58
|
+
gap: a,
|
|
59
|
+
style: {
|
|
60
|
+
"--width": "720px",
|
|
61
|
+
...o
|
|
62
|
+
},
|
|
63
|
+
toastOptions: {
|
|
64
|
+
...c,
|
|
65
|
+
unstyled: !0,
|
|
66
|
+
className: t(l({ variant: "default" }), d && "aivex:inset-x-0 aivex:mx-auto", c?.className),
|
|
67
|
+
classNames: {
|
|
68
|
+
title: "aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white",
|
|
69
|
+
description: "aivex:mt-xs aivex:max-w-[720px] aivex:text-center aivex:text-body-md-regular aivex:text-static-white aivex:opacity-80",
|
|
70
|
+
actionButton: "aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-text-brand aivex:transition-colors aivex:hover:bg-static-white/8",
|
|
71
|
+
cancelButton: "aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8",
|
|
72
|
+
closeButton: "aivex:order-last aivex:inline-flex aivex:size-2xl aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:rounded-xs aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8",
|
|
73
|
+
...c?.classNames
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
...u
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { u as Toast, d as ToastToaster, c as toast, l as toastVariants };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=Toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { CSSProperties, HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { type ExternalToast, Toaster as SonnerToaster, type ToasterProps, toast } from \"sonner\";\nimport { Button, type ButtonProps } from \"@/components/Button\";\nimport { CloseIcon } from \"@/components/Icon\";\nimport { IconButton } from \"@/components/IconButton\";\nimport { cn } from \"@/utils/cn\";\nimport type { DataAttributes } from \"@/utils/dataAttributes\";\n\n// py는 xs(4px) — 액션 버튼(32px)이 들어가도 전체 높이가 40px로 유지된다.\n/** 토스트 표면 클래스(cva) — 같은 모양의 커스텀 토스트를 만들 때 쓴다. */\nconst toastVariants = cva(\n \"aivex:inline-flex aivex:min-h-10 aivex:w-fit aivex:items-center aivex:justify-center aivex:gap-md aivex:rounded-xs aivex:bg-static-gray aivex:px-xl aivex:py-xs\",\n {\n variants: {\n variant: {\n default: \"\",\n success: \"\",\n danger: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\n/**\n * Toast의 의미 톤 — default·success·danger. 시각적으로는 같은 어두운 표면이고,\n * danger는 스크린리더가 즉시 읽도록 role=\"alert\"로 알린다. 루트에 `data-variant`가 붙는다.\n */\nexport type ToastVariant = NonNullable<VariantProps<typeof toastVariants>[\"variant\"]>;\n\n/** 액션 버튼은 라벨을 children으로 받고, 스타일은 Toast가 고정한다. */\nexport interface ToastActionProps\n extends Omit<\n ButtonProps,\n \"render\" | \"children\" | \"className\" | \"color\" | \"ref\" | \"size\" | \"style\" | \"variant\"\n >,\n DataAttributes {\n /** 버튼 라벨 */\n children: ReactNode;\n}\n\nexport interface ToastProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * 의미 톤. 기본 \"default\".\n * @default \"default\"\n */\n variant?: ToastVariant;\n /**\n * false면 아무것도 렌더하지 않는다.\n * @default true\n */\n open?: boolean;\n /** 표시할 메시지(필수). 최대 720px 폭에서 가운데 정렬로 줄바꿈된다. */\n message: string;\n /** 메시지 우측 액션 버튼(예: 실행 취소). */\n action?: ToastActionProps;\n /** 지정하면 우측 끝에 닫기(X) 버튼을 렌더한다. */\n onClose?: () => void;\n /**\n * 닫기 버튼 aria-label. 기본 \"닫기\".\n * @default \"닫기\"\n */\n closeAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** ToastToaster props — sonner `Toaster` props 그대로(position·duration·visibleToasts·gap 등). */\nexport type ToastToasterProps = ToasterProps;\n/** `toast(message, options)`의 옵션 — sonner `ExternalToast` 그대로(description·action·closeButton·duration 등). */\nexport type ToastOptions = ExternalToast;\n\n/**\n * 토스트 모양만 그리는 정적 프리미티브 — 위치·자동 사라짐·쌓임 관리가 없다.\n *\n * 일반적인 알림은 이 컴포넌트 대신 `toast(\"메시지\")` 함수를 호출한다(ToastToaster가 앱에\n * 마운트돼 있어야 함). Toast는 직접 위치·표시를 제어해야 하는 특수한 경우나 미리보기용이다.\n * 계속 보여야 하는 화면 내 안내는 Messagebox를 쓴다. role=\"status\"·aria-live=\"polite\"로 읽힌다.\n *\n * @example\n * ```tsx\n * import { Toast } from \"@aivex/ui\";\n *\n * <Toast\n * message=\"파일을 삭제했습니다\"\n * action={{ children: \"실행 취소\", onClick: undo }}\n * onClose={() => setOpen(false)}\n * open={open}\n * />\n * ```\n */\nfunction Toast({\n className,\n variant,\n open = true,\n message,\n action,\n onClose,\n closeAriaLabel = \"닫기\",\n ref,\n ...props\n}: ToastProps) {\n if (!open) return null;\n\n const { children: actionLabel, ...actionProps } = action ?? {};\n\n return (\n <div\n ref={ref}\n // 실패 알림은 읽던 내용을 끊고 바로 알린다. 나머지는 끝난 뒤에 읽는다.\n role={variant === \"danger\" ? \"alert\" : \"status\"}\n aria-live={variant === \"danger\" ? \"assertive\" : \"polite\"}\n data-variant={variant ?? \"default\"}\n className={cn(toastVariants({ variant: variant ?? \"default\" }), className)}\n {...props}\n >\n <p className=\"aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white\">\n {message}\n </p>\n {action && (\n <Button\n variant=\"ghost\"\n color=\"primary\"\n size=\"md\"\n className=\"aivex:shrink-0\"\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n {onClose && (\n <IconButton\n aria-label={closeAriaLabel}\n color=\"white\"\n size=\"sm\"\n className=\"aivex:shrink-0\"\n onClick={onClose}\n >\n <CloseIcon size={20} />\n </IconButton>\n )}\n </div>\n );\n}\n\n/**\n * `toast()` 호출을 받아 화면에 토스트를 쌓아 보여 주는 컨테이너(sonner Toaster 래퍼).\n *\n * 앱 루트(레이아웃)에 한 번만 마운트한다 — 없으면 `toast()`를 호출해도 아무것도 보이지 않는다.\n * 그 뒤 어디서든 `@aivex/ui`의 `toast()`를 호출한다(sonner를 직접 import하지 않는다).\n * 기본값: position \"bottom-center\", duration 4000ms, visibleToasts 3, gap 8.\n *\n * @example\n * ```tsx\n * import { Button, ToastToaster, toast } from \"@aivex/ui\";\n *\n * // 앱 루트\n * <>\n * <App />\n * <ToastToaster />\n * </>\n *\n * // 어디서든\n * <Button onClick={() => toast(\"저장했습니다\")}>저장</Button>\n * <Button\n * onClick={() =>\n * toast(\"파일을 삭제했습니다\", {\n * action: { label: \"실행 취소\", onClick: undo },\n * closeButton: true,\n * })\n * }\n * >\n * 삭제\n * </Button>\n * ```\n */\nfunction ToastToaster({\n position = \"bottom-center\",\n duration = 4000,\n visibleToasts = 3,\n gap = 8,\n style,\n toastOptions,\n ...props\n}: ToastToasterProps) {\n const horizontallyCentered = position.endsWith(\"center\");\n\n return (\n <SonnerToaster\n position={position}\n duration={duration}\n visibleToasts={visibleToasts}\n gap={gap}\n // 토스트는 내용만큼 넓어진다(w-fit). 그런데 sonner는 감싸는 목록에\n // --width(기본 356px)를 박고 width: var(--width)를 걸어서, 자식의\n // fit-content가 356px에 갇혀 긴 문구가 접혔다. 목록 폭을 본문 최대\n // 폭(title의 max-w-720)까지 열어 두어, 토스트가 720px까지는 한 줄로\n // 늘어나고 그 뒤에야 접히게 한다.\n // (목록은 fixed + 자식이 absolute라 fit-content로 두면 0px로 무너진다.)\n style={{ \"--width\": \"720px\", ...style } as CSSProperties}\n toastOptions={{\n ...toastOptions,\n unstyled: true,\n // 토스트는 내용만큼 넓고(w-fit) 목록은 그보다 넓다 — sonner가 토스트를\n // 목록 왼쪽 끝(left:0)에 절대배치하므로 그대로 두면 왼쪽으로 치우친다.\n // 세로 위치는 sonner가 transform으로 잡으므로 건드리지 않고, 좌우만\n // inset-x-0 + mx-auto로 가운데 맞춘다.\n className: cn(\n toastVariants({ variant: \"default\" }),\n horizontallyCentered && \"aivex:inset-x-0 aivex:mx-auto\",\n toastOptions?.className,\n ),\n classNames: {\n title:\n \"aivex:max-w-[720px] aivex:text-center aivex:text-body-lg-regular aivex:text-static-white\",\n description:\n \"aivex:mt-xs aivex:max-w-[720px] aivex:text-center aivex:text-body-md-regular aivex:text-static-white aivex:opacity-80\",\n // 스탠드얼론 Toast의 Button(ghost/primary/md)·IconButton(white/sm)과 같은 서식.\n actionButton:\n \"aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-text-brand aivex:transition-colors aivex:hover:bg-static-white/8\",\n cancelButton:\n \"aivex:inline-flex aivex:h-8 aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:gap-2xs aivex:rounded-md aivex:px-md aivex:text-label-lg aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8\",\n // sonner는 닫기 버튼을 DOM 맨 앞에 렌더한다. 시안은 우측 끝이라 order로 옮긴다.\n closeButton:\n \"aivex:order-last aivex:inline-flex aivex:size-2xl aivex:shrink-0 aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:rounded-xs aivex:text-static-white aivex:transition-colors aivex:hover:bg-static-white/8\",\n ...toastOptions?.classNames,\n },\n }}\n {...props}\n />\n );\n}\n\nexport { Toast, ToastToaster, toast, toastVariants };\n"],"mappings":";;;;;;;;;AAWA,IAAM,IAAgB,EACpB,mKACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,QAAQ;EACT,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAoED,SAAS,EAAM,EACb,cACA,YACA,UAAO,IACP,YACA,WACA,YACA,oBAAiB,MACjB,QACA,GAAG,KACU;AACb,KAAI,CAAC,EAAM,QAAO;CAElB,IAAM,EAAE,UAAU,GAAa,GAAG,MAAgB,KAAU,EAAE;AAE9D,QACE,kBAAC,OAAD;EACO;EAEL,MAAM,MAAY,WAAW,UAAU;EACvC,aAAW,MAAY,WAAW,cAAc;EAChD,gBAAc,KAAW;EACzB,WAAW,EAAG,EAAc,EAAE,SAAS,KAAW,WAAW,CAAC,EAAE,EAAU;EAC1E,GAAI;YAPN;GASE,kBAAC,KAAD;IAAG,WAAU;cACV;IACC,CAAA;GACH,KACC,kBAAC,GAAD;IACE,SAAQ;IACR,OAAM;IACN,MAAK;IACL,WAAU;IACV,GAAI;cAEH;IACM,CAAA;GAEV,KACC,kBAAC,GAAD;IACE,cAAY;IACZ,OAAM;IACN,MAAK;IACL,WAAU;IACV,SAAS;cAET,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IACZ,CAAA;GAEX;;;AAmCV,SAAS,EAAa,EACpB,cAAW,iBACX,cAAW,KACX,mBAAgB,GAChB,SAAM,GACN,UACA,iBACA,GAAG,KACiB;CACpB,IAAM,IAAuB,EAAS,SAAS,SAAS;AAExD,QACE,kBAAC,GAAD;EACY;EACA;EACK;EACV;EAOL,OAAO;GAAE,WAAW;GAAS,GAAG;GAAO;EACvC,cAAc;GACZ,GAAG;GACH,UAAU;GAKV,WAAW,EACT,EAAc,EAAE,SAAS,WAAW,CAAC,EACrC,KAAwB,iCACxB,GAAc,UACf;GACD,YAAY;IACV,OACE;IACF,aACE;IAEF,cACE;IACF,cACE;IAEF,aACE;IACF,GAAG,GAAc;IAClB;GACF;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ToastOptions, ToastProps, ToastToasterProps } from "./Toast";
|
|
2
|
-
export { Toast, ToastToaster, toast, toastVariants } from "./Toast";
|
|
1
|
+
export type { ToastActionProps, ToastOptions, ToastProps, ToastToasterProps, ToastVariant, } from "./Toast.js";
|
|
2
|
+
export { Toast, ToastToaster, toast, toastVariants } from "./Toast.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`../../utils/useControllableState.cjs`),n=require(`../InteractionLayer/InteractionLayer.cjs`);let r=require(`react/jsx-runtime`);var i=(0,require(`class-variance-authority`).cva)(`aivex:relative aivex:overflow-hidden aivex:group aivex:inline-flex aivex:items-center aivex:justify-center aivex:border aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:pointer-events-none aivex:disabled:opacity-disable`,{variants:{shape:{rectangle:``,rounded:`aivex:rounded-full`},size:{sm:`aivex:h-6 aivex:gap-none aivex:text-label-md`,md:`aivex:h-8 aivex:gap-2xs aivex:text-label-lg`,"icon-sm":`aivex:h-6 aivex:w-6 aivex:px-0`,"icon-md":`aivex:h-8 aivex:w-8 aivex:px-0`},variant:{outline:``,ghost:`aivex:border-transparent`},active:{true:`aivex:bg-bg-brand-subtle aivex:text-text-brand`,false:`aivex:bg-bg-primary aivex:text-text-primary`}},compoundVariants:[{variant:`outline`,active:!1,className:`aivex:border-border-default`},{variant:`outline`,active:!0,className:`aivex:border-border-brand-subtle`},{shape:`rectangle`,size:[`sm`,`icon-sm`],className:`aivex:rounded-sm`},{shape:`rectangle`,size:[`md`,`icon-md`],className:`aivex:rounded-md`},{shape:`rectangle`,size:`sm`,className:`aivex:px-sm`},{shape:`rectangle`,size:`md`,className:`aivex:px-md`},{shape:`rounded`,size:`sm`,className:`aivex:px-md`},{shape:`rounded`,size:`md`,className:`aivex:px-lg`}],defaultVariants:{shape:`rounded`,size:`md`,variant:`outline`,active:!1}});function a({className:a,shape:o,size:s,variant:c,active:l,defaultActive:u,onActiveChange:d,startContent:f,endContent:p,children:m,ref:h,onClick:g,type:_=`button`,...v}){let[y,b]=t.useControllableState({value:l??void 0,defaultValue:!!u,onChange:d});return(0,r.jsxs)(`button`,{ref:h,type:_,"aria-pressed":y,className:e.cn(i({shape:o,size:s,variant:c,active:y}),a),onClick:e=>{b(!y),g?.(e)},...v,children:[(0,r.jsx)(n.InteractionLayer,{}),f||p?(0,r.jsxs)(r.Fragment,{children:[f&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center`,children:f}),(0,r.jsx)(`span`,{className:`aivex:min-w-0 aivex:truncate aivex:px-2xs`,children:m}),p&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center`,children:p})]}):m]})}exports.ToggleButton=a,exports.toggleButtonVariants=i;
|
|
2
|
+
//# sourceMappingURL=ToggleButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButton.cjs","names":[],"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from \"react\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\nimport { useControllableState } from \"@/utils/useControllableState\";\n\n/** 토글 버튼의 모양·크기·변형·활성 클래스를 만드는 cva 변형. */\nconst toggleButtonVariants = cva(\n \"aivex:relative aivex:overflow-hidden aivex:group aivex:inline-flex aivex:items-center aivex:justify-center aivex:border aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:pointer-events-none aivex:disabled:opacity-disable\",\n {\n variants: {\n shape: {\n rectangle: \"\",\n rounded: \"aivex:rounded-full\",\n },\n // Button과 동일하게 아이콘 전용은 icon-* 사이즈로 통합\n size: {\n sm: \"aivex:h-6 aivex:gap-none aivex:text-label-md\",\n md: \"aivex:h-8 aivex:gap-2xs aivex:text-label-lg\",\n \"icon-sm\": \"aivex:h-6 aivex:w-6 aivex:px-0\",\n \"icon-md\": \"aivex:h-8 aivex:w-8 aivex:px-0\",\n },\n // Outline: 테두리 있음(기존) / Ghost: 테두리 없음\n variant: {\n outline: \"\",\n ghost: \"aivex:border-transparent\",\n },\n active: {\n true: \"aivex:bg-bg-brand-subtle aivex:text-text-brand\",\n false: \"aivex:bg-bg-primary aivex:text-text-primary\",\n },\n },\n compoundVariants: [\n // Outline 배리언트의 테두리 색상 (Ghost는 border-transparent 유지)\n {\n variant: \"outline\",\n active: false,\n className: \"aivex:border-border-default\",\n },\n {\n variant: \"outline\",\n active: true,\n className: \"aivex:border-border-brand-subtle\",\n },\n // rectangle 라운딩 (텍스트/아이콘 사이즈 공통)\n {\n shape: \"rectangle\",\n size: [\"sm\", \"icon-sm\"],\n className: \"aivex:rounded-sm\",\n },\n {\n shape: \"rectangle\",\n size: [\"md\", \"icon-md\"],\n className: \"aivex:rounded-md\",\n },\n // 텍스트 사이즈의 가로 패딩 (icon-* 는 size 자체가 px-0)\n {\n shape: \"rectangle\",\n size: \"sm\",\n className: \"aivex:px-sm\",\n },\n {\n shape: \"rectangle\",\n size: \"md\",\n className: \"aivex:px-md\",\n },\n {\n shape: \"rounded\",\n size: \"sm\",\n className: \"aivex:px-md\",\n },\n {\n shape: \"rounded\",\n size: \"md\",\n className: \"aivex:px-lg\",\n },\n ],\n defaultVariants: {\n shape: \"rounded\",\n size: \"md\",\n variant: \"outline\",\n active: false,\n },\n },\n);\n\nexport interface ToggleButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof toggleButtonVariants> {\n /** 라벨 앞 슬롯(아이콘 등) */\n startContent?: ReactNode;\n /** 라벨 뒤 슬롯(아이콘 등) */\n endContent?: ReactNode;\n /** 버튼 라벨. 아이콘 전용(size icon-sm·icon-md)이면 aria-label을 함께 지정한다 */\n children?: ReactNode;\n /** button 요소 ref */\n ref?: Ref<HTMLButtonElement>;\n /** 비제어 모드의 초기 활성 상태. */\n defaultActive?: boolean;\n /** 클릭으로 활성 상태가 바뀔 때 새 값으로 호출된다. 제어 모드(`active`)에서도 호출된다. */\n onActiveChange?: (active: boolean) => void;\n}\n\n/**\n * 눌림(on/off) 상태를 가지는 토글 버튼(`aria-pressed`).\n * 각각 독립적으로 켜고 끄는 필터 칩·다중 선택에 쓴다. 하나만 고르는 그룹은 Segmented·Radio,\n * 즉시 반영되는 설정 on/off는 Switch. 제어는 `active` + onActiveChange(boolean), 비제어는 defaultActive.\n * 클릭 시 상태 토글 후 onClick도 함께 호출된다. 기본은 shape `\"rounded\"`·size `\"md\"`·variant `\"outline\"`\n * (`\"ghost\"`는 테두리 없음), size는 텍스트용 `\"sm\"`·`\"md\"`와 아이콘 전용 `\"icon-sm\"`·`\"icon-md\"`.\n *\n * @example\n * ```tsx\n * import { ToggleButton } from \"@aivex/ui\";\n *\n * <ToggleButton active={onlyMine} onActiveChange={setOnlyMine} size=\"sm\">\n * 내 작업만\n * </ToggleButton>\n * ```\n */\nfunction ToggleButton({\n className,\n shape,\n size,\n variant,\n active,\n defaultActive,\n onActiveChange,\n startContent,\n endContent,\n children,\n ref,\n onClick,\n type = \"button\",\n ...props\n}: ToggleButtonProps) {\n // cva가 active를 boolean | null로 열어 두므로 null은 비제어로 본다.\n const [currentActive, setActive] = useControllableState<boolean>({\n value: active ?? undefined,\n defaultValue: Boolean(defaultActive),\n onChange: onActiveChange,\n });\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n setActive(!currentActive);\n onClick?.(e);\n };\n\n return (\n <button\n ref={ref}\n type={type}\n aria-pressed={currentActive}\n className={cn(\n toggleButtonVariants({ shape, size, variant, active: currentActive }),\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n <InteractionLayer />\n {startContent || endContent ? (\n <>\n {startContent && (\n <span className=\"aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center\">\n {startContent}\n </span>\n )}\n <span className=\"aivex:min-w-0 aivex:truncate aivex:px-2xs\">{children}</span>\n {endContent && (\n <span className=\"aivex:flex aivex:shrink-0 aivex:items-center aivex:justify-center\">\n {endContent}\n </span>\n )}\n </>\n ) : (\n children\n )}\n </button>\n );\n}\n\nexport { ToggleButton, toggleButtonVariants };\n"],"mappings":"2OAOA,IAAM,GAAA,sCAAA,KACJ,6VACA,CACE,SAAU,CACR,MAAO,CACL,UAAW,GACX,QAAS,qBACV,CAED,KAAM,CACJ,GAAI,+CACJ,GAAI,8CACJ,UAAW,iCACX,UAAW,iCACZ,CAED,QAAS,CACP,QAAS,GACT,MAAO,2BACR,CACD,OAAQ,CACN,KAAM,iDACN,MAAO,8CACR,CACF,CACD,iBAAkB,CAEhB,CACE,QAAS,UACT,OAAQ,GACR,UAAW,8BACZ,CACD,CACE,QAAS,UACT,OAAQ,GACR,UAAW,mCACZ,CAED,CACE,MAAO,YACP,KAAM,CAAC,KAAM,UAAU,CACvB,UAAW,mBACZ,CACD,CACE,MAAO,YACP,KAAM,CAAC,KAAM,UAAU,CACvB,UAAW,mBACZ,CAED,CACE,MAAO,YACP,KAAM,KACN,UAAW,cACZ,CACD,CACE,MAAO,YACP,KAAM,KACN,UAAW,cACZ,CACD,CACE,MAAO,UACP,KAAM,KACN,UAAW,cACZ,CACD,CACE,MAAO,UACP,KAAM,KACN,UAAW,cACZ,CACF,CACD,gBAAiB,CACf,MAAO,UACP,KAAM,KACN,QAAS,UACT,OAAQ,GACT,CACF,CACF,CAmCD,SAAS,EAAa,CACpB,YACA,QACA,OACA,UACA,SACA,gBACA,iBACA,eACA,aACA,WACA,MACA,UACA,OAAO,SACP,GAAG,GACiB,CAEpB,GAAM,CAAC,EAAe,GAAa,EAAA,qBAA8B,CAC/D,MAAO,GAAU,IAAA,GACjB,aAAc,EAAQ,EACtB,SAAU,EACX,CAAC,CAOF,OACE,EAAA,EAAA,MAAC,SAAD,CACO,MACC,OACN,eAAc,EACd,UAAW,EAAA,GACT,EAAqB,CAAE,QAAO,OAAM,UAAS,OAAQ,EAAe,CAAC,CACrE,EACD,CACD,QAdiB,GAA2C,CAC9D,EAAU,CAAC,EAAc,CACzB,IAAU,EAAE,EAaV,GAAI,WATN,EAWE,EAAA,EAAA,KAAC,EAAA,iBAAD,EAAoB,CAAA,CACnB,GAAgB,GACf,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,6EACb,EACI,CAAA,EAET,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,4CAA6C,WAAgB,CAAA,CAC5E,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,6EACb,EACI,CAAA,CAER,CAAA,CAAA,CAEH,EAEK"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
|
+
/** 토글 버튼의 모양·크기·변형·활성 클래스를 만드는 cva 변형. */
|
|
4
|
+
declare const toggleButtonVariants: (props?: ({
|
|
5
|
+
shape?: "rectangle" | "rounded" | null | undefined;
|
|
6
|
+
size?: "icon-md" | "icon-sm" | "md" | "sm" | null | undefined;
|
|
7
|
+
variant?: "ghost" | "outline" | null | undefined;
|
|
8
|
+
active?: boolean | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export interface ToggleButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof toggleButtonVariants> {
|
|
11
|
+
/** 라벨 앞 슬롯(아이콘 등) */
|
|
12
|
+
startContent?: ReactNode;
|
|
13
|
+
/** 라벨 뒤 슬롯(아이콘 등) */
|
|
14
|
+
endContent?: ReactNode;
|
|
15
|
+
/** 버튼 라벨. 아이콘 전용(size icon-sm·icon-md)이면 aria-label을 함께 지정한다 */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** button 요소 ref */
|
|
18
|
+
ref?: Ref<HTMLButtonElement>;
|
|
19
|
+
/** 비제어 모드의 초기 활성 상태. */
|
|
20
|
+
defaultActive?: boolean;
|
|
21
|
+
/** 클릭으로 활성 상태가 바뀔 때 새 값으로 호출된다. 제어 모드(`active`)에서도 호출된다. */
|
|
22
|
+
onActiveChange?: (active: boolean) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 눌림(on/off) 상태를 가지는 토글 버튼(`aria-pressed`).
|
|
26
|
+
* 각각 독립적으로 켜고 끄는 필터 칩·다중 선택에 쓴다. 하나만 고르는 그룹은 Segmented·Radio,
|
|
27
|
+
* 즉시 반영되는 설정 on/off는 Switch. 제어는 `active` + onActiveChange(boolean), 비제어는 defaultActive.
|
|
28
|
+
* 클릭 시 상태 토글 후 onClick도 함께 호출된다. 기본은 shape `"rounded"`·size `"md"`·variant `"outline"`
|
|
29
|
+
* (`"ghost"`는 테두리 없음), size는 텍스트용 `"sm"`·`"md"`와 아이콘 전용 `"icon-sm"`·`"icon-md"`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { ToggleButton } from "@aivex/ui";
|
|
34
|
+
*
|
|
35
|
+
* <ToggleButton active={onlyMine} onActiveChange={setOnlyMine} size="sm">
|
|
36
|
+
* 내 작업만
|
|
37
|
+
* </ToggleButton>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare function ToggleButton({ className, shape, size, variant, active, defaultActive, onActiveChange, startContent, endContent, children, ref, onClick, type, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export { ToggleButton, toggleButtonVariants };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
import {
|
|
2
|
+
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
|
+
/** 토글 버튼의 모양·크기·변형·활성 클래스를 만드는 cva 변형. */
|
|
3
4
|
declare const toggleButtonVariants: (props?: ({
|
|
4
5
|
shape?: "rectangle" | "rounded" | null | undefined;
|
|
5
6
|
size?: "icon-md" | "icon-sm" | "md" | "sm" | null | undefined;
|
|
@@ -7,11 +8,34 @@ declare const toggleButtonVariants: (props?: ({
|
|
|
7
8
|
active?: boolean | null | undefined;
|
|
8
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
10
|
export interface ToggleButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof toggleButtonVariants> {
|
|
11
|
+
/** 라벨 앞 슬롯(아이콘 등) */
|
|
10
12
|
startContent?: ReactNode;
|
|
13
|
+
/** 라벨 뒤 슬롯(아이콘 등) */
|
|
11
14
|
endContent?: ReactNode;
|
|
15
|
+
/** 버튼 라벨. 아이콘 전용(size icon-sm·icon-md)이면 aria-label을 함께 지정한다 */
|
|
12
16
|
children?: ReactNode;
|
|
17
|
+
/** button 요소 ref */
|
|
13
18
|
ref?: Ref<HTMLButtonElement>;
|
|
19
|
+
/** 비제어 모드의 초기 활성 상태. */
|
|
14
20
|
defaultActive?: boolean;
|
|
21
|
+
/** 클릭으로 활성 상태가 바뀔 때 새 값으로 호출된다. 제어 모드(`active`)에서도 호출된다. */
|
|
22
|
+
onActiveChange?: (active: boolean) => void;
|
|
15
23
|
}
|
|
16
|
-
|
|
24
|
+
/**
|
|
25
|
+
* 눌림(on/off) 상태를 가지는 토글 버튼(`aria-pressed`).
|
|
26
|
+
* 각각 독립적으로 켜고 끄는 필터 칩·다중 선택에 쓴다. 하나만 고르는 그룹은 Segmented·Radio,
|
|
27
|
+
* 즉시 반영되는 설정 on/off는 Switch. 제어는 `active` + onActiveChange(boolean), 비제어는 defaultActive.
|
|
28
|
+
* 클릭 시 상태 토글 후 onClick도 함께 호출된다. 기본은 shape `"rounded"`·size `"md"`·variant `"outline"`
|
|
29
|
+
* (`"ghost"`는 테두리 없음), size는 텍스트용 `"sm"`·`"md"`와 아이콘 전용 `"icon-sm"`·`"icon-md"`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { ToggleButton } from "@aivex/ui";
|
|
34
|
+
*
|
|
35
|
+
* <ToggleButton active={onlyMine} onActiveChange={setOnlyMine} size="sm">
|
|
36
|
+
* 내 작업만
|
|
37
|
+
* </ToggleButton>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare function ToggleButton({ className, shape, size, variant, active, defaultActive, onActiveChange, startContent, endContent, children, ref, onClick, type, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
41
|
export { ToggleButton, toggleButtonVariants };
|