@velocity-astro/cms-ui 0.0.0-stage → 0.1.0-beta.2
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 +40 -2
- package/component-registry.json +458 -0
- package/dist/components/Box/Box.d.ts +12 -0
- package/dist/components/Box/Box.d.ts.map +1 -0
- package/dist/components/Box/Box.js +7 -0
- package/dist/components/Box/Box.js.map +1 -0
- package/dist/components/Box/Box.variants.d.ts +14 -0
- package/dist/components/Box/Box.variants.d.ts.map +1 -0
- package/dist/components/Box/Box.variants.js +41 -0
- package/dist/components/Box/Box.variants.js.map +1 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/index.d.ts.map +1 -0
- package/dist/components/Box/index.js +2 -0
- package/dist/components/Box/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +21 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +10 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.variants.d.ts +14 -0
- package/dist/components/Button/Button.variants.d.ts.map +1 -0
- package/dist/components/Button/Button.variants.js +29 -0
- package/dist/components/Button/Button.variants.js.map +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Card/Card.d.ts +15 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +9 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/Card.variants.d.ts +9 -0
- package/dist/components/Card/Card.variants.d.ts.map +1 -0
- package/dist/components/Card/Card.variants.js +9 -0
- package/dist/components/Card/Card.variants.js.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +9 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +5 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.variants.js +13 -0
- package/dist/components/Checkbox/Checkbox.variants.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/DateField/DateField.d.ts +26 -0
- package/dist/components/DateField/DateField.d.ts.map +1 -0
- package/dist/components/DateField/DateField.js +22 -0
- package/dist/components/DateField/DateField.js.map +1 -0
- package/dist/components/DateField/DateField.variants.d.ts +8 -0
- package/dist/components/DateField/DateField.variants.d.ts.map +1 -0
- package/dist/components/DateField/DateField.variants.js +19 -0
- package/dist/components/DateField/DateField.variants.js.map +1 -0
- package/dist/components/DateField/index.d.ts +2 -0
- package/dist/components/DateField/index.d.ts.map +1 -0
- package/dist/components/DateField/index.js +2 -0
- package/dist/components/DateField/index.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +21 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +21 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/Dialog.variants.d.ts +17 -0
- package/dist/components/Dialog/Dialog.variants.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.variants.js +39 -0
- package/dist/components/Dialog/Dialog.variants.js.map +1 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +2 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/Fieldset/Fieldset.d.ts +17 -0
- package/dist/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/components/Fieldset/Fieldset.js +7 -0
- package/dist/components/Fieldset/Fieldset.js.map +1 -0
- package/dist/components/Fieldset/Fieldset.variants.d.ts +8 -0
- package/dist/components/Fieldset/Fieldset.variants.d.ts.map +1 -0
- package/dist/components/Fieldset/Fieldset.variants.js +23 -0
- package/dist/components/Fieldset/Fieldset.variants.js.map +1 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/Fieldset/index.d.ts.map +1 -0
- package/dist/components/Fieldset/index.js +2 -0
- package/dist/components/Fieldset/index.js.map +1 -0
- package/dist/components/FileButton/FileButton.d.ts +18 -0
- package/dist/components/FileButton/FileButton.d.ts.map +1 -0
- package/dist/components/FileButton/FileButton.js +13 -0
- package/dist/components/FileButton/FileButton.js.map +1 -0
- package/dist/components/FileButton/FileButton.variants.d.ts +9 -0
- package/dist/components/FileButton/FileButton.variants.d.ts.map +1 -0
- package/dist/components/FileButton/FileButton.variants.js +8 -0
- package/dist/components/FileButton/FileButton.variants.js.map +1 -0
- package/dist/components/FileButton/index.d.ts +2 -0
- package/dist/components/FileButton/index.d.ts.map +1 -0
- package/dist/components/FileButton/index.js +2 -0
- package/dist/components/FileButton/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +12 -0
- package/dist/components/Form/Form.d.ts.map +1 -0
- package/dist/components/Form/Form.js +13 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.variants.d.ts +6 -0
- package/dist/components/Form/Form.variants.d.ts.map +1 -0
- package/dist/components/Form/Form.variants.js +7 -0
- package/dist/components/Form/Form.variants.js.map +1 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.d.ts.map +1 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Grid/Grid.d.ts +10 -0
- package/dist/components/Grid/Grid.d.ts.map +1 -0
- package/dist/components/Grid/Grid.js +7 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/Grid.variants.d.ts +7 -0
- package/dist/components/Grid/Grid.variants.d.ts.map +1 -0
- package/dist/components/Grid/Grid.variants.js +15 -0
- package/dist/components/Grid/Grid.variants.js.map +1 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.d.ts.map +1 -0
- package/dist/components/Grid/index.js +2 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Heading/Heading.d.ts +10 -0
- package/dist/components/Heading/Heading.d.ts.map +1 -0
- package/dist/components/Heading/Heading.js +9 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Heading/Heading.variants.d.ts +13 -0
- package/dist/components/Heading/Heading.variants.d.ts.map +1 -0
- package/dist/components/Heading/Heading.variants.js +16 -0
- package/dist/components/Heading/Heading.variants.js.map +1 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Heading/index.d.ts.map +1 -0
- package/dist/components/Heading/index.js +2 -0
- package/dist/components/Heading/index.js.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +13 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.js +9 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconButton/IconButton.variants.d.ts +12 -0
- package/dist/components/IconButton/IconButton.variants.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.variants.js +22 -0
- package/dist/components/IconButton/IconButton.variants.js.map +1 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/IconButton/index.d.ts.map +1 -0
- package/dist/components/IconButton/index.js +2 -0
- package/dist/components/IconButton/index.js.map +1 -0
- package/dist/components/Inline/Inline.d.ts +9 -0
- package/dist/components/Inline/Inline.d.ts.map +1 -0
- package/dist/components/Inline/Inline.js +7 -0
- package/dist/components/Inline/Inline.js.map +1 -0
- package/dist/components/Inline/Inline.variants.d.ts +9 -0
- package/dist/components/Inline/Inline.variants.d.ts.map +1 -0
- package/dist/components/Inline/Inline.variants.js +25 -0
- package/dist/components/Inline/Inline.variants.js.map +1 -0
- package/dist/components/Inline/index.d.ts +2 -0
- package/dist/components/Inline/index.d.ts.map +1 -0
- package/dist/components/Inline/index.js +2 -0
- package/dist/components/Inline/index.js.map +1 -0
- package/dist/components/Link/Link.d.ts +13 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.js +8 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/Link/Link.variants.d.ts +6 -0
- package/dist/components/Link/Link.variants.d.ts.map +1 -0
- package/dist/components/Link/Link.variants.js +15 -0
- package/dist/components/Link/Link.variants.js.map +1 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Link/index.js +2 -0
- package/dist/components/Link/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts +8 -0
- package/dist/components/Logo/Logo.d.ts.map +1 -0
- package/dist/components/Logo/Logo.js +7 -0
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Logo/Logo.variants.d.ts +9 -0
- package/dist/components/Logo/Logo.variants.d.ts.map +1 -0
- package/dist/components/Logo/Logo.variants.js +15 -0
- package/dist/components/Logo/Logo.variants.js.map +1 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Logo/index.d.ts.map +1 -0
- package/dist/components/Logo/index.js +2 -0
- package/dist/components/Logo/index.js.map +1 -0
- package/dist/components/Menu/Menu.d.ts +22 -0
- package/dist/components/Menu/Menu.d.ts.map +1 -0
- package/dist/components/Menu/Menu.js +8 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/Menu.variants.d.ts +10 -0
- package/dist/components/Menu/Menu.variants.d.ts.map +1 -0
- package/dist/components/Menu/Menu.variants.js +16 -0
- package/dist/components/Menu/Menu.variants.js.map +1 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/index.js +2 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +30 -0
- package/dist/components/NumberField/NumberField.d.ts.map +1 -0
- package/dist/components/NumberField/NumberField.js +9 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/NumberField/NumberField.variants.d.ts +7 -0
- package/dist/components/NumberField/NumberField.variants.d.ts.map +1 -0
- package/dist/components/NumberField/NumberField.variants.js +14 -0
- package/dist/components/NumberField/NumberField.variants.js.map +1 -0
- package/dist/components/NumberField/index.d.ts +2 -0
- package/dist/components/NumberField/index.d.ts.map +1 -0
- package/dist/components/NumberField/index.js +2 -0
- package/dist/components/NumberField/index.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +42 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.js +135 -0
- package/dist/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.variants.d.ts +23 -0
- package/dist/components/RichTextEditor/RichTextEditor.variants.d.ts.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.variants.js +36 -0
- package/dist/components/RichTextEditor/RichTextEditor.variants.js.map +1 -0
- package/dist/components/RichTextEditor/index.d.ts +2 -0
- package/dist/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/components/RichTextEditor/index.js +2 -0
- package/dist/components/RichTextEditor/index.js.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +13 -0
- package/dist/components/SearchField/SearchField.d.ts.map +1 -0
- package/dist/components/SearchField/SearchField.js +9 -0
- package/dist/components/SearchField/SearchField.js.map +1 -0
- package/dist/components/SearchField/SearchField.variants.d.ts +7 -0
- package/dist/components/SearchField/SearchField.variants.d.ts.map +1 -0
- package/dist/components/SearchField/SearchField.variants.js +16 -0
- package/dist/components/SearchField/SearchField.variants.js.map +1 -0
- package/dist/components/SearchField/index.d.ts +2 -0
- package/dist/components/SearchField/index.d.ts.map +1 -0
- package/dist/components/SearchField/index.js +2 -0
- package/dist/components/SearchField/index.js.map +1 -0
- package/dist/components/Segmented/Segmented.d.ts +16 -0
- package/dist/components/Segmented/Segmented.d.ts.map +1 -0
- package/dist/components/Segmented/Segmented.js +12 -0
- package/dist/components/Segmented/Segmented.js.map +1 -0
- package/dist/components/Segmented/Segmented.variants.d.ts +3 -0
- package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -0
- package/dist/components/Segmented/Segmented.variants.js +8 -0
- package/dist/components/Segmented/Segmented.variants.js.map +1 -0
- package/dist/components/Segmented/index.d.ts +2 -0
- package/dist/components/Segmented/index.d.ts.map +1 -0
- package/dist/components/Segmented/index.js +2 -0
- package/dist/components/Segmented/index.js.map +1 -0
- package/dist/components/Select/Select.d.ts +31 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +10 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/Select.variants.d.ts +15 -0
- package/dist/components/Select/Select.variants.d.ts.map +1 -0
- package/dist/components/Select/Select.variants.js +22 -0
- package/dist/components/Select/Select.variants.js.map +1 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +11 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.variants.d.ts +9 -0
- package/dist/components/Skeleton/Skeleton.variants.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.variants.js +31 -0
- package/dist/components/Skeleton/Skeleton.variants.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.js +8 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/Spinner.variants.d.ts +13 -0
- package/dist/components/Spinner/Spinner.variants.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.variants.js +15 -0
- package/dist/components/Spinner/Spinner.variants.js.map +1 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/Spinner/index.js.map +1 -0
- package/dist/components/Stack/Stack.d.ts +10 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/Stack.js +7 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Stack/Stack.variants.d.ts +8 -0
- package/dist/components/Stack/Stack.variants.d.ts.map +1 -0
- package/dist/components/Stack/Stack.variants.js +18 -0
- package/dist/components/Stack/Stack.variants.js.map +1 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/Stack/index.js +2 -0
- package/dist/components/Stack/index.js.map +1 -0
- package/dist/components/Stat/Stat.d.ts +11 -0
- package/dist/components/Stat/Stat.d.ts.map +1 -0
- package/dist/components/Stat/Stat.js +7 -0
- package/dist/components/Stat/Stat.js.map +1 -0
- package/dist/components/Stat/Stat.variants.d.ts +5 -0
- package/dist/components/Stat/Stat.variants.d.ts.map +1 -0
- package/dist/components/Stat/Stat.variants.js +5 -0
- package/dist/components/Stat/Stat.variants.js.map +1 -0
- package/dist/components/Stat/index.d.ts +2 -0
- package/dist/components/Stat/index.d.ts.map +1 -0
- package/dist/components/Stat/index.js +2 -0
- package/dist/components/Stat/index.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +14 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +8 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/Switch.variants.d.ts +5 -0
- package/dist/components/Switch/Switch.variants.d.ts.map +1 -0
- package/dist/components/Switch/Switch.variants.js +11 -0
- package/dist/components/Switch/Switch.variants.js.map +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Table/Table.d.ts +35 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +14 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Table/Table.variants.d.ts +17 -0
- package/dist/components/Table/Table.variants.d.ts.map +1 -0
- package/dist/components/Table/Table.variants.js +25 -0
- package/dist/components/Table/Table.variants.js.map +1 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +19 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +8 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.variants.d.ts +5 -0
- package/dist/components/Tabs/Tabs.variants.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.variants.js +11 -0
- package/dist/components/Tabs/Tabs.variants.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +11 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -0
- package/dist/components/Tag/Tag.js +7 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/Tag.variants.d.ts +6 -0
- package/dist/components/Tag/Tag.variants.d.ts.map +1 -0
- package/dist/components/Tag/Tag.variants.js +14 -0
- package/dist/components/Tag/Tag.variants.js.map +1 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.js +2 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/Text/Text.d.ts +10 -0
- package/dist/components/Text/Text.d.ts.map +1 -0
- package/dist/components/Text/Text.js +7 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Text/Text.variants.d.ts +10 -0
- package/dist/components/Text/Text.variants.d.ts.map +1 -0
- package/dist/components/Text/Text.variants.js +31 -0
- package/dist/components/Text/Text.variants.js.map +1 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/TextArea/TextArea.d.ts +27 -0
- package/dist/components/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.js +9 -0
- package/dist/components/TextArea/TextArea.js.map +1 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +9 -0
- package/dist/components/TextArea/TextArea.variants.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.variants.js +15 -0
- package/dist/components/TextArea/TextArea.variants.js.map +1 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.d.ts.map +1 -0
- package/dist/components/TextArea/index.js +2 -0
- package/dist/components/TextArea/index.js.map +1 -0
- package/dist/components/TextField/TextField.d.ts +29 -0
- package/dist/components/TextField/TextField.d.ts.map +1 -0
- package/dist/components/TextField/TextField.js +9 -0
- package/dist/components/TextField/TextField.js.map +1 -0
- package/dist/components/TextField/TextField.variants.d.ts +7 -0
- package/dist/components/TextField/TextField.variants.d.ts.map +1 -0
- package/dist/components/TextField/TextField.variants.js +14 -0
- package/dist/components/TextField/TextField.variants.js.map +1 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.js +2 -0
- package/dist/components/TextField/index.js.map +1 -0
- package/dist/components/Thumbnail/Thumbnail.d.ts +11 -0
- package/dist/components/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/dist/components/Thumbnail/Thumbnail.js +14 -0
- package/dist/components/Thumbnail/Thumbnail.js.map +1 -0
- package/dist/components/Thumbnail/Thumbnail.variants.d.ts +12 -0
- package/dist/components/Thumbnail/Thumbnail.variants.d.ts.map +1 -0
- package/dist/components/Thumbnail/Thumbnail.variants.js +22 -0
- package/dist/components/Thumbnail/Thumbnail.variants.js.map +1 -0
- package/dist/components/Thumbnail/index.d.ts +2 -0
- package/dist/components/Thumbnail/index.d.ts.map +1 -0
- package/dist/components/Thumbnail/index.js +2 -0
- package/dist/components/Thumbnail/index.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +22 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +29 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/Toast.variants.d.ts +19 -0
- package/dist/components/Toast/Toast.variants.d.ts.map +1 -0
- package/dist/components/Toast/Toast.variants.js +31 -0
- package/dist/components/Toast/Toast.variants.js.map +1 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +8 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.variants.js +6 -0
- package/dist/components/Tooltip/Tooltip.variants.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/field.d.ts +19 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +30 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/index.d.ts +37 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +36 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/scales.d.ts +56 -0
- package/dist/components/scales.d.ts.map +1 -0
- package/dist/components/scales.js +54 -0
- package/dist/components/scales.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/navigation.d.ts +12 -0
- package/dist/navigation.d.ts.map +1 -0
- package/dist/navigation.js +10 -0
- package/dist/navigation.js.map +1 -0
- package/dist/patterns/AppShell/AppShell.d.ts +47 -0
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -0
- package/dist/patterns/AppShell/AppShell.js +17 -0
- package/dist/patterns/AppShell/AppShell.js.map +1 -0
- package/dist/patterns/AppShell/AppShell.variants.d.ts +35 -0
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -0
- package/dist/patterns/AppShell/AppShell.variants.js +51 -0
- package/dist/patterns/AppShell/AppShell.variants.js.map +1 -0
- package/dist/patterns/AppShell/index.d.ts +2 -0
- package/dist/patterns/AppShell/index.d.ts.map +1 -0
- package/dist/patterns/AppShell/index.js +2 -0
- package/dist/patterns/AppShell/index.js.map +1 -0
- package/dist/patterns/AuthShell/AuthShell.d.ts +16 -0
- package/dist/patterns/AuthShell/AuthShell.d.ts.map +1 -0
- package/dist/patterns/AuthShell/AuthShell.js +9 -0
- package/dist/patterns/AuthShell/AuthShell.js.map +1 -0
- package/dist/patterns/AuthShell/AuthShell.variants.d.ts +6 -0
- package/dist/patterns/AuthShell/AuthShell.variants.d.ts.map +1 -0
- package/dist/patterns/AuthShell/AuthShell.variants.js +6 -0
- package/dist/patterns/AuthShell/AuthShell.variants.js.map +1 -0
- package/dist/patterns/AuthShell/index.d.ts +2 -0
- package/dist/patterns/AuthShell/index.d.ts.map +1 -0
- package/dist/patterns/AuthShell/index.js +2 -0
- package/dist/patterns/AuthShell/index.js.map +1 -0
- package/dist/patterns/Board/Board.d.ts +42 -0
- package/dist/patterns/Board/Board.d.ts.map +1 -0
- package/dist/patterns/Board/Board.js +44 -0
- package/dist/patterns/Board/Board.js.map +1 -0
- package/dist/patterns/Board/Board.variants.d.ts +28 -0
- package/dist/patterns/Board/Board.variants.d.ts.map +1 -0
- package/dist/patterns/Board/Board.variants.js +52 -0
- package/dist/patterns/Board/Board.variants.js.map +1 -0
- package/dist/patterns/Board/index.d.ts +2 -0
- package/dist/patterns/Board/index.d.ts.map +1 -0
- package/dist/patterns/Board/index.js +2 -0
- package/dist/patterns/Board/index.js.map +1 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.d.ts +20 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.js +9 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.js.map +1 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.variants.d.ts +6 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.variants.d.ts.map +1 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.variants.js +3 -0
- package/dist/patterns/ConfirmDialog/ConfirmDialog.variants.js.map +1 -0
- package/dist/patterns/ConfirmDialog/index.d.ts +2 -0
- package/dist/patterns/ConfirmDialog/index.d.ts.map +1 -0
- package/dist/patterns/ConfirmDialog/index.js +2 -0
- package/dist/patterns/ConfirmDialog/index.js.map +1 -0
- package/dist/patterns/EmptyState/EmptyState.d.ts +16 -0
- package/dist/patterns/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/patterns/EmptyState/EmptyState.js +9 -0
- package/dist/patterns/EmptyState/EmptyState.js.map +1 -0
- package/dist/patterns/EmptyState/EmptyState.variants.d.ts +6 -0
- package/dist/patterns/EmptyState/EmptyState.variants.d.ts.map +1 -0
- package/dist/patterns/EmptyState/EmptyState.variants.js +6 -0
- package/dist/patterns/EmptyState/EmptyState.variants.js.map +1 -0
- package/dist/patterns/EmptyState/index.d.ts +2 -0
- package/dist/patterns/EmptyState/index.d.ts.map +1 -0
- package/dist/patterns/EmptyState/index.js +2 -0
- package/dist/patterns/EmptyState/index.js.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.d.ts +47 -0
- package/dist/patterns/ImagePicker/ImagePicker.d.ts.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.js +38 -0
- package/dist/patterns/ImagePicker/ImagePicker.js.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.variants.d.ts +24 -0
- package/dist/patterns/ImagePicker/ImagePicker.variants.d.ts.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.variants.js +32 -0
- package/dist/patterns/ImagePicker/ImagePicker.variants.js.map +1 -0
- package/dist/patterns/ImagePicker/index.d.ts +2 -0
- package/dist/patterns/ImagePicker/index.d.ts.map +1 -0
- package/dist/patterns/ImagePicker/index.js +2 -0
- package/dist/patterns/ImagePicker/index.js.map +1 -0
- package/dist/patterns/MediaGrid/MediaGrid.d.ts +22 -0
- package/dist/patterns/MediaGrid/MediaGrid.d.ts.map +1 -0
- package/dist/patterns/MediaGrid/MediaGrid.js +8 -0
- package/dist/patterns/MediaGrid/MediaGrid.js.map +1 -0
- package/dist/patterns/MediaGrid/MediaGrid.variants.d.ts +9 -0
- package/dist/patterns/MediaGrid/MediaGrid.variants.d.ts.map +1 -0
- package/dist/patterns/MediaGrid/MediaGrid.variants.js +13 -0
- package/dist/patterns/MediaGrid/MediaGrid.variants.js.map +1 -0
- package/dist/patterns/MediaGrid/index.d.ts +2 -0
- package/dist/patterns/MediaGrid/index.d.ts.map +1 -0
- package/dist/patterns/MediaGrid/index.js +2 -0
- package/dist/patterns/MediaGrid/index.js.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.d.ts +31 -0
- package/dist/patterns/OptionPicker/OptionPicker.d.ts.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.js +13 -0
- package/dist/patterns/OptionPicker/OptionPicker.js.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts +12 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.js +17 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.js.map +1 -0
- package/dist/patterns/OptionPicker/index.d.ts +2 -0
- package/dist/patterns/OptionPicker/index.d.ts.map +1 -0
- package/dist/patterns/OptionPicker/index.js +2 -0
- package/dist/patterns/OptionPicker/index.js.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +12 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.js +10 -0
- package/dist/patterns/PageHeader/PageHeader.js.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts +3 -0
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.variants.js +3 -0
- package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -0
- package/dist/patterns/PageHeader/index.d.ts +2 -0
- package/dist/patterns/PageHeader/index.d.ts.map +1 -0
- package/dist/patterns/PageHeader/index.js +2 -0
- package/dist/patterns/PageHeader/index.js.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.d.ts +29 -0
- package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.js +60 -0
- package/dist/patterns/PagePreview/PagePreview.js.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts +12 -0
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.variants.js +18 -0
- package/dist/patterns/PagePreview/PagePreview.variants.js.map +1 -0
- package/dist/patterns/PagePreview/index.d.ts +2 -0
- package/dist/patterns/PagePreview/index.d.ts.map +1 -0
- package/dist/patterns/PagePreview/index.js +2 -0
- package/dist/patterns/PagePreview/index.js.map +1 -0
- package/dist/patterns/Repeater/Repeater.d.ts +34 -0
- package/dist/patterns/Repeater/Repeater.d.ts.map +1 -0
- package/dist/patterns/Repeater/Repeater.js +12 -0
- package/dist/patterns/Repeater/Repeater.js.map +1 -0
- package/dist/patterns/Repeater/Repeater.variants.d.ts +12 -0
- package/dist/patterns/Repeater/Repeater.variants.d.ts.map +1 -0
- package/dist/patterns/Repeater/Repeater.variants.js +13 -0
- package/dist/patterns/Repeater/Repeater.variants.js.map +1 -0
- package/dist/patterns/Repeater/index.d.ts +2 -0
- package/dist/patterns/Repeater/index.d.ts.map +1 -0
- package/dist/patterns/Repeater/index.js +2 -0
- package/dist/patterns/Repeater/index.js.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.d.ts +21 -0
- package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.js +9 -0
- package/dist/patterns/SaveBar/SaveBar.js.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts +9 -0
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.variants.js +13 -0
- package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -0
- package/dist/patterns/SaveBar/index.d.ts +2 -0
- package/dist/patterns/SaveBar/index.d.ts.map +1 -0
- package/dist/patterns/SaveBar/index.js +2 -0
- package/dist/patterns/SaveBar/index.js.map +1 -0
- package/dist/patterns/SectionList/SectionList.d.ts +53 -0
- package/dist/patterns/SectionList/SectionList.d.ts.map +1 -0
- package/dist/patterns/SectionList/SectionList.js +59 -0
- package/dist/patterns/SectionList/SectionList.js.map +1 -0
- package/dist/patterns/SectionList/SectionList.variants.d.ts +34 -0
- package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -0
- package/dist/patterns/SectionList/SectionList.variants.js +64 -0
- package/dist/patterns/SectionList/SectionList.variants.js.map +1 -0
- package/dist/patterns/SectionList/index.d.ts +2 -0
- package/dist/patterns/SectionList/index.d.ts.map +1 -0
- package/dist/patterns/SectionList/index.js +2 -0
- package/dist/patterns/SectionList/index.js.map +1 -0
- package/dist/patterns/Split/Split.d.ts +12 -0
- package/dist/patterns/Split/Split.d.ts.map +1 -0
- package/dist/patterns/Split/Split.js +7 -0
- package/dist/patterns/Split/Split.js.map +1 -0
- package/dist/patterns/Split/Split.variants.d.ts +6 -0
- package/dist/patterns/Split/Split.variants.d.ts.map +1 -0
- package/dist/patterns/Split/Split.variants.js +6 -0
- package/dist/patterns/Split/Split.variants.js.map +1 -0
- package/dist/patterns/Split/index.d.ts +2 -0
- package/dist/patterns/Split/index.d.ts.map +1 -0
- package/dist/patterns/Split/index.js +2 -0
- package/dist/patterns/Split/index.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.d.ts +12 -0
- package/dist/patterns/Workbench/Workbench.d.ts.map +1 -0
- package/dist/patterns/Workbench/Workbench.js +7 -0
- package/dist/patterns/Workbench/Workbench.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.variants.d.ts +6 -0
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -0
- package/dist/patterns/Workbench/Workbench.variants.js +6 -0
- package/dist/patterns/Workbench/Workbench.variants.js.map +1 -0
- package/dist/patterns/Workbench/index.d.ts +2 -0
- package/dist/patterns/Workbench/index.d.ts.map +1 -0
- package/dist/patterns/Workbench/index.js +2 -0
- package/dist/patterns/Workbench/index.js.map +1 -0
- package/dist/patterns/index.d.ts +16 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +16 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/testing/accessible.d.ts +8 -0
- package/dist/testing/accessible.d.ts.map +1 -0
- package/dist/testing/accessible.js +17 -0
- package/dist/testing/accessible.js.map +1 -0
- package/dist/testing/setup.d.ts +2 -0
- package/dist/testing/setup.d.ts.map +1 -0
- package/dist/testing/setup.js +10 -0
- package/dist/testing/setup.js.map +1 -0
- package/package.json +81 -3
- package/src/styles.css +415 -0
- package/src/tokens/tokens.css +259 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Link as AriaLink } from 'react-aria-components';
|
|
3
|
+
import { linkVariants } from './Link.variants.js';
|
|
4
|
+
/** Goes to another page. */
|
|
5
|
+
export function Link({ href, children, opensInNewTab = false, isDisabled = false, tone }) {
|
|
6
|
+
return (_jsx(AriaLink, { className: linkVariants({ tone }), href: href, isDisabled: isDisabled, ...(opensInNewTab && { target: '_blank', rel: 'noopener noreferrer' }), children: children }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAWrE,4BAA4B;AAC5B,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,KAAK,EAAE,UAAU,GAAG,KAAK,EAAE,IAAI,EAAa;IACjG,OAAO,CACL,KAAC,QAAQ,IACP,SAAS,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,EACjC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,KAClB,CAAC,aAAa,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC,YAEtE,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const linkVariants: (props?: ({
|
|
3
|
+
tone?: "default" | "muted" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type LinkVariants = VariantProps<typeof linkVariants>;
|
|
6
|
+
//# sourceMappingURL=Link.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EAexB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
export const linkVariants = cva([
|
|
3
|
+
'rounded-sm underline underline-offset-2 transition-colors motion-fast',
|
|
4
|
+
'outline-none data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-offset-2 data-focus-visible:ring-offset-background',
|
|
5
|
+
'data-disabled:no-underline data-disabled:opacity-50',
|
|
6
|
+
], {
|
|
7
|
+
variants: {
|
|
8
|
+
tone: {
|
|
9
|
+
default: 'text-foreground decoration-border-strong data-hovered:decoration-current',
|
|
10
|
+
muted: 'text-foreground-secondary decoration-border data-hovered:text-foreground data-hovered:decoration-current',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: { tone: 'default' },
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=Link.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.variants.js","sourceRoot":"","sources":["../../../src/components/Link/Link.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B;IACE,uEAAuE;IACvE,gJAAgJ;IAChJ,qDAAqD;CACtD,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,0EAA0E;YACnF,KAAK,EAAE,0GAA0G;SAClH;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type LogoVariants } from './Logo.variants.js';
|
|
2
|
+
export interface LogoProps extends LogoVariants {
|
|
3
|
+
/** What the mark stands for, such as "Velocity", for screen readers. */
|
|
4
|
+
readonly label: string;
|
|
5
|
+
}
|
|
6
|
+
/** The Velocity mark. */
|
|
7
|
+
export declare function Logo({ label, size }: LogoProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErG,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yBAAyB;AACzB,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,+BAiB9C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { logoAccentClass, logoBodyClass, logoVariants } from './Logo.variants.js';
|
|
3
|
+
/** The Velocity mark. */
|
|
4
|
+
export function Logo({ label, size }) {
|
|
5
|
+
return (_jsxs("svg", { role: "img", "aria-label": label, viewBox: "0 0 90 101", className: logoVariants({ size }), children: [_jsx("path", { className: logoAccentClass, d: "M35.1288 23.8398L45.1667 49.4151L56.2482 23.8398H87.1082C86.5647 23.3764 85.9776 22.9637 85.3616 22.5944L48.6165 0.704798C46.377 -0.0699896 43.4273 -0.439281 41.2675 0.842377L3.36286 23.3692C3.13819 23.5067 2.92801 23.666 2.72508 23.8326H35.1288V23.8398Z" }), _jsx("path", { className: logoBodyClass, d: "M0.144951 28.8578C0.079723 29.2851 0.0434853 29.7123 0.0434853 30.1323L0 72.036C0 76.1778 1.95684 78.3936 5.26172 80.3631L39.4919 100.703L0.144951 28.8578Z" }), _jsx("path", { className: logoBodyClass, d: "M89.9203 28.7058L50.0588 101L86.6661 79.1539C88.7027 77.9374 90 75.0265 90 72.6442L89.9783 29.6037C89.9783 29.2923 89.9493 28.9954 89.913 28.6985L89.9203 28.7058Z" })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAOrG,yBAAyB;AACzB,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAa;IAC7C,OAAO,CACL,eAAK,IAAI,EAAC,KAAK,gBAAa,KAAK,EAAE,OAAO,EAAC,YAAY,EAAC,SAAS,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,aACvF,eACE,SAAS,EAAE,eAAe,EAC1B,CAAC,EAAC,gQAAgQ,GAClQ,EACF,eACE,SAAS,EAAE,aAAa,EACxB,CAAC,EAAC,6JAA6J,GAC/J,EACF,eACE,SAAS,EAAE,aAAa,EACxB,CAAC,EAAC,oKAAoK,GACtK,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const logoVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
/** The top of the mark is the brand colour; the rest follows the text, so it works in the dark. */
|
|
6
|
+
export declare const logoAccentClass = "fill-brand-fill";
|
|
7
|
+
export declare const logoBodyClass = "fill-foreground";
|
|
8
|
+
export type LogoVariants = VariantProps<typeof logoVariants>;
|
|
9
|
+
//# sourceMappingURL=Logo.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EASvB,CAAC;AAEH,mGAAmG;AACnG,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
export const logoVariants = cva('shrink-0', {
|
|
3
|
+
variants: {
|
|
4
|
+
size: {
|
|
5
|
+
sm: 'h-5 w-5',
|
|
6
|
+
md: 'h-6 w-6',
|
|
7
|
+
lg: 'h-8 w-8',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: { size: 'md' },
|
|
11
|
+
});
|
|
12
|
+
/** The top of the mark is the brand colour; the rest follows the text, so it works in the dark. */
|
|
13
|
+
export const logoAccentClass = 'fill-brand-fill';
|
|
14
|
+
export const logoBodyClass = 'fill-foreground';
|
|
15
|
+
//# sourceMappingURL=Logo.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.variants.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,UAAU,EAAE;IAC1C,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;SACd;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AAEH,mGAAmG;AACnG,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Logo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export interface MenuAction {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
/** What the action does: "Duplicate", "Delete". */
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly icon?: LucideIcon;
|
|
8
|
+
/** `danger` for an action that destroys something. */
|
|
9
|
+
readonly tone?: 'default' | 'danger';
|
|
10
|
+
readonly isDisabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface MenuProps {
|
|
13
|
+
/** The control that opens the menu: a `Button` or an `IconButton`. */
|
|
14
|
+
readonly trigger: ReactElement;
|
|
15
|
+
readonly actions: readonly MenuAction[];
|
|
16
|
+
/** Called with the id of the action chosen. */
|
|
17
|
+
readonly onAction: (id: string) => void;
|
|
18
|
+
readonly placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';
|
|
19
|
+
}
|
|
20
|
+
/** A list of actions that opens from a button. */
|
|
21
|
+
export declare function Menu({ trigger, actions, onAction, placement }: MenuProps): import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;CAC9E;AAED,kDAAkD;AAClD,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAwB,EAAE,EAAE,SAAS,+BAoBvF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as AriaMenu, MenuItem as AriaMenuItem, MenuTrigger, Popover } from 'react-aria-components';
|
|
3
|
+
import { menuClass, menuIconSize, menuItemVariants, menuPopoverClass } from './Menu.variants.js';
|
|
4
|
+
/** A list of actions that opens from a button. */
|
|
5
|
+
export function Menu({ trigger, actions, onAction, placement = 'bottom end' }) {
|
|
6
|
+
return (_jsxs(MenuTrigger, { children: [trigger, _jsx(Popover, { className: menuPopoverClass, placement: placement, children: _jsx(AriaMenu, { className: menuClass, onAction: (key) => onAction(String(key)), disabledKeys: actions.filter((action) => action.isDisabled).map((action) => action.id), children: actions.map(({ id, label, icon: Icon, tone }) => (_jsxs(AriaMenuItem, { id: id, className: menuItemVariants({ tone }), textValue: label, children: [Icon && _jsx(Icon, { "aria-hidden": true, size: menuIconSize }), label] }, id))) }) })] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,QAAQ,IAAI,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqBjG,kDAAkD;AAClD,MAAM,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,GAAG,YAAY,EAAa;IACtF,OAAO,CACL,MAAC,WAAW,eACT,OAAO,EACR,KAAC,OAAO,IAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,YACxD,KAAC,QAAQ,IACP,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EACxC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,YAErF,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAChD,MAAC,YAAY,IAAU,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,aACnF,IAAI,IAAI,KAAC,IAAI,yBAAa,IAAI,EAAE,YAAY,GAAI,EAChD,KAAK,KAFW,EAAE,CAGN,CAChB,CAAC,GACO,GACH,IACE,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const menuPopoverClass = "layer-overlay motion-float overflow-auto rounded-md border border-border bg-background-elevated p-1 shadow-lg outline-none min-w-40";
|
|
3
|
+
export declare const menuClass = "outline-none";
|
|
4
|
+
export declare const menuItemVariants: (props?: ({
|
|
5
|
+
tone?: "default" | "danger" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
/** The size of an item's icon, in pixels. */
|
|
8
|
+
export declare const menuIconSize = 16;
|
|
9
|
+
export type MenuItemVariants = VariantProps<typeof menuItemVariants>;
|
|
10
|
+
//# sourceMappingURL=Menu.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,gBAAgB,wIAAmC,CAAC;AACjE,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAExC,eAAO,MAAM,gBAAgB;;8EAQ3B,CAAC;AAEH,6CAA6C;AAC7C,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { floatingItemClass, floatingPanelClass } from '../field.js';
|
|
3
|
+
export const menuPopoverClass = `${floatingPanelClass} min-w-40`;
|
|
4
|
+
export const menuClass = 'outline-none';
|
|
5
|
+
export const menuItemVariants = cva(floatingItemClass, {
|
|
6
|
+
variants: {
|
|
7
|
+
tone: {
|
|
8
|
+
default: 'text-foreground',
|
|
9
|
+
danger: 'text-destructive',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: { tone: 'default' },
|
|
13
|
+
});
|
|
14
|
+
/** The size of an item's icon, in pixels. */
|
|
15
|
+
export const menuIconSize = 16;
|
|
16
|
+
//# sourceMappingURL=Menu.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.variants.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,kBAAkB,WAAW,CAAC;AACjE,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,iBAAiB,EAAE;IACrD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,kBAAkB;SAC3B;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAEH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmC,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type NumberFieldVariants } from './NumberField.variants.js';
|
|
2
|
+
export interface NumberFieldProps extends NumberFieldVariants {
|
|
3
|
+
/** Always given. It is read out even when it is not shown. */
|
|
4
|
+
readonly label: string;
|
|
5
|
+
/**
|
|
6
|
+
* Keeps the label for screen readers only. For a row of a `Repeater`, whose own label is in
|
|
7
|
+
* view above the rows; anywhere else a field shows its label.
|
|
8
|
+
*/
|
|
9
|
+
readonly isLabelHidden?: boolean;
|
|
10
|
+
/** Help that stays visible under the field. */
|
|
11
|
+
readonly description?: string;
|
|
12
|
+
/** What is wrong and how to fix it. Setting it marks the field invalid. */
|
|
13
|
+
readonly errorMessage?: string;
|
|
14
|
+
/** The number, or `null` when the field is empty. */
|
|
15
|
+
readonly value?: number | null;
|
|
16
|
+
readonly defaultValue?: number;
|
|
17
|
+
/** Called when the person leaves the field or presses Enter, with `null` when it is empty. */
|
|
18
|
+
readonly onChange?: (value: number | null) => void;
|
|
19
|
+
readonly minValue?: number;
|
|
20
|
+
readonly maxValue?: number;
|
|
21
|
+
/** Whole numbers only. */
|
|
22
|
+
readonly isInteger?: boolean;
|
|
23
|
+
readonly name?: string;
|
|
24
|
+
readonly isRequired?: boolean;
|
|
25
|
+
readonly isDisabled?: boolean;
|
|
26
|
+
readonly isReadOnly?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A number, written in the person's own format, with its label, help and error. */
|
|
29
|
+
export declare function NumberField({ label, isLabelHidden, description, errorMessage, value, defaultValue, onChange, minValue, maxValue, isInteger, name, isRequired, isDisabled, isReadOnly, width, }: NumberFieldProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAyC,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE5G,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAiB,EACjB,IAAI,EACJ,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,KAAK,GACN,EAAE,gBAAgB,+BAiClB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FieldError, Input, Label, NumberField as AriaNumberField, Text } from 'react-aria-components';
|
|
3
|
+
import { fieldDescriptionClass, fieldErrorClass, fieldHiddenLabelClass, fieldLabelClass, fieldRequiredMarkClass } from '../field.js';
|
|
4
|
+
import { numberFieldVariants, numberInputClass } from './NumberField.variants.js';
|
|
5
|
+
/** A number, written in the person's own format, with its label, help and error. */
|
|
6
|
+
export function NumberField({ label, isLabelHidden = false, description, errorMessage, value, defaultValue, onChange, minValue, maxValue, isInteger = false, name, isRequired = false, isDisabled = false, isReadOnly = false, width, }) {
|
|
7
|
+
return (_jsxs(AriaNumberField, { className: numberFieldVariants({ width }), isRequired: isRequired, isDisabled: isDisabled, isReadOnly: isReadOnly, isInvalid: errorMessage !== undefined, formatOptions: isInteger ? { maximumFractionDigits: 0 } : { maximumFractionDigits: 6 }, ...(value !== undefined && { value: value ?? Number.NaN }), ...(defaultValue !== undefined && { defaultValue }), ...(onChange && { onChange: (next) => onChange(Number.isNaN(next) ? null : next) }), ...(minValue !== undefined && { minValue }), ...(maxValue !== undefined && { maxValue }), ...(name !== undefined && { name }), children: [_jsxs(Label, { className: isLabelHidden ? fieldHiddenLabelClass : fieldLabelClass, children: [label, isRequired && (_jsx("span", { "aria-hidden": true, className: fieldRequiredMarkClass, children: ' *' }))] }), _jsx(Input, { className: numberInputClass }), description !== undefined && (_jsx(Text, { slot: "description", className: fieldDescriptionClass, children: description })), _jsx(FieldError, { className: fieldErrorClass, children: errorMessage })] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=NumberField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACvG,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrI,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAA4B,MAAM,2BAA2B,CAAC;AA6B5G,oFAAoF;AACpF,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,GAAG,KAAK,EACrB,WAAW,EACX,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EA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U,IAAC,SAAS,EAAE,eAAe,YAAG,YAAY,GAAc,IACnD,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const numberFieldVariants: (props?: ({
|
|
3
|
+
width?: "sm" | "md" | "full" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const numberInputClass: string;
|
|
6
|
+
export type NumberFieldVariants = VariantProps<typeof numberFieldVariants>;
|
|
7
|
+
//# sourceMappingURL=NumberField.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.variants.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,mBAAmB;;8EAS9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,QAAyE,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { fieldControlClass } from '../field.js';
|
|
3
|
+
export const numberFieldVariants = cva('flex flex-col gap-1.5', {
|
|
4
|
+
variants: {
|
|
5
|
+
width: {
|
|
6
|
+
full: 'w-full',
|
|
7
|
+
md: 'w-80',
|
|
8
|
+
sm: 'w-48',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: { width: 'sm' },
|
|
12
|
+
});
|
|
13
|
+
export const numberInputClass = `${fieldControlClass} tabular-nums placeholder:text-foreground-subtle`;
|
|
14
|
+
//# sourceMappingURL=NumberField.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.variants.js","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC,uBAAuB,EAAE;IAC9D,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;SACX;KACF;IACD,eAAe,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,iBAAiB,kDAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NumberField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Formatted text as a tree: `{ type: 'doc', content: [...] }`. The editor reads and writes it as it is. */
|
|
2
|
+
export interface RichTextDocument {
|
|
3
|
+
readonly type: 'doc';
|
|
4
|
+
readonly content?: readonly unknown[];
|
|
5
|
+
}
|
|
6
|
+
/** Every word the editor shows or reads out. */
|
|
7
|
+
export interface RichTextEditorWords {
|
|
8
|
+
/** The toolbar's name, such as "Formatting". */
|
|
9
|
+
readonly toolbar: string;
|
|
10
|
+
readonly bold: string;
|
|
11
|
+
readonly italic: string;
|
|
12
|
+
readonly heading: string;
|
|
13
|
+
readonly subheading: string;
|
|
14
|
+
readonly bulletList: string;
|
|
15
|
+
readonly numberedList: string;
|
|
16
|
+
readonly quote: string;
|
|
17
|
+
readonly link: string;
|
|
18
|
+
/** The label of the box a link's address is typed in, such as "Link address". */
|
|
19
|
+
readonly linkAddress: string;
|
|
20
|
+
/** Under that box, such as "A web address, or a page of this site like /contact/". */
|
|
21
|
+
readonly linkHelp: string;
|
|
22
|
+
readonly linkApply: string;
|
|
23
|
+
readonly linkRemove: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RichTextEditorProps {
|
|
26
|
+
/** Always given. It is read out even when it is not shown. */
|
|
27
|
+
readonly label: string;
|
|
28
|
+
/** Keeps the label for screen readers only, for a row of a list whose own label is in view. */
|
|
29
|
+
readonly isLabelHidden?: boolean;
|
|
30
|
+
readonly description?: string;
|
|
31
|
+
/** What is wrong and how to fix it. Setting it marks the field invalid. */
|
|
32
|
+
readonly errorMessage?: string;
|
|
33
|
+
readonly isRequired?: boolean;
|
|
34
|
+
/** The text, or `null` when there is none. */
|
|
35
|
+
readonly value: RichTextDocument | null;
|
|
36
|
+
/** Called with the text as it changes, and with `null` once nothing is left to read. */
|
|
37
|
+
readonly onChange: (value: RichTextDocument | null) => void;
|
|
38
|
+
readonly words: RichTextEditorWords;
|
|
39
|
+
}
|
|
40
|
+
/** Text with headings, lists, quotes, bold, italics and links, with its label, help and error. */
|
|
41
|
+
export declare function RichTextEditor({ label, isLabelHidden, description, errorMessage, isRequired, value, onChange, words }: RichTextEditorProps): import("react").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=RichTextEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AA0BA,4GAA4G;AAC5G,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC;AAED,gDAAgD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CAAC,EAAE,KAAK,EAAE,aAAqB,EAAE,WAAW,EAAE,YAAY,EAAE,UAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,+BA8H1J"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EditorContent, useEditor, useEditorState } from '@tiptap/react';
|
|
3
|
+
import { StarterKit } from '@tiptap/starter-kit';
|
|
4
|
+
import { Bold, Heading2, Heading3, Italic, Link2, List, ListOrdered, TextQuote } from 'lucide-react';
|
|
5
|
+
import { useEffect, useId, useRef, useState } from 'react';
|
|
6
|
+
import { Dialog, DialogTrigger, Group, Popover, Separator, ToggleButton, Toolbar } from 'react-aria-components';
|
|
7
|
+
import { Button } from '../Button/index.js';
|
|
8
|
+
import { TextField } from '../TextField/index.js';
|
|
9
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
10
|
+
import { richTextEditorBoxVariants, richTextEditorClass, richTextEditorContentClass, richTextEditorDescriptionClass, richTextEditorErrorClass, richTextEditorLabelVariants, richTextEditorLinkActionsClass, richTextEditorLinkDialogClass, richTextEditorLinkOuterClass, richTextEditorLinkPanelClass, richTextEditorRequiredMarkClass, richTextEditorSeparatorClass, richTextEditorToolClass, richTextEditorToolIconSize, richTextEditorToolbarClass, } from './RichTextEditor.variants.js';
|
|
11
|
+
const EMPTY = { type: 'doc', content: [{ type: 'paragraph' }] };
|
|
12
|
+
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
13
|
+
/**
|
|
14
|
+
* The text without the empty lines at its end. The editor keeps one there so the cursor can
|
|
15
|
+
* always get out of a list or a quote; it is not something the person wrote.
|
|
16
|
+
*/
|
|
17
|
+
function withoutEmptyEnd(text) {
|
|
18
|
+
const content = [...(text.content ?? [])];
|
|
19
|
+
const isEmptyLine = (node) => same(node, { type: 'paragraph' });
|
|
20
|
+
while (content.length > 1 && isEmptyLine(content.at(-1)))
|
|
21
|
+
content.pop();
|
|
22
|
+
return { type: 'doc', content };
|
|
23
|
+
}
|
|
24
|
+
/** Text with headings, lists, quotes, bold, italics and links, with its label, help and error. */
|
|
25
|
+
export function RichTextEditor({ label, isLabelHidden = false, description, errorMessage, isRequired = false, value, onChange, words }) {
|
|
26
|
+
const labelId = useId();
|
|
27
|
+
const descriptionId = useId();
|
|
28
|
+
const errorId = useId();
|
|
29
|
+
const described = [description !== undefined && descriptionId, errorMessage !== undefined && errorId].filter(Boolean).join(' ');
|
|
30
|
+
// What the editor last said, so a value that only echoes it does not move the cursor.
|
|
31
|
+
const said = useRef(value);
|
|
32
|
+
const changed = useRef(onChange);
|
|
33
|
+
changed.current = onChange;
|
|
34
|
+
const editor = useEditor({
|
|
35
|
+
extensions: [
|
|
36
|
+
StarterKit.configure({
|
|
37
|
+
heading: { levels: [2, 3] },
|
|
38
|
+
link: { openOnClick: false, autolink: true, defaultProtocol: 'https' },
|
|
39
|
+
code: false,
|
|
40
|
+
codeBlock: false,
|
|
41
|
+
strike: false,
|
|
42
|
+
underline: false,
|
|
43
|
+
horizontalRule: false,
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
content: (value ?? EMPTY),
|
|
47
|
+
editorProps: {
|
|
48
|
+
attributes: {
|
|
49
|
+
role: 'textbox',
|
|
50
|
+
'aria-multiline': 'true',
|
|
51
|
+
'aria-labelledby': labelId,
|
|
52
|
+
class: richTextEditorContentClass,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
onUpdate: ({ editor: current }) => {
|
|
56
|
+
const next = current.isEmpty ? null : withoutEmptyEnd(current.getJSON());
|
|
57
|
+
said.current = next;
|
|
58
|
+
changed.current(next);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
// The attributes that change with the props.
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
editor.setOptions({
|
|
64
|
+
editorProps: {
|
|
65
|
+
attributes: {
|
|
66
|
+
role: 'textbox',
|
|
67
|
+
'aria-multiline': 'true',
|
|
68
|
+
'aria-labelledby': labelId,
|
|
69
|
+
'aria-required': String(isRequired),
|
|
70
|
+
'aria-invalid': String(errorMessage !== undefined),
|
|
71
|
+
...(described !== '' && { 'aria-describedby': described }),
|
|
72
|
+
class: richTextEditorContentClass,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}, [editor, labelId, described, isRequired, errorMessage]);
|
|
77
|
+
// A value from outside (another entry, a save the server tidied) replaces the text.
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (same(value, said.current))
|
|
80
|
+
return;
|
|
81
|
+
said.current = value;
|
|
82
|
+
editor.commands.setContent((value ?? EMPTY), { emitUpdate: false });
|
|
83
|
+
}, [editor, value]);
|
|
84
|
+
const marks = [
|
|
85
|
+
{ name: words.bold, icon: Bold, isActive: (e) => e.isActive('bold'), run: (e) => e.chain().focus().toggleBold().run() },
|
|
86
|
+
{ name: words.italic, icon: Italic, isActive: (e) => e.isActive('italic'), run: (e) => e.chain().focus().toggleItalic().run() },
|
|
87
|
+
];
|
|
88
|
+
const blocks = [
|
|
89
|
+
{ name: words.heading, icon: Heading2, isActive: (e) => e.isActive('heading', { level: 2 }), run: (e) => e.chain().focus().toggleHeading({ level: 2 }).run() },
|
|
90
|
+
{ name: words.subheading, icon: Heading3, isActive: (e) => e.isActive('heading', { level: 3 }), run: (e) => e.chain().focus().toggleHeading({ level: 3 }).run() },
|
|
91
|
+
{ name: words.bulletList, icon: List, isActive: (e) => e.isActive('bulletList'), run: (e) => e.chain().focus().toggleBulletList().run() },
|
|
92
|
+
{ name: words.numberedList, icon: ListOrdered, isActive: (e) => e.isActive('orderedList'), run: (e) => e.chain().focus().toggleOrderedList().run() },
|
|
93
|
+
{ name: words.quote, icon: TextQuote, isActive: (e) => e.isActive('blockquote'), run: (e) => e.chain().focus().toggleBlockquote().run() },
|
|
94
|
+
];
|
|
95
|
+
// Which tools are on changes with the cursor, not with the props.
|
|
96
|
+
const active = useEditorState({
|
|
97
|
+
editor,
|
|
98
|
+
selector: ({ editor: current }) => ({
|
|
99
|
+
tools: [...marks, ...blocks].map((tool) => tool.isActive(current)),
|
|
100
|
+
link: current.isActive('link'),
|
|
101
|
+
href: current.getAttributes('link')['href'] ?? '',
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
const group = (tools, offset, name) => (_jsx(Group, { "aria-label": name, children: tools.map((tool, index) => (_jsx(Tooltip, { content: tool.name, children: _jsx(ToggleButton, { "aria-label": tool.name, isSelected: active.tools[offset + index] ?? false, onChange: () => tool.run(editor), className: richTextEditorToolClass, children: _jsx(tool.icon, { "aria-hidden": true, size: richTextEditorToolIconSize }) }) }, tool.name))) }));
|
|
105
|
+
return (_jsxs("div", { className: richTextEditorClass, children: [_jsxs("span", { id: labelId, className: richTextEditorLabelVariants({ isLabelHidden }), children: [label, isRequired && (_jsx("span", { "aria-hidden": true, className: richTextEditorRequiredMarkClass, children: ' *' }))] }), _jsxs("div", { className: richTextEditorBoxVariants({ isInvalid: errorMessage !== undefined }), children: [_jsxs(Toolbar, { "aria-label": words.toolbar, className: richTextEditorToolbarClass, children: [group(marks, 0, words.toolbar), _jsx(Separator, { orientation: "vertical", className: richTextEditorSeparatorClass }), group(blocks, marks.length, words.toolbar), _jsx(Separator, { orientation: "vertical", className: richTextEditorSeparatorClass }), _jsx(LinkTool, { editor: editor, isActive: active.link, href: active.href, words: words })] }), _jsx(EditorContent, { editor: editor })] }), description !== undefined && (_jsx("p", { id: descriptionId, className: richTextEditorDescriptionClass, children: description })), errorMessage !== undefined && (_jsx("p", { id: errorId, className: richTextEditorErrorClass, children: errorMessage }))] }));
|
|
106
|
+
}
|
|
107
|
+
/** The link button, with the small panel its address is typed in. */
|
|
108
|
+
function LinkTool({ editor, isActive, href, words }) {
|
|
109
|
+
const [isOpen, setOpen] = useState(false);
|
|
110
|
+
const [address, setAddress] = useState('');
|
|
111
|
+
const open = (next) => {
|
|
112
|
+
if (next)
|
|
113
|
+
setAddress(href);
|
|
114
|
+
setOpen(next);
|
|
115
|
+
};
|
|
116
|
+
const apply = () => {
|
|
117
|
+
const link = editor.chain().focus().extendMarkRange('link');
|
|
118
|
+
if (address.trim() === '')
|
|
119
|
+
link.unsetLink().run();
|
|
120
|
+
else
|
|
121
|
+
link.setLink({ href: address.trim() }).run();
|
|
122
|
+
setOpen(false);
|
|
123
|
+
};
|
|
124
|
+
return (_jsxs(DialogTrigger, { isOpen: isOpen, onOpenChange: open, children: [_jsx(Tooltip, { content: words.link, children: _jsx(ToggleButton, { "aria-label": words.link, isSelected: isActive, onChange: () => open(true), className: richTextEditorToolClass, children: _jsx(Link2, { "aria-hidden": true, size: richTextEditorToolIconSize }) }) }), _jsx(Popover, { placement: "bottom start", isNonModal: true, className: richTextEditorLinkPanelClass, children: _jsx(Dialog, { "aria-label": words.link, className: richTextEditorLinkOuterClass, children: _jsxs("form", { className: richTextEditorLinkDialogClass, onSubmit: (event) => {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
// The panel is drawn elsewhere on the page, but React still counts it as inside the
|
|
127
|
+
// form the editor is in. Applying a link must not send that form.
|
|
128
|
+
event.stopPropagation();
|
|
129
|
+
apply();
|
|
130
|
+
}, children: [_jsx(TextField, { label: words.linkAddress, description: words.linkHelp, value: address, onChange: setAddress, autoFocus: true }), _jsxs("div", { className: richTextEditorLinkActionsClass, children: [isActive && (_jsx(Button, { variant: "ghost", size: "sm", onPress: () => {
|
|
131
|
+
editor.chain().focus().extendMarkRange('link').unsetLink().run();
|
|
132
|
+
setOpen(false);
|
|
133
|
+
}, children: words.linkRemove })), _jsx(Button, { variant: "primary", size: "sm", type: "submit", children: words.linkApply })] })] }) }) })] }));
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../src/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AA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E,EAAE;4BAClB,KAAK,CAAC,cAAc,EAAE,CAAC;4BACvB,oFAAoF;4BACpF,kEAAkE;4BAClE,KAAK,CAAC,eAAe,EAAE,CAAC;4BACxB,KAAK,EAAE,CAAC;wBACV,CAAC,aAEH,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,SAAG,EACpH,eAAK,SAAS,EAAE,8BAA8B,aAC3C,QAAQ,IAAI,CACX,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE;4CACZ,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC;4CACjE,OAAO,CAAC,KAAK,CAAC,CAAC;wCACjB,CAAC,YAEA,KAAK,CAAC,UAAU,GACV,CACV,EACD,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,YAC9C,KAAK,CAAC,SAAS,GACT,IACL,IACC,GACA,GACD,IACI,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const richTextEditorClass = "flex min-w-0 flex-col gap-1.5";
|
|
2
|
+
export declare const richTextEditorLabelVariants: (props?: ({
|
|
3
|
+
isLabelHidden?: boolean | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const richTextEditorRequiredMarkClass = "text-destructive";
|
|
6
|
+
export declare const richTextEditorDescriptionClass = "text-sm text-foreground-muted";
|
|
7
|
+
export declare const richTextEditorErrorClass = "motion-rise text-sm text-destructive";
|
|
8
|
+
/** The toolbar and the text in one box, which lights up as a text field does. */
|
|
9
|
+
export declare const richTextEditorBoxVariants: (props?: ({
|
|
10
|
+
isInvalid?: boolean | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const richTextEditorToolbarClass = "flex flex-wrap items-center gap-0.5 border-b border-border px-1.5 py-1";
|
|
13
|
+
export declare const richTextEditorSeparatorClass = "mx-1 h-5 w-px bg-border";
|
|
14
|
+
export declare const richTextEditorToolClass: string;
|
|
15
|
+
export declare const richTextEditorToolIconSize = 16;
|
|
16
|
+
/** The text itself. `rich-text` in styles.css draws headings, lists, quotes and links inside it. */
|
|
17
|
+
export declare const richTextEditorContentClass = "rich-text min-h-32 px-3 py-2 text-base text-foreground outline-none";
|
|
18
|
+
/** The small panel a link's address is typed in. */
|
|
19
|
+
export declare const richTextEditorLinkPanelClass = "layer-overlay motion-float overflow-auto rounded-md border border-border bg-background-elevated p-1 shadow-lg outline-none w-80 p-3";
|
|
20
|
+
export declare const richTextEditorLinkOuterClass = "outline-none";
|
|
21
|
+
export declare const richTextEditorLinkDialogClass = "flex flex-col gap-3";
|
|
22
|
+
export declare const richTextEditorLinkActionsClass = "flex justify-end gap-2";
|
|
23
|
+
//# sourceMappingURL=RichTextEditor.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.variants.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/RichTextEditor.variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,kCAAkC,CAAC;AACnE,eAAO,MAAM,2BAA2B;;8EAGtC,CAAC;AACH,eAAO,MAAM,+BAA+B,qBAAyB,CAAC;AACtE,eAAO,MAAM,8BAA8B,kCAAwB,CAAC;AACpE,eAAO,MAAM,wBAAwB,yCAAkB,CAAC;AAExD,iFAAiF;AACjF,eAAO,MAAM,yBAAyB;;8EASrC,CAAC;AAEF,eAAO,MAAM,0BAA0B,2EAA2E,CAAC;AACnH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,uBAAuB,QAMzB,CAAC;AACZ,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,oGAAoG;AACpG,eAAO,MAAM,0BAA0B,wEAAwE,CAAC;AAEhH,oDAAoD;AACpD,eAAO,MAAM,4BAA4B,wIAAmC,CAAC;AAC7E,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AACnE,eAAO,MAAM,8BAA8B,2BAA2B,CAAC"}
|