@velocity-astro/cms-ui 0.0.0-stage → 0.1.0-beta.11
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 +543 -0
- package/dist/components/BarChart/BarChart.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.js +19 -0
- package/dist/components/BarChart/BarChart.js.map +1 -0
- package/dist/components/BarChart/BarChart.variants.d.ts +29 -0
- package/dist/components/BarChart/BarChart.variants.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.variants.js +81 -0
- package/dist/components/BarChart/BarChart.variants.js.map +1 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BarChart/index.d.ts.map +1 -0
- package/dist/components/BarChart/index.js +2 -0
- package/dist/components/BarChart/index.js.map +1 -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 +26 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +12 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.variants.d.ts +19 -0
- package/dist/components/Button/Button.variants.d.ts.map +1 -0
- package/dist/components/Button/Button.variants.js +41 -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 +17 -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 +12 -0
- package/dist/components/Card/Card.variants.d.ts.map +1 -0
- package/dist/components/Card/Card.variants.js +14 -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/ColorPicker/ColorPicker.d.ts +30 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +32 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts +24 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js +42 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js.map +1 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/index.d.ts.map +1 -0
- package/dist/components/ColorPicker/index.js +2 -0
- package/dist/components/ColorPicker/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 +20 -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 +8 -0
- package/dist/components/Grid/Grid.variants.d.ts.map +1 -0
- package/dist/components/Grid/Grid.variants.js +16 -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 +14 -0
- package/dist/components/Heading/Heading.variants.d.ts.map +1 -0
- package/dist/components/Heading/Heading.variants.js +18 -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/LoadingMark/LoadingMark.d.ts +11 -0
- package/dist/components/LoadingMark/LoadingMark.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.js +17 -0
- package/dist/components/LoadingMark/LoadingMark.js.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts +22 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js +18 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js.map +1 -0
- package/dist/components/LoadingMark/index.d.ts +2 -0
- package/dist/components/LoadingMark/index.d.ts.map +1 -0
- package/dist/components/LoadingMark/index.js +2 -0
- package/dist/components/LoadingMark/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts +16 -0
- package/dist/components/Logo/Logo.d.ts.map +1 -0
- package/dist/components/Logo/Logo.js +15 -0
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Logo/Logo.variants.d.ts +12 -0
- package/dist/components/Logo/Logo.variants.d.ts.map +1 -0
- package/dist/components/Logo/Logo.variants.js +24 -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/Meter/Meter.d.ts +13 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.js +8 -0
- package/dist/components/Meter/Meter.js.map +1 -0
- package/dist/components/Meter/Meter.variants.d.ts +14 -0
- package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
- package/dist/components/Meter/Meter.variants.js +39 -0
- package/dist/components/Meter/Meter.variants.js.map +1 -0
- package/dist/components/Meter/index.d.ts +2 -0
- package/dist/components/Meter/index.d.ts.map +1 -0
- package/dist/components/Meter/index.js +2 -0
- package/dist/components/Meter/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 +29 -0
- package/dist/components/Segmented/Segmented.d.ts.map +1 -0
- package/dist/components/Segmented/Segmented.js +21 -0
- package/dist/components/Segmented/Segmented.js.map +1 -0
- package/dist/components/Segmented/Segmented.variants.d.ts +16 -0
- package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -0
- package/dist/components/Segmented/Segmented.variants.js +24 -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/Spotlight/Spotlight.d.ts +16 -0
- package/dist/components/Spotlight/Spotlight.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.js +28 -0
- package/dist/components/Spotlight/Spotlight.js.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts +8 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.js +15 -0
- package/dist/components/Spotlight/Spotlight.variants.js.map +1 -0
- package/dist/components/Spotlight/index.d.ts +2 -0
- package/dist/components/Spotlight/index.d.ts.map +1 -0
- package/dist/components/Spotlight/index.js +2 -0
- package/dist/components/Spotlight/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 +42 -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 +21 -0
- package/dist/components/Table/Table.variants.d.ts.map +1 -0
- package/dist/components/Table/Table.variants.js +31 -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 +42 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +41 -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 +56 -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 +72 -0
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -0
- package/dist/patterns/AppShell/AppShell.js +49 -0
- package/dist/patterns/AppShell/AppShell.js.map +1 -0
- package/dist/patterns/AppShell/AppShell.variants.d.ts +87 -0
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -0
- package/dist/patterns/AppShell/AppShell.variants.js +146 -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/CommandPalette/CommandPalette.d.ts +36 -0
- package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.js +18 -0
- package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
- package/dist/patterns/CommandPalette/index.d.ts +2 -0
- package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/index.js +2 -0
- package/dist/patterns/CommandPalette/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 +55 -0
- package/dist/patterns/ImagePicker/ImagePicker.d.ts.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.js +43 -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 +33 -0
- package/dist/patterns/OptionPicker/OptionPicker.d.ts.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.js +18 -0
- package/dist/patterns/OptionPicker/OptionPicker.js.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts +18 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts.map +1 -0
- package/dist/patterns/OptionPicker/OptionPicker.variants.js +40 -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/Outline/Outline.d.ts +26 -0
- package/dist/patterns/Outline/Outline.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.js +21 -0
- package/dist/patterns/Outline/Outline.js.map +1 -0
- package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
- package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.variants.js +21 -0
- package/dist/patterns/Outline/Outline.variants.js.map +1 -0
- package/dist/patterns/Outline/index.d.ts +2 -0
- package/dist/patterns/Outline/index.d.ts.map +1 -0
- package/dist/patterns/Outline/index.js +2 -0
- package/dist/patterns/Outline/index.js.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +41 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.js +35 -0
- package/dist/patterns/PageHeader/PageHeader.js.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts +24 -0
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.variants.js +34 -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 +163 -0
- package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.js +206 -0
- package/dist/patterns/PagePreview/PagePreview.js.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts +25 -0
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -0
- package/dist/patterns/PagePreview/PagePreview.variants.js +34 -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 +37 -0
- package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.js +27 -0
- package/dist/patterns/SaveBar/SaveBar.js.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts +31 -0
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -0
- package/dist/patterns/SaveBar/SaveBar.variants.js +46 -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 +37 -0
- package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -0
- package/dist/patterns/SectionList/SectionList.variants.js +67 -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/SiteWindow/SiteWindow.d.ts +20 -0
- package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
- package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
- package/dist/patterns/SiteWindow/index.d.ts +2 -0
- package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/index.js +2 -0
- package/dist/patterns/SiteWindow/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/Welcome/Welcome.d.ts +18 -0
- package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.js +20 -0
- package/dist/patterns/Welcome/Welcome.js.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.js +12 -0
- package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
- package/dist/patterns/Welcome/index.d.ts +2 -0
- package/dist/patterns/Welcome/index.d.ts.map +1 -0
- package/dist/patterns/Welcome/index.js +2 -0
- package/dist/patterns/Welcome/index.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.d.ts +43 -0
- package/dist/patterns/Workbench/Workbench.d.ts.map +1 -0
- package/dist/patterns/Workbench/Workbench.js +62 -0
- package/dist/patterns/Workbench/Workbench.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.variants.d.ts +58 -0
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -0
- package/dist/patterns/Workbench/Workbench.variants.js +113 -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 +20 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +20 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/page-bar.d.ts +17 -0
- package/dist/patterns/page-bar.d.ts.map +1 -0
- package/dist/patterns/page-bar.js +22 -0
- package/dist/patterns/page-bar.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 +82 -3
- package/src/styles.css +551 -0
- package/src/tokens/tokens.css +284 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowRightLeft } from 'lucide-react';
|
|
3
|
+
import { useId, useRef, useState } from 'react';
|
|
4
|
+
import { Button as AriaButton, isTextDropItem, useDrag, useDrop } from 'react-aria-components';
|
|
5
|
+
import { IconButton } from '../../components/IconButton/index.js';
|
|
6
|
+
import { Menu } from '../../components/Menu/index.js';
|
|
7
|
+
import { Tag } from '../../components/Tag/index.js';
|
|
8
|
+
import { boardCardDetailClass, boardCardNotesClass, boardCardOpenClass, boardCardTitleClass, boardCardVariants, boardClass, boardColumnCountClass, boardColumnHeaderClass, boardColumnNameClass, boardColumnTitleClass, boardColumnVariants, boardDotVariants, boardEmptyClass, boardItemsClass, boardMoreClass, } from './Board.variants.js';
|
|
9
|
+
/** What a dragged card is carried as. Only a card of a board like this one is taken. */
|
|
10
|
+
const CARD = 'application/x-velocity-cms-board-card';
|
|
11
|
+
/** Columns of cards, where a card is dragged from one column to another. Each card also has a menu that moves it. */
|
|
12
|
+
export function Board({ label, columns, emptyText, onOpen, onMove, moveLabel }) {
|
|
13
|
+
const places = new Map(columns.flatMap((column) => column.items.map((item) => [item.id, column.id])));
|
|
14
|
+
const move = (id, columnId) => {
|
|
15
|
+
if (places.get(id) !== columnId)
|
|
16
|
+
onMove(id, columnId);
|
|
17
|
+
};
|
|
18
|
+
return (_jsx("div", { role: "group", "aria-label": label, className: boardClass, children: columns.map((column) => (_jsx(Column, { column: column, columns: columns, emptyText: emptyText, onOpen: onOpen, onMove: move, moveLabel: moveLabel }, column.id))) }));
|
|
19
|
+
}
|
|
20
|
+
/** One column: it takes a card dropped anywhere on it. */
|
|
21
|
+
function Column({ column, columns, emptyText, onOpen, onMove, moveLabel }) {
|
|
22
|
+
const titleId = useId();
|
|
23
|
+
const place = useRef(null);
|
|
24
|
+
const [isTarget, setTarget] = useState(false);
|
|
25
|
+
const { dropProps } = useDrop({
|
|
26
|
+
ref: place,
|
|
27
|
+
getDropOperation: (types) => (types.has(CARD) ? 'move' : 'cancel'),
|
|
28
|
+
onDropEnter: () => setTarget(true),
|
|
29
|
+
onDropExit: () => setTarget(false),
|
|
30
|
+
onDrop: (event) => {
|
|
31
|
+
setTarget(false);
|
|
32
|
+
const [dropped] = event.items.filter(isTextDropItem);
|
|
33
|
+
void dropped?.getText(CARD).then((id) => onMove(id, column.id));
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const elsewhere = columns.filter((other) => other.id !== column.id).map((other) => ({ id: other.id, label: other.title }));
|
|
37
|
+
return (_jsxs("section", { ref: place, "aria-labelledby": titleId, className: boardColumnVariants({ state: isTarget ? 'target' : 'default' }), ...dropProps, children: [_jsxs("div", { className: boardColumnHeaderClass, children: [_jsxs("h3", { id: titleId, className: boardColumnTitleClass, children: [_jsx("span", { className: boardDotVariants({ tone: column.tone }) }), _jsx("span", { className: boardColumnNameClass, children: column.title })] }), _jsx("span", { className: boardColumnCountClass, children: column.count })] }), column.items.length === 0 ? (_jsx("p", { className: boardEmptyClass, children: emptyText })) : (_jsx("ul", { className: boardItemsClass, children: column.items.map((item) => (_jsx(Card, { item: item, elsewhere: elsewhere, onOpen: onOpen, onMove: onMove, moveLabel: moveLabel }, item.id))) })), column.more !== undefined && _jsx("p", { className: boardMoreClass, children: column.more })] }));
|
|
38
|
+
}
|
|
39
|
+
/** One card: pressed it opens, dragged it moves, and its menu moves it for whoever does not drag. */
|
|
40
|
+
function Card({ item, elsewhere, onOpen, onMove, moveLabel }) {
|
|
41
|
+
const { dragProps, isDragging } = useDrag({ getItems: () => [{ [CARD]: item.id }], getAllowedDropOperations: () => ['move'] });
|
|
42
|
+
return (_jsxs("li", { className: boardCardVariants({ state: isDragging ? 'dragging' : 'default' }), ...dragProps, children: [_jsxs(AriaButton, { className: boardCardOpenClass, onPress: () => onOpen(item.id), children: [_jsx("span", { className: boardCardTitleClass, children: item.title }), item.detail !== undefined && _jsx("span", { className: boardCardDetailClass, children: item.detail }), item.notes !== undefined && item.notes.length > 0 && (_jsx("span", { className: boardCardNotesClass, children: item.notes.map((note) => (_jsx(Tag, { tone: note.tone ?? 'neutral', children: note.text }, note.text))) }))] }), elsewhere.length > 0 && (_jsx(Menu, { trigger: _jsx(IconButton, { size: "sm", icon: ArrowRightLeft, label: moveLabel(item.title) }), actions: elsewhere, onAction: (columnId) => onMove(item.id, columnId) }))] }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=Board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Board.js","sourceRoot":"","sources":["../../../src/patterns/Board/Board.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAA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,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAI,CACvK,IACE,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/** The columns side by side. A board wider than its place scrolls sideways, on its own. */
|
|
3
|
+
export declare const boardClass = "flex min-w-0 items-start gap-3 overflow-x-auto pb-2";
|
|
4
|
+
export declare const boardColumnVariants: (props?: ({
|
|
5
|
+
state?: "default" | "target" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const boardColumnHeaderClass = "flex items-center justify-between gap-2 px-1 pt-1";
|
|
8
|
+
export declare const boardColumnTitleClass = "flex min-w-0 items-center gap-2 text-sm font-semibold text-foreground";
|
|
9
|
+
export declare const boardColumnNameClass = "truncate";
|
|
10
|
+
export declare const boardColumnCountClass = "shrink-0 text-sm text-foreground-muted";
|
|
11
|
+
/** The mark before a column's name: whether the matter is still open there, won or lost. */
|
|
12
|
+
export declare const boardDotVariants: (props?: ({
|
|
13
|
+
tone?: "danger" | "neutral" | "success" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const boardItemsClass = "flex flex-col gap-2";
|
|
16
|
+
export declare const boardEmptyClass = "rounded-md border border-dashed border-border px-3 py-6 text-center text-sm text-foreground-muted";
|
|
17
|
+
export declare const boardMoreClass = "px-1 text-sm text-foreground-muted";
|
|
18
|
+
export declare const boardCardVariants: (props?: ({
|
|
19
|
+
state?: "default" | "dragging" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export declare const boardCardOpenClass: string;
|
|
22
|
+
export declare const boardCardTitleClass = "truncate text-sm font-medium text-foreground";
|
|
23
|
+
export declare const boardCardDetailClass = "truncate text-sm text-foreground-muted";
|
|
24
|
+
export declare const boardCardNotesClass = "flex flex-wrap items-center gap-1 pt-1";
|
|
25
|
+
/** The size of a card's icons, in pixels. */
|
|
26
|
+
export declare const boardIconSize = 16;
|
|
27
|
+
export type BoardColumnVariants = VariantProps<typeof boardColumnVariants>;
|
|
28
|
+
//# sourceMappingURL=Board.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Board.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Board/Board.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,2FAA2F;AAC3F,eAAO,MAAM,UAAU,wDAAwD,CAAC;AAEhF,eAAO,MAAM,mBAAmB;;8EAS9B,CAAC;AAEH,eAAO,MAAM,sBAAsB,sDAAsD,CAAC;AAC1F,eAAO,MAAM,qBAAqB,0EAA0E,CAAC;AAC7G,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAC/C,eAAO,MAAM,qBAAqB,2CAA2C,CAAC;AAE9E,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB;;8EAS3B,CAAC;AAEH,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,eAAe,sGAAsG,CAAC;AACnI,eAAO,MAAM,cAAc,uCAAuC,CAAC;AAEnE,eAAO,MAAM,iBAAiB;;8EAS5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAIpB,CAAC;AACZ,eAAO,MAAM,mBAAmB,iDAAiD,CAAC;AAClF,eAAO,MAAM,oBAAoB,2CAA2C,CAAC;AAC7E,eAAO,MAAM,mBAAmB,2CAA2C,CAAC;AAE5E,6CAA6C;AAC7C,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
/** The columns side by side. A board wider than its place scrolls sideways, on its own. */
|
|
3
|
+
export const boardClass = 'flex min-w-0 items-start gap-3 overflow-x-auto pb-2';
|
|
4
|
+
export const boardColumnVariants = cva('flex min-w-48 flex-1 basis-0 flex-col gap-2 rounded-lg border bg-background-secondary p-2 transition-colors motion-fast', {
|
|
5
|
+
variants: {
|
|
6
|
+
state: {
|
|
7
|
+
default: 'border-border',
|
|
8
|
+
/** A card is held over it, and would land here. */
|
|
9
|
+
target: 'border-ring ring-2 ring-ring',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: { state: 'default' },
|
|
13
|
+
});
|
|
14
|
+
export const boardColumnHeaderClass = 'flex items-center justify-between gap-2 px-1 pt-1';
|
|
15
|
+
export const boardColumnTitleClass = 'flex min-w-0 items-center gap-2 text-sm font-semibold text-foreground';
|
|
16
|
+
export const boardColumnNameClass = 'truncate';
|
|
17
|
+
export const boardColumnCountClass = 'shrink-0 text-sm text-foreground-muted';
|
|
18
|
+
/** The mark before a column's name: whether the matter is still open there, won or lost. */
|
|
19
|
+
export const boardDotVariants = cva('size-2 shrink-0 rounded-full', {
|
|
20
|
+
variants: {
|
|
21
|
+
tone: {
|
|
22
|
+
neutral: 'bg-foreground-subtle',
|
|
23
|
+
success: 'bg-success',
|
|
24
|
+
danger: 'bg-destructive',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: { tone: 'neutral' },
|
|
28
|
+
});
|
|
29
|
+
export const boardItemsClass = 'flex flex-col gap-2';
|
|
30
|
+
export const boardEmptyClass = 'rounded-md border border-dashed border-border px-3 py-6 text-center text-sm text-foreground-muted';
|
|
31
|
+
export const boardMoreClass = 'px-1 text-sm text-foreground-muted';
|
|
32
|
+
export const boardCardVariants = cva('motion-rise flex min-w-0 items-start gap-1 rounded-md border border-border bg-card p-1 shadow-sm', {
|
|
33
|
+
variants: {
|
|
34
|
+
state: {
|
|
35
|
+
default: '',
|
|
36
|
+
/** Being dragged: it stays in its place, faded, until it is dropped. */
|
|
37
|
+
dragging: 'opacity-50',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: { state: 'default' },
|
|
41
|
+
});
|
|
42
|
+
export const boardCardOpenClass = [
|
|
43
|
+
'flex min-w-0 flex-1 cursor-grab flex-col gap-1 rounded-sm px-2 py-1 text-left outline-none',
|
|
44
|
+
'transition-colors motion-fast data-hovered:bg-secondary data-pressed:cursor-grabbing',
|
|
45
|
+
'data-focus-visible:ring-2 data-focus-visible:ring-input-focus',
|
|
46
|
+
].join(' ');
|
|
47
|
+
export const boardCardTitleClass = 'truncate text-sm font-medium text-foreground';
|
|
48
|
+
export const boardCardDetailClass = 'truncate text-sm text-foreground-muted';
|
|
49
|
+
export const boardCardNotesClass = 'flex flex-wrap items-center gap-1 pt-1';
|
|
50
|
+
/** The size of a card's icons, in pixels. */
|
|
51
|
+
export const boardIconSize = 16;
|
|
52
|
+
//# sourceMappingURL=Board.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Board.variants.js","sourceRoot":"","sources":["../../../src/patterns/Board/Board.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,qDAAqD,CAAC;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC,yHAAyH,EAAE;IAChK,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,eAAe;YACxB,mDAAmD;YACnD,MAAM,EAAE,8BAA8B;SACvC;KACF;IACD,eAAe,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,mDAAmD,CAAC;AAC1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,uEAAuE,CAAC;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAC/C,MAAM,CAA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SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Board/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
export interface CommandItem {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
/** What choosing it does or where it goes: "Listings", "New listing". */
|
|
5
|
+
readonly label: string;
|
|
6
|
+
/** A few words at the end of the row: what kind of thing it is. */
|
|
7
|
+
readonly detail?: string;
|
|
8
|
+
readonly icon?: LucideIcon;
|
|
9
|
+
/** Other words it is found by, which are not shown. */
|
|
10
|
+
readonly keywords?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CommandGroup {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
/** The small heading over the group: "Go to", "Create". */
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly items: readonly CommandItem[];
|
|
17
|
+
}
|
|
18
|
+
export interface CommandPaletteProps {
|
|
19
|
+
readonly isOpen: boolean;
|
|
20
|
+
readonly onOpenChange: (isOpen: boolean) => void;
|
|
21
|
+
/** Names the window for screen readers: "Search and commands". */
|
|
22
|
+
readonly label: string;
|
|
23
|
+
/** What the box says before anything is typed, and what it is called. */
|
|
24
|
+
readonly placeholder: string;
|
|
25
|
+
/** Shown when nothing matches what was typed. */
|
|
26
|
+
readonly emptyText: string;
|
|
27
|
+
readonly groups: readonly CommandGroup[];
|
|
28
|
+
/** Called with the id of what was chosen. The window closes by itself. */
|
|
29
|
+
readonly onAction: (id: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A window to find anything by typing and go there: a box, and under it the matches in groups.
|
|
33
|
+
* The arrow keys move through them and Enter chooses one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function CommandPalette({ isOpen, onOpenChange, label, placeholder, emptyText, groups, onAction }: CommandPaletteProps): import("react").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=CommandPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/CommandPalette.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAgCvD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAmD5H"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Search } from 'lucide-react';
|
|
3
|
+
import { Autocomplete, Dialog, Header, Input, Menu, MenuItem, MenuSection, Modal, ModalOverlay, SearchField, useFilter, } from 'react-aria-components';
|
|
4
|
+
import { commandPaletteClass, commandPaletteContentClass, commandPaletteEmptyClass, commandPaletteHeaderClass, commandPaletteInputClass, commandPaletteItemClass, commandPaletteItemDetailClass, commandPaletteItemIconClass, commandPaletteItemIconSize, commandPaletteItemLabelClass, commandPaletteListClass, commandPaletteOverlayClass, commandPaletteSearchClass, commandPaletteSearchIconSize, commandPaletteSectionClass, } from './CommandPalette.variants.js';
|
|
5
|
+
/**
|
|
6
|
+
* A window to find anything by typing and go there: a box, and under it the matches in groups.
|
|
7
|
+
* The arrow keys move through them and Enter chooses one.
|
|
8
|
+
*/
|
|
9
|
+
export function CommandPalette({ isOpen, onOpenChange, label, placeholder, emptyText, groups, onAction }) {
|
|
10
|
+
const { contains } = useFilter({ sensitivity: 'base' });
|
|
11
|
+
return (_jsx(ModalOverlay, { isOpen: isOpen, onOpenChange: onOpenChange, isDismissable: true, className: commandPaletteOverlayClass, children: _jsx(Modal, { className: commandPaletteClass, children: _jsx(Dialog, { "aria-label": label, className: commandPaletteContentClass, children: ({ close }) => (_jsxs(Autocomplete, { filter: contains, children: [_jsxs(SearchField, { "aria-label": placeholder, autoFocus: true, className: commandPaletteSearchClass, children: [_jsx(Search, { "aria-hidden": true, size: commandPaletteSearchIconSize }), _jsx(Input, { placeholder: placeholder, className: commandPaletteInputClass })] }), _jsx(Menu, { "aria-label": label, className: commandPaletteListClass, renderEmptyState: () => _jsx("div", { className: commandPaletteEmptyClass, children: emptyText }), onAction: (key) => {
|
|
12
|
+
close();
|
|
13
|
+
onAction(String(key));
|
|
14
|
+
}, children: groups
|
|
15
|
+
.filter((group) => group.items.length > 0)
|
|
16
|
+
.map((group) => (_jsxs(MenuSection, { id: group.id, className: commandPaletteSectionClass, children: [_jsx(Header, { className: commandPaletteHeaderClass, children: group.label }), group.items.map(({ id, label: words, detail, icon: Icon, keywords }) => (_jsxs(MenuItem, { id: id, className: commandPaletteItemClass, textValue: [words, detail, keywords].filter((part) => part !== undefined).join(' '), children: [Icon && (_jsx("span", { "aria-hidden": true, className: commandPaletteItemIconClass, children: _jsx(Icon, { size: commandPaletteItemIconSize }) })), _jsx("span", { className: commandPaletteItemLabelClass, children: words }), detail !== undefined && _jsx("span", { className: commandPaletteItemDetailClass, children: detail })] }, id)))] }, group.id))) })] })) }) }) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=CommandPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPalette.js","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/CommandPalette.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,MAAM,EACN,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,WAAW,EACX,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAkCtC;;;G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AS,EAAE,0BAA0B,aAC7E,KAAC,MAAM,IAAC,SAAS,EAAE,yBAAyB,YAAG,KAAK,CAAC,KAAK,GAAU,EACnE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACvE,MAAC,QAAQ,IAEP,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,uBAAuB,EAClC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAElF,IAAI,IAAI,CACP,oCAAkB,SAAS,EAAE,2BAA2B,YACtD,KAAC,IAAI,IAAC,IAAI,EAAE,0BAA0B,GAAI,GACrC,CACR,EACD,eAAM,SAAS,EAAE,4BAA4B,YAAG,KAAK,GAAQ,EAC5D,MAAM,KAAK,SAAS,IAAI,eAAM,SAAS,EAAE,6BAA6B,YAAG,MAAM,GAAQ,KAXnF,EAAE,CAYE,CACZ,CAAC,KAjBc,KAAK,CAAC,EAAE,CAkBZ,CACf,CAAC,GACC,IACM,CAChB,GACM,GACH,GACK,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Near the top of the window, where the eye already is, rather than in the middle. */
|
|
2
|
+
export declare const commandPaletteOverlayClass = "fixed inset-0 layer-overlay flex items-start justify-center bg-scrim px-4 pt-24 motion-scrim";
|
|
3
|
+
export declare const commandPaletteClass = "flex max-h-112 w-full max-w-xl flex-col overflow-hidden rounded-xl border border-border bg-background-elevated shadow-xl outline-none motion-pop";
|
|
4
|
+
/** The window scrolls as a whole, with the box held at its top, so what scrolls also holds what the keyboard reaches. */
|
|
5
|
+
export declare const commandPaletteContentClass = "flex min-h-0 flex-col overflow-y-auto outline-none";
|
|
6
|
+
export declare const commandPaletteSearchClass = "sticky top-0 layer-raised flex shrink-0 items-center gap-3 border-b border-border bg-background-elevated px-4 text-foreground-muted";
|
|
7
|
+
export declare const commandPaletteInputClass = "h-14 w-full min-w-0 bg-transparent text-lg text-foreground outline-none placeholder:text-foreground-subtle";
|
|
8
|
+
export declare const commandPaletteSearchIconSize = 18;
|
|
9
|
+
export declare const commandPaletteListClass = "p-2 outline-none";
|
|
10
|
+
export declare const commandPaletteSectionClass = "pb-1";
|
|
11
|
+
export declare const commandPaletteHeaderClass = "px-3 pt-2 pb-1 text-xs font-semibold tracking-widest text-foreground-subtle uppercase";
|
|
12
|
+
export declare const commandPaletteItemClass: string;
|
|
13
|
+
export declare const commandPaletteItemIconClass = "flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground-muted";
|
|
14
|
+
export declare const commandPaletteItemLabelClass = "min-w-0 flex-1 truncate font-medium";
|
|
15
|
+
export declare const commandPaletteItemDetailClass = "shrink-0 text-sm text-foreground-subtle";
|
|
16
|
+
export declare const commandPaletteItemIconSize = 16;
|
|
17
|
+
export declare const commandPaletteEmptyClass = "px-3 py-8 text-center text-base text-foreground-muted";
|
|
18
|
+
//# sourceMappingURL=CommandPalette.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPalette.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/CommandPalette.variants.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,eAAO,MAAM,0BAA0B,iGAAiG,CAAC;AACzI,eAAO,MAAM,mBAAmB,qJACoH,CAAC;AACrJ,yHAAyH;AACzH,eAAO,MAAM,0BAA0B,uDAAuD,CAAC;AAE/F,eAAO,MAAM,yBAAyB,wIAAwI,CAAC;AAC/K,eAAO,MAAM,wBAAwB,+GAA+G,CAAC;AACrJ,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,SAAS,CAAC;AACjD,eAAO,MAAM,yBAAyB,0FAA0F,CAAC;AACjI,eAAO,MAAM,uBAAuB,QAGzB,CAAC;AACZ,eAAO,MAAM,2BAA2B,0HACiF,CAAC;AAC1H,eAAO,MAAM,4BAA4B,wCAAwC,CAAC;AAClF,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,wBAAwB,0DAA0D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Near the top of the window, where the eye already is, rather than in the middle. */
|
|
2
|
+
export const commandPaletteOverlayClass = 'fixed inset-0 layer-overlay flex items-start justify-center bg-scrim px-4 pt-24 motion-scrim';
|
|
3
|
+
export const commandPaletteClass = 'flex max-h-112 w-full max-w-xl flex-col overflow-hidden rounded-xl border border-border bg-background-elevated shadow-xl outline-none motion-pop';
|
|
4
|
+
/** The window scrolls as a whole, with the box held at its top, so what scrolls also holds what the keyboard reaches. */
|
|
5
|
+
export const commandPaletteContentClass = 'flex min-h-0 flex-col overflow-y-auto outline-none';
|
|
6
|
+
export const commandPaletteSearchClass = 'sticky top-0 layer-raised flex shrink-0 items-center gap-3 border-b border-border bg-background-elevated px-4 text-foreground-muted';
|
|
7
|
+
export const commandPaletteInputClass = 'h-14 w-full min-w-0 bg-transparent text-lg text-foreground outline-none placeholder:text-foreground-subtle';
|
|
8
|
+
export const commandPaletteSearchIconSize = 18;
|
|
9
|
+
export const commandPaletteListClass = 'p-2 outline-none';
|
|
10
|
+
export const commandPaletteSectionClass = 'pb-1';
|
|
11
|
+
export const commandPaletteHeaderClass = 'px-3 pt-2 pb-1 text-xs font-semibold tracking-widest text-foreground-subtle uppercase';
|
|
12
|
+
export const commandPaletteItemClass = [
|
|
13
|
+
'flex cursor-default items-center gap-3 rounded-lg px-3 py-2 text-base text-foreground outline-none',
|
|
14
|
+
'data-focused:bg-background-tertiary data-hovered:bg-background-secondary',
|
|
15
|
+
].join(' ');
|
|
16
|
+
export const commandPaletteItemIconClass = 'flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground-muted';
|
|
17
|
+
export const commandPaletteItemLabelClass = 'min-w-0 flex-1 truncate font-medium';
|
|
18
|
+
export const commandPaletteItemDetailClass = 'shrink-0 text-sm text-foreground-subtle';
|
|
19
|
+
export const commandPaletteItemIconSize = 16;
|
|
20
|
+
export const commandPaletteEmptyClass = 'px-3 py-8 text-center text-base text-foreground-muted';
|
|
21
|
+
//# sourceMappingURL=CommandPalette.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPalette.variants.js","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/CommandPalette.variants.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,MAAM,CAAC,MAAM,0BAA0B,GAAG,8FAA8F,CAAC;AACzI,MAAM,CAAC,MAAM,mBAAmB,GAC9B,kJAAkJ,CAAC;AACrJ,yHAAyH;AACzH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oDAAoD,CAAC;AAE/F,MAAM,CAAC,MAAM,yBAAyB,GAAG,qIAAqI,CAAC;AAC/K,MAAM,CAAC,MAAM,wBAAwB,GAAG,4GAA4G,CAAC;AACrJ,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAE/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,uFAAuF,CAAC;AACjI,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,oGAAoG;IACpG,0EAA0E;CAC3E,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,MAAM,CAAC,MAAM,2BAA2B,GACtC,uHAAuH,CAAC;AAC1H,MAAM,CAAC,MAAM,4BAA4B,GAAG,qCAAqC,CAAC;AAClF,MAAM,CAAC,MAAM,6BAA6B,GAAG,yCAAyC,CAAC;AACvF,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,uDAAuD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/CommandPalette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ConfirmDialogProps {
|
|
3
|
+
readonly isOpen: boolean;
|
|
4
|
+
readonly onOpenChange: (isOpen: boolean) => void;
|
|
5
|
+
/** The question, naming the thing: "Delete 6214 Lakeshore Drive?" */
|
|
6
|
+
readonly title: string;
|
|
7
|
+
/** What will happen, and whether it can be undone. */
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
/** The action in a word or two: "Delete listing", not "Yes" or "OK". */
|
|
10
|
+
readonly confirmLabel: string;
|
|
11
|
+
readonly cancelLabel: string;
|
|
12
|
+
readonly onConfirm: () => void;
|
|
13
|
+
/** `danger` when confirming destroys something. */
|
|
14
|
+
readonly tone?: 'default' | 'danger';
|
|
15
|
+
/** The action is under way: the confirming button shows a spinner and the dialog stays open. */
|
|
16
|
+
readonly isPending?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Asks before doing something that is hard to undo. */
|
|
19
|
+
export declare function ConfirmDialog({ isOpen, onOpenChange, title, children, confirmLabel, cancelLabel, onConfirm, tone, isPending, }: ConfirmDialogProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC,gGAAgG;IAChG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,SAAS,EACT,IAAgB,EAChB,SAAiB,GAClB,EAAE,kBAAkB,+BAsBpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../components/Button/index.js';
|
|
3
|
+
import { Dialog } from '../../components/Dialog/index.js';
|
|
4
|
+
import { confirmButtonVariant } from './ConfirmDialog.variants.js';
|
|
5
|
+
/** Asks before doing something that is hard to undo. */
|
|
6
|
+
export function ConfirmDialog({ isOpen, onOpenChange, title, children, confirmLabel, cancelLabel, onConfirm, tone = 'default', isPending = false, }) {
|
|
7
|
+
return (_jsx(Dialog, { isOpen: isOpen, onOpenChange: onOpenChange, title: title, role: "alertdialog", size: "sm", footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", onPress: () => onOpenChange(false), isDisabled: isPending, autoFocus: true, children: cancelLabel }), _jsx(Button, { variant: confirmButtonVariant[tone], onPress: onConfirm, isPending: isPending, children: confirmLabel })] }), children: children }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAmBnE,wDAAwD;AACxD,MAAM,UAAU,aAAa,CAAC,EAC5B,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,SAAS,GAAG,KAAK,GACE;IACnB,OAAO,CACL,KAAC,MAAM,IACL,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,aAAa,EAClB,IAAI,EAAC,IAAI,EACT,MAAM,EACJ,8BACE,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,kBAC7F,WAAW,GACL,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,YAClF,YAAY,GACN,IACR,YAGJ,QAAQ,GACF,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/ConfirmDialog.variants.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,eAAO,MAAM,oBAAoB;;;CAAoD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.variants.js","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/ConfirmDialog.variants.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/ConfirmDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface EmptyStateProps {
|
|
4
|
+
/** What is missing: "No listings yet". */
|
|
5
|
+
readonly title: string;
|
|
6
|
+
/** Why it is empty, or what adding the first one does. */
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
readonly icon?: LucideIcon;
|
|
9
|
+
/** The one thing to do next, usually a primary `Button`. */
|
|
10
|
+
readonly action?: ReactNode;
|
|
11
|
+
/** The heading's place in the page outline. */
|
|
12
|
+
readonly level?: 2 | 3 | 4;
|
|
13
|
+
}
|
|
14
|
+
/** What a screen shows where its content will be, before there is any. */
|
|
15
|
+
export declare function EmptyState({ title, description, icon: Icon, action, level }: EmptyStateProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/patterns/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC5B;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAS,EAAE,EAAE,eAAe,+BAiBhG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '../../components/Heading/index.js';
|
|
3
|
+
import { Text } from '../../components/Text/index.js';
|
|
4
|
+
import { emptyStateClass, emptyStateIconClass, emptyStateIconSize, emptyStateTextClass } from './EmptyState.variants.js';
|
|
5
|
+
/** What a screen shows where its content will be, before there is any. */
|
|
6
|
+
export function EmptyState({ title, description, icon: Icon, action, level = 2 }) {
|
|
7
|
+
return (_jsxs("div", { className: emptyStateClass, children: [Icon && (_jsx("span", { className: emptyStateIconClass, children: _jsx(Icon, { "aria-hidden": true, size: emptyStateIconSize }) })), _jsxs("div", { className: emptyStateTextClass, children: [_jsx(Heading, { level: level, size: "md", children: title }), description !== undefined && _jsx(Text, { tone: "secondary", children: description })] }), action] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/patterns/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAczH,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAmB;IAC/F,OAAO,CACL,eAAK,SAAS,EAAE,eAAe,aAC5B,IAAI,IAAI,CACP,eAAM,SAAS,EAAE,mBAAmB,YAClC,KAAC,IAAI,yBAAa,IAAI,EAAE,kBAAkB,GAAI,GACzC,CACR,EACD,eAAK,SAAS,EAAE,mBAAmB,aACjC,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,IAAI,YAC7B,KAAK,GACE,EACT,WAAW,KAAK,SAAS,IAAI,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,YAAE,WAAW,GAAQ,IACrE,EACL,MAAM,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const emptyStateClass = "motion-rise flex flex-col items-center gap-4 px-6 py-12 text-center";
|
|
2
|
+
export declare const emptyStateIconClass = "flex size-12 items-center justify-center rounded-full bg-secondary text-foreground-secondary";
|
|
3
|
+
export declare const emptyStateTextClass = "flex max-w-sm flex-col gap-1";
|
|
4
|
+
/** The icon's size in pixels. */
|
|
5
|
+
export declare const emptyStateIconSize = 24;
|
|
6
|
+
//# sourceMappingURL=EmptyState.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/EmptyState/EmptyState.variants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,wEAAwE,CAAC;AACrG,eAAO,MAAM,mBAAmB,iGAAiG,CAAC;AAClI,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,iCAAiC;AACjC,eAAO,MAAM,kBAAkB,KAAK,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const emptyStateClass = 'motion-rise flex flex-col items-center gap-4 px-6 py-12 text-center';
|
|
2
|
+
export const emptyStateIconClass = 'flex size-12 items-center justify-center rounded-full bg-secondary text-foreground-secondary';
|
|
3
|
+
export const emptyStateTextClass = 'flex max-w-sm flex-col gap-1';
|
|
4
|
+
/** The icon's size in pixels. */
|
|
5
|
+
export const emptyStateIconSize = 24;
|
|
6
|
+
//# sourceMappingURL=EmptyState.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.variants.js","sourceRoot":"","sources":["../../../src/patterns/EmptyState/EmptyState.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,qEAAqE,CAAC;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG,8FAA8F,CAAC;AAClI,MAAM,CAAC,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAElE,iCAAiC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/EmptyState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/EmptyState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface PickableImage {
|
|
2
|
+
/** What is stored when the image is chosen, and what it is called on screen. */
|
|
3
|
+
readonly name: string;
|
|
4
|
+
/** Where a small copy of it loads from. */
|
|
5
|
+
readonly url: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ImagePickerProps {
|
|
8
|
+
/** What the image is for, such as "Cover photo". */
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** Hides the label from view (it is still read out), for a row of a list whose label is in view. */
|
|
11
|
+
readonly isLabelHidden?: boolean;
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
readonly errorMessage?: string;
|
|
14
|
+
readonly isRequired?: boolean;
|
|
15
|
+
/** The name of the chosen image, or `null` when none is. */
|
|
16
|
+
readonly value: string | null;
|
|
17
|
+
/** Every image there is to choose from. */
|
|
18
|
+
readonly images: readonly PickableImage[];
|
|
19
|
+
readonly onChange: (name: string) => void;
|
|
20
|
+
/** The button's words when nothing is chosen, such as "Choose a photo". */
|
|
21
|
+
readonly chooseLabel: string;
|
|
22
|
+
/** The button's words when something is, such as "Change". */
|
|
23
|
+
readonly changeLabel: string;
|
|
24
|
+
/** Shown beside the button when nothing is chosen, such as "No photo chosen". */
|
|
25
|
+
readonly noneText: string;
|
|
26
|
+
/** The title of the window the images are chosen in, such as "Choose a photo". */
|
|
27
|
+
readonly dialogTitle: string;
|
|
28
|
+
/** The name of that window's close button, such as "Close". */
|
|
29
|
+
readonly closeLabel: string;
|
|
30
|
+
/** Shown in the window when there are no images, such as "This site has no photos yet." */
|
|
31
|
+
readonly emptyText: string;
|
|
32
|
+
/**
|
|
33
|
+
* Takes a file the person picked from their computer. Give it and the window offers an upload.
|
|
34
|
+
* Resolve once the image is in `images` and chosen, and the window closes; reject and it
|
|
35
|
+
* stays open, for `uploadError` to say why.
|
|
36
|
+
*/
|
|
37
|
+
readonly onUpload?: (file: File) => Promise<void>;
|
|
38
|
+
/** The upload button's words, such as "Upload a photo". Needed with `onUpload`. */
|
|
39
|
+
readonly uploadLabel?: string;
|
|
40
|
+
/** Shown beside the upload button, such as "JPEG, PNG or WebP". */
|
|
41
|
+
readonly uploadHint?: string;
|
|
42
|
+
/** Why the last upload did not work. */
|
|
43
|
+
readonly uploadError?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Given, only the window is drawn, and whoever gave it opens and closes it: for choosing an
|
|
46
|
+
* image from somewhere other than the field, such as the page the image is shown on.
|
|
47
|
+
*/
|
|
48
|
+
readonly window?: {
|
|
49
|
+
readonly isOpen: boolean;
|
|
50
|
+
readonly onOpenChange: (isOpen: boolean) => void;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** Shows the image a field holds and lets a person choose another from the site's images. */
|
|
54
|
+
export declare function ImagePicker({ label, isLabelHidden, description, errorMessage, isRequired, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, window: held, }: ImagePickerProps): import("react").JSX.Element;
|
|
55
|
+
//# sourceMappingURL=ImagePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePicker.d.ts","sourceRoot":"","sources":["../../../src/patterns/ImagePicker/ImagePicker.tsx"],"names":[],"mappings":"AA0BA,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,QA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AwC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;CAClG;AAKD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,YAAY,EACZ,UAAkB,EAClB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,MAAM,EAAE,IAAI,GACb,EAAE,gBAAgB,+BA0FlB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ImageOff, Upload } from 'lucide-react';
|
|
3
|
+
import { useId, useState } from 'react';
|
|
4
|
+
import { FileTrigger, ListBox, ListBoxItem } from 'react-aria-components';
|
|
5
|
+
import { Button } from '../../components/Button/index.js';
|
|
6
|
+
import { Dialog } from '../../components/Dialog/index.js';
|
|
7
|
+
import { imagePickerChoiceClass, imagePickerChoiceImageClass, imagePickerChoiceNameClass, imagePickerChoicesClass, imagePickerClass, imagePickerDescriptionClass, imagePickerEmptyClass, imagePickerErrorClass, imagePickerLabelVariants, imagePickerNameClass, imagePickerPlaceholderClass, imagePickerPlaceholderIconClass, imagePickerRequiredMarkClass, imagePickerRowClass, imagePickerThumbClass, imagePickerUploadClass, imagePickerUploadErrorClass, imagePickerUploadHintClass, } from './ImagePicker.variants.js';
|
|
8
|
+
/** The kinds of file the file chooser offers. What a file really is, the server decides. */
|
|
9
|
+
const IMAGE_FILES = ['image/jpeg', 'image/png', 'image/webp'];
|
|
10
|
+
/** Shows the image a field holds and lets a person choose another from the site's images. */
|
|
11
|
+
export function ImagePicker({ label, isLabelHidden = false, description, errorMessage, isRequired = false, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, window: held, }) {
|
|
12
|
+
const labelId = useId();
|
|
13
|
+
const [isOwnOpen, setOwnOpen] = useState(false);
|
|
14
|
+
const isOpen = held ? held.isOpen : isOwnOpen;
|
|
15
|
+
const setOpen = held ? held.onOpenChange : setOwnOpen;
|
|
16
|
+
const [isUploading, setUploading] = useState(false);
|
|
17
|
+
const upload = async (file) => {
|
|
18
|
+
if (!file || !onUpload)
|
|
19
|
+
return;
|
|
20
|
+
setUploading(true);
|
|
21
|
+
try {
|
|
22
|
+
await onUpload(file);
|
|
23
|
+
setOpen(false);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// The window stays open. Whoever gave `onUpload` says what went wrong, in `uploadError`.
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
setUploading(false);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const chosen = images.find((image) => image.name === value);
|
|
33
|
+
const choosing = (_jsxs(Dialog, { isOpen: isOpen, onOpenChange: setOpen, title: dialogTitle, closeLabel: closeLabel, size: "lg", children: [onUpload && uploadLabel !== undefined && (_jsxs("div", { className: imagePickerUploadClass, children: [_jsx(FileTrigger, { acceptedFileTypes: IMAGE_FILES, onSelect: (files) => void upload(files?.[0]), children: _jsx(Button, { variant: "secondary", size: "sm", icon: Upload, isPending: isUploading, children: uploadLabel }) }), uploadError !== undefined ? (_jsx("p", { role: "alert", className: imagePickerUploadErrorClass, children: uploadError })) : (uploadHint !== undefined && _jsx("p", { className: imagePickerUploadHintClass, children: uploadHint }))] })), _jsx(ListBox, { "aria-label": dialogTitle, layout: "grid", selectionMode: "single", autoFocus: true, selectedKeys: value === null ? [] : [value], onSelectionChange: (keys) => {
|
|
34
|
+
const [name] = keys === 'all' ? [] : [...keys];
|
|
35
|
+
if (typeof name === 'string')
|
|
36
|
+
onChange(name);
|
|
37
|
+
setOpen(false);
|
|
38
|
+
}, renderEmptyState: () => _jsx("p", { className: imagePickerEmptyClass, children: emptyText }), className: imagePickerChoicesClass, children: images.map((image) => (_jsxs(ListBoxItem, { id: image.name, textValue: image.name, className: imagePickerChoiceClass, children: [_jsx("img", { src: image.url, alt: "", loading: "lazy", className: imagePickerChoiceImageClass }), _jsx("span", { className: imagePickerChoiceNameClass, children: image.name })] }, image.name))) })] }));
|
|
39
|
+
if (held)
|
|
40
|
+
return choosing;
|
|
41
|
+
return (_jsxs("div", { role: "group", "aria-labelledby": labelId, className: imagePickerClass, children: [_jsxs("span", { id: labelId, className: imagePickerLabelVariants({ isLabelHidden }), children: [label, isRequired && (_jsx("span", { "aria-hidden": "true", className: imagePickerRequiredMarkClass, children: ' *' }))] }), _jsxs("div", { className: imagePickerRowClass, children: [chosen ? (_jsx("img", { src: chosen.url, alt: "", loading: "lazy", className: imagePickerThumbClass })) : (_jsx("span", { className: imagePickerPlaceholderClass, children: _jsx(ImageOff, { "aria-hidden": "true", className: imagePickerPlaceholderIconClass }) })), _jsx("span", { className: imagePickerNameClass, children: value ?? noneText }), _jsx(Button, { variant: "secondary", size: "sm", onPress: () => setOpen(true), children: value === null ? chooseLabel : changeLabel })] }), description !== undefined && _jsx("p", { className: imagePickerDescriptionClass, children: description }), errorMessage !== undefined && _jsx("p", { className: imagePickerErrorClass, children: errorMessage }), choosing] }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ImagePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePicker.js","sourceRoot":"","sources":["../../../src/patterns/ImagePicker/ImagePicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;A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