@tenstorrent/vesper 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +167 -0
- package/dist/components/accordion/accordion.css +1 -0
- package/dist/components/accordion/accordion.d.ts +33 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +30 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/admonition/admonition.css +1 -0
- package/dist/components/admonition/admonition.d.ts +49 -0
- package/dist/components/admonition/admonition.d.ts.map +1 -0
- package/dist/components/admonition/admonition.js +47 -0
- package/dist/components/admonition/admonition.js.map +1 -0
- package/dist/components/avatar/avatar.css +1 -0
- package/dist/components/avatar/avatar.d.ts +30 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +24 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar-group/avatar-group.css +1 -0
- package/dist/components/avatar-group/avatar-group.d.ts +36 -0
- package/dist/components/avatar-group/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar-group/avatar-group.js +30 -0
- package/dist/components/avatar-group/avatar-group.js.map +1 -0
- package/dist/components/badge/badge.css +1 -0
- package/dist/components/badge/badge.d.ts +42 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +49 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/button/button.css +1 -0
- package/dist/components/button/button.d.ts +51 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +49 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/checkbox/checkbox.css +1 -0
- package/dist/components/checkbox/checkbox.d.ts +53 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +65 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/chip/chip.css +1 -0
- package/dist/components/chip/chip.d.ts +53 -0
- package/dist/components/chip/chip.d.ts.map +1 -0
- package/dist/components/chip/chip.js +51 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/choicebox/choicebox.css +1 -0
- package/dist/components/choicebox/choicebox.d.ts +90 -0
- package/dist/components/choicebox/choicebox.d.ts.map +1 -0
- package/dist/components/choicebox/choicebox.js +131 -0
- package/dist/components/choicebox/choicebox.js.map +1 -0
- package/dist/components/code/code.css +1 -0
- package/dist/components/code/code.d.ts +23 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/code.js +23 -0
- package/dist/components/code/code.js.map +1 -0
- package/dist/components/code-block/code-block.css +1 -0
- package/dist/components/code-block/code-block.d.ts +48 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +36 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/components.d.ts +4 -0
- package/dist/components/code-block/components.d.ts.map +1 -0
- package/dist/components/code-block/components.js +27 -0
- package/dist/components/code-block/components.js.map +1 -0
- package/dist/components/code-block/fixtures.d.ts +12 -0
- package/dist/components/code-block/fixtures.d.ts.map +1 -0
- package/dist/components/code-block/fixtures.js +491 -0
- package/dist/components/code-block/fixtures.js.map +1 -0
- package/dist/components/code-block/streaming-code-block.d.ts +5 -0
- package/dist/components/code-block/streaming-code-block.d.ts.map +1 -0
- package/dist/components/code-block/streaming-code-block.js +92 -0
- package/dist/components/code-block/streaming-code-block.js.map +1 -0
- package/dist/components/code-block/themes.d.ts +16 -0
- package/dist/components/code-block/themes.d.ts.map +1 -0
- package/dist/components/code-block/themes.js +2836 -0
- package/dist/components/code-block/themes.js.map +1 -0
- package/dist/components/code-block/utils.d.ts +7 -0
- package/dist/components/code-block/utils.d.ts.map +1 -0
- package/dist/components/code-block/utils.js +42 -0
- package/dist/components/code-block/utils.js.map +1 -0
- package/dist/components/combobox/combobox.css +1 -0
- package/dist/components/combobox/combobox.d.ts +106 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +93 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/form-input-message/form-input-message.css +1 -0
- package/dist/components/form-input-message/form-input-message.d.ts +35 -0
- package/dist/components/form-input-message/form-input-message.d.ts.map +1 -0
- package/dist/components/form-input-message/form-input-message.js +38 -0
- package/dist/components/form-input-message/form-input-message.js.map +1 -0
- package/dist/components/icon-button/icon-button.css +1 -0
- package/dist/components/icon-button/icon-button.d.ts +38 -0
- package/dist/components/icon-button/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button/icon-button.js +31 -0
- package/dist/components/icon-button/icon-button.js.map +1 -0
- package/dist/components/icons/add.d.ts +3 -0
- package/dist/components/icons/add.d.ts.map +1 -0
- package/dist/components/icons/add.js +5 -0
- package/dist/components/icons/add.js.map +1 -0
- package/dist/components/icons/ai-agent-solid.d.ts +3 -0
- package/dist/components/icons/ai-agent-solid.d.ts.map +1 -0
- package/dist/components/icons/ai-agent-solid.js +5 -0
- package/dist/components/icons/ai-agent-solid.js.map +1 -0
- package/dist/components/icons/ai-agent.d.ts +3 -0
- package/dist/components/icons/ai-agent.d.ts.map +1 -0
- package/dist/components/icons/ai-agent.js +5 -0
- package/dist/components/icons/ai-agent.js.map +1 -0
- package/dist/components/icons/ai-data.d.ts +3 -0
- package/dist/components/icons/ai-data.d.ts.map +1 -0
- package/dist/components/icons/ai-data.js +5 -0
- package/dist/components/icons/ai-data.js.map +1 -0
- package/dist/components/icons/ai-model.d.ts +3 -0
- package/dist/components/icons/ai-model.d.ts.map +1 -0
- package/dist/components/icons/ai-model.js +5 -0
- package/dist/components/icons/ai-model.js.map +1 -0
- package/dist/components/icons/ai-task.d.ts +3 -0
- package/dist/components/icons/ai-task.d.ts.map +1 -0
- package/dist/components/icons/ai-task.js +5 -0
- package/dist/components/icons/ai-task.js.map +1 -0
- package/dist/components/icons/ai-video-gen.d.ts +3 -0
- package/dist/components/icons/ai-video-gen.d.ts.map +1 -0
- package/dist/components/icons/ai-video-gen.js +5 -0
- package/dist/components/icons/ai-video-gen.js.map +1 -0
- package/dist/components/icons/ai.d.ts +3 -0
- package/dist/components/icons/ai.d.ts.map +1 -0
- package/dist/components/icons/ai.js +5 -0
- package/dist/components/icons/ai.js.map +1 -0
- package/dist/components/icons/arrow-down.d.ts +3 -0
- package/dist/components/icons/arrow-down.d.ts.map +1 -0
- package/dist/components/icons/arrow-down.js +5 -0
- package/dist/components/icons/arrow-down.js.map +1 -0
- package/dist/components/icons/arrow-left.d.ts +3 -0
- package/dist/components/icons/arrow-left.d.ts.map +1 -0
- package/dist/components/icons/arrow-left.js +5 -0
- package/dist/components/icons/arrow-left.js.map +1 -0
- package/dist/components/icons/arrow-right.d.ts +3 -0
- package/dist/components/icons/arrow-right.d.ts.map +1 -0
- package/dist/components/icons/arrow-right.js +5 -0
- package/dist/components/icons/arrow-right.js.map +1 -0
- package/dist/components/icons/arrow-up-left.d.ts +3 -0
- package/dist/components/icons/arrow-up-left.d.ts.map +1 -0
- package/dist/components/icons/arrow-up-left.js +5 -0
- package/dist/components/icons/arrow-up-left.js.map +1 -0
- package/dist/components/icons/arrow-up-right.d.ts +3 -0
- package/dist/components/icons/arrow-up-right.d.ts.map +1 -0
- package/dist/components/icons/arrow-up-right.js +5 -0
- package/dist/components/icons/arrow-up-right.js.map +1 -0
- package/dist/components/icons/arrow-up.d.ts +3 -0
- package/dist/components/icons/arrow-up.d.ts.map +1 -0
- package/dist/components/icons/arrow-up.js +5 -0
- package/dist/components/icons/arrow-up.js.map +1 -0
- package/dist/components/icons/auto.d.ts +3 -0
- package/dist/components/icons/auto.d.ts.map +1 -0
- package/dist/components/icons/auto.js +5 -0
- package/dist/components/icons/auto.js.map +1 -0
- package/dist/components/icons/blackhole.d.ts +3 -0
- package/dist/components/icons/blackhole.d.ts.map +1 -0
- package/dist/components/icons/blackhole.js +5 -0
- package/dist/components/icons/blackhole.js.map +1 -0
- package/dist/components/icons/board.d.ts +3 -0
- package/dist/components/icons/board.d.ts.map +1 -0
- package/dist/components/icons/board.js +5 -0
- package/dist/components/icons/board.js.map +1 -0
- package/dist/components/icons/bolt.d.ts +3 -0
- package/dist/components/icons/bolt.d.ts.map +1 -0
- package/dist/components/icons/bolt.js +5 -0
- package/dist/components/icons/bolt.js.map +1 -0
- package/dist/components/icons/bug.d.ts +3 -0
- package/dist/components/icons/bug.d.ts.map +1 -0
- package/dist/components/icons/bug.js +5 -0
- package/dist/components/icons/bug.js.map +1 -0
- package/dist/components/icons/caret-down.d.ts +3 -0
- package/dist/components/icons/caret-down.d.ts.map +1 -0
- package/dist/components/icons/caret-down.js +5 -0
- package/dist/components/icons/caret-down.js.map +1 -0
- package/dist/components/icons/caret-left.d.ts +3 -0
- package/dist/components/icons/caret-left.d.ts.map +1 -0
- package/dist/components/icons/caret-left.js +5 -0
- package/dist/components/icons/caret-left.js.map +1 -0
- package/dist/components/icons/caret-right.d.ts +3 -0
- package/dist/components/icons/caret-right.d.ts.map +1 -0
- package/dist/components/icons/caret-right.js +5 -0
- package/dist/components/icons/caret-right.js.map +1 -0
- package/dist/components/icons/caret-up.d.ts +3 -0
- package/dist/components/icons/caret-up.d.ts.map +1 -0
- package/dist/components/icons/caret-up.js +5 -0
- package/dist/components/icons/caret-up.js.map +1 -0
- package/dist/components/icons/cart.d.ts +3 -0
- package/dist/components/icons/cart.d.ts.map +1 -0
- package/dist/components/icons/cart.js +5 -0
- package/dist/components/icons/cart.js.map +1 -0
- package/dist/components/icons/chat-solid.d.ts +3 -0
- package/dist/components/icons/chat-solid.d.ts.map +1 -0
- package/dist/components/icons/chat-solid.js +5 -0
- package/dist/components/icons/chat-solid.js.map +1 -0
- package/dist/components/icons/chat.d.ts +3 -0
- package/dist/components/icons/chat.d.ts.map +1 -0
- package/dist/components/icons/chat.js +5 -0
- package/dist/components/icons/chat.js.map +1 -0
- package/dist/components/icons/checkmark.d.ts +3 -0
- package/dist/components/icons/checkmark.d.ts.map +1 -0
- package/dist/components/icons/checkmark.js +5 -0
- package/dist/components/icons/checkmark.js.map +1 -0
- package/dist/components/icons/chip.d.ts +3 -0
- package/dist/components/icons/chip.d.ts.map +1 -0
- package/dist/components/icons/chip.js +5 -0
- package/dist/components/icons/chip.js.map +1 -0
- package/dist/components/icons/circle-add-solid.d.ts +3 -0
- package/dist/components/icons/circle-add-solid.d.ts.map +1 -0
- package/dist/components/icons/circle-add-solid.js +5 -0
- package/dist/components/icons/circle-add-solid.js.map +1 -0
- package/dist/components/icons/circle-add.d.ts +3 -0
- package/dist/components/icons/circle-add.d.ts.map +1 -0
- package/dist/components/icons/circle-add.js +5 -0
- package/dist/components/icons/circle-add.js.map +1 -0
- package/dist/components/icons/circle-x-solid.d.ts +3 -0
- package/dist/components/icons/circle-x-solid.d.ts.map +1 -0
- package/dist/components/icons/circle-x-solid.js +5 -0
- package/dist/components/icons/circle-x-solid.js.map +1 -0
- package/dist/components/icons/circle-x.d.ts +3 -0
- package/dist/components/icons/circle-x.d.ts.map +1 -0
- package/dist/components/icons/circle-x.js +5 -0
- package/dist/components/icons/circle-x.js.map +1 -0
- package/dist/components/icons/clock-countdown.d.ts +3 -0
- package/dist/components/icons/clock-countdown.d.ts.map +1 -0
- package/dist/components/icons/clock-countdown.js +5 -0
- package/dist/components/icons/clock-countdown.js.map +1 -0
- package/dist/components/icons/clock-counter-clockwise.d.ts +3 -0
- package/dist/components/icons/clock-counter-clockwise.d.ts.map +1 -0
- package/dist/components/icons/clock-counter-clockwise.js +5 -0
- package/dist/components/icons/clock-counter-clockwise.js.map +1 -0
- package/dist/components/icons/clock.d.ts +3 -0
- package/dist/components/icons/clock.d.ts.map +1 -0
- package/dist/components/icons/clock.js +5 -0
- package/dist/components/icons/clock.js.map +1 -0
- package/dist/components/icons/close-panel.d.ts +3 -0
- package/dist/components/icons/close-panel.d.ts.map +1 -0
- package/dist/components/icons/close-panel.js +5 -0
- package/dist/components/icons/close-panel.js.map +1 -0
- package/dist/components/icons/close.d.ts +3 -0
- package/dist/components/icons/close.d.ts.map +1 -0
- package/dist/components/icons/close.js +5 -0
- package/dist/components/icons/close.js.map +1 -0
- package/dist/components/icons/cloud-server-solid.d.ts +3 -0
- package/dist/components/icons/cloud-server-solid.d.ts.map +1 -0
- package/dist/components/icons/cloud-server-solid.js +5 -0
- package/dist/components/icons/cloud-server-solid.js.map +1 -0
- package/dist/components/icons/cloud-server.d.ts +3 -0
- package/dist/components/icons/cloud-server.d.ts.map +1 -0
- package/dist/components/icons/cloud-server.js +5 -0
- package/dist/components/icons/cloud-server.js.map +1 -0
- package/dist/components/icons/constants.d.ts +3 -0
- package/dist/components/icons/constants.d.ts.map +1 -0
- package/dist/components/icons/constants.js +137 -0
- package/dist/components/icons/constants.js.map +1 -0
- package/dist/components/icons/copy.d.ts +3 -0
- package/dist/components/icons/copy.d.ts.map +1 -0
- package/dist/components/icons/copy.js +5 -0
- package/dist/components/icons/copy.js.map +1 -0
- package/dist/components/icons/document-solid.d.ts +3 -0
- package/dist/components/icons/document-solid.d.ts.map +1 -0
- package/dist/components/icons/document-solid.js +5 -0
- package/dist/components/icons/document-solid.js.map +1 -0
- package/dist/components/icons/document.d.ts +3 -0
- package/dist/components/icons/document.d.ts.map +1 -0
- package/dist/components/icons/document.js +5 -0
- package/dist/components/icons/document.js.map +1 -0
- package/dist/components/icons/download.d.ts +3 -0
- package/dist/components/icons/download.d.ts.map +1 -0
- package/dist/components/icons/download.js +5 -0
- package/dist/components/icons/download.js.map +1 -0
- package/dist/components/icons/ellipses.d.ts +3 -0
- package/dist/components/icons/ellipses.d.ts.map +1 -0
- package/dist/components/icons/ellipses.js +5 -0
- package/dist/components/icons/ellipses.js.map +1 -0
- package/dist/components/icons/error-solid.d.ts +3 -0
- package/dist/components/icons/error-solid.d.ts.map +1 -0
- package/dist/components/icons/error-solid.js +5 -0
- package/dist/components/icons/error-solid.js.map +1 -0
- package/dist/components/icons/error.d.ts +3 -0
- package/dist/components/icons/error.d.ts.map +1 -0
- package/dist/components/icons/error.js +5 -0
- package/dist/components/icons/error.js.map +1 -0
- package/dist/components/icons/eye-slash.d.ts +3 -0
- package/dist/components/icons/eye-slash.d.ts.map +1 -0
- package/dist/components/icons/eye-slash.js +5 -0
- package/dist/components/icons/eye-slash.js.map +1 -0
- package/dist/components/icons/eye.d.ts +3 -0
- package/dist/components/icons/eye.d.ts.map +1 -0
- package/dist/components/icons/eye.js +5 -0
- package/dist/components/icons/eye.js.map +1 -0
- package/dist/components/icons/folder.d.ts +3 -0
- package/dist/components/icons/folder.d.ts.map +1 -0
- package/dist/components/icons/folder.js +5 -0
- package/dist/components/icons/folder.js.map +1 -0
- package/dist/components/icons/galaxy-rack.d.ts +3 -0
- package/dist/components/icons/galaxy-rack.d.ts.map +1 -0
- package/dist/components/icons/galaxy-rack.js +5 -0
- package/dist/components/icons/galaxy-rack.js.map +1 -0
- package/dist/components/icons/galaxy.d.ts +3 -0
- package/dist/components/icons/galaxy.d.ts.map +1 -0
- package/dist/components/icons/galaxy.js +5 -0
- package/dist/components/icons/galaxy.js.map +1 -0
- package/dist/components/icons/gear-solid.d.ts +3 -0
- package/dist/components/icons/gear-solid.d.ts.map +1 -0
- package/dist/components/icons/gear-solid.js +5 -0
- package/dist/components/icons/gear-solid.js.map +1 -0
- package/dist/components/icons/gear.d.ts +3 -0
- package/dist/components/icons/gear.d.ts.map +1 -0
- package/dist/components/icons/gear.js +5 -0
- package/dist/components/icons/gear.js.map +1 -0
- package/dist/components/icons/globe.d.ts +3 -0
- package/dist/components/icons/globe.d.ts.map +1 -0
- package/dist/components/icons/globe.js +5 -0
- package/dist/components/icons/globe.js.map +1 -0
- package/dist/components/icons/grid.d.ts +3 -0
- package/dist/components/icons/grid.d.ts.map +1 -0
- package/dist/components/icons/grid.js +5 -0
- package/dist/components/icons/grid.js.map +1 -0
- package/dist/components/icons/icon.d.ts +7 -0
- package/dist/components/icons/icon.d.ts.map +1 -0
- package/dist/components/icons/icon.js +9 -0
- package/dist/components/icons/icon.js.map +1 -0
- package/dist/components/icons/icons.d.ts +131 -0
- package/dist/components/icons/icons.d.ts.map +1 -0
- package/dist/components/icons/icons.js +137 -0
- package/dist/components/icons/icons.js.map +1 -0
- package/dist/components/icons/info-solid.d.ts +3 -0
- package/dist/components/icons/info-solid.d.ts.map +1 -0
- package/dist/components/icons/info-solid.js +5 -0
- package/dist/components/icons/info-solid.js.map +1 -0
- package/dist/components/icons/info.d.ts +3 -0
- package/dist/components/icons/info.d.ts.map +1 -0
- package/dist/components/icons/info.js +5 -0
- package/dist/components/icons/info.js.map +1 -0
- package/dist/components/icons/link.d.ts +3 -0
- package/dist/components/icons/link.d.ts.map +1 -0
- package/dist/components/icons/link.js +5 -0
- package/dist/components/icons/link.js.map +1 -0
- package/dist/components/icons/list.d.ts +3 -0
- package/dist/components/icons/list.d.ts.map +1 -0
- package/dist/components/icons/list.js +5 -0
- package/dist/components/icons/list.js.map +1 -0
- package/dist/components/icons/location.d.ts +3 -0
- package/dist/components/icons/location.d.ts.map +1 -0
- package/dist/components/icons/location.js +5 -0
- package/dist/components/icons/location.js.map +1 -0
- package/dist/components/icons/lock-fill.d.ts +3 -0
- package/dist/components/icons/lock-fill.d.ts.map +1 -0
- package/dist/components/icons/lock-fill.js +5 -0
- package/dist/components/icons/lock-fill.js.map +1 -0
- package/dist/components/icons/lock.d.ts +3 -0
- package/dist/components/icons/lock.d.ts.map +1 -0
- package/dist/components/icons/lock.js +5 -0
- package/dist/components/icons/lock.js.map +1 -0
- package/dist/components/icons/loudbox.d.ts +3 -0
- package/dist/components/icons/loudbox.d.ts.map +1 -0
- package/dist/components/icons/loudbox.js +5 -0
- package/dist/components/icons/loudbox.js.map +1 -0
- package/dist/components/icons/menu.d.ts +3 -0
- package/dist/components/icons/menu.d.ts.map +1 -0
- package/dist/components/icons/menu.js +5 -0
- package/dist/components/icons/menu.js.map +1 -0
- package/dist/components/icons/microphone.d.ts +3 -0
- package/dist/components/icons/microphone.d.ts.map +1 -0
- package/dist/components/icons/microphone.js +5 -0
- package/dist/components/icons/microphone.js.map +1 -0
- package/dist/components/icons/minus.d.ts +3 -0
- package/dist/components/icons/minus.d.ts.map +1 -0
- package/dist/components/icons/minus.js +5 -0
- package/dist/components/icons/minus.js.map +1 -0
- package/dist/components/icons/mode-dark.d.ts +3 -0
- package/dist/components/icons/mode-dark.d.ts.map +1 -0
- package/dist/components/icons/mode-dark.js +5 -0
- package/dist/components/icons/mode-dark.js.map +1 -0
- package/dist/components/icons/mode-light.d.ts +3 -0
- package/dist/components/icons/mode-light.d.ts.map +1 -0
- package/dist/components/icons/mode-light.js +5 -0
- package/dist/components/icons/mode-light.js.map +1 -0
- package/dist/components/icons/mode-system.d.ts +3 -0
- package/dist/components/icons/mode-system.d.ts.map +1 -0
- package/dist/components/icons/mode-system.js +5 -0
- package/dist/components/icons/mode-system.js.map +1 -0
- package/dist/components/icons/model-deepseek-color.d.ts +3 -0
- package/dist/components/icons/model-deepseek-color.d.ts.map +1 -0
- package/dist/components/icons/model-deepseek-color.js +5 -0
- package/dist/components/icons/model-deepseek-color.js.map +1 -0
- package/dist/components/icons/model-deepseek.d.ts +3 -0
- package/dist/components/icons/model-deepseek.d.ts.map +1 -0
- package/dist/components/icons/model-deepseek.js +5 -0
- package/dist/components/icons/model-deepseek.js.map +1 -0
- package/dist/components/icons/model-falcon-color.d.ts +3 -0
- package/dist/components/icons/model-falcon-color.d.ts.map +1 -0
- package/dist/components/icons/model-falcon-color.js +5 -0
- package/dist/components/icons/model-falcon-color.js.map +1 -0
- package/dist/components/icons/model-falcon.d.ts +3 -0
- package/dist/components/icons/model-falcon.d.ts.map +1 -0
- package/dist/components/icons/model-falcon.js +5 -0
- package/dist/components/icons/model-falcon.js.map +1 -0
- package/dist/components/icons/model-google-color.d.ts +3 -0
- package/dist/components/icons/model-google-color.d.ts.map +1 -0
- package/dist/components/icons/model-google-color.js +5 -0
- package/dist/components/icons/model-google-color.js.map +1 -0
- package/dist/components/icons/model-google.d.ts +3 -0
- package/dist/components/icons/model-google.d.ts.map +1 -0
- package/dist/components/icons/model-google.js +5 -0
- package/dist/components/icons/model-google.js.map +1 -0
- package/dist/components/icons/model-llama-color.d.ts +3 -0
- package/dist/components/icons/model-llama-color.d.ts.map +1 -0
- package/dist/components/icons/model-llama-color.js +5 -0
- package/dist/components/icons/model-llama-color.js.map +1 -0
- package/dist/components/icons/model-llama.d.ts +3 -0
- package/dist/components/icons/model-llama.d.ts.map +1 -0
- package/dist/components/icons/model-llama.js +5 -0
- package/dist/components/icons/model-llama.js.map +1 -0
- package/dist/components/icons/model-openai.d.ts +3 -0
- package/dist/components/icons/model-openai.d.ts.map +1 -0
- package/dist/components/icons/model-openai.js +5 -0
- package/dist/components/icons/model-openai.js.map +1 -0
- package/dist/components/icons/model-qwen-color.d.ts +3 -0
- package/dist/components/icons/model-qwen-color.d.ts.map +1 -0
- package/dist/components/icons/model-qwen-color.js +5 -0
- package/dist/components/icons/model-qwen-color.js.map +1 -0
- package/dist/components/icons/model-qwen.d.ts +3 -0
- package/dist/components/icons/model-qwen.d.ts.map +1 -0
- package/dist/components/icons/model-qwen.js +5 -0
- package/dist/components/icons/model-qwen.js.map +1 -0
- package/dist/components/icons/monitor.d.ts +3 -0
- package/dist/components/icons/monitor.d.ts.map +1 -0
- package/dist/components/icons/monitor.js +5 -0
- package/dist/components/icons/monitor.js.map +1 -0
- package/dist/components/icons/open-panel.d.ts +3 -0
- package/dist/components/icons/open-panel.d.ts.map +1 -0
- package/dist/components/icons/open-panel.js +5 -0
- package/dist/components/icons/open-panel.js.map +1 -0
- package/dist/components/icons/org-developer.d.ts +3 -0
- package/dist/components/icons/org-developer.d.ts.map +1 -0
- package/dist/components/icons/org-developer.js +5 -0
- package/dist/components/icons/org-developer.js.map +1 -0
- package/dist/components/icons/org-experience.d.ts +3 -0
- package/dist/components/icons/org-experience.d.ts.map +1 -0
- package/dist/components/icons/org-experience.js +5 -0
- package/dist/components/icons/org-experience.js.map +1 -0
- package/dist/components/icons/org-operations.d.ts +3 -0
- package/dist/components/icons/org-operations.d.ts.map +1 -0
- package/dist/components/icons/org-operations.js +5 -0
- package/dist/components/icons/org-operations.js.map +1 -0
- package/dist/components/icons/org-systems.d.ts +3 -0
- package/dist/components/icons/org-systems.d.ts.map +1 -0
- package/dist/components/icons/org-systems.js +5 -0
- package/dist/components/icons/org-systems.js.map +1 -0
- package/dist/components/icons/org-university.d.ts +3 -0
- package/dist/components/icons/org-university.d.ts.map +1 -0
- package/dist/components/icons/org-university.js +5 -0
- package/dist/components/icons/org-university.js.map +1 -0
- package/dist/components/icons/phone.d.ts +3 -0
- package/dist/components/icons/phone.d.ts.map +1 -0
- package/dist/components/icons/phone.js +5 -0
- package/dist/components/icons/phone.js.map +1 -0
- package/dist/components/icons/quasar.d.ts +3 -0
- package/dist/components/icons/quasar.d.ts.map +1 -0
- package/dist/components/icons/quasar.js +5 -0
- package/dist/components/icons/quasar.js.map +1 -0
- package/dist/components/icons/quietbox.d.ts +3 -0
- package/dist/components/icons/quietbox.d.ts.map +1 -0
- package/dist/components/icons/quietbox.js +5 -0
- package/dist/components/icons/quietbox.js.map +1 -0
- package/dist/components/icons/registry.d.ts +6 -0
- package/dist/components/icons/registry.d.ts.map +1 -0
- package/dist/components/icons/registry.js +264 -0
- package/dist/components/icons/registry.js.map +1 -0
- package/dist/components/icons/reset.d.ts +3 -0
- package/dist/components/icons/reset.d.ts.map +1 -0
- package/dist/components/icons/reset.js +5 -0
- package/dist/components/icons/reset.js.map +1 -0
- package/dist/components/icons/search.d.ts +3 -0
- package/dist/components/icons/search.d.ts.map +1 -0
- package/dist/components/icons/search.js +5 -0
- package/dist/components/icons/search.js.map +1 -0
- package/dist/components/icons/server-solid.d.ts +3 -0
- package/dist/components/icons/server-solid.d.ts.map +1 -0
- package/dist/components/icons/server-solid.js +5 -0
- package/dist/components/icons/server-solid.js.map +1 -0
- package/dist/components/icons/server.d.ts +3 -0
- package/dist/components/icons/server.d.ts.map +1 -0
- package/dist/components/icons/server.js +5 -0
- package/dist/components/icons/server.js.map +1 -0
- package/dist/components/icons/shield-solid.d.ts +3 -0
- package/dist/components/icons/shield-solid.d.ts.map +1 -0
- package/dist/components/icons/shield-solid.js +5 -0
- package/dist/components/icons/shield-solid.js.map +1 -0
- package/dist/components/icons/shield.d.ts +3 -0
- package/dist/components/icons/shield.d.ts.map +1 -0
- package/dist/components/icons/shield.js +5 -0
- package/dist/components/icons/shield.js.map +1 -0
- package/dist/components/icons/sidebar.d.ts +3 -0
- package/dist/components/icons/sidebar.d.ts.map +1 -0
- package/dist/components/icons/sidebar.js +5 -0
- package/dist/components/icons/sidebar.js.map +1 -0
- package/dist/components/icons/size.d.ts +3 -0
- package/dist/components/icons/size.d.ts.map +1 -0
- package/dist/components/icons/size.js +5 -0
- package/dist/components/icons/size.js.map +1 -0
- package/dist/components/icons/social-discord.d.ts +3 -0
- package/dist/components/icons/social-discord.d.ts.map +1 -0
- package/dist/components/icons/social-discord.js +5 -0
- package/dist/components/icons/social-discord.js.map +1 -0
- package/dist/components/icons/social-facebook.d.ts +3 -0
- package/dist/components/icons/social-facebook.d.ts.map +1 -0
- package/dist/components/icons/social-facebook.js +5 -0
- package/dist/components/icons/social-facebook.js.map +1 -0
- package/dist/components/icons/social-github.d.ts +3 -0
- package/dist/components/icons/social-github.d.ts.map +1 -0
- package/dist/components/icons/social-github.js +5 -0
- package/dist/components/icons/social-github.js.map +1 -0
- package/dist/components/icons/social-linkedin.d.ts +3 -0
- package/dist/components/icons/social-linkedin.d.ts.map +1 -0
- package/dist/components/icons/social-linkedin.js +5 -0
- package/dist/components/icons/social-linkedin.js.map +1 -0
- package/dist/components/icons/social-x.d.ts +3 -0
- package/dist/components/icons/social-x.d.ts.map +1 -0
- package/dist/components/icons/social-x.js +5 -0
- package/dist/components/icons/social-x.js.map +1 -0
- package/dist/components/icons/social-youtube.d.ts +3 -0
- package/dist/components/icons/social-youtube.d.ts.map +1 -0
- package/dist/components/icons/social-youtube.js +5 -0
- package/dist/components/icons/social-youtube.js.map +1 -0
- package/dist/components/icons/spinner.d.ts +3 -0
- package/dist/components/icons/spinner.d.ts.map +1 -0
- package/dist/components/icons/spinner.js +5 -0
- package/dist/components/icons/spinner.js.map +1 -0
- package/dist/components/icons/success-solid.d.ts +3 -0
- package/dist/components/icons/success-solid.d.ts.map +1 -0
- package/dist/components/icons/success-solid.js +5 -0
- package/dist/components/icons/success-solid.js.map +1 -0
- package/dist/components/icons/success.d.ts +3 -0
- package/dist/components/icons/success.d.ts.map +1 -0
- package/dist/components/icons/success.js +5 -0
- package/dist/components/icons/success.js.map +1 -0
- package/dist/components/icons/tensix.d.ts +3 -0
- package/dist/components/icons/tensix.d.ts.map +1 -0
- package/dist/components/icons/tensix.js +5 -0
- package/dist/components/icons/tensix.js.map +1 -0
- package/dist/components/icons/tenstorrent.d.ts +3 -0
- package/dist/components/icons/tenstorrent.d.ts.map +1 -0
- package/dist/components/icons/tenstorrent.js +5 -0
- package/dist/components/icons/tenstorrent.js.map +1 -0
- package/dist/components/icons/trash-solid.d.ts +3 -0
- package/dist/components/icons/trash-solid.d.ts.map +1 -0
- package/dist/components/icons/trash-solid.js +5 -0
- package/dist/components/icons/trash-solid.js.map +1 -0
- package/dist/components/icons/trash.d.ts +3 -0
- package/dist/components/icons/trash.d.ts.map +1 -0
- package/dist/components/icons/trash.js +5 -0
- package/dist/components/icons/trash.js.map +1 -0
- package/dist/components/icons/tt-forge-fe.d.ts +3 -0
- package/dist/components/icons/tt-forge-fe.d.ts.map +1 -0
- package/dist/components/icons/tt-forge-fe.js +5 -0
- package/dist/components/icons/tt-forge-fe.js.map +1 -0
- package/dist/components/icons/tt-forge.d.ts +3 -0
- package/dist/components/icons/tt-forge.d.ts.map +1 -0
- package/dist/components/icons/tt-forge.js +5 -0
- package/dist/components/icons/tt-forge.js.map +1 -0
- package/dist/components/icons/tt-lang.d.ts +3 -0
- package/dist/components/icons/tt-lang.d.ts.map +1 -0
- package/dist/components/icons/tt-lang.js +5 -0
- package/dist/components/icons/tt-lang.js.map +1 -0
- package/dist/components/icons/tt-llk.d.ts +3 -0
- package/dist/components/icons/tt-llk.d.ts.map +1 -0
- package/dist/components/icons/tt-llk.js +5 -0
- package/dist/components/icons/tt-llk.js.map +1 -0
- package/dist/components/icons/tt-metalium.d.ts +3 -0
- package/dist/components/icons/tt-metalium.d.ts.map +1 -0
- package/dist/components/icons/tt-metalium.js +5 -0
- package/dist/components/icons/tt-metalium.js.map +1 -0
- package/dist/components/icons/tt-nn.d.ts +3 -0
- package/dist/components/icons/tt-nn.d.ts.map +1 -0
- package/dist/components/icons/tt-nn.js +5 -0
- package/dist/components/icons/tt-nn.js.map +1 -0
- package/dist/components/icons/tt-torch.d.ts +3 -0
- package/dist/components/icons/tt-torch.d.ts.map +1 -0
- package/dist/components/icons/tt-torch.js +5 -0
- package/dist/components/icons/tt-torch.js.map +1 -0
- package/dist/components/icons/tt-xla.d.ts +3 -0
- package/dist/components/icons/tt-xla.d.ts.map +1 -0
- package/dist/components/icons/tt-xla.js +5 -0
- package/dist/components/icons/tt-xla.js.map +1 -0
- package/dist/components/icons/types.d.ts +2 -0
- package/dist/components/icons/types.d.ts.map +1 -0
- package/dist/components/icons/types.js +9 -0
- package/dist/components/icons/types.js.map +1 -0
- package/dist/components/icons/upload.d.ts +3 -0
- package/dist/components/icons/upload.d.ts.map +1 -0
- package/dist/components/icons/upload.js +5 -0
- package/dist/components/icons/upload.js.map +1 -0
- package/dist/components/icons/user-multiple-solid.d.ts +3 -0
- package/dist/components/icons/user-multiple-solid.d.ts.map +1 -0
- package/dist/components/icons/user-multiple-solid.js +5 -0
- package/dist/components/icons/user-multiple-solid.js.map +1 -0
- package/dist/components/icons/user-multiple.d.ts +3 -0
- package/dist/components/icons/user-multiple.d.ts.map +1 -0
- package/dist/components/icons/user-multiple.js +5 -0
- package/dist/components/icons/user-multiple.js.map +1 -0
- package/dist/components/icons/user-solid.d.ts +3 -0
- package/dist/components/icons/user-solid.d.ts.map +1 -0
- package/dist/components/icons/user-solid.js +5 -0
- package/dist/components/icons/user-solid.js.map +1 -0
- package/dist/components/icons/user.d.ts +3 -0
- package/dist/components/icons/user.d.ts.map +1 -0
- package/dist/components/icons/user.js +5 -0
- package/dist/components/icons/user.js.map +1 -0
- package/dist/components/icons/warning-solid.d.ts +3 -0
- package/dist/components/icons/warning-solid.d.ts.map +1 -0
- package/dist/components/icons/warning-solid.js +5 -0
- package/dist/components/icons/warning-solid.js.map +1 -0
- package/dist/components/icons/warning.d.ts +3 -0
- package/dist/components/icons/warning.d.ts.map +1 -0
- package/dist/components/icons/warning.js +5 -0
- package/dist/components/icons/warning.js.map +1 -0
- package/dist/components/icons/wormhole.d.ts +3 -0
- package/dist/components/icons/wormhole.d.ts.map +1 -0
- package/dist/components/icons/wormhole.js +5 -0
- package/dist/components/icons/wormhole.js.map +1 -0
- package/dist/components/masked-input/getMaskitoOptions.d.ts +4 -0
- package/dist/components/masked-input/getMaskitoOptions.d.ts.map +1 -0
- package/dist/components/masked-input/getMaskitoOptions.js +27 -0
- package/dist/components/masked-input/getMaskitoOptions.js.map +1 -0
- package/dist/components/masked-input/masked-input.d.ts +68 -0
- package/dist/components/masked-input/masked-input.d.ts.map +1 -0
- package/dist/components/masked-input/masked-input.js +68 -0
- package/dist/components/masked-input/masked-input.js.map +1 -0
- package/dist/components/material/material.css +1 -0
- package/dist/components/material/material.d.ts +43 -0
- package/dist/components/material/material.d.ts.map +1 -0
- package/dist/components/material/material.js +43 -0
- package/dist/components/material/material.js.map +1 -0
- package/dist/components/menu/menu.css +1 -0
- package/dist/components/menu/menu.d.ts +75 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.js +56 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/modal/modal.d.ts +83 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/modal/modal.js +118 -0
- package/dist/components/modal/modal.js.map +1 -0
- package/dist/components/progress-bar/progress-bar.css +1 -0
- package/dist/components/progress-bar/progress-bar.d.ts +38 -0
- package/dist/components/progress-bar/progress-bar.d.ts.map +1 -0
- package/dist/components/progress-bar/progress-bar.js +39 -0
- package/dist/components/progress-bar/progress-bar.js.map +1 -0
- package/dist/components/radio-group/radio-group.css +1 -0
- package/dist/components/radio-group/radio-group.d.ts +70 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +61 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/range/range.css +1 -0
- package/dist/components/range/range.d.ts +86 -0
- package/dist/components/range/range.d.ts.map +1 -0
- package/dist/components/range/range.js +87 -0
- package/dist/components/range/range.js.map +1 -0
- package/dist/components/select/select.css +1 -0
- package/dist/components/select/select.d.ts +82 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +79 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/sheet/sheet.css +1 -0
- package/dist/components/sheet/sheet.d.ts +71 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sheet/sheet.js +116 -0
- package/dist/components/sheet/sheet.js.map +1 -0
- package/dist/components/show-more/show-more.css +1 -0
- package/dist/components/show-more/show-more.d.ts +28 -0
- package/dist/components/show-more/show-more.d.ts.map +1 -0
- package/dist/components/show-more/show-more.js +26 -0
- package/dist/components/show-more/show-more.js.map +1 -0
- package/dist/components/skeleton/skeleton.css +1 -0
- package/dist/components/skeleton/skeleton.d.ts +39 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +36 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +69 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +61 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/snippet/snippet.css +1 -0
- package/dist/components/snippet/snippet.d.ts +28 -0
- package/dist/components/snippet/snippet.d.ts.map +1 -0
- package/dist/components/snippet/snippet.js +44 -0
- package/dist/components/snippet/snippet.js.map +1 -0
- package/dist/components/split-button/split-button.css +1 -0
- package/dist/components/split-button/split-button.d.ts +78 -0
- package/dist/components/split-button/split-button.d.ts.map +1 -0
- package/dist/components/split-button/split-button.js +65 -0
- package/dist/components/split-button/split-button.js.map +1 -0
- package/dist/components/status-indicator/status-indicator.css +1 -0
- package/dist/components/status-indicator/status-indicator.d.ts +35 -0
- package/dist/components/status-indicator/status-indicator.d.ts.map +1 -0
- package/dist/components/status-indicator/status-indicator.js +33 -0
- package/dist/components/status-indicator/status-indicator.js.map +1 -0
- package/dist/components/switch/switch.css +1 -0
- package/dist/components/switch/switch.d.ts +41 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +46 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/tabs/tabs.css +1 -0
- package/dist/components/tabs/tabs.d.ts +60 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +51 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tag/tag.css +1 -0
- package/dist/components/tag/tag.d.ts +42 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.js +48 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/text-area/text-area.css +1 -0
- package/dist/components/text-area/text-area.d.ts +35 -0
- package/dist/components/text-area/text-area.d.ts.map +1 -0
- package/dist/components/text-area/text-area.js +47 -0
- package/dist/components/text-area/text-area.js.map +1 -0
- package/dist/components/text-button/text-button.css +1 -0
- package/dist/components/text-button/text-button.d.ts +46 -0
- package/dist/components/text-button/text-button.d.ts.map +1 -0
- package/dist/components/text-button/text-button.js +46 -0
- package/dist/components/text-button/text-button.js.map +1 -0
- package/dist/components/text-input/text-input.css +1 -0
- package/dist/components/text-input/text-input.d.ts +57 -0
- package/dist/components/text-input/text-input.d.ts.map +1 -0
- package/dist/components/text-input/text-input.js +54 -0
- package/dist/components/text-input/text-input.js.map +1 -0
- package/dist/components/theme-switcher/theme-switcher.css +1 -0
- package/dist/components/theme-switcher/theme-switcher.d.ts +23 -0
- package/dist/components/theme-switcher/theme-switcher.d.ts.map +1 -0
- package/dist/components/theme-switcher/theme-switcher.js +24 -0
- package/dist/components/theme-switcher/theme-switcher.js.map +1 -0
- package/dist/components/toast/animations.d.ts +3 -0
- package/dist/components/toast/animations.d.ts.map +1 -0
- package/dist/components/toast/animations.js +28 -0
- package/dist/components/toast/animations.js.map +1 -0
- package/dist/components/toast/store.d.ts +77 -0
- package/dist/components/toast/store.d.ts.map +1 -0
- package/dist/components/toast/store.js +94 -0
- package/dist/components/toast/store.js.map +1 -0
- package/dist/components/toast/toast.css +1 -0
- package/dist/components/toast/toast.d.ts +32 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +202 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toast/utils.d.ts +10 -0
- package/dist/components/toast/utils.d.ts.map +1 -0
- package/dist/components/toast/utils.js +26 -0
- package/dist/components/toast/utils.js.map +1 -0
- package/dist/components/toggle/toggle.css +1 -0
- package/dist/components/toggle/toggle.d.ts +82 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle/toggle.js +129 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/tooltip/tooltip.css +1 -0
- package/dist/components/tooltip/tooltip.d.ts +58 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +52 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/typography/typography.css +1 -0
- package/dist/components/typography/typography.d.ts +33 -0
- package/dist/components/typography/typography.d.ts.map +1 -0
- package/dist/components/typography/typography.js +63 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/styles/animation.css +1 -0
- package/dist/styles/backgrounds.css +1 -0
- package/dist/styles/colors.css +1 -0
- package/dist/styles/fonts.css +1 -0
- package/dist/styles/globals.css +1 -0
- package/dist/styles/leading.css +1 -0
- package/dist/styles/radius.css +1 -0
- package/dist/styles/shadows.css +1 -0
- package/dist/styles/spacing.css +1 -0
- package/dist/styles/strokes.css +1 -0
- package/dist/styles/styles.css +1 -0
- package/dist/styles/tailwind-utilities.css +1 -0
- package/dist/styles/tailwind.css +1 -0
- package/dist/styles/tracking.css +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +2 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/generateId.d.ts +5 -0
- package/dist/utils/generateId.d.ts.map +1 -0
- package/dist/utils/generateId.js +21 -0
- package/dist/utils/generateId.js.map +1 -0
- package/dist/utils/getDisabledProps.d.ts +42 -0
- package/dist/utils/getDisabledProps.d.ts.map +1 -0
- package/dist/utils/getDisabledProps.js +36 -0
- package/dist/utils/getDisabledProps.js.map +1 -0
- package/dist/utils/getPortalContainer.d.ts +27 -0
- package/dist/utils/getPortalContainer.d.ts.map +1 -0
- package/dist/utils/getPortalContainer.js +21 -0
- package/dist/utils/getPortalContainer.js.map +1 -0
- package/dist/utils/hooks/useBaseRemSize.d.ts +9 -0
- package/dist/utils/hooks/useBaseRemSize.d.ts.map +1 -0
- package/dist/utils/hooks/useBaseRemSize.js +55 -0
- package/dist/utils/hooks/useBaseRemSize.js.map +1 -0
- package/dist/utils/hooks/useMergedRefs.d.ts +11 -0
- package/dist/utils/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/utils/hooks/useMergedRefs.js +96 -0
- package/dist/utils/hooks/useMergedRefs.js.map +1 -0
- package/dist/utils/isSingleReactElement.d.ts +3 -0
- package/dist/utils/isSingleReactElement.d.ts.map +1 -0
- package/dist/utils/isSingleReactElement.js +5 -0
- package/dist/utils/isSingleReactElement.js.map +1 -0
- package/dist/utils/polymorphic.d.ts +43 -0
- package/dist/utils/polymorphic.d.ts.map +1 -0
- package/dist/utils/polymorphic.js +2 -0
- package/dist/utils/polymorphic.js.map +1 -0
- package/dist/utils/splitFormInputProps.d.ts +119 -0
- package/dist/utils/splitFormInputProps.d.ts.map +1 -0
- package/dist/utils/splitFormInputProps.js +277 -0
- package/dist/utils/splitFormInputProps.js.map +1 -0
- package/package.json +266 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/components/icons/user.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,eAAO,MAAM,IAAI,GAAI,OAAO,cAAc,CAAC,KAAK,CAAC,4CAchD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const User = (props) => {
|
|
3
|
+
return (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M16.793 15.5L19.5 18.207V20.5H4.5V18.21L7.27539 15.5H16.793ZM14.5098 3.5L16.25 5.67578V10.3242L14.5098 12.5H9.49023L7.75 10.3242V5.67578L9.49023 3.5H14.5098Z", stroke: "currentColor" }) }));
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/components/icons/user.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAA4B,EAAE,EAAE;IACnD,OAAO,CACL,cACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,KAC9B,KAAK,YAET,eACE,CAAC,EAAC,+JAA+J,EACjK,MAAM,EAAC,cAAc,GACf,GACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning-solid.d.ts","sourceRoot":"","sources":["../../../src/components/icons/warning-solid.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,eAAO,MAAM,YAAY,GAAI,OAAO,cAAc,CAAC,KAAK,CAAC,4CAgBxD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const WarningSolid = (props) => {
|
|
3
|
+
return (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M22 18.5537L20.876 20.5H3.10352L2 18.5898L10.9658 3.5H13.0557L22 18.5537ZM11.4932 16.2422L10.9766 16.7578V17.7881L11.4932 18.3027H12.5264L13.042 17.7881V16.7578L12.5264 16.2422H11.4932ZM11.2354 8L10.7188 8.51562L11.2354 14.6973L11.751 15.2119H12.2676L12.7842 14.6973L13.3008 8.51562L12.7842 8H11.2354Z", fill: "currentColor" }) }));
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=warning-solid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning-solid.js","sourceRoot":"","sources":["../../../src/components/icons/warning-solid.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAA4B,EAAE,EAAE;IAC3D,OAAO,CACL,cACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,KAC9B,KAAK,YAET,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,+SAA+S,EACjT,IAAI,EAAC,cAAc,GACb,GACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../../src/components/icons/warning.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,eAAO,MAAM,OAAO,GAAI,OAAO,cAAc,CAAC,KAAK,CAAC,4CAwBnD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const Warning = (props) => {
|
|
3
|
+
return (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { d: "M13.0423 16.3788V17.4091L12.5259 17.9242H11.4932L10.9769 17.4091V16.3788L11.4932 15.8636H12.5259L13.0423 16.3788Z", fill: "currentColor" }), _jsx("path", { d: "M13.3005 8.13636L12.7841 14.3182L12.2678 14.8333H11.7514L11.235 14.3182L10.7187 8.13636L11.235 7.62121H12.7841L13.3005 8.13636Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M22 17.7522L20.4096 20.5H3.57229L2 17.7844L10.5018 3.5H13.5173L22 17.7522ZM3.19712 17.7914L4.16832 19.4697H19.8135L20.8029 17.7592L12.9294 4.5303H11.0898L3.19712 17.7914Z", fill: "currentColor" })] }));
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../../src/components/icons/warning.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAA4B,EAAE,EAAE;IACtD,OAAO,CACL,eACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,KAC9B,KAAK,aAET,eACE,CAAC,EAAC,mHAAmH,EACrH,IAAI,EAAC,cAAc,GACb,EACR,eACE,CAAC,EAAC,iIAAiI,EACnI,IAAI,EAAC,cAAc,GACb,EACR,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,4KAA4K,EAC9K,IAAI,EAAC,cAAc,GACb,IACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wormhole.d.ts","sourceRoot":"","sources":["../../../src/components/icons/wormhole.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,eAAO,MAAM,QAAQ,GAAI,OAAO,cAAc,CAAC,KAAK,CAAC,4CAgBpD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const Wormhole = (props) => {
|
|
3
|
+
return (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.9544 7.02386L19.9564 7.0224V9.0149L19.9544 9.01296L18.6177 10.3497L18.9616 10.6936V12.1858L18.1125 13.0344L18.4642 13.3861V14.8782L17.618 15.7239L17.9673 16.0732V17.5653L14.485 21.0471H9.51105L6.02928 17.5653V16.0732L6.03316 16.077V16.0732L6.37998 15.7263L5.53188 14.8782V13.3861L5.88307 13.0344L5.03448 12.1858V10.6936L5.37984 10.3478L4.04504 9.01296L4.04358 9.0149V7.0224L4.04504 7.02386L8.02226 3.04712H15.9777L19.9544 7.02386ZM14.9824 18.36H9.01365L7.12607 16.4724L6.77731 16.8212L9.51105 19.5549H14.485L17.2207 16.8188L16.8744 16.4729V16.4681L14.9824 18.36ZM15.4798 15.6676H8.51626L6.62916 13.7805L6.27797 14.1322L7.12607 14.9802L7.13385 14.9725V14.988L9.01365 16.8678H14.9824L17.7181 14.1322L17.3698 13.7839V13.7776L15.4798 15.6676ZM5.78058 11.4397L6.62916 12.2883L6.63305 12.2849V12.2922L8.51626 14.1754H15.4798L18.2155 11.4397L17.8716 11.0958L15.9777 12.9902H8.02226L6.12594 11.0939L5.78058 11.4397ZM5.03983 8.01865L8.02226 11.0011L15.9777 11.0016L18.9601 8.01865L15.9777 5.03622H8.02226L5.03983 8.01865Z", fill: "currentColor" }) }));
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=wormhole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wormhole.js","sourceRoot":"","sources":["../../../src/components/icons/wormhole.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAA4B,EAAE,EAAE;IACvD,OAAO,CACL,cACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,KAC9B,KAAK,YAET,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,0/BAA0/B,EAC5/B,IAAI,EAAC,cAAc,GACb,GACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMaskitoOptions.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/getMaskitoOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,cAAc,CA8B1E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function getMaskitoOptions(mask) {
|
|
2
|
+
if (!mask) {
|
|
3
|
+
return { mask: /./ };
|
|
4
|
+
}
|
|
5
|
+
if (typeof mask === "string") {
|
|
6
|
+
return { mask: Array.from(mask, (c) => (c === "_" ? /./ : c)) };
|
|
7
|
+
}
|
|
8
|
+
if ("mask" in mask) {
|
|
9
|
+
return mask;
|
|
10
|
+
}
|
|
11
|
+
if (typeof mask.replace === "string") {
|
|
12
|
+
return {
|
|
13
|
+
mask: Array.from(mask.format, (c) => (c === mask.replace ? /./ : c)),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (mask.replace instanceof RegExp) {
|
|
17
|
+
const replacement = mask.replace;
|
|
18
|
+
return {
|
|
19
|
+
mask: Array.from(mask.format, (c) => (c === "_" ? replacement : c)),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const replacements = mask.replace;
|
|
23
|
+
return {
|
|
24
|
+
mask: Array.from(mask.format, (c) => replacements[c] ?? c),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=getMaskitoOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMaskitoOptions.js","sourceRoot":"","sources":["../../../src/components/masked-input/getMaskitoOptions.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,iBAAiB,CAAC,IAAwB;IACxD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,CAAC;IAED,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACrE,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,YAAY,MAAM,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QACjC,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACpE,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC;IAClC,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KAC3D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type MaskitoOptions } from "@maskito/core";
|
|
2
|
+
import { type TextInputProps } from "../text-input/text-input.js";
|
|
3
|
+
/**
|
|
4
|
+
* The text masking configuration for a `MaskedInput`, which can take one of three shapes:
|
|
5
|
+
*
|
|
6
|
+
* - `string`: a fixed-length pattern where every `_` is a placeholder that accepts any character, eg. `"____-____-____"`.
|
|
7
|
+
* - `{ format, replace }`: a fixed-length pattern where `replace` determines the placeholder characters and what they accept.
|
|
8
|
+
* Pass a `RegExp` to keep `_` as the placeholder but restrict accepted characters, a single-character `string` to use a
|
|
9
|
+
* different placeholder that accepts any character, or a `Record<string, RegExp>` to map each placeholder character in
|
|
10
|
+
* `format` to the expression validating it.
|
|
11
|
+
* - `MaskitoOptions`: a full [maskito](https://maskito.dev) configuration, for behavior the shorthands can't express, eg.
|
|
12
|
+
* dynamic (variable-length) masks, pre/post-processing hooks, or overwrite mode.
|
|
13
|
+
*
|
|
14
|
+
* Any character in a `string` or `format` pattern that is not a placeholder is treated as a literal and inserted automatically as the user types.
|
|
15
|
+
*/
|
|
16
|
+
export type TextMaskingConfig = MaskitoOptions | string | {
|
|
17
|
+
format: string;
|
|
18
|
+
replace: RegExp | string | {
|
|
19
|
+
[key: string]: RegExp;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export interface MaskedInputProps extends Omit<TextInputProps, "type"> {
|
|
23
|
+
/** The text masking configuration, which determines the shape and formatting of the masked text. When omitted, no masking is applied and the field behaves like a regular `TextInput`. */
|
|
24
|
+
mask?: TextMaskingConfig;
|
|
25
|
+
/** The HTML input type. Restricted to the types that can be masked. @default text */
|
|
26
|
+
type?: "text" | "search" | "tel" | "email" | "url";
|
|
27
|
+
/** When `true`, the initial value of the input is formatted to match the `mask` on mount. @default false */
|
|
28
|
+
formatOnMount?: boolean;
|
|
29
|
+
/** When `true`, the current value of the input is reformatted to match the `mask` whenever the `mask` prop changes. @default true */
|
|
30
|
+
formatOnMaskChange?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A `TextInput` that restricts and formats its value as the user types, via a text mask.
|
|
34
|
+
*
|
|
35
|
+
* @param {TextMaskingConfig} [props.mask] - (optional) The text masking configuration. Accepts a `string` pattern, a `{ format, replace }` object, or a `MaskitoOptions` object. When omitted, no masking is applied
|
|
36
|
+
* @param {string} [props.type] - (optional) The HTML input type, restricted to `"text" | "search" | "tel" | "email" | "url"`. @default text
|
|
37
|
+
* @param {boolean} [props.formatOnMount] - (optional) When `true`, the initial value of the input is formatted to match the `mask` on mount. @default false
|
|
38
|
+
* @param {boolean} [props.formatOnMaskChange] - (optional) When `true`, the current value of the input is reformatted to match the `mask` whenever the `mask` prop changes. @default false
|
|
39
|
+
*
|
|
40
|
+
* You may also pass any additional props supported by the `TextInput` component including `size`, `variant`, `iconLeft`, `iconRight`, and `dropdown`
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <MaskedInput aria-label="Activation code" mask="____-____-____" />
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <MaskedInput
|
|
47
|
+
* aria-label="Phone number"
|
|
48
|
+
* placeholder="ex: +1 (222) 333-4444"
|
|
49
|
+
* mask={{ format: "+1 (___) ___-____", replace: /\d/ }}
|
|
50
|
+
* />
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* <MaskedInput
|
|
54
|
+
* aria-label="Postal code"
|
|
55
|
+
* placeholder="ex: A0A 1B1"
|
|
56
|
+
* mask={{ format: "ABA BAB", replace: { A: /[a-zA-Z]/, B: /\d/ } }}
|
|
57
|
+
* />
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <MaskedInput
|
|
61
|
+
* aria-label="Activation code"
|
|
62
|
+
* mask="____-____-____"
|
|
63
|
+
* defaultValue="123456789012"
|
|
64
|
+
* formatOnMount
|
|
65
|
+
* />
|
|
66
|
+
*/
|
|
67
|
+
export declare function MaskedInput({ mask, ref, formatOnMount, formatOnMaskChange, ...props }: MaskedInputProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
//# sourceMappingURL=masked-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masked-input.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/masked-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAC;AAM5C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,MAAM,GACN;IACE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtD,CAAC;AAEN,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IACpE,0LAA0L;IAC1L,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;IACnD,4GAA4G;IAC5G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qIAAqI;IACrI,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,GAAG,EACH,aAAqB,EACrB,kBAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,gBAAgB,2CA6BlB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
4
|
+
import { maskitoInitialCalibrationPlugin, } from "@maskito/core";
|
|
5
|
+
import { useMaskito } from "@maskito/react";
|
|
6
|
+
import { TextInput, } from "../text-input/text-input.js";
|
|
7
|
+
import { useMergedRefs } from "../../utils/hooks/useMergedRefs.js";
|
|
8
|
+
import { getMaskitoOptions } from "./getMaskitoOptions.js";
|
|
9
|
+
/**
|
|
10
|
+
* A `TextInput` that restricts and formats its value as the user types, via a text mask.
|
|
11
|
+
*
|
|
12
|
+
* @param {TextMaskingConfig} [props.mask] - (optional) The text masking configuration. Accepts a `string` pattern, a `{ format, replace }` object, or a `MaskitoOptions` object. When omitted, no masking is applied
|
|
13
|
+
* @param {string} [props.type] - (optional) The HTML input type, restricted to `"text" | "search" | "tel" | "email" | "url"`. @default text
|
|
14
|
+
* @param {boolean} [props.formatOnMount] - (optional) When `true`, the initial value of the input is formatted to match the `mask` on mount. @default false
|
|
15
|
+
* @param {boolean} [props.formatOnMaskChange] - (optional) When `true`, the current value of the input is reformatted to match the `mask` whenever the `mask` prop changes. @default false
|
|
16
|
+
*
|
|
17
|
+
* You may also pass any additional props supported by the `TextInput` component including `size`, `variant`, `iconLeft`, `iconRight`, and `dropdown`
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <MaskedInput aria-label="Activation code" mask="____-____-____" />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <MaskedInput
|
|
24
|
+
* aria-label="Phone number"
|
|
25
|
+
* placeholder="ex: +1 (222) 333-4444"
|
|
26
|
+
* mask={{ format: "+1 (___) ___-____", replace: /\d/ }}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <MaskedInput
|
|
31
|
+
* aria-label="Postal code"
|
|
32
|
+
* placeholder="ex: A0A 1B1"
|
|
33
|
+
* mask={{ format: "ABA BAB", replace: { A: /[a-zA-Z]/, B: /\d/ } }}
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <MaskedInput
|
|
38
|
+
* aria-label="Activation code"
|
|
39
|
+
* mask="____-____-____"
|
|
40
|
+
* defaultValue="123456789012"
|
|
41
|
+
* formatOnMount
|
|
42
|
+
* />
|
|
43
|
+
*/
|
|
44
|
+
export function MaskedInput({ mask, ref, formatOnMount = false, formatOnMaskChange = false, ...props }) {
|
|
45
|
+
const mounted = useRef(false);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
mounted.current = true;
|
|
48
|
+
}, []);
|
|
49
|
+
const maskitoConfig = useMemo(() => {
|
|
50
|
+
const options = getMaskitoOptions(mask);
|
|
51
|
+
const shouldFormat = mounted.current ? formatOnMaskChange : formatOnMount;
|
|
52
|
+
if (!shouldFormat)
|
|
53
|
+
return { options };
|
|
54
|
+
return {
|
|
55
|
+
options: {
|
|
56
|
+
...options,
|
|
57
|
+
plugins: [
|
|
58
|
+
...(options.plugins ?? []),
|
|
59
|
+
maskitoInitialCalibrationPlugin(),
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}, [mask, formatOnMount, formatOnMaskChange]);
|
|
64
|
+
const maskitoRef = useMaskito(maskitoConfig);
|
|
65
|
+
const mergedInputRef = useMergedRefs(ref, maskitoRef);
|
|
66
|
+
return _jsx(TextInput, { ref: mergedInputRef, ...props });
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=masked-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masked-input.js","sourceRoot":"","sources":["../../../src/components/masked-input/masked-input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,+BAA+B,GAEhC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,SAAS,GAEV,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAkCxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,GAAG,EACH,aAAa,GAAG,KAAK,EACrB,kBAAkB,GAAG,KAAK,EAC1B,GAAG,KAAK,EACS;IACjB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAExC,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,CAAC;QAC1E,IAAI,CAAC,YAAY;YAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAEtC,OAAO;YACL,OAAO,EAAE;gBACP,GAAG,OAAO;gBACV,OAAO,EAAE;oBACP,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;oBAC1B,+BAA+B,EAAE;iBAClC;aACF;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO,KAAC,SAAS,IAAC,GAAG,EAAE,cAAc,KAAM,KAAK,GAAI,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-material{border-radius:var(--vesper-radius-2);color:var(--vesper-text-primary)}.vesper-material-outlined{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-background-primary)}.vesper-material-outlined-strong{border:var(--vesper-stroke-base) solid var(--vesper-border-strong);background:var(--vesper-background-primary)}.vesper-material-raised{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-background-primary);box-shadow:var(--vesper-shadow-100)}.vesper-material-floating{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-background-primary);box-shadow:var(--vesper-shadow-300)}.vesper-material-modal{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-background-primary);box-shadow:var(--vesper-shadow-400)}.vesper-material-inset{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-tint-neutral-100);box-shadow:var(--vesper-shadow-inset-100)}.vesper-material-inset-strong{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-tint-neutral-100);box-shadow:var(--vesper-shadow-inset-200)}.vesper-material-interactive{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);background:var(--vesper-background-primary)}.vesper-material-interactive.vesper-material-disabled{color:var(--vesper-text-disabled);border-color:var(--vesper-border-disabled);background:var(--vesper-background-disabled)}.vesper-material-interactive.vesper-material-active{background:linear-gradient(0deg, var(--vesper-state-neutral-active) 0%, var(--vesper-state-neutral-active) 100%), var(--vesper-background-primary);box-shadow:var(--vesper-shadow-100)}.vesper-material-interactive.vesper-material-selected{background:var(--vesper-tint-neutral-200);border-color:var(--vesper-border-strong)}.vesper-material-interactive:not(.vesper-material-disabled){cursor:pointer}.vesper-material-interactive:not(.vesper-material-disabled):hover{background:linear-gradient(0deg, var(--vesper-state-neutral-hover) 0%, var(--vesper-state-neutral-hover) 100%), var(--vesper-background-primary);box-shadow:var(--vesper-shadow-100)}@media (forced-colors:active){.vesper-material-interactive:focus-visible:not(.vesper-material-disabled){outline:var(--vesper-stroke-strong) solid CanvasText}}@media not (forced-colors:active){.vesper-material-interactive:focus-visible:not(.vesper-material-disabled){box-shadow:var(--vesper-shadow-focus-ring)}}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ElementType } from "react";
|
|
2
|
+
import { Polymorphic } from "../../utils/polymorphic.js";
|
|
3
|
+
export declare const BUTTON_SIZES: readonly ["xs", "sm", "md", "lg"];
|
|
4
|
+
export declare const MATERIAL_VARIANTS: readonly ["outlined", "outlined-strong", "raised", "floating", "modal", "inset", "inset-strong", "interactive"];
|
|
5
|
+
export declare const INTERACTIVE_MATERIAL_STATES: readonly ["disabled", "active", "selected"];
|
|
6
|
+
export type MaterialVariant = (typeof MATERIAL_VARIANTS)[number];
|
|
7
|
+
export type InteractiveMaterialState = (typeof INTERACTIVE_MATERIAL_STATES)[number];
|
|
8
|
+
type NonInteractiveMaterialProps = {
|
|
9
|
+
/** The visual style variant of the material surface. @default outlined */
|
|
10
|
+
variant?: Exclude<MaterialVariant, "interactive">;
|
|
11
|
+
/** The current interaction state of the material surface. Only applicable when `variant` is `"interactive"`. */
|
|
12
|
+
state?: never;
|
|
13
|
+
};
|
|
14
|
+
type InteractiveMaterialProps = {
|
|
15
|
+
/** Must be set to `"interactive"` to enable interactive states such as active, selected, and disabled. */
|
|
16
|
+
variant: Extract<MaterialVariant, "interactive">;
|
|
17
|
+
/** The current interaction state of the material surface. Only applicable when `variant` is `"interactive"`. */
|
|
18
|
+
state?: InteractiveMaterialState;
|
|
19
|
+
};
|
|
20
|
+
type BaseMaterialProps = NonInteractiveMaterialProps | InteractiveMaterialProps;
|
|
21
|
+
export type MaterialProps<E extends ElementType = "div"> = Polymorphic<BaseMaterialProps, E>;
|
|
22
|
+
/**
|
|
23
|
+
* A polymorphic surface component that applies visual elevation and border treatments to its children.
|
|
24
|
+
*
|
|
25
|
+
* @param {MaterialVariant} [props.variant] - (optional) The visual style variant of the material surface. @default outlined
|
|
26
|
+
* @param {InteractiveMaterialState} [props.state] - (optional) The interaction state, only applicable when `variant` is `"interactive"`
|
|
27
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default div
|
|
28
|
+
*
|
|
29
|
+
* You may also pass any additional props to the underlying element
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <Material variant="raised">
|
|
33
|
+
* <p>Elevated card content</p>
|
|
34
|
+
* </Material>
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <Material variant="interactive" state="active" as="button">
|
|
38
|
+
* Active interactive surface
|
|
39
|
+
* </Material>
|
|
40
|
+
*/
|
|
41
|
+
export declare function Material<E extends ElementType = "div">(props: MaterialProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=material.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/components/material/material.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,eAAO,MAAM,YAAY,mCAAoC,CAAC;AAE9D,eAAO,MAAM,iBAAiB,iHASpB,CAAC;AAEX,eAAO,MAAM,2BAA2B,6CAI9B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,KAAK,2BAA2B,GAAG;IACjC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAClD,gHAAgH;IAChH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,0GAA0G;IAC1G,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACjD,gHAAgH;IAChH,KAAK,CAAC,EAAE,wBAAwB,CAAC;CAClC,CAAC;AAEF,KAAK,iBAAiB,GAAG,2BAA2B,GAAG,wBAAwB,CAAC;AAEhF,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI,WAAW,CACpE,iBAAiB,EACjB,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EACpD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,2CAsBxB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { getDisabledProps } from "../../utils/getDisabledProps.js";
|
|
4
|
+
export const BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
5
|
+
export const MATERIAL_VARIANTS = [
|
|
6
|
+
"outlined",
|
|
7
|
+
"outlined-strong",
|
|
8
|
+
"raised",
|
|
9
|
+
"floating",
|
|
10
|
+
"modal",
|
|
11
|
+
"inset",
|
|
12
|
+
"inset-strong",
|
|
13
|
+
"interactive",
|
|
14
|
+
];
|
|
15
|
+
export const INTERACTIVE_MATERIAL_STATES = [
|
|
16
|
+
"disabled",
|
|
17
|
+
"active",
|
|
18
|
+
"selected",
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* A polymorphic surface component that applies visual elevation and border treatments to its children.
|
|
22
|
+
*
|
|
23
|
+
* @param {MaterialVariant} [props.variant] - (optional) The visual style variant of the material surface. @default outlined
|
|
24
|
+
* @param {InteractiveMaterialState} [props.state] - (optional) The interaction state, only applicable when `variant` is `"interactive"`
|
|
25
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default div
|
|
26
|
+
*
|
|
27
|
+
* You may also pass any additional props to the underlying element
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <Material variant="raised">
|
|
31
|
+
* <p>Elevated card content</p>
|
|
32
|
+
* </Material>
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <Material variant="interactive" state="active" as="button">
|
|
36
|
+
* Active interactive surface
|
|
37
|
+
* </Material>
|
|
38
|
+
*/
|
|
39
|
+
export function Material(props) {
|
|
40
|
+
const { as: Component = "div", className, variant = "outlined", state, ...rest } = props;
|
|
41
|
+
return (_jsx(Component, { className: cn("vesper-material", `vesper-material-${variant}`, variant === "interactive" && state && `vesper-material-${state}`, className), ...rest, ...getDisabledProps(Component, state === "disabled") }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=material.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../../src/components/material/material.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU;IACV,iBAAiB;IACjB,QAAQ;IACR,UAAU;IACV,OAAO;IACP,OAAO;IACP,cAAc;IACd,aAAa;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,UAAU;IACV,QAAQ;IACR,UAAU;CACF,CAAC;AA4BX;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,QAAQ,CACtB,KAAuB;IAEvB,MAAM,EACJ,EAAE,EAAE,SAAS,GAAG,KAAK,EACrB,SAAS,EACT,OAAO,GAAG,UAAU,EACpB,KAAK,EACL,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,mBAAmB,OAAO,EAAE,EAC5B,OAAO,KAAK,aAAa,IAAI,KAAK,IAAI,mBAAmB,KAAK,EAAE,EAChE,SAAS,CACV,KACG,IAAI,KACJ,gBAAgB,CAAC,SAAS,EAAE,KAAK,KAAK,UAAU,CAAC,GACrD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-menu{padding:var(--vesper-spacing-2);gap:var(--vesper-spacing-half);border-radius:var(--vesper-radius-3);border:var(--vesper-stroke-base) solid var(--vesper-border-tertiary);background:var(--vesper-background-primary);box-shadow:var(--vesper-shadow-200);flex-direction:column;display:flex}.vesper-menu-item{width:100%;padding:var(--vesper-spacing-2);align-items:center;gap:var(--vesper-spacing-2);border-radius:var(--vesper-radius-1);cursor:pointer;outline:none;display:flex}@media (forced-colors:active){.vesper-menu-item:focus-visible{outline:var(--vesper-stroke-strong) solid CanvasText}}.vesper-menu-item-default{color:var(--vesper-text-primary)}.vesper-menu-item-default .vesper-menu-item-label{color:var(--vesper-text-secondary)}.vesper-menu-item-default:hover{background:var(--vesper-tint-neutral-100)}.vesper-menu-item-default:focus-visible{background:var(--vesper-tint-neutral-100)}.vesper-menu-item-default[data-highlighted]{background:var(--vesper-tint-neutral-100)}.vesper-menu-item-selected{color:var(--vesper-text-primary);background:var(--vesper-tint-neutral-200)}.vesper-menu-item-selected .vesper-menu-item-label{color:var(--vesper-text-secondary)}.vesper-menu-item-selected:hover{background:linear-gradient(0deg, var(--vesper-state-neutral-hover) 0%, var(--vesper-state-neutral-hover) 100%), var(--vesper-tint-neutral-200)}.vesper-menu-item-selected:focus-visible{background:linear-gradient(0deg, var(--vesper-state-neutral-hover) 0%, var(--vesper-state-neutral-hover) 100%), var(--vesper-tint-neutral-200)}.vesper-menu-item-selected[data-highlighted]{background:linear-gradient(0deg, var(--vesper-state-neutral-hover) 0%, var(--vesper-state-neutral-hover) 100%), var(--vesper-tint-neutral-200)}.vesper-menu-item-danger{color:var(--vesper-text-error)}.vesper-menu-item-danger:hover{background:var(--vesper-background-error-subtle)}.vesper-menu-item-danger:focus-visible{background:var(--vesper-background-error-subtle)}.vesper-menu-item-danger[data-highlighted]{background:var(--vesper-background-error-subtle)}.vesper-menu-item-locked{pointer-events:none;color:var(--vesper-text-tertiary)}.vesper-menu-item-locked .vesper-menu-item-left-icon{color:var(--vesper-icon-tertiary)}.vesper-menu-item-locked .vesper-menu-item-right-icon{color:var(--vesper-icon-tertiary)}.vesper-menu-item-disabled{pointer-events:none;color:var(--vesper-text-disabled)}.vesper-menu-item-disabled .vesper-menu-item-left-icon{color:var(--vesper-icon-disabled)}.vesper-menu-item-disabled .vesper-menu-item-right-icon{color:var(--vesper-icon-disabled)}.vesper-menu-item-left-icon{width:1rem;height:1rem}.vesper-menu-item-right-icon{width:1.25rem;height:1.25rem}.vesper-menu-item-text-container{gap:var(--vesper-spacing-half);flex-direction:column;flex:1;display:flex}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type ReactNode, RefObject } from "react";
|
|
2
|
+
import { type PortalContainer } from "../../utils/getPortalContainer.js";
|
|
3
|
+
export type MenuItemProps = {
|
|
4
|
+
/** The text label displayed for the menu item. */
|
|
5
|
+
text: string;
|
|
6
|
+
/** An optional secondary description displayed below the text label. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** An optional icon element rendered to the left of the menu item text. */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** The visual and behavioral style of the menu item. `"locked"` and `"disabled"` both prevent interaction; `"selected"` displays a checkmark; `"locked"` displays a lock icon. @default default */
|
|
11
|
+
style?: "default" | "danger" | "locked" | "selected" | "disabled";
|
|
12
|
+
/** Callback fired when the menu item is selected. */
|
|
13
|
+
onSelect(): void;
|
|
14
|
+
};
|
|
15
|
+
export interface MenuProps {
|
|
16
|
+
/** The preferred side of the trigger to render the menu against. @default bottom */
|
|
17
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
18
|
+
/** The distance in pixels from the trigger to the menu. @default 8 */
|
|
19
|
+
sideOffset?: number;
|
|
20
|
+
/** The alignment of the menu relative to the trigger along the perpendicular axis. @default start */
|
|
21
|
+
align?: "start" | "center" | "end";
|
|
22
|
+
/** An offset in pixels from the aligned edge of the trigger. @default 0 */
|
|
23
|
+
alignOffset?: number;
|
|
24
|
+
/** The trigger element that opens the menu. */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/** Controls the open state of the menu (controlled mode). */
|
|
27
|
+
open?: boolean;
|
|
28
|
+
/** Whether the menu is open by default (uncontrolled mode). */
|
|
29
|
+
defaultOpen?: boolean;
|
|
30
|
+
/** Callback fired when the open state changes. Receives the new open state as an argument. */
|
|
31
|
+
onOpenChange?(open: boolean): void;
|
|
32
|
+
/** The list of menu items to render in the dropdown. */
|
|
33
|
+
items: MenuItemProps[];
|
|
34
|
+
/** The width of the menu dropdown in pixels. @default 200 */
|
|
35
|
+
width?: number;
|
|
36
|
+
/** Specify the element or shadow root to portal the menu into */
|
|
37
|
+
container?: PortalContainer;
|
|
38
|
+
/** Specify the element to anchor the menu against. @default trigger element */
|
|
39
|
+
anchor?: HTMLElement | null | RefObject<HTMLElement | null>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A dropdown menu component triggered by a child element, rendering a list of selectable menu items.
|
|
43
|
+
*
|
|
44
|
+
* @param {MenuItemProps[]} props.items - The list of menu items to render in the dropdown
|
|
45
|
+
* @param {ReactElement} [props.children] - (optional) The trigger element that opens the menu
|
|
46
|
+
* @param {number} [props.width] - (optional) The width of the dropdown in pixels. @default 200
|
|
47
|
+
* @param {"top" | "bottom" | "left" | "right"} [props.side] - (optional) The preferred side of the trigger. @default bottom
|
|
48
|
+
* @param {number} [props.sideOffset] - (optional) Distance in pixels from the trigger. @default 8
|
|
49
|
+
* @param {"start" | "center" | "end"} [props.align] - (optional) Alignment relative to the trigger. @default start
|
|
50
|
+
* @param {PortalContainer} [props.container] - (optional) Specify the element or shadow root to portal the menu into
|
|
51
|
+
* @param {boolean} [props.open] - (optional) Controls the open state (controlled)
|
|
52
|
+
* @param {(open: boolean) => void} [props.onOpenChange] - (optional) Callback fired when the open state changes
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <Menu
|
|
56
|
+
* items={[
|
|
57
|
+
* { text: "Edit", onSelect: handleEdit },
|
|
58
|
+
* { text: "Delete", style: "danger", onSelect: handleDelete },
|
|
59
|
+
* ]}
|
|
60
|
+
* >
|
|
61
|
+
* <IconButton icon={<Ellipses />} aria-label="Actions" />
|
|
62
|
+
* </Menu>
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* <Menu
|
|
66
|
+
* items={options}
|
|
67
|
+
* side="right"
|
|
68
|
+
* width={250}
|
|
69
|
+
* align="end"
|
|
70
|
+
* >
|
|
71
|
+
* <Button variant="ghost">Options</Button>
|
|
72
|
+
* </Menu>
|
|
73
|
+
*/
|
|
74
|
+
export declare function Menu(props: MenuProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
75
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAM5D,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAIpC,MAAM,MAAM,aAAa,GAAG;IAC1B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mMAAmM;IACnM,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;IAClE,qDAAqD;IACrD,QAAQ,IAAI,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,oFAAoF;IACpF,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8FAA8F;IAC9F,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,wDAAwD;IACxD,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2UA+CpC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Menu as DropdownMenu } from "@base-ui/react/menu";
|
|
5
|
+
import { Checkmark, Lock } from "../icons/icons.js";
|
|
6
|
+
import { Typography } from "../typography/typography.js";
|
|
7
|
+
import { getPortalContainer, } from "../../utils/getPortalContainer.js";
|
|
8
|
+
import { useBaseRemSize } from "../../utils/hooks/useBaseRemSize.js";
|
|
9
|
+
import { isSingleReactElement } from "../../utils/isSingleReactElement.js";
|
|
10
|
+
/**
|
|
11
|
+
* A dropdown menu component triggered by a child element, rendering a list of selectable menu items.
|
|
12
|
+
*
|
|
13
|
+
* @param {MenuItemProps[]} props.items - The list of menu items to render in the dropdown
|
|
14
|
+
* @param {ReactElement} [props.children] - (optional) The trigger element that opens the menu
|
|
15
|
+
* @param {number} [props.width] - (optional) The width of the dropdown in pixels. @default 200
|
|
16
|
+
* @param {"top" | "bottom" | "left" | "right"} [props.side] - (optional) The preferred side of the trigger. @default bottom
|
|
17
|
+
* @param {number} [props.sideOffset] - (optional) Distance in pixels from the trigger. @default 8
|
|
18
|
+
* @param {"start" | "center" | "end"} [props.align] - (optional) Alignment relative to the trigger. @default start
|
|
19
|
+
* @param {PortalContainer} [props.container] - (optional) Specify the element or shadow root to portal the menu into
|
|
20
|
+
* @param {boolean} [props.open] - (optional) Controls the open state (controlled)
|
|
21
|
+
* @param {(open: boolean) => void} [props.onOpenChange] - (optional) Callback fired when the open state changes
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <Menu
|
|
25
|
+
* items={[
|
|
26
|
+
* { text: "Edit", onSelect: handleEdit },
|
|
27
|
+
* { text: "Delete", style: "danger", onSelect: handleDelete },
|
|
28
|
+
* ]}
|
|
29
|
+
* >
|
|
30
|
+
* <IconButton icon={<Ellipses />} aria-label="Actions" />
|
|
31
|
+
* </Menu>
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <Menu
|
|
35
|
+
* items={options}
|
|
36
|
+
* side="right"
|
|
37
|
+
* width={250}
|
|
38
|
+
* align="end"
|
|
39
|
+
* >
|
|
40
|
+
* <Button variant="ghost">Options</Button>
|
|
41
|
+
* </Menu>
|
|
42
|
+
*/
|
|
43
|
+
export function Menu(props) {
|
|
44
|
+
const { items, children, width = 200, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, container, anchor, ...rest } = props;
|
|
45
|
+
const [ref, setRef] = useState(null);
|
|
46
|
+
const baseRemSize = useBaseRemSize();
|
|
47
|
+
const portalContainer = getPortalContainer(container, ref);
|
|
48
|
+
if (!isSingleReactElement(children)) {
|
|
49
|
+
return children;
|
|
50
|
+
}
|
|
51
|
+
return (_jsxs(DropdownMenu.Root, { ...rest, children: [_jsx(DropdownMenu.Trigger, { render: children, ref: setRef }), _jsx(DropdownMenu.Portal, { container: portalContainer, children: _jsx(DropdownMenu.Positioner, { anchor: anchor, side: side, sideOffset: sideOffset * (baseRemSize / 16), align: align, alignOffset: alignOffset * (baseRemSize / 16), children: _jsx(DropdownMenu.Popup, { className: "vesper-menu", style: { width: `calc(${width} * (1rem / 16))` }, children: items.map((item, index) => (_jsx(MenuItem, { ...item }, index))) }) }) })] }));
|
|
52
|
+
}
|
|
53
|
+
function MenuItem({ onSelect, text, description, icon, style = "default", }) {
|
|
54
|
+
return (_jsxs(DropdownMenu.Item, { disabled: style === "disabled" || style === "locked", className: `vesper-menu-item vesper-menu-item-${style}`, onClick: () => onSelect(), label: text, children: [icon && _jsx("div", { className: "vesper-menu-item-left-icon", children: icon }), _jsxs("div", { className: "vesper-menu-item-text-container", children: [_jsx(Typography, { as: "span", variant: "label-md-bold", children: text }), description && (_jsx(Typography, { as: "span", variant: "copy-xs", className: "vesper-menu-item-label", children: description }))] }), style === "selected" && (_jsx(Checkmark, { className: "vesper-menu-item-right-icon" })), style === "locked" && _jsx(Lock, { className: "vesper-menu-item-right-icon" })] }));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAA6B,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EACL,kBAAkB,GAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA0CpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,GAAG,EACX,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,CAAC,EACd,KAAK,GAAG,OAAO,EACf,WAAW,GAAG,CAAC,EACf,SAAS,EACT,MAAM,EACN,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAiB,IAAI,CAAC,CAAC;IAErD,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAE3D,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,CACL,MAAC,YAAY,CAAC,IAAI,OAAK,IAAI,aACzB,KAAC,YAAY,CAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAI,EACvD,KAAC,YAAY,CAAC,MAAM,IAAC,SAAS,EAAE,eAAe,YAC7C,KAAC,YAAY,CAAC,UAAU,IACtB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,EAC3C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,YAE7C,KAAC,YAAY,CAAC,KAAK,IACjB,SAAS,EAAC,aAAa,EACvB,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,KAAK,iBAAiB,EAAE,YAE/C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,KAAC,QAAQ,OAAiB,IAAI,IAAf,KAAK,CAAc,CACnC,CAAC,GACiB,GACG,GACN,IACJ,CACrB,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,KAAK,GAAG,SAAS,GACH;IACd,OAAO,CACL,MAAC,YAAY,CAAC,IAAI,IAChB,QAAQ,EAAE,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,QAAQ,EACpD,SAAS,EAAE,qCAAqC,KAAK,EAAE,EACvD,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EACzB,KAAK,EAAE,IAAI,aAEV,IAAI,IAAI,cAAK,SAAS,EAAC,4BAA4B,YAAE,IAAI,GAAO,EACjE,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,UAAU,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,YAC1C,IAAI,GACM,EACZ,WAAW,IAAI,CACd,KAAC,UAAU,IACT,EAAE,EAAC,MAAM,EACT,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,wBAAwB,YAEjC,WAAW,GACD,CACd,IACG,EACL,KAAK,KAAK,UAAU,IAAI,CACvB,KAAC,SAAS,IAAC,SAAS,EAAC,6BAA6B,GAAG,CACtD,EACA,KAAK,KAAK,QAAQ,IAAI,KAAC,IAAI,IAAC,SAAS,EAAC,6BAA6B,GAAG,IACrD,CACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-modal{opacity:0;transform:translateY(var(--vesper-spacing-2));transition:opacity var(--vesper-transition-duration-fast) ease, transform var(--vesper-transition-duration-fast) ease, display var(--vesper-transition-duration-fast) ease allow-discrete, overlay var(--vesper-transition-duration-fast) ease allow-discrete;margin:auto;position:fixed;top:0;bottom:0;left:0;right:0;overflow:visible}.vesper-modal::-ms-backdrop{opacity:0}.vesper-modal::backdrop{opacity:0}.vesper-modal:before{content:"";transition:background var(--vesper-transition-duration-fast) ease, display var(--vesper-transition-duration-fast) ease allow-discrete, overlay var(--vesper-transition-duration-fast) ease allow-discrete;background:0 0;position:fixed;top:-100vh;bottom:-100vh;left:-100vw;right:-100vw}.vesper-modal[open]{opacity:1;transform:translateY(0)}.vesper-modal[open]:before{background:var(--vesper-scrim-contrast-base)}@starting-style{.vesper-modal[open]{opacity:0;transform:translateY(var(--vesper-spacing-2))}.vesper-modal[open]:before{background:0 0}}.vesper-modal-container{background:var(--vesper-background-primary);border-radius:var(--vesper-radius-3);border:var(--vesper-stroke-base) solid var(--vesper-border-primary);box-shadow:var(--vesper-shadow-300);max-width:calc(100vw - var(--vesper-spacing-16));gap:var(--vesper-spacing-6);padding-bottom:var(--vesper-spacing-6);flex-direction:column;display:flex;position:relative;overflow:hidden}.vesper-modal-header{padding:var(--vesper-spacing-6) var(--vesper-spacing-6) 0 var(--vesper-spacing-6);justify-content:space-between;align-items:flex-start;gap:var(--vesper-spacing-5);flex-shrink:0;display:flex}.vesper-modal-title{color:var(--vesper-text-primary)}.vesper-modal-description{color:var(--vesper-text-secondary);margin-top:var(--vesper-spacing-2)}.vesper-modal-content{padding:0 var(--vesper-spacing-6);color:var(--vesper-text-primary);flex-shrink:1;overflow-y:auto}.vesper-modal-buttons{gap:var(--vesper-spacing-6);padding:0 var(--vesper-spacing-6);flex-shrink:0;display:flex}.vesper-modal-buttons-start{justify-content:flex-start}.vesper-modal-buttons-end{justify-content:flex-end}.vesper-modal-buttons-fill .vesper-button{width:100%}.vesper-modal-buttons-between{justify-content:space-between}
|