@common-origin/design-system 2.19.0 → 2.21.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/client.js +1012 -512
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/AILabel/AILabel.d.mts +30 -0
- package/dist/components/atoms/AILabel/AILabel.d.ts +30 -0
- package/dist/components/atoms/AILabel/AILabel.mjs +94 -0
- package/dist/components/atoms/AILabel/AILabel.mjs.map +1 -0
- package/dist/components/atoms/AILabel/index.d.mts +1 -0
- package/dist/components/atoms/AILabel/index.d.ts +1 -0
- package/dist/components/atoms/Avatar/Avatar.d.mts +8 -0
- package/dist/components/atoms/Avatar/Avatar.mjs +103 -0
- package/dist/components/atoms/Avatar/Avatar.mjs.map +1 -0
- package/dist/components/atoms/Avatar/index.d.mts +1 -0
- package/dist/components/atoms/Badge/Badge.d.mts +25 -0
- package/dist/components/atoms/Badge/Badge.mjs +98 -0
- package/dist/components/atoms/Badge/Badge.mjs.map +1 -0
- package/dist/components/atoms/Badge/index.d.mts +2 -0
- package/dist/components/atoms/Box/Box.d.mts +62 -0
- package/dist/components/atoms/Box/Box.mjs +246 -0
- package/dist/components/atoms/Box/Box.mjs.map +1 -0
- package/dist/components/atoms/Box/index.d.mts +1 -0
- package/dist/components/atoms/Button/Button.d.mts +40 -0
- package/dist/components/atoms/Button/Button.mjs +208 -0
- package/dist/components/atoms/Button/Button.mjs.map +1 -0
- package/dist/components/atoms/Button/index.d.mts +1 -0
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.mts +29 -0
- package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs +29 -0
- package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs.map +1 -0
- package/dist/components/atoms/CategoryBadge/index.d.mts +2 -0
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +69 -0
- package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +151 -0
- package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs.map +1 -0
- package/dist/components/atoms/CategoryLabel/index.d.mts +2 -0
- package/dist/components/atoms/Chip/BooleanChip.d.mts +28 -0
- package/dist/components/atoms/Chip/BooleanChip.mjs +76 -0
- package/dist/components/atoms/Chip/BooleanChip.mjs.map +1 -0
- package/dist/components/atoms/Chip/Chip.d.mts +37 -0
- package/dist/components/atoms/Chip/Chip.mjs +76 -0
- package/dist/components/atoms/Chip/Chip.mjs.map +1 -0
- package/dist/components/atoms/Chip/FilterChip.d.mts +13 -0
- package/dist/components/atoms/Chip/FilterChip.mjs +14 -0
- package/dist/components/atoms/Chip/FilterChip.mjs.map +1 -0
- package/dist/components/atoms/Chip/InputChip.d.mts +27 -0
- package/dist/components/atoms/Chip/InputChip.mjs +97 -0
- package/dist/components/atoms/Chip/InputChip.mjs.map +1 -0
- package/dist/components/atoms/Chip/SuggestionChip.d.mts +24 -0
- package/dist/components/atoms/Chip/SuggestionChip.d.ts +24 -0
- package/dist/components/atoms/Chip/SuggestionChip.mjs +61 -0
- package/dist/components/atoms/Chip/SuggestionChip.mjs.map +1 -0
- package/dist/components/atoms/Chip/index.d.mts +5 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/Chip/shared/ChipBase.d.mts +12 -0
- package/dist/components/atoms/Chip/shared/ChipBase.mjs +45 -0
- package/dist/components/atoms/Chip/shared/ChipBase.mjs.map +1 -0
- package/dist/components/atoms/Chip/shared/types.d.mts +34 -0
- package/dist/components/atoms/Chip/shared/utils.d.mts +10 -0
- package/dist/components/atoms/Chip/shared/utils.mjs +46 -0
- package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -0
- package/dist/components/atoms/Container/Container.d.mts +6 -0
- package/dist/components/atoms/Container/Container.mjs +24 -0
- package/dist/components/atoms/Container/Container.mjs.map +1 -0
- package/dist/components/atoms/Container/index.d.mts +1 -0
- package/dist/components/atoms/DateFormatter/DateFormatter.d.mts +23 -0
- package/dist/components/atoms/DateFormatter/DateFormatter.mjs +64 -0
- package/dist/components/atoms/DateFormatter/DateFormatter.mjs.map +1 -0
- package/dist/components/atoms/DateFormatter/index.d.mts +1 -0
- package/dist/components/atoms/Divider/Divider.d.mts +30 -0
- package/dist/components/atoms/Divider/Divider.mjs +134 -0
- package/dist/components/atoms/Divider/Divider.mjs.map +1 -0
- package/dist/components/atoms/Divider/index.d.mts +1 -0
- package/dist/components/atoms/Icon/Icon.d.mts +22 -0
- package/dist/components/atoms/Icon/Icon.mjs +95 -0
- package/dist/components/atoms/Icon/Icon.mjs.map +1 -0
- package/dist/components/atoms/Icon/index.d.mts +1 -0
- package/dist/components/atoms/IconButton/IconButton.d.mts +14 -0
- package/dist/components/atoms/IconButton/IconButton.mjs +150 -0
- package/dist/components/atoms/IconButton/IconButton.mjs.map +1 -0
- package/dist/components/atoms/IconButton/index.d.mts +1 -0
- package/dist/components/atoms/MoneyDisplay/MoneyDisplay.d.mts +26 -0
- package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs +126 -0
- package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs.map +1 -0
- package/dist/components/atoms/MoneyDisplay/index.d.mts +2 -0
- package/dist/components/atoms/Picture/Picture.d.mts +12 -0
- package/dist/components/atoms/Picture/Picture.mjs +65 -0
- package/dist/components/atoms/Picture/Picture.mjs.map +1 -0
- package/dist/components/atoms/Picture/index.d.mts +1 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +21 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.mjs +91 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.mjs.map +1 -0
- package/dist/components/atoms/ProgressBar/index.d.mts +2 -0
- package/dist/components/atoms/Stack/Stack.d.mts +16 -0
- package/dist/components/atoms/Stack/Stack.mjs +71 -0
- package/dist/components/atoms/Stack/Stack.mjs.map +1 -0
- package/dist/components/atoms/Stack/index.d.mts +1 -0
- package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +23 -0
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs +18 -0
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +1 -0
- package/dist/components/atoms/StatusBadge/index.d.mts +2 -0
- package/dist/components/atoms/StatusLabel/StatusLabel.d.mts +17 -0
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs +28 -0
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -0
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +49 -0
- package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +161 -0
- package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs.map +1 -0
- package/dist/components/atoms/StatusLabel/index.d.mts +2 -0
- package/dist/components/atoms/Tag/Tag.d.mts +36 -0
- package/dist/components/atoms/Tag/Tag.mjs +115 -0
- package/dist/components/atoms/Tag/Tag.mjs.map +1 -0
- package/dist/components/atoms/Tag/index.d.mts +2 -0
- package/dist/components/atoms/Typography/Typography.d.mts +34 -0
- package/dist/components/atoms/Typography/Typography.mjs +139 -0
- package/dist/components/atoms/Typography/Typography.mjs.map +1 -0
- package/dist/components/atoms/Typography/index.d.mts +1 -0
- package/dist/components/atoms/index.d.mts +21 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/layout/GridSystem/GridSystem.d.mts +58 -0
- package/dist/components/layout/GridSystem/GridSystem.mjs +221 -0
- package/dist/components/layout/GridSystem/GridSystem.mjs.map +1 -0
- package/dist/components/layout/GridSystem/index.d.mts +1 -0
- package/dist/components/layout/index.d.mts +1 -0
- package/dist/components/molecules/AccountCard/AccountCard.d.mts +44 -0
- package/dist/components/molecules/AccountCard/AccountCard.mjs +191 -0
- package/dist/components/molecules/AccountCard/AccountCard.mjs.map +1 -0
- package/dist/components/molecules/AccountCard/index.d.mts +2 -0
- package/dist/components/molecules/ActionSheet/ActionSheet.d.mts +111 -0
- package/dist/components/molecules/ActionSheet/ActionSheet.mjs +283 -0
- package/dist/components/molecules/ActionSheet/ActionSheet.mjs.map +1 -0
- package/dist/components/molecules/ActionSheet/index.d.mts +2 -0
- package/dist/components/molecules/AgentInput/AgentInput.d.mts +92 -0
- package/dist/components/molecules/AgentInput/AgentInput.d.ts +63 -1
- package/dist/components/molecules/AgentInput/AgentInput.mjs +1099 -0
- package/dist/components/molecules/AgentInput/AgentInput.mjs.map +1 -0
- package/dist/components/molecules/AgentInput/agentInputSpeech.d.mts +45 -0
- package/dist/components/molecules/AgentInput/agentInputSpeech.d.ts +2 -0
- package/dist/components/molecules/AgentInput/agentInputSpeech.mjs +53 -0
- package/dist/components/molecules/AgentInput/agentInputSpeech.mjs.map +1 -0
- package/dist/components/molecules/AgentInput/agentInputStateMachine.d.mts +29 -0
- package/dist/components/molecules/AgentInput/agentInputStateMachine.mjs +55 -0
- package/dist/components/molecules/AgentInput/agentInputStateMachine.mjs.map +1 -0
- package/dist/components/molecules/AgentInput/index.d.mts +3 -0
- package/dist/components/molecules/AgentInput/index.d.ts +1 -1
- package/dist/components/molecules/Alert/Alert.d.mts +68 -0
- package/dist/components/molecules/Alert/Alert.mjs +284 -0
- package/dist/components/molecules/Alert/Alert.mjs.map +1 -0
- package/dist/components/molecules/Alert/index.d.mts +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.mts +16 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.mjs +74 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.mjs.map +1 -0
- package/dist/components/molecules/Breadcrumbs/index.d.mts +1 -0
- package/dist/components/molecules/CardLarge/CardLarge.d.mts +12 -0
- package/dist/components/molecules/CardLarge/CardLarge.mjs +76 -0
- package/dist/components/molecules/CardLarge/CardLarge.mjs.map +1 -0
- package/dist/components/molecules/CardLarge/index.d.mts +1 -0
- package/dist/components/molecules/CardSmall/CardSmall.d.mts +16 -0
- package/dist/components/molecules/CardSmall/CardSmall.mjs +73 -0
- package/dist/components/molecules/CardSmall/CardSmall.mjs.map +1 -0
- package/dist/components/molecules/CardSmall/index.d.mts +1 -0
- package/dist/components/molecules/Checkbox/Checkbox.d.mts +64 -0
- package/dist/components/molecules/Checkbox/Checkbox.mjs +139 -0
- package/dist/components/molecules/Checkbox/Checkbox.mjs.map +1 -0
- package/dist/components/molecules/Checkbox/SelectableInputBase.d.mts +40 -0
- package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +99 -0
- package/dist/components/molecules/Checkbox/SelectableInputBase.mjs.map +1 -0
- package/dist/components/molecules/Checkbox/index.d.mts +3 -0
- package/dist/components/molecules/ChipGroup/ChipGroup.d.mts +7 -0
- package/dist/components/molecules/ChipGroup/ChipGroup.mjs +56 -0
- package/dist/components/molecules/ChipGroup/ChipGroup.mjs.map +1 -0
- package/dist/components/molecules/ChipGroup/index.d.mts +1 -0
- package/dist/components/molecules/CodeBlock/CodeBlock.d.mts +46 -0
- package/dist/components/molecules/CodeBlock/CodeBlock.mjs +231 -0
- package/dist/components/molecules/CodeBlock/CodeBlock.mjs.map +1 -0
- package/dist/components/molecules/CodeBlock/index.d.mts +1 -0
- package/dist/components/molecules/DateGroup/DateGroup.d.mts +37 -0
- package/dist/components/molecules/DateGroup/DateGroup.mjs +104 -0
- package/dist/components/molecules/DateGroup/DateGroup.mjs.map +1 -0
- package/dist/components/molecules/DateGroup/index.d.mts +2 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.mts +27 -0
- package/dist/components/molecules/Dropdown/Dropdown.mjs +282 -0
- package/dist/components/molecules/Dropdown/Dropdown.mjs.map +1 -0
- package/dist/components/molecules/Dropdown/index.d.mts +1 -0
- package/dist/components/molecules/EmptyState/EmptyState.d.mts +32 -0
- package/dist/components/molecules/EmptyState/EmptyState.mjs +133 -0
- package/dist/components/molecules/EmptyState/EmptyState.mjs.map +1 -0
- package/dist/components/molecules/EmptyState/index.d.mts +2 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.d.mts +14 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.mjs +100 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.mjs.map +1 -0
- package/dist/components/molecules/FeatureBlock/index.d.mts +1 -0
- package/dist/components/molecules/InlineAlert/InlineAlert.d.mts +54 -0
- package/dist/components/molecules/InlineAlert/InlineAlert.mjs +140 -0
- package/dist/components/molecules/InlineAlert/InlineAlert.mjs.map +1 -0
- package/dist/components/molecules/InlineAlert/index.d.mts +2 -0
- package/dist/components/molecules/List/List.d.mts +30 -0
- package/dist/components/molecules/List/List.mjs +45 -0
- package/dist/components/molecules/List/List.mjs.map +1 -0
- package/dist/components/molecules/List/ListContext.d.mts +6 -0
- package/dist/components/molecules/List/ListContext.mjs +11 -0
- package/dist/components/molecules/List/ListContext.mjs.map +1 -0
- package/dist/components/molecules/List/ListItem.d.mts +101 -0
- package/dist/components/molecules/List/ListItem.mjs +224 -0
- package/dist/components/molecules/List/ListItem.mjs.map +1 -0
- package/dist/components/molecules/List/index.d.mts +4 -0
- package/dist/components/molecules/Modal/Modal.d.mts +69 -0
- package/dist/components/molecules/Modal/Modal.mjs +259 -0
- package/dist/components/molecules/Modal/Modal.mjs.map +1 -0
- package/dist/components/molecules/Modal/index.d.mts +2 -0
- package/dist/components/molecules/NumberInput/NumberInput.d.mts +86 -0
- package/dist/components/molecules/NumberInput/NumberInput.mjs +268 -0
- package/dist/components/molecules/NumberInput/NumberInput.mjs.map +1 -0
- package/dist/components/molecules/NumberInput/index.d.mts +2 -0
- package/dist/components/molecules/PageTitle/PageTitle.d.mts +21 -0
- package/dist/components/molecules/PageTitle/PageTitle.mjs +77 -0
- package/dist/components/molecules/PageTitle/PageTitle.mjs.map +1 -0
- package/dist/components/molecules/PageTitle/index.d.mts +1 -0
- package/dist/components/molecules/PasswordField/PasswordField.d.mts +55 -0
- package/dist/components/molecules/PasswordField/PasswordField.mjs +146 -0
- package/dist/components/molecules/PasswordField/PasswordField.mjs.map +1 -0
- package/dist/components/molecules/PasswordField/index.d.mts +2 -0
- package/dist/components/molecules/SearchField/SearchField.d.mts +108 -0
- package/dist/components/molecules/SearchField/SearchField.mjs +340 -0
- package/dist/components/molecules/SearchField/SearchField.mjs.map +1 -0
- package/dist/components/molecules/SearchField/index.d.mts +2 -0
- package/dist/components/molecules/Sheet/Sheet.d.mts +96 -0
- package/dist/components/molecules/Sheet/Sheet.mjs +243 -0
- package/dist/components/molecules/Sheet/Sheet.mjs.map +1 -0
- package/dist/components/molecules/Sheet/index.d.mts +2 -0
- package/dist/components/molecules/Slider/Slider.d.mts +102 -0
- package/dist/components/molecules/Slider/Slider.mjs +462 -0
- package/dist/components/molecules/Slider/Slider.mjs.map +1 -0
- package/dist/components/molecules/Slider/index.d.mts +2 -0
- package/dist/components/molecules/TabBar/TabBar.d.mts +82 -0
- package/dist/components/molecules/TabBar/TabBar.mjs +213 -0
- package/dist/components/molecules/TabBar/TabBar.mjs.map +1 -0
- package/dist/components/molecules/TabBar/index.d.mts +2 -0
- package/dist/components/molecules/TextField/InputBase.d.mts +22 -0
- package/dist/components/molecules/TextField/InputBase.mjs +56 -0
- package/dist/components/molecules/TextField/InputBase.mjs.map +1 -0
- package/dist/components/molecules/TextField/TextField.d.mts +56 -0
- package/dist/components/molecules/TextField/TextField.mjs +115 -0
- package/dist/components/molecules/TextField/TextField.mjs.map +1 -0
- package/dist/components/molecules/TextField/index.d.mts +4 -0
- package/dist/components/molecules/TransactionListItem/TransactionListItem.d.mts +39 -0
- package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +224 -0
- package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs.map +1 -0
- package/dist/components/molecules/TransactionListItem/index.d.mts +2 -0
- package/dist/components/molecules/index.d.mts +26 -0
- package/dist/data.js +316 -3
- package/dist/data.js.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/cssTokens.d.mts +14 -0
- package/dist/lib/cssTokens.mjs +19 -0
- package/dist/lib/cssTokens.mjs.map +1 -0
- package/dist/lib/cssVariables.d.mts +15 -0
- package/dist/lib/cssVariables.mjs +37 -0
- package/dist/lib/cssVariables.mjs.map +1 -0
- package/dist/lib/styleUtils.d.mts +42 -0
- package/dist/lib/styleUtils.mjs +160 -0
- package/dist/lib/styleUtils.mjs.map +1 -0
- package/dist/lib/tokenAliases.d.mts +13 -0
- package/dist/lib/tokenAliases.mjs +122 -0
- package/dist/lib/tokenAliases.mjs.map +1 -0
- package/dist/lib/usePresence.d.mts +16 -0
- package/dist/lib/usePresence.mjs +50 -0
- package/dist/lib/usePresence.mjs.map +1 -0
- package/dist/styles/icons.json +30 -1
- package/dist/{data.esm.js → styles/icons.json.mjs} +33 -1466
- package/dist/styles/icons.json.mjs.map +1 -0
- package/dist/styles/tokens.d.mts +3718 -0
- package/dist/styles/tokens.d.ts +545 -1
- package/dist/styles/tokens.json +284 -2
- package/dist/styles/tokens.json.mjs +1736 -0
- package/dist/{tokens/index.esm.js.map → styles/tokens.json.mjs.map} +1 -1
- package/dist/tokens/index.js +284 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/{index.esm.js → index.mjs} +285 -3
- package/dist/tokens/index.mjs.map +1 -0
- package/dist/tokens/styles/tokens.d.mts +3718 -0
- package/dist/tokens/styles/tokens.d.ts +545 -1
- package/dist/tokens/tokens.d.mts +4 -0
- package/dist/tokens/types/tokens.d.mts +6 -0
- package/dist/tokens.css +242 -0
- package/dist/tokens.css.d.mts +4 -0
- package/dist/types/icons.d.mts +25 -0
- package/dist/types/icons.d.ts +1 -1
- package/dist/types/icons.mjs +10 -0
- package/dist/types/icons.mjs.map +1 -0
- package/dist/types/index.d.mts +1 -0
- package/dist/types/tokens.d.mts +6 -0
- package/dist/types/tokens.mjs +10 -0
- package/dist/types/tokens.mjs.map +1 -0
- package/dist/vendor/tslib/tslib.es6.mjs +99 -0
- package/dist/vendor/tslib/tslib.es6.mjs.map +1 -0
- package/package.json +26 -12
- package/dist/client.esm.js +0 -8289
- package/dist/client.esm.js.map +0 -1
- package/dist/data.esm.js.map +0 -1
- package/dist/index.esm.js +0 -8
- package/dist/index.esm.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AILabelKind = 'suggested' | 'removal';
|
|
3
|
+
export type AILabelSize = 'small' | 'medium';
|
|
4
|
+
export interface AILabelProps {
|
|
5
|
+
/**
|
|
6
|
+
* What the agent proposes for the item: a change or addition ("Suggested"), or its removal
|
|
7
|
+
* ("Will be removed"). The wording is fixed so it reads the same in every product (decision 0046).
|
|
8
|
+
* @default 'suggested'
|
|
9
|
+
*/
|
|
10
|
+
kind?: AILabelKind;
|
|
11
|
+
/**
|
|
12
|
+
* Size on the label scale (decision 0018): small (20px) for dense lists, medium (24px) elsewhere.
|
|
13
|
+
* @default 'medium'
|
|
14
|
+
*/
|
|
15
|
+
size?: AILabelSize;
|
|
16
|
+
/** Test identifier for automated testing */
|
|
17
|
+
'data-testid'?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* AILabel marks content an agent has proposed but the user hasn't accepted (decision 0046): the AI
|
|
21
|
+
* icon and a fixed label in the AI colour, never colour alone (decision 0043). It isn't a status
|
|
22
|
+
* (use StatusLabel) or a category (use CategoryLabel), and it doesn't label AI features in general.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <AILabel /> // "Suggested"
|
|
27
|
+
* <AILabel kind="removal" /> // "Will be removed"
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const AILabel: React.FC<AILabelProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AILabelKind = 'suggested' | 'removal';
|
|
3
|
+
export type AILabelSize = 'small' | 'medium';
|
|
4
|
+
export interface AILabelProps {
|
|
5
|
+
/**
|
|
6
|
+
* What the agent proposes for the item: a change or addition ("Suggested"), or its removal
|
|
7
|
+
* ("Will be removed"). The wording is fixed so it reads the same in every product (decision 0046).
|
|
8
|
+
* @default 'suggested'
|
|
9
|
+
*/
|
|
10
|
+
kind?: AILabelKind;
|
|
11
|
+
/**
|
|
12
|
+
* Size on the label scale (decision 0018): small (20px) for dense lists, medium (24px) elsewhere.
|
|
13
|
+
* @default 'medium'
|
|
14
|
+
*/
|
|
15
|
+
size?: AILabelSize;
|
|
16
|
+
/** Test identifier for automated testing */
|
|
17
|
+
'data-testid'?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* AILabel marks content an agent has proposed but the user hasn't accepted (decision 0046): the AI
|
|
21
|
+
* icon and a fixed label in the AI colour, never colour alone (decision 0043). It isn't a status
|
|
22
|
+
* (use StatusLabel) or a category (use CategoryLabel), and it doesn't label AI features in general.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <AILabel /> // "Suggested"
|
|
27
|
+
* <AILabel kind="removal" /> // "Will be removed"
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const AILabel: React.FC<AILabelProps>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import styled$module from 'styled-components';
|
|
5
|
+
const styled = styled$module.default || styled$module;
|
|
6
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
7
|
+
import { Icon } from '../Icon/Icon.mjs';
|
|
8
|
+
|
|
9
|
+
var semantic = tokens.semantic;
|
|
10
|
+
var color = semantic.color,
|
|
11
|
+
typography = semantic.typography,
|
|
12
|
+
size = semantic.size;
|
|
13
|
+
var labels = {
|
|
14
|
+
suggested: 'Suggested',
|
|
15
|
+
removal: 'Will be removed'
|
|
16
|
+
};
|
|
17
|
+
var sizeConfig = {
|
|
18
|
+
small: {
|
|
19
|
+
font: typography.caption,
|
|
20
|
+
gap: semantic.space[100],
|
|
21
|
+
icon: 'xs'
|
|
22
|
+
},
|
|
23
|
+
medium: {
|
|
24
|
+
font: typography.small,
|
|
25
|
+
gap: semantic.space[200],
|
|
26
|
+
icon: 'sm'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var StyledAILabel = /*#__PURE__*/styled.span.withConfig({
|
|
30
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
31
|
+
return !prop.startsWith('$');
|
|
32
|
+
},
|
|
33
|
+
displayName: "AILabel__StyledAILabel",
|
|
34
|
+
componentId: "sc-qknkn-0"
|
|
35
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n white-space: nowrap;\n"], ["\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n white-space: nowrap;\n"])), function (_a) {
|
|
36
|
+
var $size = _a.$size;
|
|
37
|
+
return size.label[$size];
|
|
38
|
+
}, function (_a) {
|
|
39
|
+
var $size = _a.$size;
|
|
40
|
+
return sizeConfig[$size].gap;
|
|
41
|
+
}, function (_a) {
|
|
42
|
+
var $size = _a.$size;
|
|
43
|
+
return sizeConfig[$size].font;
|
|
44
|
+
}, color.text.ai);
|
|
45
|
+
var StyledIcon = /*#__PURE__*/styled.span.withConfig({
|
|
46
|
+
displayName: "AILabel__StyledIcon",
|
|
47
|
+
componentId: "sc-qknkn-1"
|
|
48
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n color: ", ";\n"], ["\n display: inline-flex;\n color: ", ";\n"
|
|
49
|
+
/**
|
|
50
|
+
* AILabel marks content an agent has proposed but the user hasn't accepted (decision 0046): the AI
|
|
51
|
+
* icon and a fixed label in the AI colour, never colour alone (decision 0043). It isn't a status
|
|
52
|
+
* (use StatusLabel) or a category (use CategoryLabel), and it doesn't label AI features in general.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <AILabel /> // "Suggested"
|
|
57
|
+
* <AILabel kind="removal" /> // "Will be removed"
|
|
58
|
+
* ```
|
|
59
|
+
*/])), color.icon.ai);
|
|
60
|
+
/**
|
|
61
|
+
* AILabel marks content an agent has proposed but the user hasn't accepted (decision 0046): the AI
|
|
62
|
+
* icon and a fixed label in the AI colour, never colour alone (decision 0043). It isn't a status
|
|
63
|
+
* (use StatusLabel) or a category (use CategoryLabel), and it doesn't label AI features in general.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <AILabel /> // "Suggested"
|
|
68
|
+
* <AILabel kind="removal" /> // "Will be removed"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
var AILabel = function AILabel(_a) {
|
|
72
|
+
var _b = _a.kind,
|
|
73
|
+
kind = _b === void 0 ? 'suggested' : _b,
|
|
74
|
+
_c = _a.size,
|
|
75
|
+
labelSize = _c === void 0 ? 'medium' : _c,
|
|
76
|
+
dataTestId = _a["data-testid"];
|
|
77
|
+
return jsxs(StyledAILabel, {
|
|
78
|
+
"$size": labelSize,
|
|
79
|
+
"data-testid": dataTestId,
|
|
80
|
+
children: [jsx(StyledIcon, {
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
children: jsx(Icon, {
|
|
83
|
+
name: "ai",
|
|
84
|
+
size: sizeConfig[labelSize].icon,
|
|
85
|
+
iconColor: "inherit"
|
|
86
|
+
})
|
|
87
|
+
}), labels[kind]]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
AILabel.displayName = 'AILabel';
|
|
91
|
+
var templateObject_1, templateObject_2;
|
|
92
|
+
|
|
93
|
+
export { AILabel };
|
|
94
|
+
//# sourceMappingURL=AILabel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AILabel.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AILabel.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AILabel';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject, __rest, __assign } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import styled$module from 'styled-components';
|
|
6
|
+
const styled = styled$module.default || styled$module;
|
|
7
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
8
|
+
|
|
9
|
+
// Destructure tokens
|
|
10
|
+
var semantic = tokens.semantic;
|
|
11
|
+
var initials = tokens.component.avatar.initials;
|
|
12
|
+
var color = semantic.color,
|
|
13
|
+
size = semantic.size;
|
|
14
|
+
var radius = semantic.radius;
|
|
15
|
+
var AvatarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
17
|
+
return !prop.startsWith('$');
|
|
18
|
+
},
|
|
19
|
+
displayName: "Avatar__AvatarContainer",
|
|
20
|
+
componentId: "sc-ezn4ax-0"
|
|
21
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"])), function (_a) {
|
|
22
|
+
var $size = _a.$size;
|
|
23
|
+
return size.avatar[$size];
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var $size = _a.$size;
|
|
26
|
+
return size.avatar[$size];
|
|
27
|
+
}, radius.full, color.fill.muted);
|
|
28
|
+
var AvatarImage = /*#__PURE__*/styled.img.withConfig({
|
|
29
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
30
|
+
return !prop.startsWith('$');
|
|
31
|
+
},
|
|
32
|
+
displayName: "Avatar__AvatarImage",
|
|
33
|
+
componentId: "sc-ezn4ax-1"
|
|
34
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"])), radius.full);
|
|
35
|
+
var AvatarInitials = /*#__PURE__*/styled.span.withConfig({
|
|
36
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
37
|
+
return !prop.startsWith('$');
|
|
38
|
+
},
|
|
39
|
+
displayName: "Avatar__AvatarInitials",
|
|
40
|
+
componentId: "sc-ezn4ax-2"
|
|
41
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: ", ";\n text-transform: uppercase;\n user-select: none;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: ", ";\n text-transform: uppercase;\n user-select: none;\n"
|
|
42
|
+
// Helper function to get initials from name
|
|
43
|
+
])), initials.fontFamily, initials.fontWeight, function (_a) {
|
|
44
|
+
var $size = _a.$size;
|
|
45
|
+
return initials.fontSize[$size];
|
|
46
|
+
}, color.text["default"], initials.lineHeight);
|
|
47
|
+
// Helper function to get initials from name
|
|
48
|
+
var getInitials = function getInitials(name) {
|
|
49
|
+
return name.split(' ').map(function (word) {
|
|
50
|
+
return word.charAt(0);
|
|
51
|
+
}).join('').slice(0, 2).toUpperCase();
|
|
52
|
+
};
|
|
53
|
+
var Avatar = function Avatar(_a) {
|
|
54
|
+
var name = _a.name,
|
|
55
|
+
picture = _a.picture,
|
|
56
|
+
_b = _a.size,
|
|
57
|
+
size = _b === void 0 ? 'md' : _b,
|
|
58
|
+
dataTestId = _a["data-testid"],
|
|
59
|
+
props = __rest(_a, ["name", "picture", "size", 'data-testid']);
|
|
60
|
+
// Remove styled-only props from the rest
|
|
61
|
+
var _c = props;
|
|
62
|
+
_c.$size;
|
|
63
|
+
var htmlProps = __rest(_c, ["$size"]);
|
|
64
|
+
var _d = useState(false),
|
|
65
|
+
imageError = _d[0],
|
|
66
|
+
setImageError = _d[1];
|
|
67
|
+
var _e = useState(false),
|
|
68
|
+
imageLoaded = _e[0],
|
|
69
|
+
setImageLoaded = _e[1];
|
|
70
|
+
var handleImageError = function handleImageError() {
|
|
71
|
+
setImageError(true);
|
|
72
|
+
};
|
|
73
|
+
var handleImageLoad = function handleImageLoad() {
|
|
74
|
+
setImageLoaded(true);
|
|
75
|
+
};
|
|
76
|
+
var showImage = picture && !imageError;
|
|
77
|
+
var initials = getInitials(name);
|
|
78
|
+
return jsx(AvatarContainer, __assign({
|
|
79
|
+
"$size": size,
|
|
80
|
+
"data-testid": dataTestId,
|
|
81
|
+
"data-size": size,
|
|
82
|
+
role: "img",
|
|
83
|
+
"aria-label": "Avatar for ".concat(name)
|
|
84
|
+
}, htmlProps, {
|
|
85
|
+
children: showImage ? jsx(AvatarImage, {
|
|
86
|
+
"$size": size,
|
|
87
|
+
src: picture,
|
|
88
|
+
alt: "Avatar of ".concat(name),
|
|
89
|
+
onError: handleImageError,
|
|
90
|
+
onLoad: handleImageLoad,
|
|
91
|
+
"data-state": imageLoaded ? 'loaded' : 'loading'
|
|
92
|
+
}) : jsx(AvatarInitials, {
|
|
93
|
+
"$size": size,
|
|
94
|
+
"data-initials": initials,
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
children: initials
|
|
97
|
+
})
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
101
|
+
|
|
102
|
+
export { Avatar };
|
|
103
|
+
//# sourceMappingURL=Avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Avatar.mjs';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BadgeProps {
|
|
3
|
+
/** Content to wrap with the badge */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Number to display in the badge. If 0, badge is hidden */
|
|
6
|
+
count?: number;
|
|
7
|
+
/** Maximum number to display before showing "99+" */
|
|
8
|
+
max?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Visual variant of the badge. `accent` is the blue highlight. `primary` is a deprecated alias
|
|
11
|
+
* for `accent`, because Button's `primary` is near-black (decision 0029). It keeps working
|
|
12
|
+
* until it is removed in 3.0.
|
|
13
|
+
* @default 'default'
|
|
14
|
+
*/
|
|
15
|
+
variant?: 'default' | 'accent' | 'primary' | 'error' | 'warning' | 'success';
|
|
16
|
+
/** Show only a dot indicator instead of count */
|
|
17
|
+
dot?: boolean;
|
|
18
|
+
/** Screen reader label for the badge */
|
|
19
|
+
'aria-label'?: string;
|
|
20
|
+
/** Additional CSS class */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Test identifier for automated testing */
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import styled$module, { keyframes } from 'styled-components';
|
|
5
|
+
const styled = styled$module.default || styled$module;
|
|
6
|
+
import { reducedMotion, forcedColors, visuallyHidden } from '../../../lib/styleUtils.mjs';
|
|
7
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
8
|
+
import { Typography } from '../Typography/Typography.mjs';
|
|
9
|
+
|
|
10
|
+
var semantic = tokens.semantic;
|
|
11
|
+
var color = semantic.color;
|
|
12
|
+
var radius = semantic.radius;
|
|
13
|
+
var _a = tokens.component.badge,
|
|
14
|
+
dot = _a.dot,
|
|
15
|
+
count = _a.count,
|
|
16
|
+
ring = _a.ring;
|
|
17
|
+
var scaleIn = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n"], ["\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n"])));
|
|
18
|
+
var BadgeWrapper = /*#__PURE__*/styled.span.withConfig({
|
|
19
|
+
displayName: "Badge__BadgeWrapper",
|
|
20
|
+
componentId: "sc-tjz4pp-0"
|
|
21
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"])));
|
|
22
|
+
var BadgeIndicator = /*#__PURE__*/styled.span.withConfig({
|
|
23
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
24
|
+
return !prop.startsWith('$');
|
|
25
|
+
},
|
|
26
|
+
displayName: "Badge__BadgeIndicator",
|
|
27
|
+
componentId: "sc-tjz4pp-1"
|
|
28
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"])), function (props) {
|
|
29
|
+
return props.$isVisible ? 'flex' : 'none';
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return props.$isDot ? dot.size : count.minWidth;
|
|
32
|
+
}, function (props) {
|
|
33
|
+
return props.$isDot ? dot.size : count.height;
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return props.$isDot ? '0' : "0 ".concat(semantic.space.inset.xs);
|
|
36
|
+
}, radius.full, count.lineHeight, ring.width, semantic.surface.base, scaleIn, semantic.motion.duration.moderate, semantic.motion.easing.decelerate, reducedMotion, function (props) {
|
|
37
|
+
return props.$isDot ? "".concat(forcedColors, " { forced-color-adjust: none; background-color: CanvasText; }") : "".concat(forcedColors, " { border: ").concat(semantic.border.width.thin, " solid currentColor; }");
|
|
38
|
+
}, function (props) {
|
|
39
|
+
switch (props.$variant) {
|
|
40
|
+
case 'accent':
|
|
41
|
+
case 'primary':
|
|
42
|
+
// Deprecated alias for 'accent', removed in 3.0 (#169)
|
|
43
|
+
return "\n background-color: ".concat(color.fill.accent, ";\n color: ").concat(color.text.inverse, ";\n ");
|
|
44
|
+
case 'error':
|
|
45
|
+
return "\n background-color: ".concat(color.fill.danger, ";\n color: ").concat(color.text.inverse, ";\n ");
|
|
46
|
+
case 'warning':
|
|
47
|
+
return "\n background-color: ".concat(color.fill.warning, ";\n color: ").concat(color.text.inverse, ";\n ");
|
|
48
|
+
case 'success':
|
|
49
|
+
return "\n background-color: ".concat(color.fill.success, ";\n color: ").concat(color.text.inverse, ";\n ");
|
|
50
|
+
default:
|
|
51
|
+
return "\n background-color: ".concat(color.fill.emphasis, ";\n color: ").concat(color.text.inverse, ";\n ");
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var ScreenReaderOnly = /*#__PURE__*/styled.span.withConfig({
|
|
55
|
+
displayName: "Badge__ScreenReaderOnly",
|
|
56
|
+
componentId: "sc-tjz4pp-2"
|
|
57
|
+
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
58
|
+
var Badge = function Badge(_a) {
|
|
59
|
+
var children = _a.children,
|
|
60
|
+
_b = _a.count,
|
|
61
|
+
count = _b === void 0 ? 0 : _b,
|
|
62
|
+
_c = _a.max,
|
|
63
|
+
max = _c === void 0 ? 99 : _c,
|
|
64
|
+
_d = _a.variant,
|
|
65
|
+
variant = _d === void 0 ? 'default' : _d,
|
|
66
|
+
_e = _a.dot,
|
|
67
|
+
dot = _e === void 0 ? false : _e,
|
|
68
|
+
ariaLabel = _a["aria-label"],
|
|
69
|
+
className = _a.className,
|
|
70
|
+
dataTestId = _a["data-testid"];
|
|
71
|
+
var isVisible = dot || count > 0;
|
|
72
|
+
var displayCount = count > max ? "".concat(max, "+") : count.toString();
|
|
73
|
+
// Generate default aria-label if not provided
|
|
74
|
+
var defaultAriaLabel = dot ? 'New notification indicator' : count === 1 ? '1 notification' : "".concat(count, " notifications");
|
|
75
|
+
var label = ariaLabel || defaultAriaLabel;
|
|
76
|
+
return jsxs(BadgeWrapper, {
|
|
77
|
+
className: className,
|
|
78
|
+
"data-testid": dataTestId,
|
|
79
|
+
children: [children, jsxs(BadgeIndicator, {
|
|
80
|
+
"$variant": variant,
|
|
81
|
+
"$isDot": dot,
|
|
82
|
+
"$isVisible": isVisible,
|
|
83
|
+
role: "status",
|
|
84
|
+
"aria-live": "polite",
|
|
85
|
+
children: [!dot && jsx(Typography, {
|
|
86
|
+
variant: "caption",
|
|
87
|
+
color: "inverse",
|
|
88
|
+
children: displayCount
|
|
89
|
+
}), jsx(ScreenReaderOnly, {
|
|
90
|
+
children: label
|
|
91
|
+
})]
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
96
|
+
|
|
97
|
+
export { Badge };
|
|
98
|
+
//# sourceMappingURL=Badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Tokens } from '../../../types/tokens.mjs';
|
|
3
|
+
export interface BoxProps {
|
|
4
|
+
display?: 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'none';
|
|
5
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
6
|
+
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
7
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
8
|
+
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
9
|
+
gap?: keyof Tokens['semantic']['spacing']['layout'];
|
|
10
|
+
m?: keyof Tokens['semantic']['spacing']['layout'];
|
|
11
|
+
mt?: keyof Tokens['semantic']['spacing']['layout'];
|
|
12
|
+
mr?: keyof Tokens['semantic']['spacing']['layout'];
|
|
13
|
+
mb?: keyof Tokens['semantic']['spacing']['layout'];
|
|
14
|
+
ml?: keyof Tokens['semantic']['spacing']['layout'];
|
|
15
|
+
mx?: keyof Tokens['semantic']['spacing']['layout'];
|
|
16
|
+
my?: keyof Tokens['semantic']['spacing']['layout'];
|
|
17
|
+
p?: keyof Tokens['semantic']['spacing']['layout'];
|
|
18
|
+
pt?: keyof Tokens['semantic']['spacing']['layout'];
|
|
19
|
+
pr?: keyof Tokens['semantic']['spacing']['layout'];
|
|
20
|
+
pb?: keyof Tokens['semantic']['spacing']['layout'];
|
|
21
|
+
pl?: keyof Tokens['semantic']['spacing']['layout'];
|
|
22
|
+
px?: keyof Tokens['semantic']['spacing']['layout'];
|
|
23
|
+
py?: keyof Tokens['semantic']['spacing']['layout'];
|
|
24
|
+
width?: string;
|
|
25
|
+
height?: string;
|
|
26
|
+
maxWidth?: string;
|
|
27
|
+
maxHeight?: string;
|
|
28
|
+
minWidth?: string;
|
|
29
|
+
minHeight?: string;
|
|
30
|
+
position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
31
|
+
top?: string;
|
|
32
|
+
right?: string;
|
|
33
|
+
bottom?: string;
|
|
34
|
+
left?: string;
|
|
35
|
+
borderRadius?: keyof Tokens['semantic']['border']['radius'];
|
|
36
|
+
border?: keyof Tokens['semantic']['color']['border'];
|
|
37
|
+
borderTop?: keyof Tokens['semantic']['color']['border'];
|
|
38
|
+
borderRight?: keyof Tokens['semantic']['color']['border'];
|
|
39
|
+
borderBottom?: keyof Tokens['semantic']['color']['border'];
|
|
40
|
+
borderLeft?: keyof Tokens['semantic']['color']['border'];
|
|
41
|
+
bg?: keyof Tokens['semantic']['color']['background'];
|
|
42
|
+
color?: keyof Tokens['semantic']['color']['text'];
|
|
43
|
+
shadow?: keyof Tokens['semantic']['elevation'];
|
|
44
|
+
cursor?: 'auto' | 'default' | 'pointer' | 'wait' | 'text' | 'move' | 'help' | 'not-allowed';
|
|
45
|
+
transition?: string;
|
|
46
|
+
hoverShadow?: keyof Tokens['semantic']['elevation'];
|
|
47
|
+
hoverTransform?: string;
|
|
48
|
+
overflow?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
49
|
+
overflowX?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
50
|
+
overflowY?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
51
|
+
as?: React.ElementType;
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
id?: string;
|
|
54
|
+
style?: React.CSSProperties;
|
|
55
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
56
|
+
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
57
|
+
tabIndex?: number;
|
|
58
|
+
role?: string;
|
|
59
|
+
'aria-label'?: string;
|
|
60
|
+
'data-testid'?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const Box: React.FC<BoxProps>;
|