@eylulg/ui 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -223
- package/dist/components/{Avatar → atoms/Avatar}/Avatar.d.ts +3 -1
- package/dist/components/{Avatar → atoms/Avatar}/Avatar.js +4 -4
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -0
- package/dist/components/{Avatar → atoms/Avatar}/index.d.ts +1 -1
- package/dist/components/atoms/Avatar/index.js +2 -0
- package/dist/components/{Badge → atoms/Badge}/Badge.d.ts +10 -6
- package/dist/components/{Badge → atoms/Badge}/Badge.js +12 -16
- package/dist/components/atoms/Badge/Badge.js.map +1 -0
- package/dist/components/atoms/Badge/index.d.ts +2 -0
- package/dist/components/atoms/BrandLoader/BrandLoader.d.ts +14 -0
- package/dist/components/atoms/BrandLoader/BrandLoader.js +57 -0
- package/dist/components/atoms/BrandLoader/BrandLoader.js.map +1 -0
- package/dist/components/atoms/BrandLoader/index.d.ts +2 -0
- package/dist/components/atoms/BrandLoader/index.js +2 -0
- package/dist/{chrome → components/atoms/BrandLogo}/BrandLogo.d.ts +1 -1
- package/dist/{chrome → components/atoms/BrandLogo}/BrandLogo.js +3 -4
- package/dist/components/atoms/BrandLogo/BrandLogo.js.map +1 -0
- package/dist/components/atoms/BrandLogo/index.d.ts +2 -0
- package/dist/components/atoms/BrandLogo/index.js +1 -0
- package/dist/components/{Button → atoms/Button}/Button.d.ts +13 -9
- package/dist/components/atoms/Button/Button.js +88 -0
- package/dist/components/atoms/Button/Button.js.map +1 -0
- package/dist/components/{Button → atoms/Button}/buttonStyles.d.ts +4 -6
- package/dist/components/atoms/Button/buttonStyles.js +25 -0
- package/dist/components/atoms/Button/buttonStyles.js.map +1 -0
- package/dist/components/atoms/Button/index.d.ts +2 -0
- package/dist/components/atoms/Button/index.js +4 -0
- package/dist/components/{Checkbox → atoms/Checkbox}/Checkbox.js +10 -14
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/atoms/IconButton/IconButton.d.ts +21 -0
- package/dist/components/atoms/IconButton/IconButton.js +43 -0
- package/dist/components/atoms/IconButton/IconButton.js.map +1 -0
- package/dist/components/{Kbd → atoms/Kbd}/Kbd.d.ts +2 -2
- package/dist/components/{Kbd → atoms/Kbd}/Kbd.js +9 -8
- package/dist/components/atoms/Kbd/Kbd.js.map +1 -0
- package/dist/components/atoms/NavItem/NavItem.d.ts +24 -0
- package/dist/components/atoms/NavItem/NavItem.js +42 -0
- package/dist/components/atoms/NavItem/NavItem.js.map +1 -0
- package/dist/components/atoms/NavItem/index.d.ts +2 -0
- package/dist/components/atoms/NavItem/index.js +1 -0
- package/dist/components/{ProgressBar → atoms/ProgressBar}/ProgressBar.d.ts +2 -2
- package/dist/components/{ProgressBar → atoms/ProgressBar}/ProgressBar.js +6 -5
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/components/{Skeleton → atoms/Skeleton}/Skeleton.js +3 -5
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/{Spinner → atoms/Spinner}/Spinner.js +2 -2
- package/dist/components/atoms/Spinner/Spinner.js.map +1 -0
- package/dist/components/{Switch → atoms/Switch}/Switch.d.ts +3 -3
- package/dist/components/atoms/Switch/Switch.js +35 -0
- package/dist/components/atoms/Switch/Switch.js.map +1 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts +18 -0
- package/dist/components/atoms/TextLink/TextLink.js +21 -0
- package/dist/components/atoms/TextLink/TextLink.js.map +1 -0
- package/dist/components/atoms/TextLink/index.d.ts +2 -0
- package/dist/components/atoms/TextLink/index.js +1 -0
- package/dist/components/{Tooltip → atoms/Tooltip}/Tooltip.js +4 -4
- package/dist/components/atoms/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/{Tooltip → atoms/Tooltip}/TooltipOverlay.js +2 -2
- package/dist/components/atoms/Tooltip/TooltipOverlay.js.map +1 -0
- package/dist/components/{Breadcrumbs → molecules/Breadcrumbs}/Breadcrumbs.js +5 -4
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/{Card → molecules/Card}/Card.d.ts +3 -1
- package/dist/components/{Card → molecules/Card}/Card.js +21 -13
- package/dist/components/molecules/Card/Card.js.map +1 -0
- package/dist/components/molecules/Card/index.d.ts +2 -0
- package/dist/components/{CodeBlock → molecules/CodeBlock}/CodeBlock.d.ts +7 -5
- package/dist/components/{CodeBlock → molecules/CodeBlock}/CodeBlock.js +20 -12
- package/dist/components/molecules/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/{Combobox → molecules/Combobox}/Combobox.d.ts +4 -1
- package/dist/components/molecules/Combobox/Combobox.js +91 -0
- package/dist/components/molecules/Combobox/Combobox.js.map +1 -0
- package/dist/components/{DatePicker → molecules/DatePicker}/DatePicker.d.ts +7 -4
- package/dist/components/molecules/DatePicker/DatePicker.js +138 -0
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/molecules/Dialog/Dialog.d.ts +20 -0
- package/dist/components/{Dialog → molecules/Dialog}/Dialog.js +7 -7
- package/dist/components/molecules/Dialog/Dialog.js.map +1 -0
- package/dist/components/molecules/Dialog/DialogOverlay.d.ts +3 -0
- package/dist/components/molecules/Dialog/DialogOverlay.js +60 -0
- package/dist/components/molecules/Dialog/DialogOverlay.js.map +1 -0
- package/dist/components/molecules/Drawer/Drawer.d.ts +21 -0
- package/dist/components/{Drawer → molecules/Drawer}/Drawer.js +7 -7
- package/dist/components/molecules/Drawer/Drawer.js.map +1 -0
- package/dist/components/{Drawer → molecules/Drawer}/DrawerOverlay.d.ts +1 -1
- package/dist/components/molecules/Drawer/DrawerOverlay.js +66 -0
- package/dist/components/molecules/Drawer/DrawerOverlay.js.map +1 -0
- package/dist/components/{DropdownMenu → molecules/DropdownMenu}/DropdownMenu.d.ts +8 -9
- package/dist/components/{DropdownMenu → molecules/DropdownMenu}/DropdownMenu.js +8 -20
- package/dist/components/molecules/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/{DropdownMenu → molecules/DropdownMenu}/DropdownMenuParts.d.ts +1 -1
- package/dist/components/{DropdownMenu → molecules/DropdownMenu}/DropdownMenuParts.js +17 -28
- package/dist/components/molecules/DropdownMenu/DropdownMenuParts.js.map +1 -0
- package/dist/components/{EmptyState → molecules/EmptyState}/EmptyState.d.ts +3 -4
- package/dist/components/{EmptyState → molecules/EmptyState}/EmptyState.js +6 -5
- package/dist/components/molecules/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/{FileDropZone → molecules/FileDropZone}/FileDropZone.d.ts +1 -1
- package/dist/components/{FileDropZone → molecules/FileDropZone}/FileDropZone.js +6 -5
- package/dist/components/molecules/FileDropZone/FileDropZone.js.map +1 -0
- package/dist/components/{Input → molecules/Input}/Input.d.ts +8 -6
- package/dist/components/molecules/Input/Input.js +45 -0
- package/dist/components/molecules/Input/Input.js.map +1 -0
- package/dist/components/molecules/Input/index.d.ts +2 -0
- package/dist/components/{Pagination → molecules/Pagination}/Pagination.d.ts +6 -2
- package/dist/components/{Pagination → molecules/Pagination}/Pagination.js +44 -34
- package/dist/components/molecules/Pagination/Pagination.js.map +1 -0
- package/dist/components/molecules/Pagination/index.d.ts +2 -0
- package/dist/components/molecules/Pagination/index.js +2 -0
- package/dist/components/{Popover → molecules/Popover}/Popover.d.ts +1 -1
- package/dist/components/{Popover → molecules/Popover}/Popover.js +7 -7
- package/dist/components/molecules/Popover/Popover.js.map +1 -0
- package/dist/components/{Popover → molecules/Popover}/PopoverOverlay.js +5 -4
- package/dist/components/molecules/Popover/PopoverOverlay.js.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.js +43 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/{SegmentedControl → molecules/SegmentedControl}/SegmentedControl.d.ts +6 -7
- package/dist/components/molecules/SegmentedControl/SegmentedControl.js +71 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/molecules/SegmentedControl/index.d.ts +2 -0
- package/dist/components/{Select → molecules/Select}/Select.d.ts +4 -1
- package/dist/components/molecules/Select/Select.js +58 -0
- package/dist/components/molecules/Select/Select.js.map +1 -0
- package/dist/components/molecules/Stat/Stat.d.ts +36 -0
- package/dist/components/molecules/Stat/Stat.js +85 -0
- package/dist/components/molecules/Stat/Stat.js.map +1 -0
- package/dist/components/molecules/Stat/index.d.ts +2 -0
- package/dist/components/molecules/Stat/index.js +2 -0
- package/dist/components/{Tabs → molecules/Tabs}/Tabs.js +5 -5
- package/dist/components/molecules/Tabs/Tabs.js.map +1 -0
- package/dist/components/molecules/Tag/Tag.js +49 -0
- package/dist/components/molecules/Tag/Tag.js.map +1 -0
- package/dist/components/{Textarea → molecules/Textarea}/Textarea.d.ts +3 -11
- package/dist/components/molecules/Textarea/Textarea.js +29 -0
- package/dist/components/molecules/Textarea/Textarea.js.map +1 -0
- package/dist/components/molecules/Textarea/index.d.ts +2 -0
- package/dist/components/{Toast → molecules/Toast}/Toast.d.ts +12 -8
- package/dist/components/{Toast → molecules/Toast}/Toast.js +13 -18
- package/dist/components/molecules/Toast/Toast.js.map +1 -0
- package/dist/components/molecules/Toast/ToastItem.d.ts +6 -0
- package/dist/components/{Toast → molecules/Toast}/ToastItem.js +25 -27
- package/dist/components/molecules/Toast/ToastItem.js.map +1 -0
- package/dist/components/{Toast → molecules/Toast}/index.d.ts +1 -1
- package/dist/components/{Chart → organisms/Chart}/BarChart.d.ts +1 -1
- package/dist/components/organisms/Chart/BarChart.js +304 -0
- package/dist/components/organisms/Chart/BarChart.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/ChartFrame.d.ts +2 -2
- package/dist/components/{Chart → organisms/Chart}/ChartFrame.js +14 -18
- package/dist/components/organisms/Chart/ChartFrame.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/ChartLegend.d.ts +3 -2
- package/dist/components/{Chart → organisms/Chart}/ChartLegend.js +2 -2
- package/dist/components/organisms/Chart/ChartLegend.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/ChartTable.js +8 -12
- package/dist/components/organisms/Chart/ChartTable.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/ChartTooltip.d.ts +3 -2
- package/dist/components/{Chart → organisms/Chart}/ChartTooltip.js +3 -3
- package/dist/components/organisms/Chart/ChartTooltip.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/HeatGrid.d.ts +6 -3
- package/dist/components/organisms/Chart/HeatGrid.js +235 -0
- package/dist/components/organisms/Chart/HeatGrid.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/LineChart.d.ts +1 -1
- package/dist/components/organisms/Chart/LineChart.js +227 -0
- package/dist/components/organisms/Chart/LineChart.js.map +1 -0
- package/dist/components/organisms/Chart/Sparkline.d.ts +14 -0
- package/dist/components/organisms/Chart/Sparkline.js +39 -0
- package/dist/components/organisms/Chart/Sparkline.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/format.d.ts +2 -0
- package/dist/components/{Chart → organisms/Chart}/format.js +6 -4
- package/dist/components/organisms/Chart/format.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/geometry.js +1 -1
- package/dist/components/organisms/Chart/geometry.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/index.d.ts +2 -2
- package/dist/components/{Chart → organisms/Chart}/index.js +2 -2
- package/dist/components/{Chart → organisms/Chart}/interaction.d.ts +10 -6
- package/dist/components/{Chart → organisms/Chart}/interaction.js +13 -10
- package/dist/components/organisms/Chart/interaction.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/labels.js +1 -1
- package/dist/components/organisms/Chart/labels.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/scale.js +1 -1
- package/dist/components/organisms/Chart/scale.js.map +1 -0
- package/dist/components/organisms/Chart/series.d.ts +30 -0
- package/dist/components/organisms/Chart/series.js +108 -0
- package/dist/components/organisms/Chart/series.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/summary.js +2 -5
- package/dist/components/organisms/Chart/summary.js.map +1 -0
- package/dist/components/{Chart → organisms/Chart}/types.d.ts +2 -2
- package/dist/components/{Chart → organisms/Chart}/useElementWidth.js +1 -1
- package/dist/components/organisms/Chart/useElementWidth.js.map +1 -0
- package/dist/components/{CommandPalette → organisms/CommandPalette}/CommandPalette.d.ts +7 -8
- package/dist/components/{CommandPalette → organisms/CommandPalette}/CommandPalette.js +4 -10
- package/dist/components/organisms/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/components/organisms/CommandPalette/CommandPaletteOverlay.d.ts +4 -0
- package/dist/components/organisms/CommandPalette/CommandPaletteOverlay.js +150 -0
- package/dist/components/organisms/CommandPalette/CommandPaletteOverlay.js.map +1 -0
- package/dist/components/{CommandPalette → organisms/CommandPalette}/index.d.ts +1 -1
- package/dist/components/{PageHeader → organisms/PageHeader}/PageHeader.js +5 -5
- package/dist/components/organisms/PageHeader/PageHeader.js.map +1 -0
- package/dist/{chrome → components/organisms/SidebarNav}/SidebarNav.d.ts +1 -1
- package/dist/{chrome → components/organisms/SidebarNav}/SidebarNav.js +18 -26
- package/dist/components/organisms/SidebarNav/SidebarNav.js.map +1 -0
- package/dist/components/organisms/SidebarNav/index.d.ts +2 -0
- package/dist/components/organisms/SidebarNav/index.js +2 -0
- package/dist/components/organisms/SiteFooter/SiteFooter.d.ts +33 -0
- package/dist/components/organisms/SiteFooter/SiteFooter.js +87 -0
- package/dist/components/organisms/SiteFooter/SiteFooter.js.map +1 -0
- package/dist/components/organisms/SiteFooter/index.d.ts +2 -0
- package/dist/components/organisms/SiteFooter/index.js +1 -0
- package/dist/components/{Table → organisms/Table}/Table.d.ts +9 -6
- package/dist/components/{Table → organisms/Table}/Table.js +36 -23
- package/dist/components/organisms/Table/Table.js.map +1 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggle.d.ts +36 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggle.js +88 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggle.js.map +1 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggleMenu.d.ts +14 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggleMenu.js +50 -0
- package/dist/components/organisms/ThemeToggle/ThemeToggleMenu.js.map +1 -0
- package/dist/components/organisms/ThemeToggle/index.d.ts +2 -0
- package/dist/components/organisms/ThemeToggle/index.js +2 -0
- package/dist/components/organisms/ThemeToggle/themeChoices.d.ts +7 -0
- package/dist/components/organisms/ThemeToggle/themeChoices.js +17 -0
- package/dist/components/organisms/ThemeToggle/themeChoices.js.map +1 -0
- package/dist/components/organisms/TopNav/TopNav.d.ts +51 -0
- package/dist/components/organisms/TopNav/TopNav.js +148 -0
- package/dist/components/organisms/TopNav/TopNav.js.map +1 -0
- package/dist/components/organisms/TopNav/index.d.ts +2 -0
- package/dist/components/organisms/TopNav/index.js +2 -0
- package/dist/{chrome → components/templates/AppShell}/AppShell.d.ts +10 -6
- package/dist/{chrome → components/templates/AppShell}/AppShell.js +12 -17
- package/dist/components/templates/AppShell/AppShell.js.map +1 -0
- package/dist/components/templates/AppShell/index.d.ts +2 -0
- package/dist/components/templates/AppShell/index.js +1 -0
- package/dist/{chrome → data}/projects.d.ts +13 -8
- package/dist/{chrome → data}/projects.js +48 -25
- package/dist/data/projects.js.map +1 -0
- package/dist/fonts.css +27 -2
- package/dist/index.d.ts +56 -38
- package/dist/index.js +55 -42
- package/dist/internal/Field.d.ts +16 -11
- package/dist/internal/Field.js +29 -23
- package/dist/internal/Field.js.map +1 -1
- package/dist/internal/OverlayParts.d.ts +43 -0
- package/dist/internal/OverlayParts.js +43 -0
- package/dist/internal/OverlayParts.js.map +1 -0
- package/dist/internal/PreloadOnIntent.d.ts +2 -3
- package/dist/internal/PreloadOnIntent.js +3 -3
- package/dist/internal/PreloadOnIntent.js.map +1 -1
- package/dist/{chrome → internal}/brandLogoPath.js +1 -2
- package/dist/internal/brandLogoPath.js.map +1 -0
- package/dist/internal/button.d.ts +7 -0
- package/dist/internal/button.js +19 -0
- package/dist/internal/button.js.map +1 -0
- package/dist/internal/control.d.ts +32 -0
- package/dist/internal/control.js +59 -0
- package/dist/internal/control.js.map +1 -0
- package/dist/internal/focusRing.d.ts +7 -1
- package/dist/internal/focusRing.js +8 -3
- package/dist/internal/focusRing.js.map +1 -1
- package/dist/internal/layout.d.ts +9 -0
- package/dist/internal/layout.js +13 -0
- package/dist/internal/layout.js.map +1 -0
- package/dist/internal/lazyModule.d.ts +8 -2
- package/dist/internal/lazyModule.js +20 -6
- package/dist/internal/lazyModule.js.map +1 -1
- package/dist/internal/link.d.ts +3 -0
- package/dist/internal/link.js +10 -0
- package/dist/internal/link.js.map +1 -0
- package/dist/internal/listParts.d.ts +12 -0
- package/dist/internal/listParts.js +32 -0
- package/dist/internal/listParts.js.map +1 -0
- package/dist/internal/surfaces.d.ts +11 -5
- package/dist/internal/surfaces.js +13 -7
- package/dist/internal/surfaces.js.map +1 -1
- package/dist/internal/toggle.d.ts +8 -0
- package/dist/internal/toggle.js +22 -0
- package/dist/internal/toggle.js.map +1 -0
- package/dist/internal/types.d.ts +2 -5
- package/dist/{chrome → router}/Anchor.js +1 -2
- package/dist/{chrome → router}/Anchor.js.map +1 -1
- package/dist/{chrome → router}/LinkRouter.js +1 -1
- package/dist/{chrome → router}/LinkRouter.js.map +1 -1
- package/dist/{chrome → router}/types.d.ts +3 -3
- package/dist/styles/themes/variants.d.ts +0 -12
- package/dist/styles/themes/variants.js +3 -43
- package/dist/styles/themes/variants.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{chrome → theme}/themeScript.d.ts +2 -5
- package/dist/{chrome → theme}/themeScript.js +4 -7
- package/dist/theme/themeScript.js.map +1 -0
- package/dist/{chrome → theme}/useTheme.js +1 -1
- package/dist/theme/useTheme.js.map +1 -0
- package/dist/theme.css +87 -56
- package/dist/tokens.css +42 -48
- package/dist/utils/cx.d.ts +0 -12
- package/dist/utils/cx.js +18 -10
- package/dist/utils/cx.js.map +1 -1
- package/package.json +147 -107
- package/dist/chrome/AppShell.js.map +0 -1
- package/dist/chrome/BrandLogo.js.map +0 -1
- package/dist/chrome/BrandMark.d.ts +0 -12
- package/dist/chrome/BrandMark.js +0 -40
- package/dist/chrome/BrandMark.js.map +0 -1
- package/dist/chrome/MobileMenu.d.ts +0 -19
- package/dist/chrome/MobileMenu.js +0 -52
- package/dist/chrome/MobileMenu.js.map +0 -1
- package/dist/chrome/ProjectSwitcher.d.ts +0 -30
- package/dist/chrome/ProjectSwitcher.js +0 -64
- package/dist/chrome/ProjectSwitcher.js.map +0 -1
- package/dist/chrome/ProjectSwitcherMenu.d.ts +0 -13
- package/dist/chrome/ProjectSwitcherMenu.js +0 -50
- package/dist/chrome/ProjectSwitcherMenu.js.map +0 -1
- package/dist/chrome/SidebarNav.js.map +0 -1
- package/dist/chrome/SiteFooter.d.ts +0 -37
- package/dist/chrome/SiteFooter.js +0 -105
- package/dist/chrome/SiteFooter.js.map +0 -1
- package/dist/chrome/TextSizeToggle.d.ts +0 -11
- package/dist/chrome/TextSizeToggle.js +0 -38
- package/dist/chrome/TextSizeToggle.js.map +0 -1
- package/dist/chrome/ThemeToggle.d.ts +0 -26
- package/dist/chrome/ThemeToggle.js +0 -100
- package/dist/chrome/ThemeToggle.js.map +0 -1
- package/dist/chrome/ThemeToggleMenu.d.ts +0 -16
- package/dist/chrome/ThemeToggleMenu.js +0 -42
- package/dist/chrome/ThemeToggleMenu.js.map +0 -1
- package/dist/chrome/TopNav.d.ts +0 -42
- package/dist/chrome/TopNav.js +0 -117
- package/dist/chrome/TopNav.js.map +0 -1
- package/dist/chrome/brandLogoPath.js.map +0 -1
- package/dist/chrome/index.d.ts +0 -28
- package/dist/chrome/index.js +0 -15
- package/dist/chrome/projects.js.map +0 -1
- package/dist/chrome/themeChoices.d.ts +0 -6
- package/dist/chrome/themeChoices.js +0 -18
- package/dist/chrome/themeChoices.js.map +0 -1
- package/dist/chrome/themeScript.js.map +0 -1
- package/dist/chrome/useTextSize.d.ts +0 -16
- package/dist/chrome/useTextSize.js +0 -64
- package/dist/chrome/useTextSize.js.map +0 -1
- package/dist/chrome/useTheme.js.map +0 -1
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Avatar/index.js +0 -2
- package/dist/components/Badge/Badge.js.map +0 -1
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +0 -1
- package/dist/components/Button/Button.js +0 -73
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/buttonStyles.js +0 -32
- package/dist/components/Button/buttonStyles.js.map +0 -1
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Button/index.js +0 -4
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/index.d.ts +0 -2
- package/dist/components/Chart/BarChart.js +0 -327
- package/dist/components/Chart/BarChart.js.map +0 -1
- package/dist/components/Chart/ChartFrame.js.map +0 -1
- package/dist/components/Chart/ChartLegend.js.map +0 -1
- package/dist/components/Chart/ChartTable.js.map +0 -1
- package/dist/components/Chart/ChartTooltip.js.map +0 -1
- package/dist/components/Chart/HeatGrid.js +0 -256
- package/dist/components/Chart/HeatGrid.js.map +0 -1
- package/dist/components/Chart/LineChart.js +0 -248
- package/dist/components/Chart/LineChart.js.map +0 -1
- package/dist/components/Chart/format.js.map +0 -1
- package/dist/components/Chart/geometry.js.map +0 -1
- package/dist/components/Chart/interaction.js.map +0 -1
- package/dist/components/Chart/labels.js.map +0 -1
- package/dist/components/Chart/scale.js.map +0 -1
- package/dist/components/Chart/series.d.ts +0 -14
- package/dist/components/Chart/series.js +0 -72
- package/dist/components/Chart/series.js.map +0 -1
- package/dist/components/Chart/summary.js.map +0 -1
- package/dist/components/Chart/useElementWidth.js.map +0 -1
- package/dist/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/components/CodeBlock/CodeBlock.js.map +0 -1
- package/dist/components/Combobox/Combobox.js +0 -106
- package/dist/components/Combobox/Combobox.js.map +0 -1
- package/dist/components/CommandPalette/CommandPalette.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteOverlay.d.ts +0 -11
- package/dist/components/CommandPalette/CommandPaletteOverlay.js +0 -180
- package/dist/components/CommandPalette/CommandPaletteOverlay.js.map +0 -1
- package/dist/components/DatePicker/DatePicker.js +0 -142
- package/dist/components/DatePicker/DatePicker.js.map +0 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -37
- package/dist/components/Dialog/Dialog.js.map +0 -1
- package/dist/components/Dialog/DialogOverlay.d.ts +0 -3
- package/dist/components/Dialog/DialogOverlay.js +0 -72
- package/dist/components/Dialog/DialogOverlay.js.map +0 -1
- package/dist/components/Drawer/Drawer.d.ts +0 -36
- package/dist/components/Drawer/Drawer.js.map +0 -1
- package/dist/components/Drawer/DrawerOverlay.js +0 -71
- package/dist/components/Drawer/DrawerOverlay.js.map +0 -1
- package/dist/components/DropdownMenu/DropdownMenu.js.map +0 -1
- package/dist/components/DropdownMenu/DropdownMenuParts.js.map +0 -1
- package/dist/components/EmptyState/EmptyState.js.map +0 -1
- package/dist/components/FileDropZone/FileDropZone.js.map +0 -1
- package/dist/components/IconButton/IconButton.d.ts +0 -17
- package/dist/components/IconButton/IconButton.js +0 -37
- package/dist/components/IconButton/IconButton.js.map +0 -1
- package/dist/components/Input/Input.js +0 -43
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Kbd/Kbd.js.map +0 -1
- package/dist/components/PageHeader/PageHeader.js.map +0 -1
- package/dist/components/Pagination/Pagination.js.map +0 -1
- package/dist/components/Pagination/index.d.ts +0 -2
- package/dist/components/Pagination/index.js +0 -2
- package/dist/components/Popover/Popover.js.map +0 -1
- package/dist/components/Popover/PopoverOverlay.js.map +0 -1
- package/dist/components/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/components/ProgressBar/index.d.ts +0 -2
- package/dist/components/RadioGroup/RadioGroup.js +0 -46
- package/dist/components/RadioGroup/RadioGroup.js.map +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -55
- package/dist/components/SegmentedControl/SegmentedControl.js.map +0 -1
- package/dist/components/SegmentedControl/index.d.ts +0 -2
- package/dist/components/Select/Select.js +0 -64
- package/dist/components/Select/Select.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/Spinner/Spinner.js.map +0 -1
- package/dist/components/Stat/Stat.d.ts +0 -49
- package/dist/components/Stat/Stat.js +0 -125
- package/dist/components/Stat/Stat.js.map +0 -1
- package/dist/components/Stat/index.d.ts +0 -2
- package/dist/components/Stat/index.js +0 -2
- package/dist/components/Switch/Switch.js +0 -39
- package/dist/components/Switch/Switch.js.map +0 -1
- package/dist/components/Table/Table.js.map +0 -1
- package/dist/components/Tabs/Tabs.js.map +0 -1
- package/dist/components/Tag/Tag.js +0 -48
- package/dist/components/Tag/Tag.js.map +0 -1
- package/dist/components/Textarea/Textarea.js +0 -30
- package/dist/components/Textarea/Textarea.js.map +0 -1
- package/dist/components/Textarea/index.d.ts +0 -2
- package/dist/components/Toast/Toast.js.map +0 -1
- package/dist/components/Toast/ToastItem.d.ts +0 -6
- package/dist/components/Toast/ToastItem.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/Tooltip/TooltipOverlay.js.map +0 -1
- package/dist/internal/LazyDialogTrigger.d.ts +0 -8
- package/dist/internal/LazyDialogTrigger.js +0 -15
- package/dist/internal/LazyDialogTrigger.js.map +0 -1
- package/dist/internal/Spinner.d.ts +0 -3
- package/dist/internal/Spinner.js +0 -14
- package/dist/internal/Spinner.js.map +0 -1
- package/dist/internal/useLazyMenuTrigger.d.ts +0 -23
- package/dist/internal/useLazyMenuTrigger.js +0 -47
- package/dist/internal/useLazyMenuTrigger.js.map +0 -1
- package/dist/utils/cxLite.d.ts +0 -12
- package/dist/utils/cxLite.js +0 -23
- package/dist/utils/cxLite.js.map +0 -1
- /package/dist/components/{Badge → atoms/Badge}/index.js +0 -0
- /package/dist/components/{Checkbox → atoms/Checkbox}/Checkbox.d.ts +0 -0
- /package/dist/components/{Checkbox → atoms/Checkbox}/index.d.ts +0 -0
- /package/dist/components/{Checkbox → atoms/Checkbox}/index.js +0 -0
- /package/dist/components/{IconButton → atoms/IconButton}/index.d.ts +0 -0
- /package/dist/components/{IconButton → atoms/IconButton}/index.js +0 -0
- /package/dist/components/{Kbd → atoms/Kbd}/index.d.ts +0 -0
- /package/dist/components/{Kbd → atoms/Kbd}/index.js +0 -0
- /package/dist/components/{ProgressBar → atoms/ProgressBar}/index.js +0 -0
- /package/dist/components/{Skeleton → atoms/Skeleton}/Skeleton.d.ts +0 -0
- /package/dist/components/{Skeleton → atoms/Skeleton}/index.d.ts +0 -0
- /package/dist/components/{Skeleton → atoms/Skeleton}/index.js +0 -0
- /package/dist/components/{Spinner → atoms/Spinner}/Spinner.d.ts +0 -0
- /package/dist/components/{Spinner → atoms/Spinner}/index.d.ts +0 -0
- /package/dist/components/{Spinner → atoms/Spinner}/index.js +0 -0
- /package/dist/components/{Switch → atoms/Switch}/index.d.ts +0 -0
- /package/dist/components/{Switch → atoms/Switch}/index.js +0 -0
- /package/dist/components/{Tooltip → atoms/Tooltip}/Tooltip.d.ts +0 -0
- /package/dist/components/{Tooltip → atoms/Tooltip}/TooltipOverlay.d.ts +0 -0
- /package/dist/components/{Tooltip → atoms/Tooltip}/index.d.ts +0 -0
- /package/dist/components/{Tooltip → atoms/Tooltip}/index.js +0 -0
- /package/dist/components/{Breadcrumbs → molecules/Breadcrumbs}/Breadcrumbs.d.ts +0 -0
- /package/dist/components/{Breadcrumbs → molecules/Breadcrumbs}/index.d.ts +0 -0
- /package/dist/components/{Breadcrumbs → molecules/Breadcrumbs}/index.js +0 -0
- /package/dist/components/{Card → molecules/Card}/index.js +0 -0
- /package/dist/components/{CodeBlock → molecules/CodeBlock}/index.d.ts +0 -0
- /package/dist/components/{CodeBlock → molecules/CodeBlock}/index.js +0 -0
- /package/dist/components/{Combobox → molecules/Combobox}/index.d.ts +0 -0
- /package/dist/components/{Combobox → molecules/Combobox}/index.js +0 -0
- /package/dist/components/{DatePicker → molecules/DatePicker}/index.d.ts +0 -0
- /package/dist/components/{DatePicker → molecules/DatePicker}/index.js +0 -0
- /package/dist/components/{Dialog → molecules/Dialog}/index.d.ts +0 -0
- /package/dist/components/{Dialog → molecules/Dialog}/index.js +0 -0
- /package/dist/components/{Drawer → molecules/Drawer}/index.d.ts +0 -0
- /package/dist/components/{Drawer → molecules/Drawer}/index.js +0 -0
- /package/dist/components/{DropdownMenu → molecules/DropdownMenu}/index.d.ts +0 -0
- /package/dist/components/{DropdownMenu → molecules/DropdownMenu}/index.js +0 -0
- /package/dist/components/{EmptyState → molecules/EmptyState}/index.d.ts +0 -0
- /package/dist/components/{EmptyState → molecules/EmptyState}/index.js +0 -0
- /package/dist/components/{FileDropZone → molecules/FileDropZone}/index.d.ts +0 -0
- /package/dist/components/{FileDropZone → molecules/FileDropZone}/index.js +0 -0
- /package/dist/components/{Input → molecules/Input}/index.js +0 -0
- /package/dist/components/{Popover → molecules/Popover}/PopoverOverlay.d.ts +0 -0
- /package/dist/components/{Popover → molecules/Popover}/index.d.ts +0 -0
- /package/dist/components/{Popover → molecules/Popover}/index.js +0 -0
- /package/dist/components/{RadioGroup → molecules/RadioGroup}/RadioGroup.d.ts +0 -0
- /package/dist/components/{RadioGroup → molecules/RadioGroup}/index.d.ts +0 -0
- /package/dist/components/{RadioGroup → molecules/RadioGroup}/index.js +0 -0
- /package/dist/components/{SegmentedControl → molecules/SegmentedControl}/index.js +0 -0
- /package/dist/components/{Select → molecules/Select}/index.d.ts +0 -0
- /package/dist/components/{Select → molecules/Select}/index.js +0 -0
- /package/dist/components/{Tabs → molecules/Tabs}/Tabs.d.ts +0 -0
- /package/dist/components/{Tabs → molecules/Tabs}/index.d.ts +0 -0
- /package/dist/components/{Tabs → molecules/Tabs}/index.js +0 -0
- /package/dist/components/{Tag → molecules/Tag}/Tag.d.ts +0 -0
- /package/dist/components/{Tag → molecules/Tag}/index.d.ts +0 -0
- /package/dist/components/{Tag → molecules/Tag}/index.js +0 -0
- /package/dist/components/{Textarea → molecules/Textarea}/index.js +0 -0
- /package/dist/components/{Toast → molecules/Toast}/index.js +0 -0
- /package/dist/components/{Chart → organisms/Chart}/ChartTable.d.ts +0 -0
- /package/dist/components/{Chart → organisms/Chart}/geometry.d.ts +0 -0
- /package/dist/components/{Chart → organisms/Chart}/labels.d.ts +0 -0
- /package/dist/components/{Chart → organisms/Chart}/scale.d.ts +0 -0
- /package/dist/components/{Chart → organisms/Chart}/summary.d.ts +0 -0
- /package/dist/components/{Chart → organisms/Chart}/useElementWidth.d.ts +0 -0
- /package/dist/components/{CommandPalette → organisms/CommandPalette}/index.js +0 -0
- /package/dist/components/{PageHeader → organisms/PageHeader}/PageHeader.d.ts +0 -0
- /package/dist/components/{PageHeader → organisms/PageHeader}/index.d.ts +0 -0
- /package/dist/components/{PageHeader → organisms/PageHeader}/index.js +0 -0
- /package/dist/components/{Table → organisms/Table}/index.d.ts +0 -0
- /package/dist/components/{Table → organisms/Table}/index.js +0 -0
- /package/dist/{chrome → internal}/brandLogoPath.d.ts +0 -0
- /package/dist/{chrome → router}/Anchor.d.ts +0 -0
- /package/dist/{chrome → router}/LinkRouter.d.ts +0 -0
- /package/dist/{chrome → theme}/useTheme.d.ts +0 -0
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { Tone } from '../../../internal/types';
|
|
3
|
+
/** The shared semantic tones plus four categorical hues for apps with many statuses. */
|
|
4
|
+
export type BadgeTone = Tone | 'blue' | 'purple' | 'pink' | 'indigo';
|
|
4
5
|
export type BadgeSize = 'sm' | 'md';
|
|
5
6
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
|
-
|
|
7
|
+
tone?: BadgeTone;
|
|
7
8
|
size?: BadgeSize;
|
|
8
9
|
/** Shows a status dot before the label. */
|
|
9
10
|
dot?: boolean;
|
|
10
|
-
|
|
11
|
+
/** A neutral label whose status dot carries the tone. Use it for lists of statuses. */
|
|
12
|
+
quiet?: boolean;
|
|
13
|
+
/** An icon element such as `<Star />`. */
|
|
14
|
+
icon?: ReactNode;
|
|
11
15
|
children: ReactNode;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* A static, non-interactive status label. Colour never carries the meaning
|
|
15
|
-
* alone: the text says it. Blue, purple, pink
|
|
19
|
+
* alone: the text says it. Blue, purple, pink and indigo are
|
|
16
20
|
* categorical hues for apps with many statuses; the contrast check covers
|
|
17
21
|
* each of them in light and dark.
|
|
18
22
|
*/
|
|
19
|
-
export declare function Badge({
|
|
23
|
+
export declare function Badge({ tone, size, dot, quiet, icon, className, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cx } from "
|
|
2
|
+
import { cx } from "../../../utils/cx.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
// src/components/Badge/Badge.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
4
|
+
// src/components/atoms/Badge/Badge.tsx
|
|
5
|
+
var tones = {
|
|
6
|
+
neutral: {
|
|
7
7
|
badge: "bg-tertiary text-secondary ring-default",
|
|
8
8
|
dot: "bg-fg-tertiary"
|
|
9
9
|
},
|
|
@@ -35,10 +35,6 @@ var colors = {
|
|
|
35
35
|
badge: "bg-pink-subtle text-pink ring-pink",
|
|
36
36
|
dot: "bg-fg-pink"
|
|
37
37
|
},
|
|
38
|
-
orange: {
|
|
39
|
-
badge: "bg-orange-subtle text-orange ring-orange",
|
|
40
|
-
dot: "bg-fg-orange"
|
|
41
|
-
},
|
|
42
38
|
indigo: {
|
|
43
39
|
badge: "bg-indigo-subtle text-indigo ring-indigo",
|
|
44
40
|
dot: "bg-fg-indigo"
|
|
@@ -50,23 +46,23 @@ var sizes = {
|
|
|
50
46
|
};
|
|
51
47
|
/**
|
|
52
48
|
* A static, non-interactive status label. Colour never carries the meaning
|
|
53
|
-
* alone: the text says it. Blue, purple, pink
|
|
49
|
+
* alone: the text says it. Blue, purple, pink and indigo are
|
|
54
50
|
* categorical hues for apps with many statuses; the contrast check covers
|
|
55
51
|
* each of them in light and dark.
|
|
56
52
|
*/
|
|
57
|
-
function Badge({
|
|
53
|
+
function Badge({ tone = "neutral", size = "md", dot = false, quiet = false, icon, className, children, ...props }) {
|
|
58
54
|
return /* @__PURE__ */ jsxs("span", {
|
|
59
55
|
...props,
|
|
60
|
-
"
|
|
61
|
-
className: cx("inline-flex items-center rounded-full font-medium whitespace-nowrap ring-1 ring-inset", colors[color].badge, sizes[size], className),
|
|
56
|
+
className: cx("inline-flex items-center rounded-full font-medium whitespace-nowrap ring-1 ring-inset", tones[quiet ? "neutral" : tone].badge, sizes[size], className),
|
|
62
57
|
children: [
|
|
63
|
-
dot && /* @__PURE__ */ jsx("span", {
|
|
58
|
+
(dot || quiet) && /* @__PURE__ */ jsx("span", {
|
|
64
59
|
"aria-hidden": "true",
|
|
65
|
-
className: cx("size-1.5 rounded-full",
|
|
60
|
+
className: cx("size-1.5 rounded-full", tones[tone].dot)
|
|
66
61
|
}),
|
|
67
|
-
|
|
62
|
+
icon && /* @__PURE__ */ jsx("span", {
|
|
68
63
|
"aria-hidden": "true",
|
|
69
|
-
className: "
|
|
64
|
+
className: "inline-flex shrink-0 [&>svg]:size-3",
|
|
65
|
+
children: icon
|
|
70
66
|
}),
|
|
71
67
|
children
|
|
72
68
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","names":[],"sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport type { Tone } from '../../../internal/types';\nimport { cx } from '../../../utils/cx';\n\n/** The shared semantic tones plus four categorical hues for apps with many statuses. */\nexport type BadgeTone = Tone | 'blue' | 'purple' | 'pink' | 'indigo';\nexport type BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n tone?: BadgeTone;\n size?: BadgeSize;\n /** Shows a status dot before the label. */\n dot?: boolean;\n /** A neutral label whose status dot carries the tone. Use it for lists of statuses. */\n quiet?: boolean;\n /** An icon element such as `<Star />`. */\n icon?: ReactNode;\n children: ReactNode;\n}\n\nconst tones: Record<BadgeTone, { badge: string; dot: string }> = {\n neutral: { badge: 'bg-tertiary text-secondary ring-default', dot: 'bg-fg-tertiary' },\n brand: {\n badge: 'bg-brand-subtle text-brand ring-brand-200 dark:ring-brand-800',\n dot: 'bg-fg-brand',\n },\n success: {\n badge: 'bg-success-subtle text-success ring-success-200 dark:ring-success-800',\n dot: 'bg-fg-success',\n },\n warning: {\n badge: 'bg-warning-subtle text-warning ring-warning-200 dark:ring-warning-800',\n dot: 'bg-fg-warning',\n },\n error: {\n badge: 'bg-error-subtle text-error ring-error-200 dark:ring-error-800',\n dot: 'bg-fg-error',\n },\n blue: { badge: 'bg-blue-subtle text-blue ring-blue', dot: 'bg-fg-blue' },\n purple: { badge: 'bg-purple-subtle text-purple ring-purple', dot: 'bg-fg-purple' },\n pink: { badge: 'bg-pink-subtle text-pink ring-pink', dot: 'bg-fg-pink' },\n indigo: { badge: 'bg-indigo-subtle text-indigo ring-indigo', dot: 'bg-fg-indigo' },\n};\n\nconst sizes: Record<BadgeSize, string> = {\n sm: 'h-5 gap-1 px-2 text-xs',\n md: 'h-6 gap-1.5 px-2.5 text-sm',\n};\n\n/**\n * A static, non-interactive status label. Colour never carries the meaning\n * alone: the text says it. Blue, purple, pink and indigo are\n * categorical hues for apps with many statuses; the contrast check covers\n * each of them in light and dark.\n */\nexport function Badge({\n tone = 'neutral',\n size = 'md',\n dot = false,\n quiet = false,\n icon,\n className,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n {...props}\n className={cx(\n 'inline-flex items-center rounded-full font-medium whitespace-nowrap ring-1 ring-inset',\n tones[quiet ? 'neutral' : tone].badge,\n sizes[size],\n className,\n )}\n >\n {(dot || quiet) && (\n <span aria-hidden='true' className={cx('size-1.5 rounded-full', tones[tone].dot)} />\n )}\n {icon && (\n <span aria-hidden='true' className='inline-flex shrink-0 [&>svg]:size-3'>\n {icon}\n </span>\n )}\n {children}\n </span>\n );\n}\n"],"mappings":";;;;AAoBA,IAAM,QAA2D;CAC/D,SAAS;EAAE,OAAO;EAA2C,KAAK;CAAiB;CACnF,OAAO;EACL,OAAO;EACP,KAAK;CACP;CACA,SAAS;EACP,OAAO;EACP,KAAK;CACP;CACA,SAAS;EACP,OAAO;EACP,KAAK;CACP;CACA,OAAO;EACL,OAAO;EACP,KAAK;CACP;CACA,MAAM;EAAE,OAAO;EAAsC,KAAK;CAAa;CACvE,QAAQ;EAAE,OAAO;EAA4C,KAAK;CAAe;CACjF,MAAM;EAAE,OAAO;EAAsC,KAAK;CAAa;CACvE,QAAQ;EAAE,OAAO;EAA4C,KAAK;CAAe;AACnF;AAEA,IAAM,QAAmC;CACvC,IAAI;CACJ,IAAI;AACN;;;;;;;AAQA,SAAgB,MAAM,EACpB,OAAO,WACP,OAAO,MACP,MAAM,OACN,QAAQ,OACR,MACA,WACA,UACA,GAAG,SACU;CACb,OACE,qBAAC,QAAD;EACE,GAAI;EACJ,WAAW,GACT,yFACA,MAAM,QAAQ,YAAY,KAAK,CAAC,OAChC,MAAM,OACN,SACF;EAPF,UAAA;IASI,OAAO,UACP,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAW,GAAG,yBAAyB,MAAM,KAAK,CAAC,GAAG;GAAI,CAAA;GAEpF,QACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAU;IAChC,UAAA;GACG,CAAA;GAEP;EACG;;AAEV"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface BrandLoaderProps {
|
|
2
|
+
/** Text read aloud while loading. */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Rendered width and height in pixels. */
|
|
5
|
+
size?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The logo drawing itself like a brush stroke, for a page that is on its way.
|
|
10
|
+
* A wide stroke along the logo's outline reveals the filled shape, which then
|
|
11
|
+
* holds, fades and starts again. The dash is 0.42 of the path, just over its
|
|
12
|
+
* longest part, so every part draws at the same pace and none waits. Under reduced motion it shows the still logo.
|
|
13
|
+
*/
|
|
14
|
+
export declare function BrandLoader({ label, size, className }: BrandLoaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { brandLogoPath } from "../../../internal/brandLogoPath.js";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/atoms/BrandLoader/BrandLoader.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The logo drawing itself like a brush stroke, for a page that is on its way.
|
|
8
|
+
* A wide stroke along the logo's outline reveals the filled shape, which then
|
|
9
|
+
* holds, fades and starts again. The dash is 0.42 of the path, just over its
|
|
10
|
+
* longest part, so every part draws at the same pace and none waits. Under reduced motion it shows the still logo.
|
|
11
|
+
*/
|
|
12
|
+
function BrandLoader({ label = "Loading", size = 64, className }) {
|
|
13
|
+
const maskId = useId();
|
|
14
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
15
|
+
role: "status",
|
|
16
|
+
className,
|
|
17
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
viewBox: "-0.5 -0.5 101 101",
|
|
19
|
+
width: size,
|
|
20
|
+
height: size,
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
focusable: "false",
|
|
23
|
+
className: "motion-safe:animate-brand-fade",
|
|
24
|
+
children: [/* @__PURE__ */ jsx("mask", {
|
|
25
|
+
id: maskId,
|
|
26
|
+
maskUnits: "userSpaceOnUse",
|
|
27
|
+
x: "-10",
|
|
28
|
+
y: "-10",
|
|
29
|
+
width: "120",
|
|
30
|
+
height: "120",
|
|
31
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
32
|
+
d: brandLogoPath,
|
|
33
|
+
pathLength: 1,
|
|
34
|
+
fill: "none",
|
|
35
|
+
stroke: "white",
|
|
36
|
+
strokeWidth: 14,
|
|
37
|
+
strokeLinecap: "round",
|
|
38
|
+
strokeLinejoin: "round",
|
|
39
|
+
strokeDasharray: .42,
|
|
40
|
+
strokeDashoffset: 0,
|
|
41
|
+
className: "motion-safe:animate-brand-draw"
|
|
42
|
+
})
|
|
43
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
44
|
+
className: "fill-(--ui-logo)",
|
|
45
|
+
fillRule: "evenodd",
|
|
46
|
+
d: brandLogoPath,
|
|
47
|
+
mask: `url(#${maskId})`
|
|
48
|
+
})]
|
|
49
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "sr-only",
|
|
51
|
+
children: label
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export { BrandLoader };
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=BrandLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandLoader.js","names":[],"sources":["../../../../src/components/atoms/BrandLoader/BrandLoader.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { brandLogoPath } from '../../../internal/brandLogoPath';\n\nexport interface BrandLoaderProps {\n /** Text read aloud while loading. */\n label?: string;\n /** Rendered width and height in pixels. */\n size?: number;\n className?: string;\n}\n\n/**\n * The logo drawing itself like a brush stroke, for a page that is on its way.\n * A wide stroke along the logo's outline reveals the filled shape, which then\n * holds, fades and starts again. The dash is 0.42 of the path, just over its\n * longest part, so every part draws at the same pace and none waits. Under reduced motion it shows the still logo.\n */\nexport function BrandLoader({ label = 'Loading', size = 64, className }: BrandLoaderProps) {\n const maskId = useId();\n return (\n <span role='status' className={className}>\n <svg\n viewBox='-0.5 -0.5 101 101'\n width={size}\n height={size}\n aria-hidden='true'\n focusable='false'\n className='motion-safe:animate-brand-fade'\n >\n <mask id={maskId} maskUnits='userSpaceOnUse' x='-10' y='-10' width='120' height='120'>\n <path\n d={brandLogoPath}\n pathLength={1}\n fill='none'\n stroke='white'\n strokeWidth={14}\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeDasharray={0.42}\n strokeDashoffset={0}\n className='motion-safe:animate-brand-draw'\n />\n </mask>\n <path\n className='fill-(--ui-logo)'\n fillRule='evenodd'\n d={brandLogoPath}\n mask={`url(#${maskId})`}\n />\n </svg>\n <span className='sr-only'>{label}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;AAiBA,SAAgB,YAAY,EAAE,QAAQ,WAAW,OAAO,IAAI,aAA+B;CACzF,MAAM,SAAS,MAAM;CACrB,OACE,qBAAC,QAAD;EAAM,MAAK;EAAoB;EAA/B,UAAA,CACE,qBAAC,OAAD;GACE,SAAQ;GACR,OAAO;GACP,QAAQ;GACR,eAAY;GACZ,WAAU;GACV,WAAU;GANZ,UAAA,CAQE,oBAAC,QAAD;IAAM,IAAI;IAAQ,WAAU;IAAiB,GAAE;IAAM,GAAE;IAAM,OAAM;IAAM,QAAO;IAC9E,UAAA,oBAAC,QAAD;KACE,GAAG;KACH,YAAY;KACZ,MAAK;KACL,QAAO;KACP,aAAa;KACb,eAAc;KACd,gBAAe;KACf,iBAAiB;KACjB,kBAAkB;KAClB,WAAU;IACX,CAAA;GACG,CAAA,GACN,oBAAC,QAAD;IACE,WAAU;IACV,UAAS;IACT,GAAG;IACH,MAAM,QAAQ,OAAO;GACtB,CAAA,CACE;EACL,CAAA,GAAA,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAY,CAAA,CACnC;;AAEV"}
|
|
@@ -6,7 +6,7 @@ export interface BrandLogoProps extends Omit<SVGProps<SVGSVGElement>, 'children'
|
|
|
6
6
|
size?: number;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Eylül
|
|
9
|
+
* Eylül's logo: a calligraphic E and G whose strokes form a horse's
|
|
10
10
|
* head. It is one path in the brand green, light green in dark mode, in every
|
|
11
11
|
* theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.
|
|
12
12
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { brandLogoPath } from "./brandLogoPath.js";
|
|
1
|
+
import { brandLogoPath } from "../../../internal/brandLogoPath.js";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
// src/
|
|
3
|
+
// src/components/atoms/BrandLogo/BrandLogo.tsx
|
|
5
4
|
/**
|
|
6
|
-
* Eylül
|
|
5
|
+
* Eylül's logo: a calligraphic E and G whose strokes form a horse's
|
|
7
6
|
* head. It is one path in the brand green, light green in dark mode, in every
|
|
8
7
|
* theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.
|
|
9
8
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandLogo.js","names":[],"sources":["../../../../src/components/atoms/BrandLogo/BrandLogo.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { brandLogoPath } from '../../../internal/brandLogoPath';\n\nexport interface BrandLogoProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n /** Accessible name. Without it the logo is decorative and hidden. */\n title?: string;\n /** Rendered width and height in pixels. At 48 and below it draws with a thin outline. */\n size?: number;\n}\n\n/**\n * Eylül's logo: a calligraphic E and G whose strokes form a horse's\n * head. It is one path in the brand green, light green in dark mode, in every\n * theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.\n */\nexport function BrandLogo({ title, size = 64, ...props }: BrandLogoProps) {\n const labelled = Boolean(title);\n const small = size <= 48;\n return (\n <svg\n viewBox={small ? '-1.5 -1.5 103 103' : '-0.5 -0.5 101 101'}\n width={size}\n height={size}\n role={labelled ? 'img' : undefined}\n aria-label={title}\n aria-hidden={labelled ? undefined : true}\n focusable='false'\n {...props}\n >\n <path\n className='fill-(--ui-logo) stroke-(--ui-logo)'\n strokeWidth={small ? 2 : 0}\n strokeLinejoin='round'\n fillRule='evenodd'\n d={brandLogoPath}\n />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;AAeA,SAAgB,UAAU,EAAE,OAAO,OAAO,IAAI,GAAG,SAAyB;CACxE,MAAM,WAAW,QAAQ,KAAK;CAC9B,MAAM,QAAQ,QAAQ;CACtB,OACE,oBAAC,OAAD;EACE,SAAS,QAAQ,sBAAsB;EACvC,OAAO;EACP,QAAQ;EACR,MAAM,WAAW,QAAQ,KAAA;EACzB,cAAY;EACZ,eAAa,WAAW,KAAA,IAAY;EACpC,WAAU;EACV,GAAI;EAEJ,UAAA,oBAAC,QAAD;GACE,WAAU;GACV,aAAa,QAAQ,IAAI;GACzB,gBAAe;GACf,UAAS;GACT,GAAG;EACJ,CAAA;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BrandLogo } from "./BrandLogo.js";
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import { type ButtonProps as AriaButtonProps, type LinkProps as AriaLinkProps } from 'react-aria-components';
|
|
3
|
-
import type
|
|
4
|
-
import { type
|
|
5
|
-
export {
|
|
3
|
+
import { type ControlSize } from '../../../internal/control';
|
|
4
|
+
import { type ButtonVariant } from './buttonStyles';
|
|
5
|
+
export { buttonStyles, type ButtonVariant } from './buttonStyles';
|
|
6
6
|
interface ButtonLookProps {
|
|
7
7
|
/**
|
|
8
8
|
* Visual emphasis. Use one primary button per view. `destructive-outline` is
|
|
9
9
|
* the quieter choice for a delete action next to a primary one.
|
|
10
10
|
*/
|
|
11
11
|
variant?: ButtonVariant;
|
|
12
|
-
size?:
|
|
13
|
-
/**
|
|
14
|
-
iconLeading?:
|
|
15
|
-
/**
|
|
16
|
-
iconTrailing?:
|
|
12
|
+
size?: ControlSize;
|
|
13
|
+
/** An icon element such as `<Plus />`, rendered before the label. */
|
|
14
|
+
iconLeading?: ReactNode;
|
|
15
|
+
/** An icon element such as `<ArrowRight />`, rendered after the label. */
|
|
16
|
+
iconTrailing?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* `sm` shows only the icon below the sm breakpoint, as a square button. The label stays
|
|
19
|
+
* as the accessible name. Needs `iconLeading`.
|
|
20
|
+
*/
|
|
21
|
+
hideLabelBelow?: 'sm';
|
|
17
22
|
}
|
|
18
23
|
export interface ButtonProps extends ButtonLookProps, Omit<AriaButtonProps, 'isPending'> {
|
|
19
24
|
/** Shows a spinner, keeps the width and announces the pending state. */
|
|
@@ -32,7 +37,6 @@ export interface ButtonProps extends ButtonLookProps, Omit<AriaButtonProps, 'isP
|
|
|
32
37
|
export interface LinkButtonProps extends ButtonLookProps, Omit<AriaLinkProps, 'children'> {
|
|
33
38
|
href: string;
|
|
34
39
|
children?: ReactNode;
|
|
35
|
-
/** Ref to the anchor element. */
|
|
36
40
|
ref?: Ref<HTMLAnchorElement>;
|
|
37
41
|
}
|
|
38
42
|
/** A button, or a link that looks like one when `href` is set. */
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../../internal/control.js";
|
|
3
|
+
import { cx } from "../../../utils/cx.js";
|
|
4
|
+
import { Spinner } from "../Spinner/Spinner.js";
|
|
5
|
+
import { buttonStyles } from "./buttonStyles.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Button, Link, composeRenderProps } from "react-aria-components";
|
|
8
|
+
// src/components/atoms/Button/Button.tsx
|
|
9
|
+
var iconOnlyBelowSm = {
|
|
10
|
+
sm: "w-control-sm px-0 sm:w-auto sm:px-3",
|
|
11
|
+
md: "w-control-md px-0 sm:w-auto sm:px-control-x",
|
|
12
|
+
lg: "w-control-lg px-0 sm:w-auto sm:px-5"
|
|
13
|
+
};
|
|
14
|
+
function label(content, hideLabelBelow) {
|
|
15
|
+
return hideLabelBelow ? /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "sr-only sm:not-sr-only",
|
|
17
|
+
children: content
|
|
18
|
+
}) : content;
|
|
19
|
+
}
|
|
20
|
+
/** A button, or a link that looks like one when `href` is set. */
|
|
21
|
+
function Button$1(props) {
|
|
22
|
+
if (props.href !== void 0) return /* @__PURE__ */ jsx(ButtonLink, { ...props });
|
|
23
|
+
return /* @__PURE__ */ jsx(ButtonControl, { ...props });
|
|
24
|
+
}
|
|
25
|
+
function ButtonControl({ variant = "primary", size = "md", isLoading = false, iconLeading, iconTrailing, hideLabelBelow, loadingLabel, ref, className, children, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
27
|
+
...props,
|
|
28
|
+
ref,
|
|
29
|
+
isPending: isLoading,
|
|
30
|
+
className: composeRenderProps(className, (consumer) => buttonStyles({
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
className: cx(hideLabelBelow && iconOnlyBelowSm[size], consumer)
|
|
34
|
+
})),
|
|
35
|
+
children: composeRenderProps(children, (content, { isPending }) => /* @__PURE__ */ jsxs(Fragment, { children: [isPending && /* @__PURE__ */ jsxs("span", {
|
|
36
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
37
|
+
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
38
|
+
size: "sm",
|
|
39
|
+
className: "text-current"
|
|
40
|
+
}), loadingLabel && /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
children: loadingLabel
|
|
43
|
+
})]
|
|
44
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
45
|
+
className: cx("inline-flex items-center gap-[inherit]", isPending && "opacity-0"),
|
|
46
|
+
children: [
|
|
47
|
+
iconLeading && /* @__PURE__ */ jsx("span", {
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
className: "inline-flex shrink-0 [&>svg]:size-4",
|
|
50
|
+
children: iconLeading
|
|
51
|
+
}),
|
|
52
|
+
label(content, hideLabelBelow),
|
|
53
|
+
iconTrailing && /* @__PURE__ */ jsx("span", {
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
className: "inline-flex shrink-0 [&>svg]:size-4",
|
|
56
|
+
children: iconTrailing
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
})] }))
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function ButtonLink({ variant = "primary", size = "md", iconLeading, iconTrailing, hideLabelBelow, ref, className, children, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsxs(Link, {
|
|
64
|
+
...props,
|
|
65
|
+
ref,
|
|
66
|
+
className: composeRenderProps(className, (consumer) => buttonStyles({
|
|
67
|
+
variant,
|
|
68
|
+
size,
|
|
69
|
+
className: cx(hideLabelBelow && iconOnlyBelowSm[size], consumer)
|
|
70
|
+
})),
|
|
71
|
+
children: [
|
|
72
|
+
iconLeading && /* @__PURE__ */ jsx("span", {
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: "inline-flex shrink-0 [&>svg]:size-4",
|
|
75
|
+
children: iconLeading
|
|
76
|
+
}),
|
|
77
|
+
label(children, hideLabelBelow),
|
|
78
|
+
iconTrailing && /* @__PURE__ */ jsx("span", {
|
|
79
|
+
"aria-hidden": "true",
|
|
80
|
+
className: "inline-flex shrink-0 [&>svg]:size-4",
|
|
81
|
+
children: iconTrailing
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export { Button$1 as Button, buttonStyles };
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","names":["Button","AriaButton","_Fragment","AriaLink"],"sources":["../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport {\n Button as AriaButton,\n Link as AriaLink,\n composeRenderProps,\n type ButtonProps as AriaButtonProps,\n type LinkProps as AriaLinkProps,\n} from 'react-aria-components';\nimport { iconSlot, type ControlSize } from '../../../internal/control';\nimport { cx } from '../../../utils/cx';\nimport { Spinner } from '../Spinner/Spinner';\nimport { buttonStyles, type ButtonVariant } from './buttonStyles';\n\nexport { buttonStyles, type ButtonVariant } from './buttonStyles';\n\ninterface ButtonLookProps {\n /**\n * Visual emphasis. Use one primary button per view. `destructive-outline` is\n * the quieter choice for a delete action next to a primary one.\n */\n variant?: ButtonVariant;\n size?: ControlSize;\n /** An icon element such as `<Plus />`, rendered before the label. */\n iconLeading?: ReactNode;\n /** An icon element such as `<ArrowRight />`, rendered after the label. */\n iconTrailing?: ReactNode;\n /**\n * `sm` shows only the icon below the sm breakpoint, as a square button. The label stays\n * as the accessible name. Needs `iconLeading`.\n */\n hideLabelBelow?: 'sm';\n}\n\nconst iconOnlyBelowSm: Record<ControlSize, string> = {\n sm: 'w-control-sm px-0 sm:w-auto sm:px-3',\n md: 'w-control-md px-0 sm:w-auto sm:px-control-x',\n lg: 'w-control-lg px-0 sm:w-auto sm:px-5',\n};\n\nfunction label(content: ReactNode, hideLabelBelow: 'sm' | undefined) {\n return hideLabelBelow ? <span className='sr-only sm:not-sr-only'>{content}</span> : content;\n}\n\nexport interface ButtonProps extends ButtonLookProps, Omit<AriaButtonProps, 'isPending'> {\n /** Shows a spinner, keeps the width and announces the pending state. */\n isLoading?: boolean;\n /** Text announced while loading. Defaults to the button label. */\n loadingLabel?: string;\n href?: undefined;\n /** Ref to the button element, for example to return focus to it. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * A link that looks like a button: pass `href` and Button renders a React Aria\n * Link (an `<a>`), which goes through your router's navigate when the app is\n * wrapped in a React Aria `RouterProvider`. A link cannot be loading.\n */\nexport interface LinkButtonProps extends ButtonLookProps, Omit<AriaLinkProps, 'children'> {\n href: string;\n children?: ReactNode;\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/** A button, or a link that looks like one when `href` is set. */\nexport function Button(props: ButtonProps | LinkButtonProps) {\n if (props.href !== undefined) return <ButtonLink {...props} />;\n return <ButtonControl {...props} />;\n}\n\nfunction ButtonControl({\n variant = 'primary',\n size = 'md',\n isLoading = false,\n iconLeading,\n iconTrailing,\n hideLabelBelow,\n loadingLabel,\n ref,\n className,\n children,\n ...props\n}: ButtonProps) {\n return (\n <AriaButton\n {...props}\n ref={ref}\n isPending={isLoading}\n className={composeRenderProps(className, (consumer) =>\n buttonStyles({\n variant,\n size,\n className: cx(hideLabelBelow && iconOnlyBelowSm[size], consumer),\n }),\n )}\n >\n {composeRenderProps(children, (content, { isPending }): ReactNode => (\n <>\n {isPending && (\n <span className='absolute inset-0 flex items-center justify-center'>\n <Spinner size='sm' className='text-current' />\n {loadingLabel && <span className='sr-only'>{loadingLabel}</span>}\n </span>\n )}\n <span className={cx('inline-flex items-center gap-[inherit]', isPending && 'opacity-0')}>\n {iconLeading && (\n <span aria-hidden='true' className={iconSlot}>\n {iconLeading}\n </span>\n )}\n {label(content, hideLabelBelow)}\n {iconTrailing && (\n <span aria-hidden='true' className={iconSlot}>\n {iconTrailing}\n </span>\n )}\n </span>\n </>\n ))}\n </AriaButton>\n );\n}\n\nfunction ButtonLink({\n variant = 'primary',\n size = 'md',\n iconLeading,\n iconTrailing,\n hideLabelBelow,\n ref,\n className,\n children,\n ...props\n}: LinkButtonProps) {\n return (\n <AriaLink\n {...props}\n ref={ref}\n className={composeRenderProps(className, (consumer) =>\n buttonStyles({\n variant,\n size,\n className: cx(hideLabelBelow && iconOnlyBelowSm[size], consumer),\n }),\n )}\n >\n {iconLeading && (\n <span aria-hidden='true' className={iconSlot}>\n {iconLeading}\n </span>\n )}\n {label(children, hideLabelBelow)}\n {iconTrailing && (\n <span aria-hidden='true' className={iconSlot}>\n {iconTrailing}\n </span>\n )}\n </AriaLink>\n );\n}\n"],"mappings":";;;;;;;;AAiCA,IAAM,kBAA+C;CACnD,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,SAAS,MAAM,SAAoB,gBAAkC;CACnE,OAAO,iBAAiB,oBAAC,QAAD;EAAM,WAAU;EAA0B,UAAA;CAAc,CAAA,IAAI;AACtF;;AAwBA,SAAgBA,SAAO,OAAsC;CAC3D,IAAI,MAAM,SAAS,KAAA,GAAW,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;CAC7D,OAAO,oBAAC,eAAD,EAAe,GAAI,MAAQ,CAAA;AACpC;AAEA,SAAS,cAAc,EACrB,UAAU,WACV,OAAO,MACP,YAAY,OACZ,aACA,cACA,gBACA,cACA,KACA,WACA,UACA,GAAG,SACW;CACd,OACE,oBAACC,QAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,WAAW,mBAAmB,YAAY,aACxC,aAAa;GACX;GACA;GACA,WAAW,GAAG,kBAAkB,gBAAgB,OAAO,QAAQ;EACjE,CAAC,CACH;EAEC,UAAA,mBAAmB,WAAW,SAAS,EAAE,gBACxC,qBAAAC,UAAA,EAAA,UAAA,CACG,aACC,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,oBAAC,SAAD;IAAS,MAAK;IAAK,WAAU;GAAgB,CAAA,GAC5C,gBAAgB,oBAAC,QAAD;IAAM,WAAU;IAAW,UAAA;GAAmB,CAAA,CAC3D;EAER,CAAA,GAAA,qBAAC,QAAD;GAAM,WAAW,GAAG,0CAA0C,aAAa,WAAW;GAAtF,UAAA;IACG,eACC,oBAAC,QAAD;KAAM,eAAY;KAAO,WAAA;KACtB,UAAA;IACG,CAAA;IAEP,MAAM,SAAS,cAAc;IAC7B,gBACC,oBAAC,QAAD;KAAM,eAAY;KAAO,WAAA;KACtB,UAAA;IACG,CAAA;GAEJ;EACN,CAAA,CAAA,EAAA,CAAA,CACH;CACS,CAAA;AAEhB;AAEA,SAAS,WAAW,EAClB,UAAU,WACV,OAAO,MACP,aACA,cACA,gBACA,KACA,WACA,UACA,GAAG,SACe;CAClB,OACE,qBAACC,MAAD;EACE,GAAI;EACC;EACL,WAAW,mBAAmB,YAAY,aACxC,aAAa;GACX;GACA;GACA,WAAW,GAAG,kBAAkB,gBAAgB,OAAO,QAAQ;EACjE,CAAC,CACH;EATF,UAAA;GAWG,eACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAA;IACtB,UAAA;GACG,CAAA;GAEP,MAAM,UAAU,cAAc;GAC9B,gBACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAA;IACtB,UAAA;GACG,CAAA;EAEA;;AAEd"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const buttonSizes: Record<ButtonSize, string>;
|
|
5
|
-
export declare const buttonBase: string;
|
|
1
|
+
import { type ButtonVariant } from '../../../internal/button';
|
|
2
|
+
import { type ControlSize } from '../../../internal/control';
|
|
3
|
+
export type { ButtonVariant };
|
|
6
4
|
export interface ButtonStylesOptions {
|
|
7
5
|
variant?: ButtonVariant;
|
|
8
|
-
size?:
|
|
6
|
+
size?: ControlSize;
|
|
9
7
|
/** Extra classes, merged so they win over the defaults. */
|
|
10
8
|
className?: string;
|
|
11
9
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonBase, buttonVariants } from "../../../internal/button.js";
|
|
3
|
+
import { controlHeight, controlRadius } from "../../../internal/control.js";
|
|
4
|
+
import { cx } from "../../../utils/cx.js";
|
|
5
|
+
// src/components/atoms/Button/buttonStyles.ts
|
|
6
|
+
var buttonSizes = {
|
|
7
|
+
sm: `${controlRadius.sm} ${controlHeight.sm} gap-1.5 px-3 text-sm`,
|
|
8
|
+
md: `${controlRadius.md} ${controlHeight.md} gap-2 px-control-x text-sm`,
|
|
9
|
+
lg: `${controlRadius.lg} ${controlHeight.lg} gap-2.5 px-5 text-md`
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The class string of a Button, for a custom element that must look like one,
|
|
13
|
+
* such as a framework link component that cannot be wrapped:
|
|
14
|
+
*
|
|
15
|
+
* <Link href="/new" className={buttonStyles({ variant: 'secondary' })}>New</Link>
|
|
16
|
+
*
|
|
17
|
+
* The hover, pressed and disabled states key off React Aria's data attributes,
|
|
18
|
+
* so use it on a React Aria element; on a plain element only the resting state shows.
|
|
19
|
+
*/
|
|
20
|
+
function buttonStyles({ variant = "primary", size = "md", className } = {}) {
|
|
21
|
+
return cx(buttonBase, buttonVariants[variant], buttonSizes[size], className);
|
|
22
|
+
}
|
|
23
|
+
export { buttonStyles };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=buttonStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonStyles.js","names":[],"sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"sourcesContent":["import { buttonBase, buttonVariants, type ButtonVariant } from '../../../internal/button';\nimport { controlHeight, controlRadius, type ControlSize } from '../../../internal/control';\nimport { cx } from '../../../utils/cx';\n\nexport type { ButtonVariant };\n\nconst buttonSizes: Record<ControlSize, string> = {\n sm: `${controlRadius.sm} ${controlHeight.sm} gap-1.5 px-3 text-sm`,\n md: `${controlRadius.md} ${controlHeight.md} gap-2 px-control-x text-sm`,\n lg: `${controlRadius.lg} ${controlHeight.lg} gap-2.5 px-5 text-md`,\n};\n\nexport interface ButtonStylesOptions {\n variant?: ButtonVariant;\n size?: ControlSize;\n /** Extra classes, merged so they win over the defaults. */\n className?: string;\n}\n\n/**\n * The class string of a Button, for a custom element that must look like one,\n * such as a framework link component that cannot be wrapped:\n *\n * <Link href=\"/new\" className={buttonStyles({ variant: 'secondary' })}>New</Link>\n *\n * The hover, pressed and disabled states key off React Aria's data attributes,\n * so use it on a React Aria element; on a plain element only the resting state shows.\n */\nexport function buttonStyles({\n variant = 'primary',\n size = 'md',\n className,\n}: ButtonStylesOptions = {}): string {\n return cx(buttonBase, buttonVariants[variant], buttonSizes[size], className);\n}\n"],"mappings":";;;;;AAMA,IAAM,cAA2C;CAC/C,IAAI,GAAG,cAAc,GAAG,GAAG,cAAc,GAAG;CAC5C,IAAI,GAAG,cAAc,GAAG,GAAG,cAAc,GAAG;CAC5C,IAAI,GAAG,cAAc,GAAG,GAAG,cAAc,GAAG;AAC9C;;;;;;;;;;AAkBA,SAAgB,aAAa,EAC3B,UAAU,WACV,OAAO,MACP,cACuB,CAAC,GAAW;CACnC,OAAO,GAAG,YAAY,eAAe,UAAU,YAAY,OAAO,SAAS;AAC7E"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { focusRingGroup } from "../../../internal/focusRing.js";
|
|
3
|
+
import { ToggleText, toggleRow } from "../../../internal/toggle.js";
|
|
4
|
+
import { cx } from "../../../utils/cx.js";
|
|
3
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Check, Minus } from "lucide-react";
|
|
5
6
|
import { Checkbox, composeRenderProps } from "react-aria-components";
|
|
6
|
-
|
|
7
|
+
import { Check, Minus } from "lucide-react";
|
|
8
|
+
// src/components/atoms/Checkbox/Checkbox.tsx
|
|
7
9
|
function Checkbox$1({ children, hint, className, ...props }) {
|
|
8
10
|
return /* @__PURE__ */ jsx(Checkbox, {
|
|
9
11
|
...props,
|
|
10
|
-
className: composeRenderProps(className, (consumer) => cx(
|
|
12
|
+
className: composeRenderProps(className, (consumer) => cx(toggleRow, consumer)),
|
|
11
13
|
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
12
|
-
className: cx("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-xs border border-control bg-primary text-fg-on-solid transition-colors", "group-data-selected:border-brand group-data-selected:bg-brand-solid", "group-data-indeterminate:border-brand group-data-indeterminate:bg-brand-solid", "group-data-invalid:border-error", "group-data-disabled:border-disabled group-data-disabled:bg-disabled group-data-disabled:text-fg-disabled",
|
|
14
|
+
className: cx("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-xs border border-control bg-primary text-fg-on-solid transition-colors", "group-data-selected:border-brand group-data-selected:bg-brand-solid", "group-data-indeterminate:border-brand group-data-indeterminate:bg-brand-solid", "group-data-invalid:border-error", "group-data-disabled:border-disabled group-data-disabled:bg-disabled group-data-disabled:text-fg-disabled", focusRingGroup),
|
|
13
15
|
children: isIndeterminate ? /* @__PURE__ */ jsx(Minus, {
|
|
14
16
|
"aria-hidden": "true",
|
|
15
17
|
className: "size-3",
|
|
@@ -19,15 +21,9 @@ function Checkbox$1({ children, hint, className, ...props }) {
|
|
|
19
21
|
className: "size-3",
|
|
20
22
|
strokeWidth: 3
|
|
21
23
|
}) : null
|
|
22
|
-
}),
|
|
23
|
-
|
|
24
|
-
children
|
|
25
|
-
className: "font-medium",
|
|
26
|
-
children
|
|
27
|
-
}), hint && /* @__PURE__ */ jsx("span", {
|
|
28
|
-
className: "text-tertiary",
|
|
29
|
-
children: hint
|
|
30
|
-
})]
|
|
24
|
+
}), /* @__PURE__ */ jsx(ToggleText, {
|
|
25
|
+
hint,
|
|
26
|
+
children
|
|
31
27
|
})] })
|
|
32
28
|
});
|
|
33
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["Checkbox","AriaCheckbox","_Fragment"],"sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"sourcesContent":["import { Check, Minus } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n Checkbox as AriaCheckbox,\n composeRenderProps,\n type CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\nimport { focusRingGroup } from '../../../internal/focusRing';\nimport { toggleRow, ToggleText } from '../../../internal/toggle';\nimport { cx } from '../../../utils/cx';\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'children'> {\n /** Visible label. If omitted, pass `aria-label`. */\n children?: ReactNode;\n /** Supporting text under the label. */\n hint?: ReactNode;\n}\n\nexport function Checkbox({ children, hint, className, ...props }: CheckboxProps) {\n return (\n <AriaCheckbox\n {...props}\n className={composeRenderProps(className, (consumer) => cx(toggleRow, consumer))}\n >\n {({ isSelected, isIndeterminate }) => (\n <>\n <span\n className={cx(\n 'mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-xs border border-control bg-primary text-fg-on-solid transition-colors',\n 'group-data-selected:border-brand group-data-selected:bg-brand-solid',\n 'group-data-indeterminate:border-brand group-data-indeterminate:bg-brand-solid',\n 'group-data-invalid:border-error',\n 'group-data-disabled:border-disabled group-data-disabled:bg-disabled group-data-disabled:text-fg-disabled',\n focusRingGroup,\n )}\n >\n {isIndeterminate ? (\n <Minus aria-hidden='true' className='size-3' strokeWidth={3} />\n ) : isSelected ? (\n <Check aria-hidden='true' className='size-3' strokeWidth={3} />\n ) : null}\n </span>\n <ToggleText hint={hint}>{children}</ToggleText>\n </>\n )}\n </AriaCheckbox>\n );\n}\n"],"mappings":";;;;;;;;AAkBA,SAAgBA,WAAS,EAAE,UAAU,MAAM,WAAW,GAAG,SAAwB;CAC/E,OACE,oBAACC,UAAD;EACE,GAAI;EACJ,WAAW,mBAAmB,YAAY,aAAa,GAAG,WAAW,QAAQ,CAAC;EAE5E,WAAA,EAAE,YAAY,sBACd,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;GACE,WAAW,GACT,0IACA,uEACA,iFACA,mCACA,4GACA,cACF;GAEC,UAAA,kBACC,oBAAC,OAAD;IAAO,eAAY;IAAO,WAAU;IAAS,aAAa;GAAI,CAAA,IAC5D,aACF,oBAAC,OAAD;IAAO,eAAY;IAAO,WAAU;IAAS,aAAa;GAAI,CAAA,IAC5D;EACA,CAAA,GACN,oBAAC,YAAD;GAAkB;GAAO;EAAqB,CAAA,CAC9C,EAAA,CAAA;CAEQ,CAAA;AAElB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
|
+
import { type ButtonProps as AriaButtonProps } from 'react-aria-components';
|
|
3
|
+
import { type ButtonVariant } from '../../../internal/button';
|
|
4
|
+
/** `xs` is for a control inside another one, such as a field's toggle or a tag's remove button. */
|
|
5
|
+
export type IconButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
export interface IconButtonProps extends Omit<AriaButtonProps, 'children' | 'isPending'> {
|
|
7
|
+
/** An icon element such as `<Trash2 />`. */
|
|
8
|
+
icon: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Required: an icon alone has no accessible name. Leave it out only inside a React Aria
|
|
11
|
+
* slot (such as a DatePicker's `slot='next'`), which names the button in the user's language.
|
|
12
|
+
*/
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
variant?: ButtonVariant;
|
|
15
|
+
size?: IconButtonSize;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
/** Ref to the button element, for example to return focus to it. */
|
|
18
|
+
ref?: Ref<HTMLButtonElement>;
|
|
19
|
+
}
|
|
20
|
+
/** A square button with one icon, on the same size scale as Button. */
|
|
21
|
+
export declare function IconButton({ icon, variant, size, isLoading, ref, className, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonBase, buttonVariants } from "../../../internal/button.js";
|
|
3
|
+
import { controlRadius, controlSquare } from "../../../internal/control.js";
|
|
4
|
+
import { cx } from "../../../utils/cx.js";
|
|
5
|
+
import { Spinner } from "../Spinner/Spinner.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Button, composeRenderProps } from "react-aria-components";
|
|
8
|
+
// src/components/atoms/IconButton/IconButton.tsx
|
|
9
|
+
var sizes = {
|
|
10
|
+
xs: {
|
|
11
|
+
button: "size-control-xs rounded-sm",
|
|
12
|
+
icon: "size-3.5"
|
|
13
|
+
},
|
|
14
|
+
sm: {
|
|
15
|
+
button: `${controlRadius.sm} ${controlSquare.sm}`,
|
|
16
|
+
icon: "size-4"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
button: `${controlRadius.md} ${controlSquare.md}`,
|
|
20
|
+
icon: "size-5"
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
button: `${controlRadius.lg} ${controlSquare.lg}`,
|
|
24
|
+
icon: "size-5"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/** A square button with one icon, on the same size scale as Button. */
|
|
28
|
+
function IconButton({ icon, variant = "secondary", size = "md", isLoading = false, ref, className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
30
|
+
...props,
|
|
31
|
+
ref,
|
|
32
|
+
isPending: isLoading,
|
|
33
|
+
className: composeRenderProps(className, (consumer) => cx(buttonBase, buttonVariants[variant], "p-0", sizes[size].button, consumer)),
|
|
34
|
+
children: ({ isPending }) => isPending ? /* @__PURE__ */ jsx(Spinner, { className: cx(sizes[size].icon, "text-current") }) : /* @__PURE__ */ jsx("span", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: cx("inline-flex [&>svg]:size-full", sizes[size].icon),
|
|
37
|
+
children: icon
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export { IconButton };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":["AriaButton"],"sources":["../../../../src/components/atoms/IconButton/IconButton.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport {\n Button as AriaButton,\n composeRenderProps,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { buttonBase, buttonVariants, type ButtonVariant } from '../../../internal/button';\nimport { controlRadius, controlSquare } from '../../../internal/control';\nimport { cx } from '../../../utils/cx';\nimport { Spinner } from '../Spinner/Spinner';\n\n/** `xs` is for a control inside another one, such as a field's toggle or a tag's remove button. */\nexport type IconButtonSize = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface IconButtonProps extends Omit<AriaButtonProps, 'children' | 'isPending'> {\n /** An icon element such as `<Trash2 />`. */\n icon: ReactNode;\n /**\n * Required: an icon alone has no accessible name. Leave it out only inside a React Aria\n * slot (such as a DatePicker's `slot='next'`), which names the button in the user's language.\n */\n 'aria-label'?: string;\n variant?: ButtonVariant;\n size?: IconButtonSize;\n isLoading?: boolean;\n /** Ref to the button element, for example to return focus to it. */\n ref?: Ref<HTMLButtonElement>;\n}\n\nconst sizes: Record<IconButtonSize, { button: string; icon: string }> = {\n xs: { button: 'size-control-xs rounded-sm', icon: 'size-3.5' },\n sm: { button: `${controlRadius.sm} ${controlSquare.sm}`, icon: 'size-4' },\n md: { button: `${controlRadius.md} ${controlSquare.md}`, icon: 'size-5' },\n lg: { button: `${controlRadius.lg} ${controlSquare.lg}`, icon: 'size-5' },\n};\n\n/** A square button with one icon, on the same size scale as Button. */\nexport function IconButton({\n icon,\n variant = 'secondary',\n size = 'md',\n isLoading = false,\n ref,\n className,\n ...props\n}: IconButtonProps) {\n return (\n <AriaButton\n {...props}\n ref={ref}\n isPending={isLoading}\n className={composeRenderProps(className, (consumer) =>\n cx(buttonBase, buttonVariants[variant], 'p-0', sizes[size].button, consumer),\n )}\n >\n {({ isPending }) =>\n isPending ? (\n <Spinner className={cx(sizes[size].icon, 'text-current')} />\n ) : (\n <span\n aria-hidden='true'\n className={cx('inline-flex [&>svg]:size-full', sizes[size].icon)}\n >\n {icon}\n </span>\n )\n }\n </AriaButton>\n );\n}\n"],"mappings":";;;;;;;;AA6BA,IAAM,QAAkE;CACtE,IAAI;EAAE,QAAQ;EAA8B,MAAM;CAAW;CAC7D,IAAI;EAAE,QAAQ,GAAG,cAAc,GAAG,GAAG,cAAc;EAAM,MAAM;CAAS;CACxE,IAAI;EAAE,QAAQ,GAAG,cAAc,GAAG,GAAG,cAAc;EAAM,MAAM;CAAS;CACxE,IAAI;EAAE,QAAQ,GAAG,cAAc,GAAG,GAAG,cAAc;EAAM,MAAM;CAAS;AAC1E;;AAGA,SAAgB,WAAW,EACzB,MACA,UAAU,aACV,OAAO,MACP,YAAY,OACZ,KACA,WACA,GAAG,SACe;CAClB,OACE,oBAACA,QAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,WAAW,mBAAmB,YAAY,aACxC,GAAG,YAAY,eAAe,UAAU,OAAO,MAAM,KAAK,CAAC,QAAQ,QAAQ,CAC7E;EAEE,WAAA,EAAE,gBACF,YACE,oBAAC,SAAD,EAAS,WAAW,GAAG,MAAM,KAAK,CAAC,MAAM,cAAc,EAAI,CAAA,IAE3D,oBAAC,QAAD;GACE,eAAY;GACZ,WAAW,GAAG,iCAAiC,MAAM,KAAK,CAAC,IAAI;GAE9D,UAAA;EACG,CAAA;CAGA,CAAA;AAEhB"}
|
|
@@ -7,10 +7,10 @@ export interface KbdProps extends HTMLAttributes<HTMLElement> {
|
|
|
7
7
|
* assistive technology. Use it for a shortcut hint inside a control, so the
|
|
8
8
|
* hint is not counted as the control's visible label (WCAG 2.5.3).
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
isDecorative?: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* A keyboard key or combination. Pass `keys` for a combination: the keys are
|
|
14
14
|
* nested in an outer kbd, as the HTML spec describes for key sequences.
|
|
15
15
|
*/
|
|
16
|
-
export declare function Kbd({ keys,
|
|
16
|
+
export declare function Kbd({ keys, isDecorative, children, className, ...props }: KbdProps): import("react").JSX.Element;
|