@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,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Typography, } from "../typography/typography.js";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
export const BADGE_SIZES = ["sm", "md", "lg"];
|
|
5
|
+
export const BADGE_VARIANTS = [
|
|
6
|
+
"accent",
|
|
7
|
+
"success",
|
|
8
|
+
"warning",
|
|
9
|
+
"danger",
|
|
10
|
+
"info",
|
|
11
|
+
"purple",
|
|
12
|
+
"pink",
|
|
13
|
+
"mint",
|
|
14
|
+
"contrast",
|
|
15
|
+
];
|
|
16
|
+
const BADGE_TYPOGRAPHY_VARIANTS = {
|
|
17
|
+
lg: "label-md",
|
|
18
|
+
md: "label-sm",
|
|
19
|
+
sm: "label-xs",
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A polymorphic badge component for describing the content it sits next to (e.g. plan tier, environment, role) with color variants and optional icons.
|
|
23
|
+
*
|
|
24
|
+
* Unlike `Tag` (which categorizes content) and `Chip` (which displays on/off states), `Badges` provide contextual metadata about adjacent content.
|
|
25
|
+
*
|
|
26
|
+
* @see packages/vesper/src/components/chip/chip.tsx
|
|
27
|
+
* @see packages/vesper/src/components/tag/tag.tsx
|
|
28
|
+
*
|
|
29
|
+
* @param {BadgeSize} [props.size] - (optional) The size of the badge. @default md
|
|
30
|
+
* @param {BadgeVariant} [props.variant] - (optional) The color variant of the badge. @default accent
|
|
31
|
+
* @param {boolean} [props.subtle] - (optional) Renders the badge with a more subdued appearance. @default false
|
|
32
|
+
* @param {ReactNode} [props.icon] - (optional) An icon element rendered to the left of the badge text
|
|
33
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default div
|
|
34
|
+
*
|
|
35
|
+
* You may also pass any additional props to the underlying element
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <Badge variant="success">Active</Badge>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <Badge size="sm" variant="danger" icon={<ErrorSolid />} subtle>
|
|
42
|
+
* 3 errors
|
|
43
|
+
* </Badge>
|
|
44
|
+
*/
|
|
45
|
+
export function Badge(props) {
|
|
46
|
+
const { as: Component = "div", className, size = "md", variant = "accent", subtle, icon, children, ...rest } = props;
|
|
47
|
+
return (_jsxs(Component, { className: cn("vesper-badge", `vesper-badge-${size}`, subtle ? `vesper-badge-${variant}-subtle` : `vesper-badge-${variant}`, className), ...rest, children: [icon && _jsx("span", { className: "vesper-badge-icon", children: icon }), _jsx(Typography, { as: "span", variant: BADGE_TYPOGRAPHY_VARIANTS[size], className: "vesper-badge-text", children: children })] }));
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,UAAU,GAEX,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAGhC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ;IACR,SAAS;IACT,SAAS;IACT,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,MAAM;IACN,MAAM;IACN,UAAU;CACF,CAAC;AAoBX,MAAM,yBAAyB,GAA4C;IACzE,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,KAAK,CAAgC,KAAoB;IACvE,MAAM,EACJ,EAAE,EAAE,SAAS,GAAG,KAAK,EACrB,SAAS,EACT,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,QAAQ,EAClB,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,MAAC,SAAS,IACR,SAAS,EAAE,EAAE,CACX,cAAc,EACd,gBAAgB,IAAI,EAAE,EACtB,MAAM,CAAC,CAAC,CAAC,gBAAgB,OAAO,SAAS,CAAC,CAAC,CAAC,gBAAgB,OAAO,EAAE,EACrE,SAAS,CACV,KACG,IAAI,aAEP,IAAI,IAAI,eAAM,SAAS,EAAC,mBAAmB,YAAE,IAAI,GAAQ,EAC1D,KAAC,UAAU,IACT,EAAE,EAAC,MAAM,EACT,OAAO,EAAE,yBAAyB,CAAC,IAAI,CAAC,EACxC,SAAS,EAAC,mBAAmB,YAE5B,QAAQ,GACE,IACH,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-button{justify-content:center;align-items:center;gap:var(--vesper-spacing-2);width:fit-content;font-family:var(--vesper-font-mono);text-transform:uppercase;font-weight:400;line-height:var(--vesper-leading-none);letter-spacing:var(--vesper-tracking-normal);cursor:pointer;display:inline-flex}@media (forced-colors:active){.vesper-button{border:var(--vesper-stroke-base) solid CanvasText}.vesper-button:focus-visible{outline:var(--vesper-stroke-strong) solid CanvasText}}@media not (forced-colors:active){.vesper-button:focus-visible{box-shadow:var(--vesper-shadow-focus-ring)}}.vesper-button{text-box-trim:trim-both;text-box-edge:cap alphabetic}.vesper-button-lg{height:3rem;padding:0 var(--vesper-spacing-5);border-radius:var(--vesper-radius-2);font-size:1rem}.vesper-button-lg .vesper-button-icon{width:1.25rem;height:1.25rem}.vesper-button-md{height:2.5rem;padding:0 var(--vesper-spacing-4);border-radius:var(--vesper-radius-2);font-size:1rem}.vesper-button-md .vesper-button-icon{width:1.25rem;height:1.25rem}.vesper-button-sm{height:2rem;padding:0 var(--vesper-spacing-3);border-radius:var(--vesper-radius-1);font-size:.875rem}.vesper-button-sm .vesper-button-icon{width:1rem;height:1rem}.vesper-button-xs{height:1.5rem;padding:0 var(--vesper-spacing-2);border-radius:var(--vesper-radius-1);font-size:.875rem}.vesper-button-xs .vesper-button-icon{width:.875rem;height:.875rem}.vesper-button-primary{color:var(--vesper-text-primary);background:var(--vesper-background-accent-base)}.vesper-button-primary:hover{background:linear-gradient(0deg, var(--vesper-state-inverse-hover) 0%, var(--vesper-state-inverse-hover) 100%), var(--vesper-background-accent-base)}@media not (forced-colors:active){.vesper-button-contrast{color:var(--vesper-text-inverse-primary);background:var(--vesper-background-inverse-primary)}.vesper-button-contrast:hover{background:linear-gradient(0deg, var(--vesper-state-inverse-hover) 0%, var(--vesper-state-inverse-hover) 100%), var(--vesper-background-inverse-primary)}}@media (forced-colors:active){.vesper-button-contrast:focus-visible{outline-offset:var(--vesper-spacing-micro);outline-width:var(--vesper-stroke-base)}.vesper-button-contrast{forced-color-adjust:none;color:canvas;background:canvastext}}.vesper-button-danger{color:var(--vesper-text-inverse-primary);background:var(--vesper-background-error-base)}.vesper-button-danger:hover{background:linear-gradient(0deg, var(--vesper-state-inverse-hover) 0%, var(--vesper-state-inverse-hover) 100%), var(--vesper-background-error-base)}.vesper-button-warning{color:var(--vesper-text-primary);background:var(--vesper-background-warning-base)}.vesper-button-warning:hover{background:linear-gradient(0deg, var(--vesper-state-inverse-hover) 0%, var(--vesper-state-inverse-hover) 100%), var(--vesper-background-warning-base)}.vesper-button-subtle{color:var(--vesper-text-primary);background:var(--vesper-tint-neutral-300)}.vesper-button-subtle:hover{background:var(--vesper-tint-neutral-400)}.vesper-button-tertiary{color:var(--vesper-text-primary)}@media (forced-colors:none){.vesper-button-tertiary{border:var(--vesper-stroke-base) solid var(--vesper-border-secondary)}}.vesper-button-tertiary{background:var(--vesper-tint-inverse-100)}.vesper-button-tertiary:hover{background:var(--vesper-tint-neutral-200)}.vesper-button-ghost{color:var(--vesper-text-primary)}.vesper-button-ghost:hover{background:var(--vesper-tint-neutral-200)}.vesper-button-disabled{color:var(--vesper-text-disabled);background:var(--vesper-background-disabled);pointer-events:none}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
|
+
import type { Polymorphic } from "../../utils/polymorphic.js";
|
|
3
|
+
export declare const BUTTON_SIZES: readonly ["xs", "sm", "md", "lg"];
|
|
4
|
+
export declare const BUTTON_VARIANTS: readonly ["contrast", "danger", "ghost", "primary", "subtle", "tertiary", "warning"];
|
|
5
|
+
export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
6
|
+
export type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
7
|
+
export type ButtonProps<E extends ElementType = "button"> = Polymorphic<{
|
|
8
|
+
/** The size of the button. Affects padding and font size. @default md */
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
/** The visual style variant of the button. @default primary */
|
|
11
|
+
variant?: ButtonVariant;
|
|
12
|
+
/** When true, renders the button in a disabled state and prevents interaction. @default false */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** An optional icon element rendered to the left of the button content. */
|
|
15
|
+
iconLeft?: ReactNode;
|
|
16
|
+
/** An optional icon element rendered to the right of the button content. */
|
|
17
|
+
iconRight?: ReactNode;
|
|
18
|
+
}, E>;
|
|
19
|
+
/**
|
|
20
|
+
* A polymorphic button component with multiple size and style variants, supporting optional leading and trailing icons.
|
|
21
|
+
*
|
|
22
|
+
* Unlike `TextButton` (which renders text without a background fill or outline), `IconButton` (which displays a single icon without text), and `SplitButton` (which pairs a primary action with a dropdown menu), `Button` is the standard interactive control for triggering actions.
|
|
23
|
+
*
|
|
24
|
+
* @see packages/vesper/src/components/icon-button/icon-button.tsx
|
|
25
|
+
* @see packages/vesper/src/components/split-button/split-button.tsx
|
|
26
|
+
* @see packages/vesper/src/components/text-/text-button.tsx
|
|
27
|
+
*
|
|
28
|
+
* @param {ButtonSize} [props.size] - (optional) The size of the button. @default md
|
|
29
|
+
* @param {ButtonVariant} [props.variant] - (optional) The visual style variant. @default primary
|
|
30
|
+
* @param {boolean} [props.disabled] - (optional) Renders the button in a disabled state. @default false
|
|
31
|
+
* @param {ReactNode} [props.iconLeft] - (optional) An icon rendered to the left of the button content
|
|
32
|
+
* @param {ReactNode} [props.iconRight] - (optional) An icon rendered to the right of the button content
|
|
33
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default button
|
|
34
|
+
*
|
|
35
|
+
* You may also pass any additional props to the underlying element
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <Button onClick={handleClick}>Submit</Button>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <Button variant="danger" size="sm" iconLeft={<Trash />}>
|
|
42
|
+
* Delete
|
|
43
|
+
* </Button>
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <Button as="a" href="/docs" variant="ghost">
|
|
47
|
+
* Documentation
|
|
48
|
+
* </Button>
|
|
49
|
+
*/
|
|
50
|
+
export declare function Button<E extends ElementType = "button">(props: ButtonProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,YAAY,mCAAoC,CAAC;AAE9D,eAAO,MAAM,eAAe,sFAQlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IAAI,WAAW,CACrE;IACE,yEAAyE;IACzE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,EACD,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,EACrD,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,2CA8BtB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 BUTTON_VARIANTS = [
|
|
6
|
+
"contrast",
|
|
7
|
+
"danger",
|
|
8
|
+
"ghost",
|
|
9
|
+
"primary",
|
|
10
|
+
"subtle",
|
|
11
|
+
"tertiary",
|
|
12
|
+
"warning",
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* A polymorphic button component with multiple size and style variants, supporting optional leading and trailing icons.
|
|
16
|
+
*
|
|
17
|
+
* Unlike `TextButton` (which renders text without a background fill or outline), `IconButton` (which displays a single icon without text), and `SplitButton` (which pairs a primary action with a dropdown menu), `Button` is the standard interactive control for triggering actions.
|
|
18
|
+
*
|
|
19
|
+
* @see packages/vesper/src/components/icon-button/icon-button.tsx
|
|
20
|
+
* @see packages/vesper/src/components/split-button/split-button.tsx
|
|
21
|
+
* @see packages/vesper/src/components/text-/text-button.tsx
|
|
22
|
+
*
|
|
23
|
+
* @param {ButtonSize} [props.size] - (optional) The size of the button. @default md
|
|
24
|
+
* @param {ButtonVariant} [props.variant] - (optional) The visual style variant. @default primary
|
|
25
|
+
* @param {boolean} [props.disabled] - (optional) Renders the button in a disabled state. @default false
|
|
26
|
+
* @param {ReactNode} [props.iconLeft] - (optional) An icon rendered to the left of the button content
|
|
27
|
+
* @param {ReactNode} [props.iconRight] - (optional) An icon rendered to the right of the button content
|
|
28
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default button
|
|
29
|
+
*
|
|
30
|
+
* You may also pass any additional props to the underlying element
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <Button onClick={handleClick}>Submit</Button>
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <Button variant="danger" size="sm" iconLeft={<Trash />}>
|
|
37
|
+
* Delete
|
|
38
|
+
* </Button>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <Button as="a" href="/docs" variant="ghost">
|
|
42
|
+
* Documentation
|
|
43
|
+
* </Button>
|
|
44
|
+
*/
|
|
45
|
+
export function Button(props) {
|
|
46
|
+
const { as: Component = "button", size = "md", variant = "primary", iconLeft, iconRight, children, className, disabled, ...rest } = props;
|
|
47
|
+
return (_jsxs(Component, { className: cn("vesper-button", `vesper-button-${size}`, `vesper-button-${disabled ? "disabled" : variant}`, className), ...rest, ...getDisabledProps(Component, !!disabled), children: [iconLeft && _jsx("span", { className: "vesper-button-icon", children: iconLeft }), children, iconRight && _jsx("span", { className: "vesper-button-icon", children: iconRight })] }));
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.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,eAAe,GAAG;IAC7B,UAAU;IACV,QAAQ;IACR,OAAO;IACP,SAAS;IACT,QAAQ;IACR,UAAU;IACV,SAAS;CACD,CAAC;AAsBX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,MAAM,CACpB,KAAqB;IAErB,MAAM,EACJ,EAAE,EAAE,SAAS,GAAG,QAAQ,EACxB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,MAAC,SAAS,IACR,SAAS,EAAE,EAAE,CACX,eAAe,EACf,iBAAiB,IAAI,EAAE,EACvB,iBAAiB,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,EAClD,SAAS,CACV,KACG,IAAI,KACJ,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,aAE1C,QAAQ,IAAI,eAAM,SAAS,EAAC,oBAAoB,YAAE,QAAQ,GAAQ,EAClE,QAAQ,EACR,SAAS,IAAI,eAAM,SAAS,EAAC,oBAAoB,YAAE,SAAS,GAAQ,IAC3D,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-checkbox{align-items:center;gap:var(--vesper-spacing-2);width:fit-content;display:flex}.vesper-checkbox:not(:has(:disabled)){cursor:pointer}.vesper-checkbox-box{border-radius:var(--vesper-radius-half);border:var(--vesper-stroke-base) solid var(--vesper-border-primary);position:relative}.vesper-checkbox-sm .vesper-checkbox-box{width:.75rem;height:.75rem}.vesper-checkbox-md .vesper-checkbox-box{width:1rem;height:1rem}.vesper-checkbox-checked-icon,.vesper-checkbox-indeterminate-icon{visibility:hidden;position:absolute}.vesper-checkbox-input{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vesper-checkbox-input:checked:not(:indeterminate):not(:disabled)+.vesper-checkbox-box{background:var(--vesper-background-accent-base);border-color:var(--vesper-background-accent-base)}.vesper-checkbox-input:checked:not(:indeterminate)+.vesper-checkbox-box .vesper-checkbox-checked-icon{visibility:visible}.vesper-checkbox-input:focus-visible+.vesper-checkbox-box{outline-offset:var(--vesper-spacing-micro);outline:var(--vesper-stroke-base) solid var(--vesper-border-focus)}@media (forced-colors:active){.vesper-checkbox-input:focus-visible+.vesper-checkbox-box{outline-color:canvastext}}.vesper-checkbox-input:indeterminate+.vesper-checkbox-box{background:var(--vesper-background-accent-base);border-color:var(--vesper-background-accent-base)}.vesper-checkbox-input:indeterminate+.vesper-checkbox-box .vesper-checkbox-indeterminate-icon{visibility:visible}.vesper-checkbox-input:disabled+.vesper-checkbox-box{border-color:var(--vesper-border-disabled);background:var(--vesper-background-disabled)}.vesper-checkbox-input:disabled+.vesper-checkbox-box .vesper-checkbox-indicator{color:var(--vesper-icon-disabled)}.vesper-checkbox-input:disabled~.vesper-checkbox-label{color:var(--vesper-text-disabled)}.vesper-checkbox-label{color:var(--vesper-text-primary)}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type FormInputProps } from "../../utils/splitFormInputProps.js";
|
|
2
|
+
export declare const CHECKBOX_SIZES: readonly ["sm", "md"];
|
|
3
|
+
export type CheckboxSize = (typeof CHECKBOX_SIZES)[number];
|
|
4
|
+
export interface CheckboxProps extends FormInputProps<"label", "input"> {
|
|
5
|
+
/** The text displayed next to the checkbox, also used as the input's default `aria-label`. An asterisk is appended when `required` is `true`. */
|
|
6
|
+
text: string;
|
|
7
|
+
/** When true, renders the checkbox in an indeterminate (mixed) state, displaying a dash icon instead of a checkmark. @default false */
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
/** The size of the checkbox and its text. @default md */
|
|
10
|
+
size?: CheckboxSize;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A form-ready checkbox input with a label, supporting controlled and uncontrolled usage as well as indeterminate state.
|
|
14
|
+
*
|
|
15
|
+
* Unlike `Switch`, which only allows a binary on/off choice, `Checkbox` can be used for individual boolean selections that can also include indeterminate state.
|
|
16
|
+
*
|
|
17
|
+
* Related components include `Toggle` (which selects one option from a segmented group) and `Choicebox` (which selects any number of options from a group).
|
|
18
|
+
*
|
|
19
|
+
* @see packages/vesper/src/components/switch/switch.tsx
|
|
20
|
+
* @see packages/vesper/src/components/toggle/toggle.tsx
|
|
21
|
+
* @see packages/vesper/src/components/choicebox/choicebox.tsx
|
|
22
|
+
*
|
|
23
|
+
* @param {string} props.text - The text displayed next to the checkbox
|
|
24
|
+
* @param {CheckboxSize} [props.size] - (optional) The size of the checkbox and its text. @default md
|
|
25
|
+
* @param {boolean} [props.indeterminate] - (optional) Renders the checkbox in an indeterminate (mixed) state. @default false
|
|
26
|
+
* @param {boolean} [props.checked] - (optional) The controlled checked state
|
|
27
|
+
* @param {boolean} [props.defaultChecked] - (optional) The initial checked state (uncontrolled)
|
|
28
|
+
* @param {boolean} [props.disabled] - (optional) Prevents interaction. @default false
|
|
29
|
+
* @param {boolean} [props.required] - (optional) Marks the checkbox as required for form validation, and appends an asterisk to the `text`. @default false
|
|
30
|
+
* @param {string} [props.name] - (optional) Form field name submitted with form data
|
|
31
|
+
*
|
|
32
|
+
* You may also pass any additional props to the wrapping `div` element
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <Checkbox text="Accept terms" name="terms" required />
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <Checkbox
|
|
39
|
+
* text="Select all"
|
|
40
|
+
* indeterminate={someChecked && !allChecked}
|
|
41
|
+
* checked={allChecked}
|
|
42
|
+
* onChange={(e) => toggleAll(e.target.checked)}
|
|
43
|
+
* />
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <Checkbox
|
|
47
|
+
* text="Accept terms"
|
|
48
|
+
* aria-label="Terms and conditions"
|
|
49
|
+
* required
|
|
50
|
+
* />
|
|
51
|
+
*/
|
|
52
|
+
export declare function Checkbox(props: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,cAAc,uBAAwB,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;IACrE,iJAAiJ;IACjJ,IAAI,EAAE,MAAM,CAAC;IACb,uIAAuI;IACvI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yDAAyD;IACzD,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA0C5C"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useLayoutEffect, useRef } from "react";
|
|
4
|
+
import { Checkmark, Minus } from "../icons/icons.js";
|
|
5
|
+
import { Typography, } from "../typography/typography.js";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import { useMergedRefs } from "../../utils/hooks/useMergedRefs.js";
|
|
8
|
+
import { splitFormInputProps, } from "../../utils/splitFormInputProps.js";
|
|
9
|
+
export const CHECKBOX_SIZES = ["sm", "md"];
|
|
10
|
+
const CHECKBOX_TYPOGRAPHY = {
|
|
11
|
+
sm: "label-md",
|
|
12
|
+
md: "label-lg",
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A form-ready checkbox input with a label, supporting controlled and uncontrolled usage as well as indeterminate state.
|
|
16
|
+
*
|
|
17
|
+
* Unlike `Switch`, which only allows a binary on/off choice, `Checkbox` can be used for individual boolean selections that can also include indeterminate state.
|
|
18
|
+
*
|
|
19
|
+
* Related components include `Toggle` (which selects one option from a segmented group) and `Choicebox` (which selects any number of options from a group).
|
|
20
|
+
*
|
|
21
|
+
* @see packages/vesper/src/components/switch/switch.tsx
|
|
22
|
+
* @see packages/vesper/src/components/toggle/toggle.tsx
|
|
23
|
+
* @see packages/vesper/src/components/choicebox/choicebox.tsx
|
|
24
|
+
*
|
|
25
|
+
* @param {string} props.text - The text displayed next to the checkbox
|
|
26
|
+
* @param {CheckboxSize} [props.size] - (optional) The size of the checkbox and its text. @default md
|
|
27
|
+
* @param {boolean} [props.indeterminate] - (optional) Renders the checkbox in an indeterminate (mixed) state. @default false
|
|
28
|
+
* @param {boolean} [props.checked] - (optional) The controlled checked state
|
|
29
|
+
* @param {boolean} [props.defaultChecked] - (optional) The initial checked state (uncontrolled)
|
|
30
|
+
* @param {boolean} [props.disabled] - (optional) Prevents interaction. @default false
|
|
31
|
+
* @param {boolean} [props.required] - (optional) Marks the checkbox as required for form validation, and appends an asterisk to the `text`. @default false
|
|
32
|
+
* @param {string} [props.name] - (optional) Form field name submitted with form data
|
|
33
|
+
*
|
|
34
|
+
* You may also pass any additional props to the wrapping `div` element
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <Checkbox text="Accept terms" name="terms" required />
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* <Checkbox
|
|
41
|
+
* text="Select all"
|
|
42
|
+
* indeterminate={someChecked && !allChecked}
|
|
43
|
+
* checked={allChecked}
|
|
44
|
+
* onChange={(e) => toggleAll(e.target.checked)}
|
|
45
|
+
* />
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <Checkbox
|
|
49
|
+
* text="Accept terms"
|
|
50
|
+
* aria-label="Terms and conditions"
|
|
51
|
+
* required
|
|
52
|
+
* />
|
|
53
|
+
*/
|
|
54
|
+
export function Checkbox(props) {
|
|
55
|
+
const { text, size = "md", indeterminate, className, ...rest } = props;
|
|
56
|
+
const { ariaProps, controlProps, wrapperProps, formProps } = splitFormInputProps(rest);
|
|
57
|
+
const innerRef = useRef(null);
|
|
58
|
+
useLayoutEffect(() => {
|
|
59
|
+
if (innerRef.current)
|
|
60
|
+
innerRef.current.indeterminate = !!indeterminate;
|
|
61
|
+
}, [indeterminate]);
|
|
62
|
+
const mergedInputRef = useMergedRefs(controlProps.ref, innerRef);
|
|
63
|
+
return (_jsxs("label", { ...wrapperProps, className: cn("vesper-checkbox", `vesper-checkbox-${size}`, className), children: [_jsx("input", { "aria-label": text, ...ariaProps, ...controlProps, ...formProps, ref: mergedInputRef, type: "checkbox", className: "vesper-checkbox-input" }), _jsx("div", { className: "vesper-checkbox-box", children: _jsxs("div", { className: "vesper-checkbox-indicator", children: [_jsx(Checkmark, { className: "vesper-checkbox-checked-icon" }), _jsx(Minus, { className: "vesper-checkbox-indeterminate-icon" })] }) }), _jsx(Typography, { variant: CHECKBOX_TYPOGRAPHY[size], className: "vesper-checkbox-label", as: "span", children: formProps.required ? `${text} *` : text })] }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,UAAU,GAEX,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAapD,MAAM,mBAAmB,GAA+C;IACtE,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,GACxD,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5B,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAChD,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,CAAC,OAAO;YAAE,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,aAAa,CAAC;IACzE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,cAAc,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAEjE,OAAO,CACL,oBACM,YAAY,EAChB,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,IAAI,EAAE,EAAE,SAAS,CAAC,aAEtE,8BACc,IAAI,KACZ,SAAS,KACT,YAAY,KACZ,SAAS,EACb,GAAG,EAAE,cAAc,EACnB,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,uBAAuB,GACjC,EACF,cAAK,SAAS,EAAC,qBAAqB,YAClC,eAAK,SAAS,EAAC,2BAA2B,aACxC,KAAC,SAAS,IAAC,SAAS,EAAC,8BAA8B,GAAG,EACtD,KAAC,KAAK,IAAC,SAAS,EAAC,oCAAoC,GAAG,IACpD,GACF,EACN,KAAC,UAAU,IACT,OAAO,EAAE,mBAAmB,CAAC,IAAI,CAAC,EAClC,SAAS,EAAC,uBAAuB,EACjC,EAAE,EAAC,MAAM,YAER,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAC7B,IACP,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-chip{justify-content:space-between;align-items:center;gap:var(--vesper-spacing-1);border-radius:var(--vesper-radius-1);width:fit-content;padding:0 var(--vesper-spacing-2);cursor:pointer;display:inline-flex}@media (forced-colors:active){.vesper-chip{border:var(--vesper-stroke-base) solid CanvasText}.vesper-chip:focus-visible{outline:var(--vesper-stroke-strong) solid CanvasText}}@media not (forced-colors:active){.vesper-chip:focus-visible{box-shadow:var(--vesper-shadow-focus-ring)}}.vesper-chip-sm{height:1.5rem}.vesper-chip-md{height:1.75rem}.vesper-chip-default{color:var(--vesper-text-primary);border:var(--vesper-stroke-base) solid var(--vesper-border-primary);background:var(--vesper-tint-inverse-200)}.vesper-chip-default.vesper-chip-selected{color:var(--vesper-text-inverse-primary);background:var(--vesper-background-inverse-primary);border:var(--vesper-stroke-base) solid var(--vesper-border-strong)}@media (forced-colors:active){.vesper-chip-default.vesper-chip-selected{border:var(--vesper-stroke-base) solid CanvasText;color:canvas;forced-color-adjust:none;background:canvastext}}.vesper-chip-default:hover{border:var(--vesper-stroke-base) solid var(--vesper-border-strong)}.vesper-chip-contrast{color:var(--vesper-text-inverse-primary);border:var(--vesper-stroke-base) solid var(--vesper-border-strong);background:var(--vesper-background-inverse-primary)}.vesper-chip-contrast.vesper-chip-selected{color:var(--vesper-text-primary);background:var(--vesper-background-primary)}@media (forced-colors:active){.vesper-chip-contrast.vesper-chip-selected{border:var(--vesper-stroke-base) solid CanvasText;color:canvastext;forced-color-adjust:none;background:canvas}}.vesper-chip-contrast:hover:not(.vesper-chip-selected){background:var(--vesper-background-inverse-secondary)}@media (forced-colors:active){.vesper-chip-contrast{color:canvas;forced-color-adjust:none;background:canvastext}.vesper-chip-contrast:focus-visible{outline-offset:var(--vesper-spacing-micro);outline-width:var(--vesper-stroke-base)}}.vesper-chip.vesper-chip-disabled{pointer-events:none;color:var(--vesper-text-disabled);background:var(--vesper-background-disabled);border:var(--vesper-stroke-base) solid var(--vesper-border-disabled)}.vesper-chip.vesper-chip-disabled .vesper-chip-icon{color:var(--vesper-icon-disabled)}@media (forced-colors:active){.vesper-chip.vesper-chip-disabled{opacity:.5}}.vesper-chip-icon{width:.875rem;height:.875rem;display:flex}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
|
+
import type { Polymorphic } from "../../utils/polymorphic.js";
|
|
3
|
+
export declare const CHIP_VARIANTS: readonly ["default", "contrast"];
|
|
4
|
+
export declare const CHIP_SIZES: readonly ["sm", "md"];
|
|
5
|
+
export type ChipVariant = (typeof CHIP_VARIANTS)[number];
|
|
6
|
+
export type ChipSize = (typeof CHIP_SIZES)[number];
|
|
7
|
+
export type ChipProps<E extends ElementType = "button"> = Polymorphic<{
|
|
8
|
+
/** The visual style variant of the chip. @default default */
|
|
9
|
+
variant?: ChipVariant;
|
|
10
|
+
/** The size of the chip. @default md */
|
|
11
|
+
size?: ChipSize;
|
|
12
|
+
/** An optional icon element rendered to the left of the chip content. */
|
|
13
|
+
iconLeft?: ReactNode;
|
|
14
|
+
/** An optional icon element rendered to the right of the chip content. */
|
|
15
|
+
iconRight?: ReactNode;
|
|
16
|
+
/** Whether the chip is currently selected. When rendered as a button, this value is reflected via `aria-pressed`. @default false */
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
/** When `true`, renders the chip in a disabled state and prevents interaction. @default false */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Callback fired when the chip is clicked. Receives the next selected state as an argument. */
|
|
21
|
+
onChange?(selected: boolean): void;
|
|
22
|
+
}, E>;
|
|
23
|
+
/**
|
|
24
|
+
* A polymorphic selectable chip component for displaying on/off states in UI panels and forms, supporting icons and click callbacks.
|
|
25
|
+
*
|
|
26
|
+
* Unlike `Tag` (which categorizes content) and `Badge` (which describes adjacent content), `Chips` represent toggleable selections.
|
|
27
|
+
*
|
|
28
|
+
* @see packages/vesper/src/components/badge/badge.tsx
|
|
29
|
+
* @see packages/vesper/src/components/tag/tag.tsx
|
|
30
|
+
*
|
|
31
|
+
* @param {ChipVariant} [props.variant] - (optional) The visual style variant. @default default
|
|
32
|
+
* @param {ChipSize} [props.size] - (optional) The size of the `Chip`. @default md
|
|
33
|
+
* @param {boolean} [props.selected] - (optional) Whether the chip is currently selected @default false
|
|
34
|
+
* @param {boolean} [props.disabled] - (optional) Renders the chip in a disabled state @default false
|
|
35
|
+
* @param {ReactNode} [props.iconLeft] - (optional) An icon rendered to the left of the chip content
|
|
36
|
+
* @param {ReactNode} [props.iconRight] - (optional) An icon rendered to the right of the chip content
|
|
37
|
+
* @param {(selected: boolean) => void} [props.onChange] - (optional) Callback fired with the next selected state when clicked
|
|
38
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default button
|
|
39
|
+
*
|
|
40
|
+
* You may also pass any additional props to the underlying element
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <Chip selected={isActive} onChange={setIsActive}>
|
|
44
|
+
* Filter
|
|
45
|
+
* </Chip>
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <Chip variant="contrast" iconLeft={<Add />} disabled>
|
|
49
|
+
* Add tag
|
|
50
|
+
* </Chip>
|
|
51
|
+
*/
|
|
52
|
+
export declare function Chip<E extends ElementType = "button">(props: ChipProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/components/chip/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,aAAa,kCAAmC,CAAC;AAE9D,eAAO,MAAM,UAAU,uBAAwB,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IAAI,WAAW,CACnE;IACE,6DAA6D;IAC7D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,wCAAwC;IACxC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,oIAAoI;IACpI,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gGAAgG;IAChG,QAAQ,CAAC,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC,EACD,CAAC,CACF,CAAC;AAOF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CA2CzE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Typography, } from "../typography/typography.js";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
import { getDisabledProps } from "../../utils/getDisabledProps.js";
|
|
6
|
+
export const CHIP_VARIANTS = ["default", "contrast"];
|
|
7
|
+
export const CHIP_SIZES = ["sm", "md"];
|
|
8
|
+
const CHIP_TYPOGRAPHY = {
|
|
9
|
+
sm: "label-xs",
|
|
10
|
+
md: "label-sm",
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A polymorphic selectable chip component for displaying on/off states in UI panels and forms, supporting icons and click callbacks.
|
|
14
|
+
*
|
|
15
|
+
* Unlike `Tag` (which categorizes content) and `Badge` (which describes adjacent content), `Chips` represent toggleable selections.
|
|
16
|
+
*
|
|
17
|
+
* @see packages/vesper/src/components/badge/badge.tsx
|
|
18
|
+
* @see packages/vesper/src/components/tag/tag.tsx
|
|
19
|
+
*
|
|
20
|
+
* @param {ChipVariant} [props.variant] - (optional) The visual style variant. @default default
|
|
21
|
+
* @param {ChipSize} [props.size] - (optional) The size of the `Chip`. @default md
|
|
22
|
+
* @param {boolean} [props.selected] - (optional) Whether the chip is currently selected @default false
|
|
23
|
+
* @param {boolean} [props.disabled] - (optional) Renders the chip in a disabled state @default false
|
|
24
|
+
* @param {ReactNode} [props.iconLeft] - (optional) An icon rendered to the left of the chip content
|
|
25
|
+
* @param {ReactNode} [props.iconRight] - (optional) An icon rendered to the right of the chip content
|
|
26
|
+
* @param {(selected: boolean) => void} [props.onChange] - (optional) Callback fired with the next selected state when clicked
|
|
27
|
+
* @param {React.ElementType} [props.as] - (optional) Element type to render. @default button
|
|
28
|
+
*
|
|
29
|
+
* You may also pass any additional props to the underlying element
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <Chip selected={isActive} onChange={setIsActive}>
|
|
33
|
+
* Filter
|
|
34
|
+
* </Chip>
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <Chip variant="contrast" iconLeft={<Add />} disabled>
|
|
38
|
+
* Add tag
|
|
39
|
+
* </Chip>
|
|
40
|
+
*/
|
|
41
|
+
export function Chip(props) {
|
|
42
|
+
const { as: Component = "button", variant = "default", size = "md", children, iconLeft, iconRight, className, selected = false, disabled = false, onChange, onClick, ...rest } = props;
|
|
43
|
+
return (_jsxs(Typography, { as: Component, variant: CHIP_TYPOGRAPHY[size], "aria-pressed": Component === "button" ? selected : undefined, className: cn("vesper-chip", `vesper-chip-${variant}`, `vesper-chip-${size}`, selected && `vesper-chip-selected`, disabled && `vesper-chip-disabled`, className),
|
|
44
|
+
// TypeScript cannot infer the type of onClick because this component is polymorphic
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
+
onClick: (e) => {
|
|
47
|
+
onChange?.(!selected);
|
|
48
|
+
onClick?.(e);
|
|
49
|
+
}, ...rest, ...getDisabledProps(Component, disabled), children: [iconLeft && _jsx("span", { className: "vesper-chip-icon", children: iconLeft }), children, iconRight && _jsx("span", { className: "vesper-chip-icon", children: iconRight })] }));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EACL,UAAU,GAGX,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AA0BhD,MAAM,eAAe,GAA2C;IAC9D,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,IAAI,CAAmC,KAAmB;IACxE,MAAM,EACJ,EAAE,EAAE,SAAS,GAAG,QAAQ,EACxB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,OAAO,EACP,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,MAAC,UAAU,IACT,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,kBAChB,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC3D,SAAS,EAAE,EAAE,CACX,aAAa,EACb,eAAe,OAAO,EAAE,EACxB,eAAe,IAAI,EAAE,EACrB,QAAQ,IAAI,sBAAsB,EAClC,QAAQ,IAAI,sBAAsB,EAClC,SAAS,CACV;QACD,oFAAoF;QACpF,8DAA8D;QAC9D,OAAO,EAAE,CAAC,CAAM,EAAE,EAAE;YAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;YACtB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QACf,CAAC,KACI,IAA2B,KAC5B,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,aAExC,QAAQ,IAAI,eAAM,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAQ,EAChE,QAAQ,EACR,SAAS,IAAI,eAAM,SAAS,EAAC,kBAAkB,YAAE,SAAS,GAAQ,IACxD,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vesper-choicebox{gap:var(--vesper-spacing-2);flex-direction:column;display:flex}.vesper-choicebox-item{justify-content:space-between;align-items:center;gap:var(--vesper-spacing-3);border-radius:var(--vesper-radius-1);background:var(--vesper-background-primary);padding:var(--vesper-spacing-3);border:var(--vesper-stroke-base) solid var(--vesper-border-secondary);display:flex}.vesper-choicebox-item.vesper-choicebox-item-compact{padding-top:.375rem;padding-bottom:.375rem}.vesper-choicebox-item:has(:disabled){border-color:var(--vesper-border-disabled)}.vesper-choicebox-item:has(:disabled) .vesper-choicebox-item-label{color:var(--vesper-text-disabled)}.vesper-choicebox-item:has(:disabled) .vesper-choicebox-item-description{color:var(--vesper-text-disabled)}.vesper-choicebox-item:not(:has(:disabled)):hover{background:linear-gradient(0deg, var(--vesper-tint-neutral-100) 0%, var(--vesper-tint-neutral-100) 100%), var(--vesper-background-primary)}.vesper-choicebox-item:not(:has(:disabled)):has(:checked){border-color:var(--vesper-border-strong);background:linear-gradient(0deg, var(--vesper-tint-neutral-200) 0%, var(--vesper-tint-neutral-200) 100%), var(--vesper-background-primary)}.vesper-choicebox-item:not(:has(:disabled)){cursor:pointer}.vesper-choicebox-item:has(:focus-visible){box-shadow:var(--vesper-shadow-focus-ring)}.vesper-choicebox-item-label{color:var(--vesper-text-primary)}.vesper-choicebox-item-description{color:var(--vesper-text-secondary);margin-top:var(--vesper-spacing-1)}.vesper-choicebox-input-single-indicator{border:var(--vesper-stroke-base) solid var(--vesper-border-primary);border-radius:50%;justify-content:center;align-items:center;width:.75rem;height:.75rem;display:flex}.vesper-choicebox-input-single-indicator:after{content:"";border-radius:50%;width:50%;height:50%}.vesper-choicebox-input-multi-indicator{border-radius:var(--vesper-radius-half);border:var(--vesper-stroke-base) solid var(--vesper-border-primary);width:.75rem;height:.75rem;color:var(--vesper-text-primary);justify-content:center;align-items:center;display:flex}.vesper-choicebox-input-multi-indicator svg{visibility:hidden;width:.625rem;height:.625rem}.vesper-choicebox-input{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vesper-choicebox-input:checked+.vesper-choicebox-input-single-indicator{border-color:var(--vesper-background-accent-base);background:var(--vesper-background-accent-base)}.vesper-choicebox-input:checked+.vesper-choicebox-input-single-indicator:after{background:var(--vesper-background-primary)}.vesper-choicebox-input:checked+.vesper-choicebox-input-multi-indicator{border-color:var(--vesper-background-accent-base);background:var(--vesper-background-accent-base)}.vesper-choicebox-input:checked+.vesper-choicebox-input-multi-indicator svg{visibility:visible}.vesper-choicebox-input:disabled+.vesper-choicebox-input-single-indicator{border-color:var(--vesper-border-disabled);background:var(--vesper-background-disabled)}.vesper-choicebox-input:disabled+.vesper-choicebox-input-multi-indicator{border-color:var(--vesper-border-disabled);background:var(--vesper-background-disabled)}.vesper-choicebox-input:disabled:checked+.vesper-choicebox-input-single-indicator:after{background:var(--vesper-icon-disabled)}.vesper-choicebox-input:disabled:checked+.vesper-choicebox-input-multi-indicator{color:var(--vesper-icon-disabled)}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export type ChoiceboxItem = {
|
|
3
|
+
/** The value associated with this option. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** The text label displayed for this option. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** An optional secondary description displayed below the label. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** When `true`, prevents this option from being selected. @default false */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** An optional HTML `id` attribute applied to the underlying input element. */
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
interface ChoiceboxBaseProps extends Omit<ComponentProps<"fieldset">, "children" | "onChange" | "defaultValue"> {
|
|
15
|
+
/** The name attribute shared by all inputs in the group, used for form submission. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** The list of options to render. */
|
|
18
|
+
options: ChoiceboxItem[];
|
|
19
|
+
/** When `true`, disables all options in the group, preventing interaction. @default false */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ChoiceboxSingleSelectProps extends ChoiceboxBaseProps {
|
|
23
|
+
/** When `false` or omitted, the choicebox operates in single-select (radio) mode. */
|
|
24
|
+
multiselect?: false;
|
|
25
|
+
/** When `true`, a selection is required for form validation. @default false */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** The currently selected value (controlled mode). */
|
|
28
|
+
value?: string;
|
|
29
|
+
/** The initially selected value (uncontrolled mode). */
|
|
30
|
+
defaultValue?: string;
|
|
31
|
+
/** Callback fired when the selected value changes. Receives the newly selected value. */
|
|
32
|
+
onChange?(value: string): void;
|
|
33
|
+
}
|
|
34
|
+
export interface ChoiceboxMultiSelectProps extends ChoiceboxBaseProps {
|
|
35
|
+
/** When `true`, the choicebox operates in multi-select (checkbox) mode. */
|
|
36
|
+
multiselect: true;
|
|
37
|
+
/** The currently selected values (controlled mode). */
|
|
38
|
+
values?: string[];
|
|
39
|
+
/** The initially selected values (uncontrolled mode). */
|
|
40
|
+
defaultValues?: string[];
|
|
41
|
+
/** Callback fired when the selected values change. Receives the full array of currently selected values. */
|
|
42
|
+
onChange?(values: string[]): void;
|
|
43
|
+
/** The minimum number of selections required for form validation. @default 0 */
|
|
44
|
+
min?: number;
|
|
45
|
+
/** The maximum number of selections allowed for form validation. @default Infinity */
|
|
46
|
+
max?: number;
|
|
47
|
+
}
|
|
48
|
+
export type ChoiceboxProps = ChoiceboxSingleSelectProps | ChoiceboxMultiSelectProps;
|
|
49
|
+
/**
|
|
50
|
+
* A selection group component that supports both single-select (radio) and multi-select (checkbox) modes with card-style options.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} props.name - The name attribute shared by all inputs, used for form submission
|
|
53
|
+
* @param {ChoiceboxItem[]} props.options - The list of options to render
|
|
54
|
+
* @param {boolean} [props.multiselect] - (optional) When `true`, enables multi-select (checkbox) mode. @default false
|
|
55
|
+
* @param {boolean} [props.disabled] - (optional) Disables all options in the group. @default false
|
|
56
|
+
* @param {string} [props.value] - (optional) The currently selected value (single-select, controlled)
|
|
57
|
+
* @param {string} [props.defaultValue] - (optional) The initially selected value (single-select, uncontrolled)
|
|
58
|
+
* @param {(value: string) => void} [props.onChange] - (optional) Callback fired on selection change (single-select)
|
|
59
|
+
* @param {string[]} [props.values] - (optional) The currently selected values (multi-select, controlled)
|
|
60
|
+
* @param {(values: string[]) => void} [props.onChange] - (optional) Callback fired with all selected values (multi-select)
|
|
61
|
+
*
|
|
62
|
+
* You may also pass any additional props to the underlying `fieldset` element
|
|
63
|
+
|
|
64
|
+
* @example
|
|
65
|
+
* <Choicebox
|
|
66
|
+
* name="plan"
|
|
67
|
+
* options={[
|
|
68
|
+
* { value: "free", label: "Free", description: "Basic features" },
|
|
69
|
+
* { value: "pro", label: "Pro", description: "Advanced features" },
|
|
70
|
+
* ]}
|
|
71
|
+
* value={selectedPlan}
|
|
72
|
+
* onChange={setSelectedPlan}
|
|
73
|
+
* />
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Choicebox
|
|
77
|
+
* multiselect
|
|
78
|
+
* name="features"
|
|
79
|
+
* options={[
|
|
80
|
+
* { value: "dark-mode", label: "Dark Mode" },
|
|
81
|
+
* { value: "notifications", label: "Notifications" },
|
|
82
|
+
* ]}
|
|
83
|
+
* min={1}
|
|
84
|
+
* max={3}
|
|
85
|
+
* onChange={(values) => console.log(values)}
|
|
86
|
+
* />
|
|
87
|
+
*/
|
|
88
|
+
export declare function Choicebox(props: ChoiceboxProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=choicebox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choicebox.d.ts","sourceRoot":"","sources":["../../../src/components/choicebox/choicebox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAQf,MAAM,MAAM,aAAa,GAAG;IAC1B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,UAAU,kBAAmB,SAAQ,IAAI,CACvC,cAAc,CAAC,UAAU,CAAC,EAC1B,UAAU,GAAG,UAAU,GAAG,cAAc,CACzC;IACC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,qFAAqF;IACrF,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,2EAA2E;IAC3E,WAAW,EAAE,IAAI,CAAC;IAClB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,4GAA4G;IAC5G,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,cAAc,GACxB,0BAA0B,GAAG,yBAAyB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAG9C"}
|