@ds-mo/ui 0.2.4 → 0.4.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/dist/components/ds-accordion.d.ts +11 -0
- package/dist/components/ds-accordion.js +2 -0
- package/dist/components/ds-accordion.js.map +1 -0
- package/dist/components/ds-badge.d.ts +11 -0
- package/dist/components/ds-badge.js +2 -0
- package/dist/components/ds-badge.js.map +1 -0
- package/dist/components/ds-banner.d.ts +11 -0
- package/dist/components/ds-banner.js +2 -0
- package/dist/components/ds-banner.js.map +1 -0
- package/dist/components/ds-breadcrumb.d.ts +11 -0
- package/dist/components/ds-breadcrumb.js +2 -0
- package/dist/components/ds-breadcrumb.js.map +1 -0
- package/dist/components/ds-button.d.ts +11 -0
- package/dist/components/ds-button.js +2 -0
- package/dist/components/ds-button.js.map +1 -0
- package/dist/components/ds-card.d.ts +11 -0
- package/dist/components/ds-card.js +2 -0
- package/dist/components/ds-card.js.map +1 -0
- package/dist/components/ds-checkbox.d.ts +11 -0
- package/dist/components/ds-checkbox.js +2 -0
- package/dist/components/ds-checkbox.js.map +1 -0
- package/dist/components/ds-divider.d.ts +11 -0
- package/dist/components/ds-divider.js +2 -0
- package/dist/components/ds-divider.js.map +1 -0
- package/dist/components/ds-empty-state.d.ts +11 -0
- package/dist/components/ds-empty-state.js +2 -0
- package/dist/components/ds-empty-state.js.map +1 -0
- package/dist/components/ds-fade.d.ts +11 -0
- package/dist/components/ds-fade.js +2 -0
- package/dist/components/ds-fade.js.map +1 -0
- package/dist/components/ds-field.d.ts +11 -0
- package/dist/components/ds-field.js +2 -0
- package/dist/components/ds-field.js.map +1 -0
- package/dist/components/ds-header.d.ts +11 -0
- package/dist/components/ds-header.js +2 -0
- package/dist/components/ds-header.js.map +1 -0
- package/dist/components/ds-input.d.ts +11 -0
- package/dist/components/ds-input.js +2 -0
- package/dist/components/ds-input.js.map +1 -0
- package/dist/components/ds-loader.d.ts +11 -0
- package/dist/components/ds-loader.js +2 -0
- package/dist/components/ds-loader.js.map +1 -0
- package/dist/components/ds-menu.d.ts +11 -0
- package/dist/components/ds-menu.js +2 -0
- package/dist/components/ds-menu.js.map +1 -0
- package/dist/components/ds-modal.d.ts +11 -0
- package/dist/components/ds-modal.js +2 -0
- package/dist/components/ds-modal.js.map +1 -0
- package/dist/components/ds-pagination.d.ts +11 -0
- package/dist/components/ds-pagination.js +2 -0
- package/dist/components/ds-pagination.js.map +1 -0
- package/dist/components/ds-radio-group.d.ts +11 -0
- package/dist/components/ds-radio-group.js +2 -0
- package/dist/components/ds-radio-group.js.map +1 -0
- package/dist/components/ds-scrollbar.d.ts +11 -0
- package/dist/components/ds-scrollbar.js +2 -0
- package/dist/components/ds-scrollbar.js.map +1 -0
- package/dist/components/ds-sidebar.d.ts +11 -0
- package/dist/components/ds-sidebar.js +2 -0
- package/dist/components/ds-sidebar.js.map +1 -0
- package/dist/components/ds-skeleton.d.ts +11 -0
- package/dist/components/ds-skeleton.js +2 -0
- package/dist/components/ds-skeleton.js.map +1 -0
- package/dist/components/ds-slider.d.ts +11 -0
- package/dist/components/ds-slider.js +2 -0
- package/dist/components/ds-slider.js.map +1 -0
- package/dist/components/ds-surface.d.ts +11 -0
- package/dist/components/ds-surface.js +2 -0
- package/dist/components/ds-surface.js.map +1 -0
- package/dist/components/ds-tab-group.d.ts +11 -0
- package/dist/components/ds-tab-group.js +2 -0
- package/dist/components/ds-tab-group.js.map +1 -0
- package/dist/components/ds-table.d.ts +11 -0
- package/dist/components/ds-table.js +2 -0
- package/dist/components/ds-table.js.map +1 -0
- package/dist/components/ds-tag.d.ts +11 -0
- package/dist/components/ds-tag.js +2 -0
- package/dist/components/ds-tag.js.map +1 -0
- package/dist/components/ds-text.d.ts +11 -0
- package/dist/components/ds-text.js +2 -0
- package/dist/components/ds-text.js.map +1 -0
- package/dist/components/ds-toast-provider.d.ts +11 -0
- package/dist/components/ds-toast-provider.js +2 -0
- package/dist/components/ds-toast-provider.js.map +1 -0
- package/dist/components/ds-toggle.d.ts +11 -0
- package/dist/components/ds-toggle.js +2 -0
- package/dist/components/ds-toggle.js.map +1 -0
- package/dist/components/ds-tooltip.d.ts +11 -0
- package/dist/components/ds-tooltip.js +2 -0
- package/dist/components/ds-tooltip.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-BcuUR5Ao.js +2 -0
- package/dist/components/p-BcuUR5Ao.js.map +1 -0
- package/dist/types/.stencil/Accordion/Accordion.d.ts +28 -0
- package/dist/types/.stencil/Badge/Badge.d.ts +8 -0
- package/dist/types/.stencil/Badge/index.d.ts +2 -0
- package/dist/types/.stencil/Banner/Banner.d.ts +29 -0
- package/dist/types/.stencil/Breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/types/.stencil/Button/Button.d.ts +38 -0
- package/dist/types/.stencil/Button/index.d.ts +2 -0
- package/dist/types/.stencil/Card/Card.d.ts +8 -0
- package/dist/types/.stencil/Checkbox/Checkbox.d.ts +13 -0
- package/dist/types/.stencil/Checkbox/index.d.ts +2 -0
- package/dist/types/.stencil/Divider/Divider.d.ts +7 -0
- package/dist/types/.stencil/Divider/index.d.ts +2 -0
- package/dist/types/.stencil/EmptyState/EmptyState.d.ts +7 -0
- package/dist/types/.stencil/Fade/Fade.d.ts +10 -0
- package/dist/types/.stencil/Fade/index.d.ts +2 -0
- package/dist/types/.stencil/Field/Field.d.ts +8 -0
- package/dist/types/.stencil/Header/Header.d.ts +7 -0
- package/dist/types/.stencil/Input/Input.d.ts +26 -0
- package/dist/types/.stencil/Input/index.d.ts +2 -0
- package/dist/types/.stencil/Loader/Loader.d.ts +12 -0
- package/dist/types/.stencil/Loader/index.d.ts +2 -0
- package/dist/types/.stencil/Menu/Menu.d.ts +60 -0
- package/dist/types/.stencil/Modal/Modal.d.ts +31 -0
- package/dist/types/.stencil/Pagination/Pagination.d.ts +11 -0
- package/dist/types/.stencil/RadioGroup/RadioGroup.d.ts +21 -0
- package/dist/types/.stencil/RadioGroup/index.d.ts +2 -0
- package/dist/types/.stencil/Scrollbar/Scrollbar.d.ts +27 -0
- package/dist/types/.stencil/Sidebar/Sidebar.d.ts +29 -0
- package/dist/types/.stencil/Skeleton/Skeleton.d.ts +16 -0
- package/dist/types/.stencil/Skeleton/index.d.ts +2 -0
- package/dist/types/.stencil/Slider/Slider.d.ts +18 -0
- package/dist/types/.stencil/Slider/index.d.ts +2 -0
- package/dist/types/.stencil/Surface/Surface.d.ts +22 -0
- package/dist/types/.stencil/TabGroup/TabGroup.d.ts +29 -0
- package/dist/types/.stencil/Table/Table.d.ts +50 -0
- package/dist/types/.stencil/Tag/Tag.d.ts +32 -0
- package/dist/types/.stencil/Tag/index.d.ts +2 -0
- package/dist/types/.stencil/Text/Text.d.ts +22 -0
- package/dist/types/.stencil/Text/index.d.ts +2 -0
- package/dist/types/.stencil/Toast/Toast.d.ts +15 -0
- package/dist/types/.stencil/Toast/toast-service.d.ts +24 -0
- package/dist/types/.stencil/Toggle/Toggle.d.ts +10 -0
- package/dist/types/.stencil/Toggle/index.d.ts +2 -0
- package/dist/types/.stencil/Tooltip/Tooltip.d.ts +36 -0
- package/dist/types/components.d.ts +2024 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/package.json +33 -29
- package/src/angular/angular-component-lib/utils.ts +65 -0
- package/src/angular/index.ts +35 -0
- package/src/angular/proxies.ts +819 -0
- package/dist/index.css +0 -2
- package/dist/index.d.ts +0 -969
- package/dist/index.js +0 -2492
- package/dist/index.js.map +0 -1
- package/dist/r/accordion.json +0 -79
- package/dist/r/badge.json +0 -69
- package/dist/r/banner.json +0 -90
- package/dist/r/breadcrumb.json +0 -70
- package/dist/r/button-group.json +0 -65
- package/dist/r/button.json +0 -137
- package/dist/r/card.json +0 -82
- package/dist/r/checkbox.json +0 -91
- package/dist/r/divider.json +0 -57
- package/dist/r/empty-state.json +0 -69
- package/dist/r/error-boundary.json +0 -66
- package/dist/r/fade.json +0 -65
- package/dist/r/field.json +0 -71
- package/dist/r/header.json +0 -67
- package/dist/r/input.json +0 -77
- package/dist/r/loader.json +0 -54
- package/dist/r/menu.json +0 -130
- package/dist/r/modal.json +0 -93
- package/dist/r/pagination.json +0 -80
- package/dist/r/radio.json +0 -85
- package/dist/r/registry.json +0 -1600
- package/dist/r/scrollbar.json +0 -68
- package/dist/r/select.json +0 -93
- package/dist/r/sidebar.json +0 -105
- package/dist/r/skeleton.json +0 -72
- package/dist/r/slider.json +0 -87
- package/dist/r/surface.json +0 -97
- package/dist/r/tab-group.json +0 -72
- package/dist/r/tab.json +0 -71
- package/dist/r/table.json +0 -110
- package/dist/r/tag.json +0 -110
- package/dist/r/text.json +0 -94
- package/dist/r/toast.json +0 -77
- package/dist/r/toggle-button-group.json +0 -65
- package/dist/r/toggle-button.json +0 -94
- package/dist/r/toggle.json +0 -65
- package/dist/r/tooltip.json +0 -86
- package/src/components/Accordion/Accordion.module.css +0 -66
- package/src/components/Accordion/Accordion.stories.tsx +0 -95
- package/src/components/Accordion/Accordion.tsx +0 -122
- package/src/components/Accordion/index.ts +0 -2
- package/src/components/Badge/Badge.module.css +0 -6
- package/src/components/Badge/Badge.stories.tsx +0 -99
- package/src/components/Badge/Badge.tsx +0 -23
- package/src/components/Badge/index.ts +0 -2
- package/src/components/Banner/Banner.module.css +0 -67
- package/src/components/Banner/Banner.stories.tsx +0 -81
- package/src/components/Banner/Banner.tsx +0 -109
- package/src/components/Banner/index.ts +0 -2
- package/src/components/Breadcrumb/Breadcrumb.module.css +0 -46
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -72
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -68
- package/src/components/Breadcrumb/index.ts +0 -2
- package/src/components/Button/Button.mdx +0 -143
- package/src/components/Button/Button.module.css +0 -343
- package/src/components/Button/Button.stories.tsx +0 -575
- package/src/components/Button/Button.tsx +0 -201
- package/src/components/Button/index.ts +0 -10
- package/src/components/ButtonGroup/ButtonGroup.module.css +0 -157
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -384
- package/src/components/ButtonGroup/ButtonGroup.tsx +0 -122
- package/src/components/ButtonGroup/index.ts +0 -2
- package/src/components/Card/Card.module.css +0 -36
- package/src/components/Card/Card.stories.tsx +0 -78
- package/src/components/Card/Card.tsx +0 -53
- package/src/components/Card/index.ts +0 -2
- package/src/components/Checkbox/Checkbox.module.css +0 -47
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -129
- package/src/components/Checkbox/Checkbox.tsx +0 -68
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/Divider/Divider.module.css +0 -19
- package/src/components/Divider/Divider.stories.tsx +0 -55
- package/src/components/Divider/Divider.tsx +0 -28
- package/src/components/Divider/index.ts +0 -2
- package/src/components/EmptyState/EmptyState.module.css +0 -8
- package/src/components/EmptyState/EmptyState.stories.tsx +0 -53
- package/src/components/EmptyState/EmptyState.tsx +0 -31
- package/src/components/EmptyState/index.ts +0 -2
- package/src/components/ErrorBoundary/ErrorBoundary.module.css +0 -18
- package/src/components/ErrorBoundary/ErrorBoundary.stories.tsx +0 -38
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -50
- package/src/components/ErrorBoundary/index.ts +0 -2
- package/src/components/Fade/Fade.module.css +0 -31
- package/src/components/Fade/Fade.stories.tsx +0 -35
- package/src/components/Fade/Fade.tsx +0 -33
- package/src/components/Fade/index.ts +0 -2
- package/src/components/Field/Field.module.css +0 -5
- package/src/components/Field/Field.stories.tsx +0 -111
- package/src/components/Field/Field.tsx +0 -22
- package/src/components/Field/index.ts +0 -2
- package/src/components/Header/Header.module.css +0 -33
- package/src/components/Header/Header.stories.tsx +0 -52
- package/src/components/Header/Header.tsx +0 -42
- package/src/components/Header/index.ts +0 -2
- package/src/components/Input/Input.module.css +0 -71
- package/src/components/Input/Input.stories.tsx +0 -135
- package/src/components/Input/Input.tsx +0 -76
- package/src/components/Input/index.ts +0 -2
- package/src/components/LabelWrap/LabelWrap.module.css +0 -34
- package/src/components/LabelWrap/LabelWrap.tsx +0 -32
- package/src/components/LabelWrap/index.ts +0 -1
- package/src/components/Loader/Loader.module.css +0 -9
- package/src/components/Loader/Loader.stories.tsx +0 -44
- package/src/components/Loader/Loader.tsx +0 -43
- package/src/components/Loader/index.ts +0 -2
- package/src/components/Menu/DestructiveMenuItem.module.css +0 -57
- package/src/components/Menu/DestructiveMenuItem.tsx +0 -64
- package/src/components/Menu/Menu.module.css +0 -49
- package/src/components/Menu/Menu.stories.tsx +0 -129
- package/src/components/Menu/Menu.tsx +0 -269
- package/src/components/Menu/MenuItem.module.css +0 -84
- package/src/components/Menu/MenuItem.tsx +0 -101
- package/src/components/Menu/index.ts +0 -6
- package/src/components/Modal/Modal.module.css +0 -67
- package/src/components/Modal/Modal.stories.tsx +0 -71
- package/src/components/Modal/Modal.tsx +0 -122
- package/src/components/Modal/index.ts +0 -2
- package/src/components/Pagination/Pagination.module.css +0 -64
- package/src/components/Pagination/Pagination.stories.tsx +0 -51
- package/src/components/Pagination/Pagination.tsx +0 -103
- package/src/components/Pagination/index.ts +0 -2
- package/src/components/Radio/Radio.module.css +0 -61
- package/src/components/Radio/Radio.stories.tsx +0 -101
- package/src/components/Radio/Radio.tsx +0 -108
- package/src/components/Radio/index.ts +0 -2
- package/src/components/Scrollbar/Scrollbar.module.css +0 -81
- package/src/components/Scrollbar/Scrollbar.stories.tsx +0 -46
- package/src/components/Scrollbar/Scrollbar.tsx +0 -187
- package/src/components/Scrollbar/index.ts +0 -2
- package/src/components/Select/Select.module.css +0 -31
- package/src/components/Select/Select.stories.tsx +0 -59
- package/src/components/Select/Select.tsx +0 -92
- package/src/components/Select/index.ts +0 -2
- package/src/components/Sidebar/Sidebar.module.css +0 -161
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -125
- package/src/components/Sidebar/Sidebar.tsx +0 -129
- package/src/components/Sidebar/SidebarItem.tsx +0 -57
- package/src/components/Sidebar/SidebarSection.tsx +0 -42
- package/src/components/Sidebar/index.ts +0 -6
- package/src/components/Skeleton/Skeleton.module.css +0 -53
- package/src/components/Skeleton/Skeleton.stories.tsx +0 -89
- package/src/components/Skeleton/Skeleton.tsx +0 -66
- package/src/components/Skeleton/index.ts +0 -2
- package/src/components/Slider/Slider.module.css +0 -62
- package/src/components/Slider/Slider.stories.tsx +0 -120
- package/src/components/Slider/Slider.tsx +0 -74
- package/src/components/Slider/index.ts +0 -2
- package/src/components/Surface/Surface.module.css +0 -222
- package/src/components/Surface/Surface.stories.tsx +0 -213
- package/src/components/Surface/Surface.tsx +0 -219
- package/src/components/Surface/index.ts +0 -12
- package/src/components/Tab/Tab.module.css +0 -66
- package/src/components/Tab/Tab.stories.tsx +0 -103
- package/src/components/Tab/Tab.tsx +0 -41
- package/src/components/Tab/index.ts +0 -2
- package/src/components/TabGroup/TabGroup.module.css +0 -26
- package/src/components/TabGroup/TabGroup.stories.tsx +0 -60
- package/src/components/TabGroup/TabGroup.tsx +0 -83
- package/src/components/TabGroup/index.ts +0 -2
- package/src/components/Table/Table.module.css +0 -130
- package/src/components/Table/Table.stories.tsx +0 -111
- package/src/components/Table/Table.tsx +0 -226
- package/src/components/Table/index.ts +0 -11
- package/src/components/Tag/Tag.module.css +0 -270
- package/src/components/Tag/Tag.stories.tsx +0 -399
- package/src/components/Tag/Tag.tsx +0 -162
- package/src/components/Tag/index.ts +0 -2
- package/src/components/Text/Text.module.css +0 -166
- package/src/components/Text/Text.stories.tsx +0 -212
- package/src/components/Text/Text.tsx +0 -181
- package/src/components/Text/index.ts +0 -13
- package/src/components/Toast/Toast.module.css +0 -91
- package/src/components/Toast/Toast.stories.tsx +0 -66
- package/src/components/Toast/Toast.tsx +0 -182
- package/src/components/Toast/index.ts +0 -8
- package/src/components/Toggle/Toggle.module.css +0 -87
- package/src/components/Toggle/Toggle.stories.tsx +0 -85
- package/src/components/Toggle/Toggle.tsx +0 -52
- package/src/components/Toggle/index.ts +0 -2
- package/src/components/ToggleButton/ToggleButton.module.css +0 -172
- package/src/components/ToggleButton/ToggleButton.stories.tsx +0 -299
- package/src/components/ToggleButton/ToggleButton.tsx +0 -118
- package/src/components/ToggleButton/index.ts +0 -2
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.module.css +0 -163
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.stories.tsx +0 -341
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +0 -111
- package/src/components/ToggleButtonGroup/index.ts +0 -2
- package/src/components/Tooltip/Tooltip.module.css +0 -45
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -46
- package/src/components/Tooltip/Tooltip.tsx +0 -224
- package/src/components/Tooltip/index.ts +0 -2
- package/src/css-modules.d.ts +0 -4
- package/src/docs/ColorUsage.mdx +0 -195
- package/src/docs/ElevationUsage.mdx +0 -95
- package/src/docs/Introduction.mdx +0 -97
- package/src/docs/OpticalSizing.mdx +0 -178
- package/src/docs/TypographyUsage.mdx +0 -121
- package/src/index.ts +0 -154
- package/src/stories/Colors.stories.tsx +0 -528
- package/src/stories/Dimensions.stories.tsx +0 -200
- package/src/stories/Effects.stories.tsx +0 -231
- package/src/stories/Icons.stories.tsx +0 -159
- package/src/stories/Typography.stories.tsx +0 -157
- package/src/types/icons.ts +0 -15
- package/src/types/index.ts +0 -1
- package/src/utils/cn.ts +0 -6
- package/src/utils/css-tokens.ts +0 -22
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import { cn } from '@/utils/cn';
|
|
3
|
-
import { Text } from '@/components/Text';
|
|
4
|
-
import styles from './Breadcrumb.module.css';
|
|
5
|
-
|
|
6
|
-
export interface BreadcrumbItem {
|
|
7
|
-
label: string;
|
|
8
|
-
href?: string;
|
|
9
|
-
onClick?: () => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface BreadcrumbProps {
|
|
13
|
-
/** Ordered list of breadcrumb items. Last item is treated as current page. */
|
|
14
|
-
items: BreadcrumbItem[];
|
|
15
|
-
/** Custom separator. Defaults to '/'. */
|
|
16
|
-
separator?: React.ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(
|
|
21
|
-
({ items, separator = '/', className }, ref) => (
|
|
22
|
-
<nav ref={ref} aria-label="Breadcrumb" className={cn(styles.breadcrumb, className)}>
|
|
23
|
-
<ol className={styles.list}>
|
|
24
|
-
{items.map((item, i) => {
|
|
25
|
-
const isLast = i === items.length - 1;
|
|
26
|
-
return (
|
|
27
|
-
<li key={i} className={styles.item}>
|
|
28
|
-
{isLast ? (
|
|
29
|
-
<Text variant="text-body-medium-emphasis" as="span" color="primary" aria-current="page">
|
|
30
|
-
{item.label}
|
|
31
|
-
</Text>
|
|
32
|
-
) : (
|
|
33
|
-
<>
|
|
34
|
-
{item.href ? (
|
|
35
|
-
<a
|
|
36
|
-
href={item.href}
|
|
37
|
-
className={styles.link}
|
|
38
|
-
onClick={e => { if (item.onClick) { e.preventDefault(); item.onClick(); } }}
|
|
39
|
-
>
|
|
40
|
-
<Text variant="text-body-medium" as="span" color="inherit">
|
|
41
|
-
{item.label}
|
|
42
|
-
</Text>
|
|
43
|
-
</a>
|
|
44
|
-
) : (
|
|
45
|
-
<button
|
|
46
|
-
type="button"
|
|
47
|
-
className={styles.link}
|
|
48
|
-
onClick={item.onClick}
|
|
49
|
-
>
|
|
50
|
-
<Text variant="text-body-medium" as="span" color="inherit">
|
|
51
|
-
{item.label}
|
|
52
|
-
</Text>
|
|
53
|
-
</button>
|
|
54
|
-
)}
|
|
55
|
-
<span className={styles.separator} aria-hidden="true">
|
|
56
|
-
{separator}
|
|
57
|
-
</span>
|
|
58
|
-
</>
|
|
59
|
-
)}
|
|
60
|
-
</li>
|
|
61
|
-
);
|
|
62
|
-
})}
|
|
63
|
-
</ol>
|
|
64
|
-
</nav>
|
|
65
|
-
)
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
Breadcrumb.displayName = 'Breadcrumb';
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Meta, Title, Subtitle, Canvas, Controls, Primary } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import * as ButtonStories from './Button.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={ButtonStories} />
|
|
5
|
-
|
|
6
|
-
<Title />
|
|
7
|
-
|
|
8
|
-
<Subtitle>
|
|
9
|
-
Buttons trigger actions. They are the primary way users commit to a decision —
|
|
10
|
-
saving a record, opening a dialog, navigating somewhere meaningful.
|
|
11
|
-
</Subtitle>
|
|
12
|
-
|
|
13
|
-
A button should make its purpose obvious from its label, its visual weight, and
|
|
14
|
-
its position on the page. The right button in the right place is invisible — it
|
|
15
|
-
just feels like the next step. The wrong button competes for attention and slows
|
|
16
|
-
the user down.
|
|
17
|
-
|
|
18
|
-
## Playground
|
|
19
|
-
|
|
20
|
-
Use the controls below to explore every prop the component accepts. This is the
|
|
21
|
-
fastest way to understand how `variant`, `intent`, `contrast`, and `elevation`
|
|
22
|
-
combine.
|
|
23
|
-
|
|
24
|
-
<Primary />
|
|
25
|
-
|
|
26
|
-
<Controls />
|
|
27
|
-
|
|
28
|
-
## When to use
|
|
29
|
-
|
|
30
|
-
Reach for a button when the user needs to perform an **action** — submit a form,
|
|
31
|
-
delete a record, open a panel, run a process. If the user is navigating between
|
|
32
|
-
pages or sections, prefer a link instead. Buttons are for verbs; links are for
|
|
33
|
-
nouns.
|
|
34
|
-
|
|
35
|
-
A page should have **one** clearly dominant button. If two actions look equally
|
|
36
|
-
important, the user has to stop and read both before deciding — which is exactly
|
|
37
|
-
the moment of friction good hierarchy avoids.
|
|
38
|
-
|
|
39
|
-
## Variants
|
|
40
|
-
|
|
41
|
-
`primary` is filled and carries the strongest visual weight. Use it for the one
|
|
42
|
-
action you most want the user to take on a given screen.
|
|
43
|
-
|
|
44
|
-
`secondary` is a softer treatment for actions that matter but should not compete
|
|
45
|
-
with the primary action. Use `elevation="none"` to get the ghost treatment for
|
|
46
|
-
tertiary actions like cancel, dismiss, or inline controls.
|
|
47
|
-
|
|
48
|
-
<Canvas of={ButtonStories.Variants} />
|
|
49
|
-
|
|
50
|
-
> **Do** pair one `primary` with one or more `secondary` buttons in a form footer.
|
|
51
|
-
>
|
|
52
|
-
> **Don't** stack two `primary` buttons next to each other — only one action can
|
|
53
|
-
> be the primary one.
|
|
54
|
-
|
|
55
|
-
## Intent
|
|
56
|
-
|
|
57
|
-
Intent communicates the **meaning** of the action through color. Most buttons
|
|
58
|
-
should use `brand` (the default) or `neutral`. Reserve semantic intents for
|
|
59
|
-
moments when the meaning genuinely matches.
|
|
60
|
-
|
|
61
|
-
<Canvas of={ButtonStories.Intents} />
|
|
62
|
-
|
|
63
|
-
- `brand` — the default for primary calls-to-action
|
|
64
|
-
- `neutral` — for actions that should not draw color, like filters or toolbar controls
|
|
65
|
-
- `negative` — for destructive actions (delete, remove, discard)
|
|
66
|
-
- `positive` — for confirmations of a successful state, used sparingly
|
|
67
|
-
- `warning` / `caution` — for actions that need a moment of pause
|
|
68
|
-
- `ai` — reserved for AI-generated or AI-triggering actions
|
|
69
|
-
- `none` — inverted styling for use on colored or dark surfaces
|
|
70
|
-
|
|
71
|
-
> **Don't** use `negative` intent for a cancel button. Cancel is not destructive;
|
|
72
|
-
> it is the absence of an action. Use `secondary` with no intent.
|
|
73
|
-
|
|
74
|
-
## Sizes
|
|
75
|
-
|
|
76
|
-
Pick a size from the surrounding density, not the importance of the action.
|
|
77
|
-
Forms and dialogs use `md`. Compact toolbars and table rows use `sm` or `xs`.
|
|
78
|
-
Hero sections and marketing surfaces can use `lg`.
|
|
79
|
-
|
|
80
|
-
<Canvas of={ButtonStories.Sizes} />
|
|
81
|
-
|
|
82
|
-
## Icons
|
|
83
|
-
|
|
84
|
-
A leading icon can clarify a button's purpose at a glance — but only when the
|
|
85
|
-
icon's meaning is unambiguous. If you have to think about which icon to pick,
|
|
86
|
-
the label alone is doing a better job.
|
|
87
|
-
|
|
88
|
-
<Canvas of={ButtonStories.IconAndLabel} />
|
|
89
|
-
|
|
90
|
-
Icon-only buttons must always have an `aria-label`. Without it, screen readers
|
|
91
|
-
announce nothing meaningful, and keyboard users lose all context.
|
|
92
|
-
|
|
93
|
-
<Canvas of={ButtonStories.IconOnly} />
|
|
94
|
-
|
|
95
|
-
## States
|
|
96
|
-
|
|
97
|
-
Buttons have several states that communicate progress or availability:
|
|
98
|
-
|
|
99
|
-
- `inactive` — the action is not currently available, but may become available
|
|
100
|
-
- `loading` — the action is in flight; prevents double-submission
|
|
101
|
-
- `rounded` — pill-shaped variant for filter chips and compact actions
|
|
102
|
-
|
|
103
|
-
<Canvas of={ButtonStories.Loading} />
|
|
104
|
-
|
|
105
|
-
<Canvas of={ButtonStories.Inactive} />
|
|
106
|
-
|
|
107
|
-
> **Do** use `loading` for any async action that takes longer than ~200ms.
|
|
108
|
-
> Without it, users will click again, often submitting twice.
|
|
109
|
-
|
|
110
|
-
## Full width
|
|
111
|
-
|
|
112
|
-
Use `fullWidth` inside narrow containers like mobile sheets, side panels, or
|
|
113
|
-
form footers where the button should fill the available width. Avoid full-width
|
|
114
|
-
buttons on wide desktop layouts — they read as banner CTAs and feel heavy.
|
|
115
|
-
|
|
116
|
-
<Canvas of={ButtonStories.FullWidth} />
|
|
117
|
-
|
|
118
|
-
## On colored surfaces
|
|
119
|
-
|
|
120
|
-
When a button sits on a colored or dark surface, set the `background` prop so
|
|
121
|
-
the button can adapt its contrast to remain legible. The `BackgroundContext`
|
|
122
|
-
story below demonstrates every variant against every supported surface.
|
|
123
|
-
|
|
124
|
-
<Canvas of={ButtonStories.BackgroundContext} />
|
|
125
|
-
|
|
126
|
-
## Accessibility
|
|
127
|
-
|
|
128
|
-
- Every button must have a discernible name — either visible text in `label` or
|
|
129
|
-
an `aria-label` for icon-only buttons.
|
|
130
|
-
- The `inactive` state is **not** the same as the HTML `disabled` attribute.
|
|
131
|
-
`inactive` keeps the button focusable and announceable; truly disabled buttons
|
|
132
|
-
vanish from the tab order and frustrate users who can't tell why an action
|
|
133
|
-
isn't working.
|
|
134
|
-
- Touch targets meet the 24×24 CSS pixel minimum at all sizes; `xs` is intended
|
|
135
|
-
for dense desktop UIs and should not be used on mobile.
|
|
136
|
-
|
|
137
|
-
## Full reference matrix
|
|
138
|
-
|
|
139
|
-
The matrix below renders every meaningful combination of `variant`, `intent`,
|
|
140
|
-
`contrast`, `elevation`, `size`, and state on a single canvas. Use it as a
|
|
141
|
-
visual regression reference when changing tokens or styles.
|
|
142
|
-
|
|
143
|
-
<Canvas of={ButtonStories.Matrix} />
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
/* ==========================================================================
|
|
2
|
-
Button — unified primary/secondary
|
|
3
|
-
Hover/pressed via color-mix() on background-color. No pseudo-element overlays.
|
|
4
|
-
========================================================================== */
|
|
5
|
-
|
|
6
|
-
.button {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
border: none;
|
|
11
|
-
border-radius: var(--dimension-radius-050);
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
position: relative;
|
|
14
|
-
transition: transform var(--effect-motion-short-2);
|
|
15
|
-
height: var(--dimension-size-400);
|
|
16
|
-
font-family: inherit;
|
|
17
|
-
color: var(--color-foreground-primary);
|
|
18
|
-
background: transparent;
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
text-decoration: none;
|
|
21
|
-
-webkit-user-select: none;
|
|
22
|
-
user-select: none;
|
|
23
|
-
|
|
24
|
-
/* Interaction — ghost defaults (semi-transparent overlay) */
|
|
25
|
-
--_hover-bg: var(--color-interaction-hover);
|
|
26
|
-
--_pressed-bg: var(--color-interaction-pressed);
|
|
27
|
-
--_border: var(--color-border-tertiary);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.button:focus-visible {
|
|
31
|
-
outline: var(--dimension-stroke-width-025) solid var(--color-interaction-focus);
|
|
32
|
-
outline-offset: var(--dimension-space-025);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.button:hover:not(.inactive) {
|
|
36
|
-
background-color: var(--_hover-bg);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.button:active:not(.inactive) {
|
|
40
|
-
background-color: var(--_pressed-bg);
|
|
41
|
-
transform: scale(var(--dimension-scale-subtle));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* ==========================================================================
|
|
45
|
-
Background context — parent surface awareness
|
|
46
|
-
Adjusts hover tokens and secondary fg for colored parent surfaces.
|
|
47
|
-
1-class specificity; overridden by filled variant rules (2+ classes).
|
|
48
|
-
========================================================================== */
|
|
49
|
-
|
|
50
|
-
.onMedium {
|
|
51
|
-
--_hover-bg: var(--color-interaction-on-medium-background-hover);
|
|
52
|
-
--_pressed-bg: var(--color-interaction-on-medium-background-pressed);
|
|
53
|
-
--_border: var(--color-border-on-medium-background-tertiary);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.onBold {
|
|
57
|
-
--_hover-bg: var(--color-interaction-on-bold-background-hover);
|
|
58
|
-
--_pressed-bg: var(--color-interaction-on-bold-background-pressed);
|
|
59
|
-
--_border: var(--color-border-on-bold-background-tertiary);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.onStrong {
|
|
63
|
-
--_hover-bg: var(--color-interaction-on-strong-background-hover);
|
|
64
|
-
--_pressed-bg: var(--color-interaction-on-strong-background-pressed);
|
|
65
|
-
--_border: var(--color-border-on-strong-background-tertiary);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.onAlwaysDark {
|
|
69
|
-
--_hover-bg: var(--color-always-dark-interaction-hover);
|
|
70
|
-
--_pressed-bg: var(--color-always-dark-interaction-pressed);
|
|
71
|
-
--_border: var(--color-always-dark-border-tertiary);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* ==========================================================================
|
|
75
|
-
Variant: Primary
|
|
76
|
-
Bold background, on-bold content. Elevation controls shadow.
|
|
77
|
-
========================================================================== */
|
|
78
|
-
|
|
79
|
-
.primary {
|
|
80
|
-
color: var(--color-foreground-on-bold-background-primary);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Primary intent: none — inverted surface (black in light mode, white in dark mode) */
|
|
84
|
-
.primary.intentNone {
|
|
85
|
-
background-color: var(--color-inverted-background);
|
|
86
|
-
color: var(--color-inverted-foreground-primary);
|
|
87
|
-
--_hover-bg: color-mix(in oklch, var(--color-inverted-background) 90%, var(--color-inverted-foreground-primary));
|
|
88
|
-
--_pressed-bg: color-mix(in oklch, var(--color-inverted-background) 85%, var(--color-inverted-foreground-primary));
|
|
89
|
-
--_border: var(--color-inverted-border-tertiary);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Filled primary — background from --_bg, bold-contrast hover via color-mix.
|
|
93
|
-
2-class specificity beats background context (1-class). */
|
|
94
|
-
.primary:not(.intentNone) {
|
|
95
|
-
background-color: var(--_bg);
|
|
96
|
-
--_hover-bg: color-mix(in oklch, var(--_bg) 85%, var(--color-foreground-on-bold-background-primary));
|
|
97
|
-
--_pressed-bg: color-mix(in oklch, var(--_bg) 80%, var(--color-foreground-on-bold-background-primary));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* ── Primary bold contrast (default) ────────────────────────────────── */
|
|
101
|
-
|
|
102
|
-
.primary.intentBrand { --_bg: var(--color-background-bold-brand); color: var(--color-foreground-faint-brand); }
|
|
103
|
-
.primary.intentNeutral { --_bg: var(--color-background-bold-neutral); color: var(--color-foreground-faint-neutral); }
|
|
104
|
-
.primary.intentPositive { --_bg: var(--color-background-bold-positive); color: var(--color-foreground-faint-positive); }
|
|
105
|
-
.primary.intentNegative { --_bg: var(--color-background-bold-negative); color: var(--color-foreground-faint-negative); }
|
|
106
|
-
.primary.intentWarning { --_bg: var(--color-background-bold-warning); color: var(--color-foreground-faint-warning); }
|
|
107
|
-
.primary.intentCaution { --_bg: var(--color-background-bold-caution); color: var(--color-foreground-faint-caution); }
|
|
108
|
-
.primary.intentAi { --_bg: var(--color-background-bold-ai); color: var(--color-foreground-faint-ai); }
|
|
109
|
-
|
|
110
|
-
/* ── Primary medium contrast ────────────────────────────────────────── */
|
|
111
|
-
|
|
112
|
-
.primary.contrastMedium {
|
|
113
|
-
--_hover-bg: color-mix(in oklch, var(--_bg) 85%, var(--color-foreground-primary));
|
|
114
|
-
--_pressed-bg: color-mix(in oklch, var(--_bg) 80%, var(--color-foreground-primary));
|
|
115
|
-
}
|
|
116
|
-
.primary.contrastMedium.intentBrand { --_bg: var(--color-background-medium-brand); color: var(--color-foreground-strong-brand); }
|
|
117
|
-
.primary.contrastMedium.intentNeutral { --_bg: var(--color-background-medium-neutral); color: var(--color-foreground-strong-neutral); }
|
|
118
|
-
.primary.contrastMedium.intentPositive { --_bg: var(--color-background-medium-positive); color: var(--color-foreground-strong-positive); }
|
|
119
|
-
.primary.contrastMedium.intentNegative { --_bg: var(--color-background-medium-negative); color: var(--color-foreground-strong-negative); }
|
|
120
|
-
.primary.contrastMedium.intentWarning { --_bg: var(--color-background-medium-warning); color: var(--color-foreground-strong-warning); }
|
|
121
|
-
.primary.contrastMedium.intentCaution { --_bg: var(--color-background-medium-caution); color: var(--color-foreground-strong-caution); }
|
|
122
|
-
.primary.contrastMedium.intentAi { --_bg: var(--color-background-medium-ai); color: var(--color-foreground-strong-ai); }
|
|
123
|
-
|
|
124
|
-
/* ── Primary strong contrast ────────────────────────────────────────── */
|
|
125
|
-
|
|
126
|
-
.primary.contrastStrong {
|
|
127
|
-
--_hover-bg: color-mix(in oklch, var(--_bg) 90%, var(--color-foreground-on-bold-background-primary));
|
|
128
|
-
--_pressed-bg: color-mix(in oklch, var(--_bg) 85%, var(--color-foreground-on-bold-background-primary));
|
|
129
|
-
}
|
|
130
|
-
.primary.contrastStrong.intentBrand { --_bg: var(--color-background-strong-brand); color: var(--color-foreground-medium-brand); }
|
|
131
|
-
.primary.contrastStrong.intentNeutral { --_bg: var(--color-background-strong-neutral); color: var(--color-foreground-medium-neutral); }
|
|
132
|
-
.primary.contrastStrong.intentPositive { --_bg: var(--color-background-strong-positive); color: var(--color-foreground-medium-positive); }
|
|
133
|
-
.primary.contrastStrong.intentNegative { --_bg: var(--color-background-strong-negative); color: var(--color-foreground-medium-negative); }
|
|
134
|
-
.primary.contrastStrong.intentWarning { --_bg: var(--color-background-strong-warning); color: var(--color-foreground-medium-warning); }
|
|
135
|
-
.primary.contrastStrong.intentCaution { --_bg: var(--color-background-strong-caution); color: var(--color-foreground-medium-caution); }
|
|
136
|
-
.primary.contrastStrong.intentAi { --_bg: var(--color-background-strong-ai); color: var(--color-foreground-medium-ai); }
|
|
137
|
-
|
|
138
|
-
/* ── Primary faint contrast ─────────────────────────────────────────── */
|
|
139
|
-
|
|
140
|
-
.primary.contrastFaint {
|
|
141
|
-
--_hover-bg: color-mix(in oklch, var(--_bg) 90%, var(--color-foreground-primary));
|
|
142
|
-
--_pressed-bg: color-mix(in oklch, var(--_bg) 85%, var(--color-foreground-primary));
|
|
143
|
-
}
|
|
144
|
-
.primary.contrastFaint.intentBrand { --_bg: var(--color-background-faint-brand); color: var(--color-foreground-bold-brand); }
|
|
145
|
-
.primary.contrastFaint.intentNeutral { --_bg: var(--color-background-faint-neutral); color: var(--color-foreground-bold-neutral); }
|
|
146
|
-
.primary.contrastFaint.intentPositive { --_bg: var(--color-background-faint-positive); color: var(--color-foreground-bold-positive); }
|
|
147
|
-
.primary.contrastFaint.intentNegative { --_bg: var(--color-background-faint-negative); color: var(--color-foreground-bold-negative); }
|
|
148
|
-
.primary.contrastFaint.intentWarning { --_bg: var(--color-background-faint-warning); color: var(--color-foreground-bold-warning); }
|
|
149
|
-
.primary.contrastFaint.intentCaution { --_bg: var(--color-background-faint-caution); color: var(--color-foreground-bold-caution); }
|
|
150
|
-
.primary.contrastFaint.intentAi { --_bg: var(--color-background-faint-ai); color: var(--color-foreground-bold-ai); }
|
|
151
|
-
|
|
152
|
-
/* ==========================================================================
|
|
153
|
-
Variant: Secondary
|
|
154
|
-
Base is ghost (transparent, no border, no shadow).
|
|
155
|
-
Elevation classes add the chrome — flat=border, elevated=bg+shadow, floating=bg+floating.
|
|
156
|
-
========================================================================== */
|
|
157
|
-
|
|
158
|
-
.secondary {
|
|
159
|
-
background-color: transparent;
|
|
160
|
-
color: var(--color-foreground-secondary);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* Secondary intent — bold fg color */
|
|
164
|
-
.secondary.intentBrand { color: var(--color-foreground-bold-brand); }
|
|
165
|
-
.secondary.intentNeutral { color: var(--color-foreground-bold-neutral); }
|
|
166
|
-
.secondary.intentPositive { color: var(--color-foreground-bold-positive); }
|
|
167
|
-
.secondary.intentNegative { color: var(--color-foreground-bold-negative); }
|
|
168
|
-
.secondary.intentWarning { color: var(--color-foreground-bold-warning); }
|
|
169
|
-
.secondary.intentCaution { color: var(--color-foreground-bold-caution); }
|
|
170
|
-
.secondary.intentAi { color: var(--color-foreground-bold-ai); }
|
|
171
|
-
|
|
172
|
-
/* ── Secondary fg on medium surface ─────────────────────────────────── */
|
|
173
|
-
|
|
174
|
-
.secondary.onMedium { color: var(--color-foreground-primary); }
|
|
175
|
-
.secondary.onMedium.intentBrand { color: var(--color-foreground-strong-brand); }
|
|
176
|
-
.secondary.onMedium.intentNeutral { color: var(--color-foreground-strong-neutral); }
|
|
177
|
-
.secondary.onMedium.intentPositive { color: var(--color-foreground-strong-positive); }
|
|
178
|
-
.secondary.onMedium.intentNegative { color: var(--color-foreground-strong-negative); }
|
|
179
|
-
.secondary.onMedium.intentWarning { color: var(--color-foreground-strong-warning); }
|
|
180
|
-
.secondary.onMedium.intentCaution { color: var(--color-foreground-strong-caution); }
|
|
181
|
-
.secondary.onMedium.intentAi { color: var(--color-foreground-strong-ai); }
|
|
182
|
-
|
|
183
|
-
/* ── Secondary fg on bold surface ──────────────────────────────────── */
|
|
184
|
-
|
|
185
|
-
.secondary.onBold { color: var(--color-foreground-on-bold-background-secondary); }
|
|
186
|
-
.secondary.onBold.intentBrand { color: var(--color-foreground-faint-brand); }
|
|
187
|
-
.secondary.onBold.intentNeutral { color: var(--color-foreground-faint-neutral); }
|
|
188
|
-
.secondary.onBold.intentPositive { color: var(--color-foreground-faint-positive); }
|
|
189
|
-
.secondary.onBold.intentNegative { color: var(--color-foreground-faint-negative); }
|
|
190
|
-
.secondary.onBold.intentWarning { color: var(--color-foreground-faint-warning); }
|
|
191
|
-
.secondary.onBold.intentCaution { color: var(--color-foreground-faint-caution); }
|
|
192
|
-
.secondary.onBold.intentAi { color: var(--color-foreground-faint-ai); }
|
|
193
|
-
|
|
194
|
-
/* ── Secondary fg on always-dark surface ──────────────────────────── */
|
|
195
|
-
|
|
196
|
-
.secondary.onAlwaysDark { color: var(--color-always-dark-foreground-secondary); }
|
|
197
|
-
.secondary.onAlwaysDark.intentBrand { color: var(--color-always-dark-foreground-brand); }
|
|
198
|
-
.secondary.onAlwaysDark.intentNeutral { color: var(--color-always-dark-foreground-neutral); }
|
|
199
|
-
.secondary.onAlwaysDark.intentPositive { color: var(--color-always-dark-foreground-positive); }
|
|
200
|
-
.secondary.onAlwaysDark.intentNegative { color: var(--color-always-dark-foreground-negative); }
|
|
201
|
-
.secondary.onAlwaysDark.intentWarning { color: var(--color-always-dark-foreground-warning); }
|
|
202
|
-
.secondary.onAlwaysDark.intentCaution { color: var(--color-always-dark-foreground-caution); }
|
|
203
|
-
.secondary.onAlwaysDark.intentAi { color: var(--color-always-dark-foreground-ai); }
|
|
204
|
-
|
|
205
|
-
/* ── Secondary fg on strong surface ─────────────────────────────────── */
|
|
206
|
-
|
|
207
|
-
.secondary.onStrong { color: var(--color-foreground-on-bold-background-secondary); }
|
|
208
|
-
.secondary.onStrong.intentBrand { color: var(--color-foreground-faint-brand); }
|
|
209
|
-
.secondary.onStrong.intentNeutral { color: var(--color-foreground-faint-neutral); }
|
|
210
|
-
.secondary.onStrong.intentPositive { color: var(--color-foreground-faint-positive); }
|
|
211
|
-
.secondary.onStrong.intentNegative { color: var(--color-foreground-faint-negative); }
|
|
212
|
-
.secondary.onStrong.intentWarning { color: var(--color-foreground-faint-warning); }
|
|
213
|
-
.secondary.onStrong.intentCaution { color: var(--color-foreground-faint-caution); }
|
|
214
|
-
.secondary.onStrong.intentAi { color: var(--color-foreground-faint-ai); }
|
|
215
|
-
|
|
216
|
-
/* ==========================================================================
|
|
217
|
-
Elevation
|
|
218
|
-
========================================================================== */
|
|
219
|
-
|
|
220
|
-
/* ── Secondary chrome ───────────────────────────────────────────────── */
|
|
221
|
-
|
|
222
|
-
/* elevationNone = ghost base — no extra CSS needed */
|
|
223
|
-
|
|
224
|
-
.secondary.elevationFlat {
|
|
225
|
-
box-shadow: inset 0 0 0 1px var(--_border);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.secondary.elevationElevated {
|
|
229
|
-
background-color: var(--color-background-primary);
|
|
230
|
-
box-shadow: var(--effect-elevation-elevated-sm);
|
|
231
|
-
--_hover-bg: color-mix(in oklch, var(--color-background-primary) 90%, var(--color-foreground-primary));
|
|
232
|
-
--_pressed-bg: color-mix(in oklch, var(--color-background-primary) 85%, var(--color-foreground-primary));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.secondary.elevationFloating {
|
|
236
|
-
background-color: var(--color-background-primary);
|
|
237
|
-
box-shadow: var(--effect-elevation-elevated-floating);
|
|
238
|
-
--_hover-bg: color-mix(in oklch, var(--color-background-primary) 90%, var(--color-foreground-primary));
|
|
239
|
-
--_pressed-bg: color-mix(in oklch, var(--color-background-primary) 85%, var(--color-foreground-primary));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/* ── Primary shadow + border control ───────────────────────────────── */
|
|
243
|
-
|
|
244
|
-
/* elevated */
|
|
245
|
-
.primary.elevationElevated { box-shadow: var(--effect-elevation-elevated-sm); }
|
|
246
|
-
|
|
247
|
-
/* none = no shadow, no border (flat colored button — default for primary) */
|
|
248
|
-
.primary.elevationNone { box-shadow: none; }
|
|
249
|
-
|
|
250
|
-
/* flat = inset ring against the page background (not the button fill) */
|
|
251
|
-
.primary.elevationFlat { box-shadow: inset 0 0 0 1px var(--_border); }
|
|
252
|
-
|
|
253
|
-
/* intentNone flat: inverted fill + default border ring (bg/fg inherited from .primary.intentNone) */
|
|
254
|
-
.primary.intentNone.elevationFlat {
|
|
255
|
-
--_border: var(--color-border-tertiary);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/* intentNone on strong/always-dark: flip to surface bg/fg — inverted (black) would be invisible */
|
|
259
|
-
.primary.intentNone.onStrong,
|
|
260
|
-
.primary.intentNone.onAlwaysDark {
|
|
261
|
-
background-color: var(--color-background-primary);
|
|
262
|
-
color: var(--color-foreground-primary);
|
|
263
|
-
--_hover-bg: color-mix(in oklch, var(--color-background-primary) 90%, var(--color-foreground-primary));
|
|
264
|
-
--_pressed-bg: color-mix(in oklch, var(--color-background-primary) 85%, var(--color-foreground-primary));
|
|
265
|
-
--_border: var(--color-border-tertiary);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/* floating = FAB-strength shadow for both variants */
|
|
269
|
-
.primary.elevationFloating { box-shadow: var(--effect-elevation-elevated-floating) !important; }
|
|
270
|
-
|
|
271
|
-
/* ==========================================================================
|
|
272
|
-
Layout: icon-only, label-only, icon+label, dropdown
|
|
273
|
-
========================================================================== */
|
|
274
|
-
|
|
275
|
-
.iconOnly { padding: 0; width: var(--dimension-size-400); min-width: var(--dimension-size-400); }
|
|
276
|
-
.labelOnly { padding: 0 var(--dimension-space-100); }
|
|
277
|
-
.iconAndLabel { padding: 0 var(--dimension-space-100) 0 var(--dimension-space-075); gap: var(--dimension-space-025); }
|
|
278
|
-
.dropdown { gap: var(--dimension-space-050); }
|
|
279
|
-
|
|
280
|
-
/* ==========================================================================
|
|
281
|
-
Sizes
|
|
282
|
-
========================================================================== */
|
|
283
|
-
|
|
284
|
-
.sizeSM { height: var(--dimension-size-300); }
|
|
285
|
-
.sizeSM.iconOnly { width: var(--dimension-size-300); min-width: var(--dimension-size-300); }
|
|
286
|
-
.sizeSM.labelOnly { padding: 0 var(--dimension-space-075); }
|
|
287
|
-
.sizeSM.iconAndLabel { padding: 0 var(--dimension-space-075) 0 var(--dimension-space-050); gap: 1px; }
|
|
288
|
-
|
|
289
|
-
.sizeXS { height: var(--dimension-size-200); }
|
|
290
|
-
.sizeXS.iconOnly { width: var(--dimension-size-200); min-width: var(--dimension-size-200); }
|
|
291
|
-
.sizeXS.labelOnly, .sizeXS.iconAndLabel { padding: 0 var(--dimension-space-025); gap: 0; }
|
|
292
|
-
|
|
293
|
-
.sizeLG { height: var(--dimension-size-500); }
|
|
294
|
-
.sizeLG.iconOnly { width: var(--dimension-size-500); min-width: var(--dimension-size-500); }
|
|
295
|
-
.sizeLG.labelOnly { padding: 0 var(--dimension-space-150); }
|
|
296
|
-
.sizeLG.iconAndLabel { padding: 0 var(--dimension-space-150) 0 var(--dimension-space-100); gap: var(--dimension-space-075); }
|
|
297
|
-
|
|
298
|
-
/* ==========================================================================
|
|
299
|
-
Rounded (pill shape)
|
|
300
|
-
========================================================================== */
|
|
301
|
-
|
|
302
|
-
.rounded { border-radius: var(--dimension-radius-half); }
|
|
303
|
-
.rounded.labelOnly { padding-left: calc(var(--dimension-space-100) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-100) + var(--dimension-space-050)); }
|
|
304
|
-
.rounded.iconAndLabel { padding-left: calc(var(--dimension-space-075) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-100) + var(--dimension-space-050)); }
|
|
305
|
-
.rounded.sizeSM.labelOnly { padding-left: calc(var(--dimension-space-075) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-075) + var(--dimension-space-050)); }
|
|
306
|
-
.rounded.sizeSM.iconAndLabel { padding-left: calc(var(--dimension-space-050) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-075) + var(--dimension-space-050)); }
|
|
307
|
-
.rounded.sizeLG.labelOnly { padding-left: calc(var(--dimension-space-150) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-150) + var(--dimension-space-050)); }
|
|
308
|
-
.rounded.sizeLG.iconAndLabel { padding-left: calc(var(--dimension-space-100) + var(--dimension-space-050)); padding-right: calc(var(--dimension-space-150) + var(--dimension-space-050)); }
|
|
309
|
-
.rounded.iconOnly { width: var(--dimension-size-400); min-width: var(--dimension-size-400); padding: 0; }
|
|
310
|
-
.rounded.sizeLG.iconOnly { width: var(--dimension-size-500); min-width: var(--dimension-size-500); }
|
|
311
|
-
.rounded.sizeSM.iconOnly { width: var(--dimension-size-300); min-width: var(--dimension-size-300); }
|
|
312
|
-
.rounded.sizeXS.iconOnly { width: var(--dimension-size-200); min-width: var(--dimension-size-200); }
|
|
313
|
-
|
|
314
|
-
/* ==========================================================================
|
|
315
|
-
Disabled
|
|
316
|
-
========================================================================== */
|
|
317
|
-
|
|
318
|
-
.inactive { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
|
|
319
|
-
|
|
320
|
-
/* ==========================================================================
|
|
321
|
-
Badge
|
|
322
|
-
========================================================================== */
|
|
323
|
-
|
|
324
|
-
.badge {
|
|
325
|
-
position: absolute;
|
|
326
|
-
top: var(--dimension-space-025);
|
|
327
|
-
right: var(--dimension-space-025);
|
|
328
|
-
font-size: var(--typography-fontsize-xs);
|
|
329
|
-
font-weight: var(--typography-weight-semibold);
|
|
330
|
-
line-height: var(--typography-lineheight-xs);
|
|
331
|
-
color: var(--color-foreground-secondary);
|
|
332
|
-
pointer-events: none;
|
|
333
|
-
z-index: 10;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/* ==========================================================================
|
|
337
|
-
Full width
|
|
338
|
-
========================================================================== */
|
|
339
|
-
|
|
340
|
-
.fullWidth {
|
|
341
|
-
display: flex;
|
|
342
|
-
width: 100%;
|
|
343
|
-
}
|