@15gifts/back-office-kit 0.0.0-stage → 0.1.0-alpha.1
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 +39 -0
- package/README.md +49 -2
- package/bin/back-office-kit.js +35 -0
- package/dist/browser/back-office-kit.js +22186 -0
- package/dist/components/Alert/Alert.css.d.ts +33 -0
- package/dist/components/Alert/Alert.d.ts +24 -0
- package/dist/components/Alert/Alert.js +63 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/Alert/Alert.styles.js +17 -0
- package/dist/components/Alert/Alert.styles.js.map +1 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AppShell/AppShell.css.d.ts +9 -0
- package/dist/components/AppShell/AppShell.d.ts +22 -0
- package/dist/components/AppShell/AppShell.js +48 -0
- package/dist/components/AppShell/AppShell.js.map +1 -0
- package/dist/components/AppShell/AppShell.styles.js +7 -0
- package/dist/components/AppShell/AppShell.styles.js.map +1 -0
- package/dist/components/AppShell/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.css.d.ts +22 -0
- package/dist/components/Avatar/Avatar.d.ts +14 -0
- package/dist/components/Avatar/Avatar.js +30 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/Avatar.styles.js +16 -0
- package/dist/components/Avatar/Avatar.styles.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.css.d.ts +16 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/Badge.js +18 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/Badge.styles.js +87 -0
- package/dist/components/Badge/Badge.styles.js.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css.d.ts +7 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +24 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +51 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.styles.js +7 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Button/Button.css.d.ts +74 -0
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/components/Button/Button.js +54 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.styles.js +29 -0
- package/dist/components/Button/Button.styles.js.map +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.css.d.ts +37 -0
- package/dist/components/Card/Card.d.ts +18 -0
- package/dist/components/Card/Card.js +38 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/Card.styles.js +18 -0
- package/dist/components/Card/Card.styles.js.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/ChatTranscript/ChatTranscript.css.d.ts +15 -0
- package/dist/components/ChatTranscript/ChatTranscript.d.ts +94 -0
- package/dist/components/ChatTranscript/ChatTranscript.js +162 -0
- package/dist/components/ChatTranscript/ChatTranscript.js.map +1 -0
- package/dist/components/ChatTranscript/ChatTranscript.styles.js +6 -0
- package/dist/components/ChatTranscript/ChatTranscript.styles.js.map +1 -0
- package/dist/components/ChatTranscript/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.css.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/components/Checkbox/Checkbox.js +46 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.styles.js +8 -0
- package/dist/components/Checkbox/Checkbox.styles.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.css.d.ts +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +66 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js +10 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/dist/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/components/Chip/Chip.css.d.ts +4 -0
- package/dist/components/Chip/Chip.d.ts +18 -0
- package/dist/components/Chip/Chip.js +40 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/Chip.styles.js +7 -0
- package/dist/components/Chip/Chip.styles.js.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.css.d.ts +5 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +19 -0
- package/dist/components/ColorPicker/ColorPicker.js +79 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.styles.js +6 -0
- package/dist/components/ColorPicker/ColorPicker.styles.js.map +1 -0
- package/dist/components/ColorPicker/color.d.ts +14 -0
- package/dist/components/ColorPicker/color.js +39 -0
- package/dist/components/ColorPicker/color.js.map +1 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/Combobox/Combobox.d.ts +82 -0
- package/dist/components/Combobox/Combobox.js +177 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/CopyButton/CopyButton.d.ts +11 -0
- package/dist/components/CopyButton/CopyButton.js +40 -0
- package/dist/components/CopyButton/CopyButton.js.map +1 -0
- package/dist/components/CopyButton/index.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.css.d.ts +31 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +58 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +258 -0
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.styles.js +8 -0
- package/dist/components/DateRangePicker/DateRangePicker.styles.js.map +1 -0
- package/dist/components/DateRangePicker/index.d.ts +4 -0
- package/dist/components/DateRangePicker/presets.d.ts +27 -0
- package/dist/components/DateRangePicker/presets.js +62 -0
- package/dist/components/DateRangePicker/presets.js.map +1 -0
- package/dist/components/DateTimeInput/DateTimeInput.css.d.ts +1 -0
- package/dist/components/DateTimeInput/DateTimeInput.d.ts +9 -0
- package/dist/components/DateTimeInput/DateTimeInput.js +29 -0
- package/dist/components/DateTimeInput/DateTimeInput.js.map +1 -0
- package/dist/components/DateTimeInput/DateTimeInput.styles.js +8 -0
- package/dist/components/DateTimeInput/DateTimeInput.styles.js.map +1 -0
- package/dist/components/DateTimeInput/index.d.ts +2 -0
- package/dist/components/DescriptionList/DescriptionList.css.d.ts +62 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +23 -0
- package/dist/components/DescriptionList/DescriptionList.js +27 -0
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/DescriptionList/DescriptionList.styles.js +42 -0
- package/dist/components/DescriptionList/DescriptionList.styles.js.map +1 -0
- package/dist/components/DescriptionList/index.d.ts +2 -0
- package/dist/components/DetailsSummary/DetailsSummary.css.d.ts +5 -0
- package/dist/components/DetailsSummary/DetailsSummary.d.ts +11 -0
- package/dist/components/DetailsSummary/DetailsSummary.js +26 -0
- package/dist/components/DetailsSummary/DetailsSummary.js.map +1 -0
- package/dist/components/DetailsSummary/DetailsSummary.styles.js +15 -0
- package/dist/components/DetailsSummary/DetailsSummary.styles.js.map +1 -0
- package/dist/components/DetailsSummary/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.css.d.ts +14 -0
- package/dist/components/Drawer/Drawer.d.ts +42 -0
- package/dist/components/Drawer/Drawer.js +75 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/Drawer.styles.js +17 -0
- package/dist/components/Drawer/Drawer.styles.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/EmptyLine/EmptyLine.css.d.ts +11 -0
- package/dist/components/EmptyLine/EmptyLine.d.ts +7 -0
- package/dist/components/EmptyLine/EmptyLine.js +19 -0
- package/dist/components/EmptyLine/EmptyLine.js.map +1 -0
- package/dist/components/EmptyLine/EmptyLine.styles.js +12 -0
- package/dist/components/EmptyLine/EmptyLine.styles.js.map +1 -0
- package/dist/components/EmptyLine/index.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.css.d.ts +16 -0
- package/dist/components/EmptyState/EmptyState.d.ts +15 -0
- package/dist/components/EmptyState/EmptyState.js +37 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.styles.js +15 -0
- package/dist/components/EmptyState/EmptyState.styles.js.map +1 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.css.d.ts +24 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.d.ts +17 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.js +32 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.js.map +1 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.styles.js +17 -0
- package/dist/components/EnvironmentChip/EnvironmentChip.styles.js.map +1 -0
- package/dist/components/EnvironmentChip/index.d.ts +2 -0
- package/dist/components/Field/Field.css.d.ts +13 -0
- package/dist/components/Field/Field.d.ts +57 -0
- package/dist/components/Field/Field.js +58 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/Field.styles.js +6 -0
- package/dist/components/Field/Field.styles.js.map +1 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Fieldset/Fieldset.css.d.ts +6 -0
- package/dist/components/Fieldset/Fieldset.d.ts +11 -0
- package/dist/components/Fieldset/Fieldset.js +32 -0
- package/dist/components/Fieldset/Fieldset.js.map +1 -0
- package/dist/components/Fieldset/Fieldset.styles.js +6 -0
- package/dist/components/Fieldset/Fieldset.styles.js.map +1 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/Grid/Grid.css.d.ts +22 -0
- package/dist/components/Grid/Grid.d.ts +21 -0
- package/dist/components/Grid/Grid.js +23 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/Grid.styles.js +28 -0
- package/dist/components/Grid/Grid.styles.js.map +1 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Heading/Heading.css.d.ts +21 -0
- package/dist/components/Heading/Heading.d.ts +11 -0
- package/dist/components/Heading/Heading.js +22 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Heading/Heading.styles.js +18 -0
- package/dist/components/Heading/Heading.styles.js.map +1 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Icon/Icon.css.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +24 -0
- package/dist/components/Icon/Icon.js +24 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/Icon.styles.js +6 -0
- package/dist/components/Icon/Icon.styles.js.map +1 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/List/List.css.d.ts +4 -0
- package/dist/components/List/List.d.ts +13 -0
- package/dist/components/List/List.js +28 -0
- package/dist/components/List/List.js.map +1 -0
- package/dist/components/List/List.styles.js +6 -0
- package/dist/components/List/List.styles.js.map +1 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/Loader/Loader.css.d.ts +1 -0
- package/dist/components/Loader/Loader.d.ts +12 -0
- package/dist/components/Loader/Loader.js +27 -0
- package/dist/components/Loader/Loader.js.map +1 -0
- package/dist/components/Loader/Loader.styles.js +7 -0
- package/dist/components/Loader/Loader.styles.js.map +1 -0
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/Menu/Menu.css.d.ts +9 -0
- package/dist/components/Menu/Menu.d.ts +114 -0
- package/dist/components/Menu/Menu.js +140 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/Menu.styles.js +6 -0
- package/dist/components/Menu/Menu.styles.js.map +1 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/MetricBar/MetricBar.css.d.ts +10 -0
- package/dist/components/MetricBar/MetricBar.d.ts +28 -0
- package/dist/components/MetricBar/MetricBar.js +51 -0
- package/dist/components/MetricBar/MetricBar.js.map +1 -0
- package/dist/components/MetricBar/MetricBar.styles.js +20 -0
- package/dist/components/MetricBar/MetricBar.styles.js.map +1 -0
- package/dist/components/MetricBar/index.d.ts +2 -0
- package/dist/components/Modal/Modal.css.d.ts +24 -0
- package/dist/components/Modal/Modal.d.ts +22 -0
- package/dist/components/Modal/Modal.js +64 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/Modal.styles.js +17 -0
- package/dist/components/Modal/Modal.styles.js.map +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/NavRail/HumaraLogo.d.ts +5 -0
- package/dist/components/NavRail/HumaraLogo.js +33 -0
- package/dist/components/NavRail/HumaraLogo.js.map +1 -0
- package/dist/components/NavRail/NavRail.css.d.ts +11 -0
- package/dist/components/NavRail/NavRail.d.ts +68 -0
- package/dist/components/NavRail/NavRail.js +129 -0
- package/dist/components/NavRail/NavRail.js.map +1 -0
- package/dist/components/NavRail/NavRail.styles.js +8 -0
- package/dist/components/NavRail/NavRail.styles.js.map +1 -0
- package/dist/components/NavRail/index.d.ts +2 -0
- package/dist/components/NumberInput/NumberInput.d.ts +21 -0
- package/dist/components/NumberInput/NumberInput.js +59 -0
- package/dist/components/NumberInput/NumberInput.js.map +1 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/PageHeader/PageHeader.css.d.ts +8 -0
- package/dist/components/PageHeader/PageHeader.d.ts +15 -0
- package/dist/components/PageHeader/PageHeader.js +40 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/PageHeader/PageHeader.styles.js +6 -0
- package/dist/components/PageHeader/PageHeader.styles.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.css.d.ts +3 -0
- package/dist/components/Pagination/Pagination.d.ts +19 -0
- package/dist/components/Pagination/Pagination.js +61 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/Pagination.styles.js +6 -0
- package/dist/components/Pagination/Pagination.styles.js.map +1 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Popover/Popover.css.d.ts +4 -0
- package/dist/components/Popover/Popover.d.ts +26 -0
- package/dist/components/Popover/Popover.js +44 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Popover/Popover.styles.js +7 -0
- package/dist/components/Popover/Popover.styles.js.map +1 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/PortalContainer/PortalContainer.d.ts +18 -0
- package/dist/components/PortalContainer/PortalContainer.js +17 -0
- package/dist/components/PortalContainer/PortalContainer.js.map +1 -0
- package/dist/components/PortalContainer/index.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.css.d.ts +8 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +22 -0
- package/dist/components/ProgressBar/ProgressBar.js +64 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.styles.js +11 -0
- package/dist/components/ProgressBar/ProgressBar.styles.js.map +1 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/RadioCards/RadioCards.css.d.ts +6 -0
- package/dist/components/RadioCards/RadioCards.d.ts +26 -0
- package/dist/components/RadioCards/RadioCards.js +65 -0
- package/dist/components/RadioCards/RadioCards.js.map +1 -0
- package/dist/components/RadioCards/RadioCards.styles.js +6 -0
- package/dist/components/RadioCards/RadioCards.styles.js.map +1 -0
- package/dist/components/RadioCards/index.d.ts +2 -0
- package/dist/components/SaveBar/SaveBar.css.d.ts +5 -0
- package/dist/components/SaveBar/SaveBar.d.ts +19 -0
- package/dist/components/SaveBar/SaveBar.js +44 -0
- package/dist/components/SaveBar/SaveBar.js.map +1 -0
- package/dist/components/SaveBar/SaveBar.styles.js +6 -0
- package/dist/components/SaveBar/SaveBar.styles.js.map +1 -0
- package/dist/components/SaveBar/index.d.ts +2 -0
- package/dist/components/Select/Select.css.d.ts +5 -0
- package/dist/components/Select/Select.d.ts +56 -0
- package/dist/components/Select/Select.js +118 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/Select.styles.js +8 -0
- package/dist/components/Select/Select.styles.js.map +1 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.js +38 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.styles.js +17 -0
- package/dist/components/Skeleton/Skeleton.styles.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Stack/Stack.css.d.ts +54 -0
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/Stack.js +21 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Stack/Stack.styles.js +39 -0
- package/dist/components/Stack/Stack.styles.js.map +1 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/StatCard/StatCard.css.d.ts +4 -0
- package/dist/components/StatCard/StatCard.d.ts +11 -0
- package/dist/components/StatCard/StatCard.js +27 -0
- package/dist/components/StatCard/StatCard.js.map +1 -0
- package/dist/components/StatCard/StatCard.styles.js +6 -0
- package/dist/components/StatCard/StatCard.styles.js.map +1 -0
- package/dist/components/StatCard/index.d.ts +2 -0
- package/dist/components/StatsGrid/StatsGrid.css.d.ts +1 -0
- package/dist/components/StatsGrid/StatsGrid.d.ts +4 -0
- package/dist/components/StatsGrid/StatsGrid.js +13 -0
- package/dist/components/StatsGrid/StatsGrid.js.map +1 -0
- package/dist/components/StatsGrid/StatsGrid.styles.js +6 -0
- package/dist/components/StatsGrid/StatsGrid.styles.js.map +1 -0
- package/dist/components/StatsGrid/index.d.ts +2 -0
- package/dist/components/StatusBadge/StatusBadge.css.d.ts +53 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +10 -0
- package/dist/components/StatusBadge/StatusBadge.js +17 -0
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +19 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js.map +1 -0
- package/dist/components/StatusBadge/index.d.ts +2 -0
- package/dist/components/Switch/Switch.css.d.ts +3 -0
- package/dist/components/Switch/Switch.d.ts +11 -0
- package/dist/components/Switch/Switch.js +37 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/Switch.styles.js +8 -0
- package/dist/components/Switch/Switch.styles.js.map +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switcher/Switcher.css.d.ts +32 -0
- package/dist/components/Switcher/Switcher.d.ts +80 -0
- package/dist/components/Switcher/Switcher.js +158 -0
- package/dist/components/Switcher/Switcher.js.map +1 -0
- package/dist/components/Switcher/Switcher.styles.js +16 -0
- package/dist/components/Switcher/Switcher.styles.js.map +1 -0
- package/dist/components/Switcher/index.d.ts +2 -0
- package/dist/components/Table/Table.css.d.ts +31 -0
- package/dist/components/Table/Table.d.ts +163 -0
- package/dist/components/Table/Table.js +248 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Table/Table.styles.js +12 -0
- package/dist/components/Table/Table.styles.js.map +1 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/TableAction/TableAction.d.ts +10 -0
- package/dist/components/TableAction/TableAction.js +19 -0
- package/dist/components/TableAction/TableAction.js.map +1 -0
- package/dist/components/TableAction/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.css.d.ts +6 -0
- package/dist/components/Tabs/Tabs.d.ts +69 -0
- package/dist/components/Tabs/Tabs.js +67 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.styles.js +7 -0
- package/dist/components/Tabs/Tabs.styles.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tag/Tag.css.d.ts +42 -0
- package/dist/components/Tag/Tag.d.ts +10 -0
- package/dist/components/Tag/Tag.js +30 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/Tag.styles.js +23 -0
- package/dist/components/Tag/Tag.styles.js.map +1 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/TextInput/TextInput.css.d.ts +1 -0
- package/dist/components/TextInput/TextInput.d.ts +27 -0
- package/dist/components/TextInput/TextInput.js +59 -0
- package/dist/components/TextInput/TextInput.js.map +1 -0
- package/dist/components/TextInput/TextInput.styles.js +6 -0
- package/dist/components/TextInput/TextInput.styles.js.map +1 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/useCharCount.d.ts +15 -0
- package/dist/components/TextInput/useCharCount.js +14 -0
- package/dist/components/TextInput/useCharCount.js.map +1 -0
- package/dist/components/Textarea/Textarea.css.d.ts +4 -0
- package/dist/components/Textarea/Textarea.d.ts +19 -0
- package/dist/components/Textarea/Textarea.js +59 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/Textarea.styles.js +8 -0
- package/dist/components/Textarea/Textarea.styles.js.map +1 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/ThemeMenu/ThemeMenu.d.ts +13 -0
- package/dist/components/ThemeMenu/ThemeMenu.js +52 -0
- package/dist/components/ThemeMenu/ThemeMenu.js.map +1 -0
- package/dist/components/ThemeMenu/index.d.ts +2 -0
- package/dist/components/ThemePicker/ThemePicker.css.d.ts +10 -0
- package/dist/components/ThemePicker/ThemePicker.d.ts +26 -0
- package/dist/components/ThemePicker/ThemePicker.js +76 -0
- package/dist/components/ThemePicker/ThemePicker.js.map +1 -0
- package/dist/components/ThemePicker/ThemePicker.styles.js +7 -0
- package/dist/components/ThemePicker/ThemePicker.styles.js.map +1 -0
- package/dist/components/ThemePicker/index.d.ts +2 -0
- package/dist/components/TimeInput/TimeInput.d.ts +10 -0
- package/dist/components/TimeInput/TimeInput.js +29 -0
- package/dist/components/TimeInput/TimeInput.js.map +1 -0
- package/dist/components/TimeInput/index.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.css.d.ts +4 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +43 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +69 -0
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.styles.js +13 -0
- package/dist/components/ToggleGroup/ToggleGroup.styles.js.map +1 -0
- package/dist/components/ToggleGroup/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.css.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.js +33 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.styles.js +6 -0
- package/dist/components/Tooltip/Tooltip.styles.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TopBar/TopBar.css.d.ts +3 -0
- package/dist/components/TopBar/TopBar.d.ts +9 -0
- package/dist/components/TopBar/TopBar.js +20 -0
- package/dist/components/TopBar/TopBar.js.map +1 -0
- package/dist/components/TopBar/TopBar.styles.js +6 -0
- package/dist/components/TopBar/TopBar.styles.js.map +1 -0
- package/dist/components/TopBar/index.d.ts +2 -0
- package/dist/components/UserMenu/UserMenu.css.d.ts +5 -0
- package/dist/components/UserMenu/UserMenu.d.ts +27 -0
- package/dist/components/UserMenu/UserMenu.js +55 -0
- package/dist/components/UserMenu/UserMenu.js.map +1 -0
- package/dist/components/UserMenu/UserMenu.styles.js +7 -0
- package/dist/components/UserMenu/UserMenu.styles.js.map +1 -0
- package/dist/components/UserMenu/index.d.ts +2 -0
- package/dist/examples/Crm.css.d.ts +3 -0
- package/dist/examples/ExampleShell.d.ts +28 -0
- package/dist/examples/Expenses.css.d.ts +2 -0
- package/dist/examples/HiringTracker.css.d.ts +13 -0
- package/dist/examples/SalesPipeline.css.d.ts +11 -0
- package/dist/foundations/Foundations.css.d.ts +12 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +67 -0
- package/dist/styles/input.css.d.ts +26 -0
- package/dist/styles/input.styles.js +7 -0
- package/dist/styles/input.styles.js.map +1 -0
- package/dist/styles/shared.css.d.ts +13 -0
- package/dist/styles/shared.styles.js +6 -0
- package/dist/styles/shared.styles.js.map +1 -0
- package/dist/styles.css +4 -0
- package/dist/theme/fontSize.d.ts +15 -0
- package/dist/theme/fontSize.js +16 -0
- package/dist/theme/fontSize.js.map +1 -0
- package/dist/theme/htmlSetting.d.ts +14 -0
- package/dist/theme/htmlSetting.js +33 -0
- package/dist/theme/htmlSetting.js.map +1 -0
- package/dist/theme/theme.d.ts +29 -0
- package/dist/theme/theme.js +37 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/tokens/contract.css.d.ts +120 -0
- package/dist/tokens/contract.styles.js +68 -0
- package/dist/tokens/contract.styles.js.map +1 -0
- package/dist/tokens/global.css.d.ts +0 -0
- package/dist/tokens/global.styles.js +2 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/palette.d.ts +16 -0
- package/dist/tokens/palette.js +18 -0
- package/dist/tokens/palette.js.map +1 -0
- package/dist/tokens/scale.d.ts +51 -0
- package/dist/tokens/scale.js +47 -0
- package/dist/tokens/scale.js.map +1 -0
- package/dist/tokens/themes.css.d.ts +387 -0
- package/dist/tokens.js +4 -0
- package/package.json +111 -4
- package/skills/back-office-kit/SKILL.md +49 -0
- package/skills/back-office-kit/references/artifact-template.html +103 -0
- package/skills/back-office-kit/references/components.md +1470 -0
- package/skills/back-office-kit/references/install.md +210 -0
- package/skills/back-office-kit/references/migrate.md +142 -0
- package/skills/back-office-kit/references/patterns.md +294 -0
- package/skills/back-office-kit/references/testing.md +162 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { chip as e } from "./EnvironmentChip.styles.js";
|
|
2
|
+
import { visuallyHidden as t } from "../../styles/shared.styles.js";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/EnvironmentChip/EnvironmentChip.tsx
|
|
6
|
+
var a = [
|
|
7
|
+
[/pre-?prod|stag|uat|\bqa\b|test/, "highlight"],
|
|
8
|
+
[/prod|live/, "danger"],
|
|
9
|
+
[/dev|ephemeral|preview|sandbox|demo/, "info"]
|
|
10
|
+
];
|
|
11
|
+
function o(e) {
|
|
12
|
+
let t = e.toLowerCase();
|
|
13
|
+
return a.find(([e]) => e.test(t))?.[1] ?? "neutral";
|
|
14
|
+
}
|
|
15
|
+
function s({ environment: a, className: s, ...c }) {
|
|
16
|
+
let l = o(a);
|
|
17
|
+
return /* @__PURE__ */ i("span", {
|
|
18
|
+
className: n(e({ tone: l }), s),
|
|
19
|
+
"data-tone": l,
|
|
20
|
+
...c,
|
|
21
|
+
children: [/* @__PURE__ */ r("span", {
|
|
22
|
+
"aria-hidden": !0,
|
|
23
|
+
children: "●"
|
|
24
|
+
}), /* @__PURE__ */ i("span", { children: [/* @__PURE__ */ r("span", {
|
|
25
|
+
className: t,
|
|
26
|
+
children: "Environment: "
|
|
27
|
+
}), a] })]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export { s as EnvironmentChip, o as environmentTone };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=EnvironmentChip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentChip.js","names":["styles.chip","TONES","environmentTone","name","environment","pattern","EnvironmentChip","props","tone","clsx","chip","className","visuallyHidden"],"sources":["../../../src/components/EnvironmentChip/EnvironmentChip.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps } from 'react'\n\nimport * as styles from './EnvironmentChip.css'\nimport { visuallyHidden } from '../../styles/shared.css'\n\nexport type EnvironmentTone = 'danger' | 'highlight' | 'info' | 'neutral'\n\nconst TONES: [RegExp, EnvironmentTone][] = [\n // Checked in order: \"preprod\" is a test environment, not production.\n [/pre-?prod|stag|uat|\\bqa\\b|test/, 'highlight'],\n [/prod|live/, 'danger'],\n [/dev|ephemeral|preview|sandbox|demo/, 'info'],\n]\n\n/**\n * The colour an environment name gets: production and live are `danger`; staging, UAT, QA, test\n * and pre-prod are `highlight`; dev, ephemeral, preview, sandbox and demo are `info`; anything\n * else (e.g. local) is `neutral`.\n */\nexport function environmentTone(environment: string): EnvironmentTone {\n const name = environment.toLowerCase()\n return TONES.find(([pattern]) => pattern.test(name))?.[1] ?? 'neutral'\n}\n\nexport interface EnvironmentChipProps extends ComponentProps<'span'> {\n /** Environment name, shown as given, e.g. \"Staging\". Its colour comes from the name (see `environmentTone`). */\n environment: string\n}\n\n/**\n * Shows which environment the app is pointed at, coloured by its name so production always stands\n * out. Put it in the TopBar `end` slot.\n */\nexport function EnvironmentChip({ environment, className, ...props }: EnvironmentChipProps) {\n const tone = environmentTone(environment)\n return (\n <span className={clsx(styles.chip({ tone }), className)} data-tone={tone} {...props}>\n <span aria-hidden>●</span>\n <span>\n <span className={visuallyHidden}>Environment: </span>\n {environment}\n </span>\n </span>\n )\n}\n"],"mappings":";;;;;AAQA,IAAMC,IAAqC;CAEzC,CAAC,kCAAkC,WAAW;CAC9C,CAAC,aAAa,QAAQ;CACtB,CAAC,sCAAsC,MAAM;AAC/C;AAOA,SAAgBC,EAAgB,GAAsC;CACpE,IAAMC,IAAOC,EAAY,YAAY;CACrC,OAAOH,EAAM,MAAM,CAACI,OAAaA,EAAQ,KAAKF,CAAI,CAAC,CAAC,GAAG,MAAM;AAC/D;AAWA,SAAgBG,EAAgB,EAAE,gBAAa,cAAW,GAAGC,KAA+B;CAC1F,IAAMC,IAAON,EAAgBE,CAAW;CACxC,OACE,kBAAC,QAAD;EAAM,WAAWK,EAAKT,EAAY,EAAE,QAAK,CAAC,GAAGW,CAAS;EAAG,aAAWH;EAAM,GAAID;EAA9E,UAAA,CACE,kBAAC,QAAD;GAAM,eAAA;GAAY,UAAA;EAAO,CAAA,GACzB,kBAAC,QAAD,EAAA,UAAA,CACE,kBAAC,QAAD;GAAM,WAAWK;GAAgB,UAAA;EAAmB,CAAA,GACnDR,CACG,EAAA,CAAA,CACF;;AAEV"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
+
// src/components/EnvironmentChip/EnvironmentChip.css.ts
|
|
4
|
+
var t = e({
|
|
5
|
+
defaultClassName: "_1iu246r0",
|
|
6
|
+
variantClassNames: { tone: {
|
|
7
|
+
highlight: "_1iu246r1",
|
|
8
|
+
danger: "_1iu246r2",
|
|
9
|
+
info: "_1iu246r3",
|
|
10
|
+
neutral: "_1iu246r4"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: {},
|
|
13
|
+
compoundVariants: []
|
|
14
|
+
});
|
|
15
|
+
export { t as chip };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=EnvironmentChip.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentChip.styles.js","names":["_7a468","chip","createRuntimeFn"],"sources":["../../../src/components/EnvironmentChip/EnvironmentChip.css.ts"],"sourcesContent":["import { recipe } from '@vanilla-extract/recipes'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, radius, space } from '../../tokens/scale'\n\nexport const chip = recipe({\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: space['1.5'],\n height: '1.75rem',\n paddingInline: space['2.5'],\n borderRadius: radius.full,\n border: '1px solid',\n fontFamily: vars.font.sans,\n fontSize: fontSize.xs,\n fontWeight: fontWeight.medium,\n whiteSpace: 'nowrap',\n },\n variants: {\n tone: {\n highlight: {\n backgroundColor: vars.color.highlightSubtle,\n borderColor: vars.color.highlight,\n color: vars.color.highlightInk,\n },\n danger: {\n backgroundColor: vars.color.dangerSubtle,\n borderColor: vars.color.danger,\n color: vars.color.dangerInk,\n },\n info: {\n backgroundColor: vars.color.infoSubtle,\n borderColor: vars.color.info,\n color: vars.color.infoInk,\n },\n neutral: {\n backgroundColor: vars.color.neutralSubtle,\n borderColor: vars.color.border,\n color: vars.color.neutralInk,\n },\n },\n },\n})\n"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Indents the description and error, e.g. to line up with a checkbox's label text. */
|
|
2
|
+
export declare const messageInset: `var(--${string})`;
|
|
3
|
+
export declare const root: string;
|
|
4
|
+
export declare const label: string;
|
|
5
|
+
export declare const required: string;
|
|
6
|
+
export declare const description: string;
|
|
7
|
+
export declare const error: string;
|
|
8
|
+
export declare const errorIcon: string;
|
|
9
|
+
/** A label wrapping a checkbox, switch or radio and its text. */
|
|
10
|
+
export declare const inlineLabel: string;
|
|
11
|
+
/** A `<fieldset>` reset to lay out like a field. */
|
|
12
|
+
export declare const fieldset: string;
|
|
13
|
+
export declare const legend: string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
/** The label, description and error props every input shares. */
|
|
4
|
+
export interface FieldBaseProps {
|
|
5
|
+
/** Visible label, also the input's accessible name. */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Help text under the input, linked with `aria-describedby`. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Error message. When set, the input is marked invalid and the message is announced. */
|
|
10
|
+
error?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Native `required`: the label gets an asterisk and the browser blocks submitting an empty
|
|
13
|
+
* field. When a form library validates instead, keep `required` and put `noValidate` on the `<form>`.
|
|
14
|
+
*/
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Disables the input and greys out the label. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** `data-*` attributes, e.g. `{ 'data-testid': 'name-field' }`. */
|
|
20
|
+
export type DataAttributes = {
|
|
21
|
+
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
/** Props for an inner part (trigger, popup, item…): its own props plus `data-*`, with a string `className`. */
|
|
24
|
+
export type PartProps<P> = Partial<Omit<P, 'className' | 'children'>> & {
|
|
25
|
+
className?: string;
|
|
26
|
+
} & DataAttributes;
|
|
27
|
+
/** Props for the `Field` root element (the wrapper around label, input and messages). */
|
|
28
|
+
export type FieldRootProps = Omit<BaseField.Root.Props, 'children' | 'invalid' | 'disabled'> & DataAttributes;
|
|
29
|
+
/** Options every labelled input takes besides `FieldBaseProps`. */
|
|
30
|
+
export interface FieldOptionProps {
|
|
31
|
+
/** Hides the label visually. It still names the input for screen readers and tests. */
|
|
32
|
+
hideLabel?: boolean;
|
|
33
|
+
/** Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. */
|
|
34
|
+
fieldProps?: FieldRootProps;
|
|
35
|
+
}
|
|
36
|
+
/** Adds `visuallyHidden` when `hideLabel` is set. */
|
|
37
|
+
export declare const labelClass: (className: string | undefined, hideLabel?: boolean) => string | undefined;
|
|
38
|
+
export interface FieldProps extends FieldBaseProps, Pick<FieldOptionProps, 'hideLabel'>, Omit<BaseField.Root.Props, 'className' | 'children' | 'invalid'> {
|
|
39
|
+
className?: string;
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/** The label text plus the required marker. Used inside `Field.Label` or a part's own label. */
|
|
43
|
+
export declare function FieldLabelText({ label, required }: Pick<FieldBaseProps, 'label' | 'required'>): import('react').JSX.Element;
|
|
44
|
+
export declare const hasError: (error: ReactNode) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Wraps a form control with a label, description and error message. Base UI wires up the label,
|
|
47
|
+
* `aria-describedby` and invalid state for any Base UI control (or `Field.Control`) inside it.
|
|
48
|
+
* Here `required` only adds the asterisk, so put `required` on the control too.
|
|
49
|
+
*/
|
|
50
|
+
export declare function Field({ label, description, error, required, hideLabel, className, children, ...props }: FieldProps): import('react').JSX.Element;
|
|
51
|
+
/** The description (a `<div>`, so it can hold block content) and error parts, for components that lay out their own `Field.Root`. */
|
|
52
|
+
export declare function FieldMessages({ description, error, ids, }: Pick<FieldBaseProps, 'description' | 'error'> & {
|
|
53
|
+
ids?: {
|
|
54
|
+
description: string;
|
|
55
|
+
error: string;
|
|
56
|
+
};
|
|
57
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { root as e } from "./Field.styles.js";
|
|
2
|
+
import "../../styles/shared.styles.js";
|
|
3
|
+
import { clsx as t } from "clsx";
|
|
4
|
+
import { CircleAlert as n } from "lucide-react";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Field as o } from "@base-ui/react/field";
|
|
7
|
+
// src/components/Field/Field.tsx
|
|
8
|
+
var s = (e, n) => t(e, n && "tyvs8e1") || void 0;
|
|
9
|
+
function c({ label: e, required: t }) {
|
|
10
|
+
return /* @__PURE__ */ a(r, { children: [e, t && /* @__PURE__ */ i("span", {
|
|
11
|
+
"aria-hidden": !0,
|
|
12
|
+
className: "oe0y263",
|
|
13
|
+
children: "*"
|
|
14
|
+
})] });
|
|
15
|
+
}
|
|
16
|
+
var l = (e) => e != null && e !== !1 && e !== "";
|
|
17
|
+
function u({ label: n, description: r, error: u, required: f, hideLabel: p, className: m, children: h, ...g }) {
|
|
18
|
+
let _ = l(u);
|
|
19
|
+
return /* @__PURE__ */ a(o.Root, {
|
|
20
|
+
...g,
|
|
21
|
+
invalid: _ || void 0,
|
|
22
|
+
className: t(e, m),
|
|
23
|
+
children: [
|
|
24
|
+
n != null && /* @__PURE__ */ i(o.Label, {
|
|
25
|
+
className: s("oe0y262", p),
|
|
26
|
+
children: /* @__PURE__ */ i(c, {
|
|
27
|
+
label: n,
|
|
28
|
+
required: f
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
h,
|
|
32
|
+
/* @__PURE__ */ i(d, {
|
|
33
|
+
description: r,
|
|
34
|
+
error: u
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function d({ description: e, error: t, ids: s }) {
|
|
40
|
+
return /* @__PURE__ */ a(r, { children: [e != null && /* @__PURE__ */ i(o.Description, {
|
|
41
|
+
id: s?.description,
|
|
42
|
+
render: /* @__PURE__ */ i("div", {}),
|
|
43
|
+
className: "oe0y264",
|
|
44
|
+
children: e
|
|
45
|
+
}), l(t) && /* @__PURE__ */ a(o.Error, {
|
|
46
|
+
id: s?.error,
|
|
47
|
+
match: !0,
|
|
48
|
+
className: "oe0y265",
|
|
49
|
+
children: [/* @__PURE__ */ i(n, {
|
|
50
|
+
size: "1.08em",
|
|
51
|
+
"aria-hidden": !0,
|
|
52
|
+
className: "oe0y266"
|
|
53
|
+
}), /* @__PURE__ */ i("span", { children: t })]
|
|
54
|
+
})] });
|
|
55
|
+
}
|
|
56
|
+
export { u as Field, c as FieldLabelText, d as FieldMessages, l as hasError, s as labelClass };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","names":["_Fragment","required","Field","BaseField","styles.root","label","description","error","labelClass","clsx","className","hideLabel","FieldLabelText","required$1","Fragment","label","hasError","error","Field$1","label$1","props","invalid","Field","root","children","FieldMessages","description$1","error$1","ids","CircleAlert"],"sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import { Field as BaseField } from '@base-ui/react/field'\nimport { clsx } from 'clsx'\nimport { CircleAlert } from 'lucide-react'\nimport type { ReactNode } from 'react'\n\nimport * as styles from './Field.css'\nimport { visuallyHidden } from '../../styles/shared.css'\n\n/** The label, description and error props every input shares. */\nexport interface FieldBaseProps {\n /** Visible label, also the input's accessible name. */\n label?: ReactNode\n /** Help text under the input, linked with `aria-describedby`. */\n description?: ReactNode\n /** Error message. When set, the input is marked invalid and the message is announced. */\n error?: ReactNode\n /**\n * Native `required`: the label gets an asterisk and the browser blocks submitting an empty\n * field. When a form library validates instead, keep `required` and put `noValidate` on the `<form>`.\n */\n required?: boolean\n /** Disables the input and greys out the label. */\n disabled?: boolean\n}\n\n/** `data-*` attributes, e.g. `{ 'data-testid': 'name-field' }`. */\nexport type DataAttributes = { [key: `data-${string}`]: string | number | boolean | undefined }\n\n/** Props for an inner part (trigger, popup, item…): its own props plus `data-*`, with a string `className`. */\nexport type PartProps<P> = Partial<Omit<P, 'className' | 'children'>> & {\n className?: string\n} & DataAttributes\n\n/** Props for the `Field` root element (the wrapper around label, input and messages). */\nexport type FieldRootProps = Omit<BaseField.Root.Props, 'children' | 'invalid' | 'disabled'> &\n DataAttributes\n\n/** Options every labelled input takes besides `FieldBaseProps`. */\nexport interface FieldOptionProps {\n /** Hides the label visually. It still names the input for screen readers and tests. */\n hideLabel?: boolean\n /** Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. */\n fieldProps?: FieldRootProps\n}\n\n/** Adds `visuallyHidden` when `hideLabel` is set. */\nexport const labelClass = (className: string | undefined, hideLabel?: boolean) =>\n clsx(className, hideLabel && visuallyHidden) || undefined\n\nexport interface FieldProps\n extends\n FieldBaseProps,\n Pick<FieldOptionProps, 'hideLabel'>,\n Omit<BaseField.Root.Props, 'className' | 'children' | 'invalid'> {\n className?: string\n children?: ReactNode\n}\n\n/** The label text plus the required marker. Used inside `Field.Label` or a part's own label. */\nexport function FieldLabelText({ label, required }: Pick<FieldBaseProps, 'label' | 'required'>) {\n return (\n <>\n {label}\n {required && (\n <span aria-hidden className={styles.required}>\n *\n </span>\n )}\n </>\n )\n}\n\nexport const hasError = (error: ReactNode) => error != null && error !== false && error !== ''\n\n/**\n * Wraps a form control with a label, description and error message. Base UI wires up the label,\n * `aria-describedby` and invalid state for any Base UI control (or `Field.Control`) inside it.\n * Here `required` only adds the asterisk, so put `required` on the control too.\n */\nexport function Field({\n label,\n description,\n error,\n required,\n hideLabel,\n className,\n children,\n ...props\n}: FieldProps) {\n const invalid = hasError(error)\n return (\n <BaseField.Root\n {...props}\n invalid={invalid || undefined}\n className={clsx(styles.root, className)}\n >\n {label != null && (\n <BaseField.Label className={labelClass(styles.label, hideLabel)}>\n <FieldLabelText label={label} required={required} />\n </BaseField.Label>\n )}\n {children}\n <FieldMessages description={description} error={error} />\n </BaseField.Root>\n )\n}\n\n/** The description (a `<div>`, so it can hold block content) and error parts, for components that lay out their own `Field.Root`. */\nexport function FieldMessages({\n description,\n error,\n ids,\n}: Pick<FieldBaseProps, 'description' | 'error'> & {\n ids?: { description: string; error: string }\n}) {\n return (\n <>\n {description != null && (\n <BaseField.Description\n id={ids?.description}\n render={<div />}\n className={styles.description}\n >\n {description}\n </BaseField.Description>\n )}\n {hasError(error) && (\n <BaseField.Error id={ids?.error} match className={styles.error}>\n <CircleAlert size=\"1.08em\" aria-hidden className={styles.errorIcon} />\n <span>{error}</span>\n </BaseField.Error>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;AA8CA,IAAaQ,KAAc,GAA+B,MACxDC,EAAKC,GAAWC,KAAA,SAA2B,KAAK,KAAA;AAYlD,SAAgBC,EAAe,EAAE,UAAO,UAAAC,KAAwD;CAC9F,OACE,kBAAAb,GAAA,EAAA,UAAA,CACGe,GACAd,KACC,kBAAC,QAAD;EAAM,eAAA;EAAY,WAAW;EAAiB,UAAA;CAExC,CAAA,CAER,EAAA,CAAA;AAEN;AAEA,IAAae,KAAY,MAAqBC,KAAS,QAAQA,MAAU,MAASA,MAAU;AAO5F,SAAgBf,EAAM,EACpB,OAAAiB,GACA,gBACA,UACA,aACA,cACA,cACA,aACA,GAAGC,KACU;CACb,IAAMC,IAAUL,EAASC,CAAK;CAC9B,OACE,kBAACd,EAAU,MAAX;EACE,GAAIiB;EACJ,SAASC,KAAW,KAAA;EACpB,WAAWZ,EAAKL,GAAaM,CAAS;EAHxC,UAAA;GAKGL,KAAS,QACR,kBAACF,EAAU,OAAX;IAAiB,WAAWK,EAAW,WAAcG,CAAS;IAC5D,UAAA,kBAACC,GAAD;KAAuB,OAAAO;KAAiB;IAAW,CAAA;GACpC,CAAA;GAElBK;GACD,kBAACC,GAAD;IAA4B;IAAoB;GAAQ,CAAA;EAC1C;;AAEpB;AAGA,SAAgBA,EAAc,EAC5B,aAAAC,GACA,OAAAC,GACA,UAGC;CACD,OACE,kBAAA3B,GAAA,EAAA,UAAA,CACGM,KAAe,QACd,kBAACH,EAAU,aAAX;EACE,IAAIyB,GAAK;EACT,QAAQ,kBAAC,OAAD,CAAM,CAAA;EACd,WAAW;EAEV,UAAAtB;CACoB,CAAA,GAExBU,EAAST,CAAK,KACb,kBAACJ,EAAU,OAAX;EAAiB,IAAIyB,GAAK;EAAO,OAAA;EAAM,WAAW;EAAlD,UAAA,CACE,kBAACC,GAAD;GAAa,MAAK;GAAS,eAAA;GAAY,WAAW;EAAmB,CAAA,GACrE,kBAAC,QAAD,EAAA,UAAOtB,EAAY,CAAA,CACJ;CAEnB,CAAA,CAAA,EAAA,CAAA;AAEN"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
// src/components/Field/Field.css.ts
|
|
3
|
+
var e = "oe0y261", t = "oe0y262", n = "oe0y263", r = "oe0y264", i = "oe0y265", a = "oe0y266", o = "oe0y267", s = "oe0y268", c = "oe0y269 oe0y262";
|
|
4
|
+
export { r as description, i as error, a as errorIcon, s as fieldset, o as inlineLabel, t as label, c as legend, n as required, e as root };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=Field.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.styles.js","names":["root","label","required","description","error","errorIcon","inlineLabel","fieldset","legend"],"sources":["../../../src/components/Field/Field.css.ts"],"sourcesContent":["import { createVar, style } from '@vanilla-extract/css'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight, space } from '../../tokens/scale'\n\n/** Indents the description and error, e.g. to line up with a checkbox's label text. */\nexport const messageInset = createVar()\n\nexport const root = style({\n vars: { [messageInset]: '0px' },\n display: 'flex',\n flexDirection: 'column',\n gap: space['1.5'],\n minWidth: 0,\n fontFamily: vars.font.sans,\n color: vars.color.ink,\n})\n\nexport const label = style({\n display: 'inline-flex',\n alignItems: 'center',\n gap: space['2'],\n fontSize: fontSize.md,\n fontWeight: fontWeight.medium,\n lineHeight: lineHeight.tight,\n color: vars.color.ink,\n wordBreak: 'break-word',\n selectors: { '&[data-disabled]': { color: vars.color.inkMuted } },\n})\n\nexport const required = style({ color: vars.color.dangerInk, marginInlineStart: `-${space['1']}` })\n\nexport const description = style({\n margin: 0,\n paddingInlineStart: messageInset,\n fontSize: fontSize.md,\n lineHeight: lineHeight.normal,\n color: vars.color.inkMuted,\n})\n\nexport const error = style({\n display: 'flex',\n paddingInlineStart: messageInset,\n alignItems: 'flex-start',\n gap: space['1.5'],\n fontSize: fontSize.sm,\n lineHeight: lineHeight.normal,\n color: vars.color.dangerInk,\n})\n\nexport const errorIcon = style({ flexShrink: 0, marginBlockStart: '0.15em' })\n\n/** A label wrapping a checkbox, switch or radio and its text. */\nexport const inlineLabel = style({\n display: 'inline-flex',\n alignItems: 'center',\n gap: space['2.5'],\n alignSelf: 'flex-start',\n fontSize: fontSize.md,\n lineHeight: lineHeight.normal,\n color: vars.color.ink,\n cursor: 'pointer',\n selectors: { '&[data-disabled]': { cursor: 'not-allowed', color: vars.color.inkMuted } },\n})\n\n/** A `<fieldset>` reset to lay out like a field. */\nexport const fieldset = style({\n display: 'flex',\n flexDirection: 'column',\n gap: space['1.5'],\n minWidth: 0,\n margin: 0,\n padding: 0,\n border: 0,\n})\n\nexport const legend = style([label, { padding: 0 }])\n"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface FieldsetProps extends Omit<BaseFieldset.Root.Props, 'className'> {
|
|
4
|
+
/** The card's title. */
|
|
5
|
+
legend: ReactNode;
|
|
6
|
+
/** Help text under the legend, linked with `aria-describedby`. A `<div>`, so it can hold block content. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** A titled card of related fields. Nested fieldsets render as an indented group instead of a card. */
|
|
11
|
+
export declare function Fieldset({ legend, description, className, children, ...props }: FieldsetProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { body as e, fieldset as t, legend as n } from "./Fieldset.styles.js";
|
|
2
|
+
import { useId as r } from "react";
|
|
3
|
+
import { clsx as i } from "clsx";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { Fieldset as s } from "@base-ui/react/fieldset";
|
|
6
|
+
// src/components/Fieldset/Fieldset.tsx
|
|
7
|
+
function c({ legend: c, description: l, className: u, children: d, ...f }) {
|
|
8
|
+
let p = r();
|
|
9
|
+
return /* @__PURE__ */ o(s.Root, {
|
|
10
|
+
"aria-describedby": l == null ? void 0 : p,
|
|
11
|
+
...f,
|
|
12
|
+
className: i(t, u),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ a(s.Legend, {
|
|
15
|
+
className: n,
|
|
16
|
+
children: c
|
|
17
|
+
}),
|
|
18
|
+
l != null && /* @__PURE__ */ a("div", {
|
|
19
|
+
id: p,
|
|
20
|
+
className: "_1n1f3hg2",
|
|
21
|
+
children: l
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ a("div", {
|
|
24
|
+
className: e,
|
|
25
|
+
children: d
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export { c as Fieldset };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.js","names":["Fieldset","BaseFieldset","description","styles.fieldset","styles.legend","legend","styles.body","Fieldset$1","legend$1","description$1","props","descriptionId","useId","Fieldset","clsx","fieldset","className","legend","body"],"sources":["../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'\nimport { clsx } from 'clsx'\nimport { useId, type ReactNode } from 'react'\n\nimport * as styles from './Fieldset.css'\n\nexport interface FieldsetProps extends Omit<BaseFieldset.Root.Props, 'className'> {\n /** The card's title. */\n legend: ReactNode\n /** Help text under the legend, linked with `aria-describedby`. A `<div>`, so it can hold block content. */\n description?: ReactNode\n className?: string\n}\n\n/** A titled card of related fields. Nested fieldsets render as an indented group instead of a card. */\nexport function Fieldset({ legend, description, className, children, ...props }: FieldsetProps) {\n const descriptionId = useId()\n return (\n <BaseFieldset.Root\n aria-describedby={description != null ? descriptionId : undefined}\n {...props}\n className={clsx(styles.fieldset, className)}\n >\n <BaseFieldset.Legend className={styles.legend}>{legend}</BaseFieldset.Legend>\n {description != null && (\n <div id={descriptionId} className={styles.description}>\n {description}\n </div>\n )}\n <div className={styles.body}>{children}</div>\n </BaseFieldset.Root>\n )\n}\n"],"mappings":";;;;;;AAeA,SAAgBA,EAAS,EAAE,QAAAQ,GAAQ,aAAAC,GAAa,cAAW,aAAU,GAAGC,KAAwB;CAC9F,IAAMC,IAAgBC,EAAM;CAC5B,OACE,kBAACX,EAAa,MAAd;EACE,oBAAkBC,KAAe,OAAuB,KAAA,IAAhBS;EACxC,GAAID;EACJ,WAAWI,EAAKX,GAAiBa,CAAS;EAH5C,UAAA;GAKE,kBAACf,EAAa,QAAd;IAAqB,WAAWG;IAAgB,UAAAC;GAA4B,CAAA;GAC3EH,KAAe,QACd,kBAAC,OAAD;IAAK,IAAIS;IAAe,WAAW;IAChC,UAAAT;GACE,CAAA;GAEP,kBAAC,OAAD;IAAK,WAAWI;IAAc;GAAc,CAAA;EAC3B;;AAEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.styles.js","names":["fieldset","legend","description","body"],"sources":["../../../src/components/Fieldset/Fieldset.css.ts"],"sourcesContent":["import { globalStyle, style } from '@vanilla-extract/css'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight, radius, space } from '../../tokens/scale'\n\n/** Each top-level fieldset is its own card. */\nexport const fieldset = style({\n minWidth: 0,\n margin: 0,\n padding: space['6'],\n border: `1px solid ${vars.color.border}`,\n borderRadius: radius.xl,\n backgroundColor: vars.color.surface,\n color: vars.color.ink,\n fontFamily: vars.font.sans,\n})\n\n// Base UI's Legend is a <div>, so it sits inside the card without floating. (A float plus\n// `clear` on the body swallowed the body's top margin when there was no description.)\nexport const legend = style({\n padding: 0,\n fontSize: fontSize.lg,\n fontWeight: fontWeight.semibold,\n lineHeight: lineHeight.tight,\n})\n\nexport const description = style({\n margin: 0,\n paddingTop: space['1'],\n maxWidth: '80ch',\n fontSize: fontSize.sm,\n lineHeight: lineHeight.normal,\n color: vars.color.inkMuted,\n})\n\n/** The fields, under a hairline. */\nexport const body = style({\n display: 'flex',\n flexDirection: 'column',\n gap: space['5'],\n marginTop: space['4'],\n paddingTop: space['5'],\n borderTop: `1px solid ${vars.color.border}`,\n})\n\n// A fieldset inside another is marked by a rule down its left, not another card.\nglobalStyle(`${fieldset} ${fieldset}`, {\n padding: `${space['0.5']} 0 ${space['0.5']} ${space['4']}`,\n border: 'none',\n borderLeft: `2px solid ${vars.color.border}`,\n borderRadius: 0,\n background: 'none',\n})\nglobalStyle(`${fieldset} ${fieldset} ${body}`, {\n marginTop: space['3'],\n paddingTop: 0,\n borderTop: 'none',\n})\nglobalStyle(`${fieldset} ${fieldset} ${legend}`, { fontSize: fontSize.md })\n"],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StackGap } from '../Stack/Stack.css';
|
|
2
|
+
/** The column gap, so the responsive template can subtract it. */
|
|
3
|
+
export declare const gapVar: `var(--${string})`;
|
|
4
|
+
export declare const grid: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
5
|
+
gap: Record<StackGap, {
|
|
6
|
+
vars: Record<string, string>;
|
|
7
|
+
}>;
|
|
8
|
+
align: {
|
|
9
|
+
start: {
|
|
10
|
+
alignItems: "start";
|
|
11
|
+
};
|
|
12
|
+
center: {
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
};
|
|
15
|
+
end: {
|
|
16
|
+
alignItems: "end";
|
|
17
|
+
};
|
|
18
|
+
stretch: {
|
|
19
|
+
alignItems: "stretch";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { StackGap } from '../Stack/Stack.css';
|
|
3
|
+
export interface GridProps extends ComponentProps<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* A number gives that many equal columns. A string is a `grid-template-columns` value, e.g.
|
|
6
|
+
* `'1fr 20rem'` for content beside a sidebar. Default `1`.
|
|
7
|
+
*/
|
|
8
|
+
columns?: number | string;
|
|
9
|
+
/**
|
|
10
|
+
* Responsive: columns are at least this wide (e.g. `'16rem'`), so the grid drops to fewer columns
|
|
11
|
+
* as it narrows, down to one. With a number of `columns` it never goes above that number; on its
|
|
12
|
+
* own it fits as many as there's room for. Ignored when `columns` is a string.
|
|
13
|
+
*/
|
|
14
|
+
minColumnWidth?: string;
|
|
15
|
+
/** Space between cells: `'1'` 4px, `'2'` 8px, `'3'` 12px, `'4'` 16px (default), `'6'` 24px, `'8'` 32px. */
|
|
16
|
+
gap?: StackGap;
|
|
17
|
+
/** Vertical alignment in each row. `start` (default) keeps fields top-aligned when one has a description. */
|
|
18
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
19
|
+
}
|
|
20
|
+
/** Grid layout, e.g. form fields in rows or cards in a responsive grid. */
|
|
21
|
+
export declare function Grid({ columns, minColumnWidth, gap, align, className, style, ...props }: GridProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { gapVar as e, grid as t } from "./Grid.styles.js";
|
|
2
|
+
import { clsx as n } from "clsx";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Grid/Grid.tsx
|
|
5
|
+
function i(t, n) {
|
|
6
|
+
return typeof t == "string" ? t : n ? t === void 0 ? `repeat(auto-fit, minmax(min(100%, ${n}), 1fr))` : `repeat(auto-fill, minmax(min(100%, max(${n}, ${`(100% - ${t - 1} * ${e}) / ${t}`})), 1fr))` : `repeat(${t ?? 1}, minmax(0, 1fr))`;
|
|
7
|
+
}
|
|
8
|
+
function a({ columns: e, minColumnWidth: a, gap: o = "4", align: s = "start", className: c, style: l, ...u }) {
|
|
9
|
+
return /* @__PURE__ */ r("div", {
|
|
10
|
+
className: n(t({
|
|
11
|
+
gap: o,
|
|
12
|
+
align: s
|
|
13
|
+
}), c),
|
|
14
|
+
style: {
|
|
15
|
+
gridTemplateColumns: i(e, a),
|
|
16
|
+
...l
|
|
17
|
+
},
|
|
18
|
+
...u
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export { a as Grid };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","names":["styles.gapVar","styles.grid","template","columns","minColumnWidth","gapVar","Grid","props","clsx","grid","className","style"],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps } from 'react'\n\nimport * as styles from './Grid.css'\nimport type { StackGap } from '../Stack/Stack.css'\n\nexport interface GridProps extends ComponentProps<'div'> {\n /**\n * A number gives that many equal columns. A string is a `grid-template-columns` value, e.g.\n * `'1fr 20rem'` for content beside a sidebar. Default `1`.\n */\n columns?: number | string\n /**\n * Responsive: columns are at least this wide (e.g. `'16rem'`), so the grid drops to fewer columns\n * as it narrows, down to one. With a number of `columns` it never goes above that number; on its\n * own it fits as many as there's room for. Ignored when `columns` is a string.\n */\n minColumnWidth?: string\n /** Space between cells: `'1'` 4px, `'2'` 8px, `'3'` 12px, `'4'` 16px (default), `'6'` 24px, `'8'` 32px. */\n gap?: StackGap\n /** Vertical alignment in each row. `start` (default) keeps fields top-aligned when one has a description. */\n align?: 'start' | 'center' | 'end' | 'stretch'\n}\n\nfunction template(columns: number | string | undefined, minColumnWidth: string | undefined) {\n if (typeof columns === 'string') return columns\n if (!minColumnWidth) return `repeat(${columns ?? 1}, minmax(0, 1fr))`\n if (columns === undefined) return `repeat(auto-fit, minmax(min(100%, ${minColumnWidth}), 1fr))`\n // Each column is at least 1/columns of the row (less the gaps), so no more than `columns` fit.\n const share = `(100% - ${columns - 1} * ${styles.gapVar}) / ${columns}`\n return `repeat(auto-fill, minmax(min(100%, max(${minColumnWidth}, ${share})), 1fr))`\n}\n\n/** Grid layout, e.g. form fields in rows or cards in a responsive grid. */\nexport function Grid({\n columns,\n minColumnWidth,\n gap = '4',\n align = 'start',\n className,\n style,\n ...props\n}: GridProps) {\n return (\n <div\n className={clsx(styles.grid({ gap, align }), className)}\n style={{ gridTemplateColumns: template(columns, minColumnWidth), ...style }}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAwBA,SAASE,EAAS,GAAsC,GAAoC;CAM1F,OALI,OAAOC,KAAY,WAAiBA,IACnCC,IACDD,MAAY,KAAA,IAAkB,qCAAqCC,EAAe,YAG/E,0CAA0CA,EAAe,IAAI,WAD3CD,IAAU,EAAE,KAAKH,EAAc,MAAMG,IACY,aAJ9C,UAAUA,KAAW,EAAE;AAKrD;AAGA,SAAgBG,EAAK,EACnB,YACA,mBACA,SAAM,KACN,WAAQ,SACR,cACA,UACA,GAAGC,KACS;CACZ,OACE,kBAAC,OAAD;EACE,WAAWC,EAAKP,EAAY;GAAE;GAAK;EAAM,CAAC,GAAGS,CAAS;EACtD,OAAO;GAAE,qBAAqBR,EAASC,GAASC,CAAc;GAAG,GAAGO;EAAM;EAC1E,GAAIJ;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
|
+
// src/components/Grid/Grid.css.ts
|
|
5
|
+
var t = "var(--_13fdgeh0)", n = e({
|
|
6
|
+
defaultClassName: "_13fdgeh1",
|
|
7
|
+
variantClassNames: {
|
|
8
|
+
gap: {
|
|
9
|
+
1: "_13fdgeh2",
|
|
10
|
+
2: "_13fdgeh3",
|
|
11
|
+
3: "_13fdgeh4",
|
|
12
|
+
4: "_13fdgeh5",
|
|
13
|
+
6: "_13fdgeh6",
|
|
14
|
+
8: "_13fdgeh7"
|
|
15
|
+
},
|
|
16
|
+
align: {
|
|
17
|
+
start: "_13fdgeh8",
|
|
18
|
+
center: "_13fdgeh9",
|
|
19
|
+
end: "_13fdgeha",
|
|
20
|
+
stretch: "_13fdgehb"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {},
|
|
24
|
+
compoundVariants: []
|
|
25
|
+
});
|
|
26
|
+
export { t as gapVar, n as grid };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=Grid.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.styles.js","names":["_7a468","gapVar","grid","createRuntimeFn"],"sources":["../../../src/components/Grid/Grid.css.ts"],"sourcesContent":["import { createVar } from '@vanilla-extract/css'\nimport { recipe } from '@vanilla-extract/recipes'\n\nimport { space } from '../../tokens/scale'\nimport { gaps, type StackGap } from '../Stack/Stack.css'\n\n/** The column gap, so the responsive template can subtract it. */\nexport const gapVar = createVar()\n\nexport const grid = recipe({\n base: {\n display: 'grid',\n gap: gapVar,\n minWidth: 0,\n },\n variants: {\n gap: Object.fromEntries(gaps.map((key) => [key, { vars: { [gapVar]: space[key] } }])) as Record<\n StackGap,\n { vars: Record<string, string> }\n >,\n align: {\n start: { alignItems: 'start' },\n center: { alignItems: 'center' },\n end: { alignItems: 'end' },\n stretch: { alignItems: 'stretch' },\n },\n },\n})\n"],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
export declare const heading: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
fontSize: string;
|
|
6
|
+
};
|
|
7
|
+
sm: {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
};
|
|
10
|
+
md: {
|
|
11
|
+
fontSize: string;
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
fontSize: string;
|
|
15
|
+
};
|
|
16
|
+
xl: {
|
|
17
|
+
fontSize: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
export type HeadingVariants = NonNullable<RecipeVariants<typeof heading>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export interface HeadingProps extends ComponentProps<'h2'> {
|
|
5
|
+
/** Document outline level (`h1`–`h6`). */
|
|
6
|
+
level: HeadingLevel;
|
|
7
|
+
/** Visual size, independent of `level`. Defaults to the size for the level. */
|
|
8
|
+
size?: HeadingSize;
|
|
9
|
+
}
|
|
10
|
+
/** Section heading. `level` sets the semantic h1–h6; `size` sets the look independently. Pages get their h1 from `PageHeader`. */
|
|
11
|
+
export declare function Heading({ level, size, className, ...props }: HeadingProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { heading as e } from "./Heading.styles.js";
|
|
2
|
+
import { clsx as t } from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Heading/Heading.tsx
|
|
5
|
+
var r = {
|
|
6
|
+
1: "xl",
|
|
7
|
+
2: "lg",
|
|
8
|
+
3: "md",
|
|
9
|
+
4: "sm",
|
|
10
|
+
5: "xs",
|
|
11
|
+
6: "xs"
|
|
12
|
+
};
|
|
13
|
+
function i({ level: i, size: a, className: o, ...s }) {
|
|
14
|
+
let c = `h${i}`;
|
|
15
|
+
return /* @__PURE__ */ n(c, {
|
|
16
|
+
className: t(e({ size: a ?? r[i] }), o),
|
|
17
|
+
...s
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { i as Heading };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=Heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.js","names":["styles.heading","sizeForLevel","Heading","props","Tag","level","clsx","heading","size","className"],"sources":["../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps } from 'react'\n\nimport * as styles from './Heading.css'\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\nexport type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeForLevel: Record<HeadingLevel, HeadingSize> = {\n 1: 'xl',\n 2: 'lg',\n 3: 'md',\n 4: 'sm',\n 5: 'xs',\n 6: 'xs',\n}\n\nexport interface HeadingProps extends ComponentProps<'h2'> {\n /** Document outline level (`h1`–`h6`). */\n level: HeadingLevel\n /** Visual size, independent of `level`. Defaults to the size for the level. */\n size?: HeadingSize\n}\n\n/** Section heading. `level` sets the semantic h1–h6; `size` sets the look independently. Pages get their h1 from `PageHeader`. */\nexport function Heading({ level, size, className, ...props }: HeadingProps) {\n const Tag = `h${level}` as const\n return (\n <Tag\n className={clsx(styles.heading({ size: size ?? sizeForLevel[level] }), className)}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAQA,IAAMC,IAAkD;CACtD,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAUA,SAAgBC,EAAQ,EAAE,UAAO,SAAM,cAAW,GAAGC,KAAuB;CAC1E,IAAMC,IAAM,IAAIC;CAChB,OACE,kBAACD,GAAD;EACE,WAAWE,EAAKN,EAAe,EAAE,MAAMQ,KAAQP,EAAaI,GAAO,CAAC,GAAGI,CAAS;EAChF,GAAIN;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
+
// src/components/Heading/Heading.css.ts
|
|
4
|
+
var t = e({
|
|
5
|
+
defaultClassName: "_1votls70",
|
|
6
|
+
variantClassNames: { size: {
|
|
7
|
+
xs: "_1votls71",
|
|
8
|
+
sm: "_1votls72",
|
|
9
|
+
md: "_1votls73",
|
|
10
|
+
lg: "_1votls74",
|
|
11
|
+
xl: "_1votls75"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: {},
|
|
14
|
+
compoundVariants: []
|
|
15
|
+
});
|
|
16
|
+
export { t as heading };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Heading.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.styles.js","names":["_7a468","heading","createRuntimeFn"],"sources":["../../../src/components/Heading/Heading.css.ts"],"sourcesContent":["import { recipe, type RecipeVariants } from '@vanilla-extract/recipes'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight } from '../../tokens/scale'\n\nexport const heading = recipe({\n base: {\n margin: 0,\n fontFamily: vars.font.sans,\n fontWeight: fontWeight.semibold,\n lineHeight: lineHeight.tight,\n color: vars.color.ink,\n },\n variants: {\n size: {\n xs: { fontSize: fontSize.md },\n sm: { fontSize: fontSize.lg },\n md: { fontSize: fontSize.xl },\n lg: { fontSize: fontSize['2xl'] },\n xl: { fontSize: fontSize['3xl'] },\n },\n },\n})\n\nexport type HeadingVariants = NonNullable<RecipeVariants<typeof heading>>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const icon: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LucideIcon, LucideProps } from 'lucide-react';
|
|
2
|
+
declare const sizes: {
|
|
3
|
+
readonly xs: "0.75rem";
|
|
4
|
+
readonly sm: "1rem";
|
|
5
|
+
readonly md: "1.25rem";
|
|
6
|
+
readonly lg: "1.5rem";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A named size (rem, so it scales with the text-size setting), a CSS length such as `'1.2em'`
|
|
10
|
+
* (em follows the surrounding text), or a number. Numbers are px at the 16px base and are
|
|
11
|
+
* converted to rem; they're kept for backward compatibility, so prefer the strings.
|
|
12
|
+
*/
|
|
13
|
+
export type IconSize = keyof typeof sizes | `${number}${'em' | 'rem'}` | 12 | 14 | 16 | 20 | 24;
|
|
14
|
+
export interface IconProps extends Omit<LucideProps, 'size'> {
|
|
15
|
+
/** A lucide-react icon component, e.g. `Play`. */
|
|
16
|
+
icon: LucideIcon;
|
|
17
|
+
/** `xs` 0.75rem, `sm` 1rem, `md` 1.25rem (default), `lg` 1.5rem, an em/rem length, or px (deprecated). */
|
|
18
|
+
size?: IconSize;
|
|
19
|
+
/** Accessible name. Without it the icon is decorative and hidden from assistive tech. */
|
|
20
|
+
label?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Renders a lucide-react icon at a token size. Decorative unless `label` is given. */
|
|
23
|
+
export declare function Icon({ icon: Glyph, size, label, className, ...props }: IconProps): import('react').JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { icon as e } from "./Icon.styles.js";
|
|
2
|
+
import { clsx as t } from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Icon/Icon.tsx
|
|
5
|
+
var r = {
|
|
6
|
+
xs: "0.75rem",
|
|
7
|
+
sm: "1rem",
|
|
8
|
+
md: "1.25rem",
|
|
9
|
+
lg: "1.5rem"
|
|
10
|
+
}, i = (e) => `${+(e / 16).toFixed(4)}rem`;
|
|
11
|
+
function a({ icon: a, size: o = "md", label: s, className: c, ...l }) {
|
|
12
|
+
return /* @__PURE__ */ n(a, {
|
|
13
|
+
size: typeof o == "number" ? i(o) : o in r ? r[o] : o,
|
|
14
|
+
role: s ? "img" : void 0,
|
|
15
|
+
"aria-label": s,
|
|
16
|
+
"aria-hidden": !s || void 0,
|
|
17
|
+
focusable: !1,
|
|
18
|
+
className: t(e, c),
|
|
19
|
+
...l
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { a as Icon };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["styles.icon","sizes","toRem","px","Icon","Glyph","props","size","label","clsx","icon","className"],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { LucideIcon, LucideProps } from 'lucide-react'\n\nimport * as styles from './Icon.css'\n\nconst sizes = { xs: '0.75rem', sm: '1rem', md: '1.25rem', lg: '1.5rem' } as const\n\n/**\n * A named size (rem, so it scales with the text-size setting), a CSS length such as `'1.2em'`\n * (em follows the surrounding text), or a number. Numbers are px at the 16px base and are\n * converted to rem; they're kept for backward compatibility, so prefer the strings.\n */\nexport type IconSize = keyof typeof sizes | `${number}${'em' | 'rem'}` | 12 | 14 | 16 | 20 | 24\n\nconst toRem = (px: number) => `${+(px / 16).toFixed(4)}rem`\n\nexport interface IconProps extends Omit<LucideProps, 'size'> {\n /** A lucide-react icon component, e.g. `Play`. */\n icon: LucideIcon\n /** `xs` 0.75rem, `sm` 1rem, `md` 1.25rem (default), `lg` 1.5rem, an em/rem length, or px (deprecated). */\n size?: IconSize\n /** Accessible name. Without it the icon is decorative and hidden from assistive tech. */\n label?: string\n}\n\n/** Renders a lucide-react icon at a token size. Decorative unless `label` is given. */\nexport function Icon({ icon: Glyph, size = 'md', label, className, ...props }: IconProps) {\n return (\n <Glyph\n size={\n typeof size === 'number'\n ? toRem(size)\n : size in sizes\n ? sizes[size as keyof typeof sizes]\n : size\n }\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n focusable={false}\n className={clsx(styles.icon, className)}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAKA,IAAMC,IAAQ;CAAE,IAAI;CAAW,IAAI;CAAQ,IAAI;CAAW,IAAI;AAAS,GASjEC,KAAS,MAAe,GAAG,EAAEC,IAAK,GAAA,CAAI,QAAQ,CAAC,EAAE;AAYvD,SAAgBC,EAAK,EAAE,MAAMC,GAAO,UAAO,MAAM,UAAO,cAAW,GAAGC,KAAoB;CACxF,OACE,kBAACD,GAAD;EACE,MACE,OAAOE,KAAS,WACZL,EAAMK,CAAI,IACVA,KAAQN,IACNA,EAAMM,KACNA;EAER,MAAMC,IAAQ,QAAQ,KAAA;EACtB,cAAYA;EACZ,eAAa,MAAQ,KAAA;EACrB,WAAW;EACX,WAAWC,EAAKT,GAAaW,CAAS;EACtC,GAAIL;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.styles.js","names":["icon"],"sources":["../../../src/components/Icon/Icon.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css'\n\nexport const icon = style({ flexShrink: 0, verticalAlign: 'middle' })\n"],"mappings":""}
|