@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,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject, __assign } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import styled$module from 'styled-components';
|
|
6
|
+
const styled = styled$module.default || styled$module;
|
|
7
|
+
import { Container } from '../../atoms/Container/Container.mjs';
|
|
8
|
+
import { Typography } from '../../atoms/Typography/Typography.mjs';
|
|
9
|
+
import { Icon } from '../../atoms/Icon/Icon.mjs';
|
|
10
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
11
|
+
|
|
12
|
+
var BreadcrumbNavStyled = /*#__PURE__*/styled.nav.withConfig({
|
|
13
|
+
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
14
|
+
componentId: "sc-7ouzg5-0"
|
|
15
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), tokens.semantic.border["default"]);
|
|
16
|
+
var BreadcrumbStyled = /*#__PURE__*/styled.li.withConfig({
|
|
17
|
+
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
18
|
+
componentId: "sc-7ouzg5-1"
|
|
19
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: ", ";\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"], ["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: ", ";\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"])), tokens.semantic.space[200], tokens.semantic.space[200], tokens.semantic.color.text.muted, tokens.component.breadcrumbs.item.maxWidth, tokens.semantic.color.text["default"]);
|
|
20
|
+
var BreadcrumbSeparator = /*#__PURE__*/styled.span.withConfig({
|
|
21
|
+
displayName: "Breadcrumbs__BreadcrumbSeparator",
|
|
22
|
+
componentId: "sc-7ouzg5-2"
|
|
23
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n opacity: 0.5;\n"], ["\n display: inline-flex;\n align-items: center;\n opacity: 0.5;\n"])));
|
|
24
|
+
var isInternalUrl = function isInternalUrl(url) {
|
|
25
|
+
return url.startsWith('/') && !url.startsWith('http');
|
|
26
|
+
};
|
|
27
|
+
var Breadcrumbs = function Breadcrumbs(_a) {
|
|
28
|
+
var breadcrumbs = _a.breadcrumbs,
|
|
29
|
+
LinkComponent = _a.linkComponent;
|
|
30
|
+
return jsx(Container, {
|
|
31
|
+
children: jsx(BreadcrumbNavStyled, {
|
|
32
|
+
"aria-label": "breadcrumb",
|
|
33
|
+
children: jsx("ol", {
|
|
34
|
+
children: breadcrumbs.map(function (breadcrumb, index) {
|
|
35
|
+
return jsxs(React.Fragment, {
|
|
36
|
+
children: [jsx(BreadcrumbStyled, {
|
|
37
|
+
children: index === breadcrumbs.length - 1 ? jsx(Typography, {
|
|
38
|
+
variant: "caption",
|
|
39
|
+
children: breadcrumb.label
|
|
40
|
+
}) : LinkComponent && isInternalUrl(breadcrumb.url) ? jsx(LinkComponent, {
|
|
41
|
+
href: breadcrumb.url,
|
|
42
|
+
children: jsx(Typography, {
|
|
43
|
+
variant: "caption",
|
|
44
|
+
children: breadcrumb.label
|
|
45
|
+
})
|
|
46
|
+
}) : jsx("a", __assign({
|
|
47
|
+
href: breadcrumb.url
|
|
48
|
+
}, !isInternalUrl(breadcrumb.url) && {
|
|
49
|
+
target: "_blank",
|
|
50
|
+
rel: "noopener noreferrer"
|
|
51
|
+
}, {
|
|
52
|
+
children: jsx(Typography, {
|
|
53
|
+
variant: "caption",
|
|
54
|
+
children: breadcrumb.label
|
|
55
|
+
})
|
|
56
|
+
}))
|
|
57
|
+
}), index < breadcrumbs.length - 1 && jsx(BreadcrumbSeparator, {
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
children: jsx(Icon, {
|
|
60
|
+
name: "arrowRight",
|
|
61
|
+
size: "xs",
|
|
62
|
+
iconColor: "subdued"
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
}, index);
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
72
|
+
|
|
73
|
+
export { Breadcrumbs };
|
|
74
|
+
//# sourceMappingURL=Breadcrumbs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumbs.mjs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type CardLargeProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
excerpt: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
labels?: string[];
|
|
6
|
+
picture: string;
|
|
7
|
+
onImageClick?: () => void;
|
|
8
|
+
imageHref?: string;
|
|
9
|
+
/** Test identifier for automated testing */
|
|
10
|
+
'data-testid'?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const CardLarge: ({ title, excerpt, subtitle, labels, picture, onImageClick, imageHref, "data-testid": dataTestId, }: CardLargeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import styled$module from 'styled-components';
|
|
5
|
+
const styled = styled$module.default || styled$module;
|
|
6
|
+
import { Chip } from '../../atoms/Chip/Chip.mjs';
|
|
7
|
+
import '../../atoms/Icon/Icon.mjs';
|
|
8
|
+
import '../../atoms/Chip/shared/ChipBase.mjs';
|
|
9
|
+
import '../../atoms/Chip/SuggestionChip.mjs';
|
|
10
|
+
import { Picture } from '../../atoms/Picture/Picture.mjs';
|
|
11
|
+
import { Stack } from '../../atoms/Stack/Stack.mjs';
|
|
12
|
+
import { Typography } from '../../atoms/Typography/Typography.mjs';
|
|
13
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
14
|
+
|
|
15
|
+
var CardLargeStyled = /*#__PURE__*/styled.div.withConfig({
|
|
16
|
+
displayName: "CardLarge__CardLargeStyled",
|
|
17
|
+
componentId: "sc-1rfgdzl-0"
|
|
18
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n /* The image answers hover and press through Picture, and only when it's clickable (issue 185) */\n img {\n border-radius: ", ";\n width: 100%;\n }\n"], ["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n /* The image answers hover and press through Picture, and only when it's clickable (issue 185) */\n img {\n border-radius: ", ";\n width: 100%;\n }\n"])), tokens.component.cardLarge.maxWidth, tokens.semantic.radius['2xl']);
|
|
19
|
+
var CardLarge = function CardLarge(_a) {
|
|
20
|
+
var title = _a.title,
|
|
21
|
+
excerpt = _a.excerpt,
|
|
22
|
+
subtitle = _a.subtitle,
|
|
23
|
+
_b = _a.labels,
|
|
24
|
+
labels = _b === void 0 ? [] : _b,
|
|
25
|
+
picture = _a.picture,
|
|
26
|
+
onImageClick = _a.onImageClick,
|
|
27
|
+
imageHref = _a.imageHref,
|
|
28
|
+
dataTestId = _a["data-testid"];
|
|
29
|
+
return jsx(CardLargeStyled, {
|
|
30
|
+
"data-testid": dataTestId,
|
|
31
|
+
children: jsxs(Stack, {
|
|
32
|
+
direction: "column",
|
|
33
|
+
gap: "md",
|
|
34
|
+
children: [jsx(Picture, {
|
|
35
|
+
title: title,
|
|
36
|
+
src: picture,
|
|
37
|
+
onClick: onImageClick,
|
|
38
|
+
href: imageHref
|
|
39
|
+
}), jsxs(Stack, {
|
|
40
|
+
direction: "row",
|
|
41
|
+
alignItems: "flex-start",
|
|
42
|
+
justifyContent: "space-between",
|
|
43
|
+
gap: "xs",
|
|
44
|
+
children: [jsxs(Stack, {
|
|
45
|
+
direction: "column",
|
|
46
|
+
gap: "xs",
|
|
47
|
+
children: [jsx(Typography, {
|
|
48
|
+
variant: "h5",
|
|
49
|
+
children: title
|
|
50
|
+
}), subtitle && jsx(Typography, {
|
|
51
|
+
variant: "small",
|
|
52
|
+
color: "subdued",
|
|
53
|
+
children: subtitle
|
|
54
|
+
}), excerpt && jsx(Typography, {
|
|
55
|
+
variant: "body",
|
|
56
|
+
children: excerpt
|
|
57
|
+
})]
|
|
58
|
+
}), jsx(Stack, {
|
|
59
|
+
direction: "row",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
gap: "xs",
|
|
62
|
+
children: Array.isArray(labels) && labels.map(function (label, index) {
|
|
63
|
+
return jsx(Chip, {
|
|
64
|
+
title: label,
|
|
65
|
+
variant: "default"
|
|
66
|
+
}, index);
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
var templateObject_1;
|
|
74
|
+
|
|
75
|
+
export { CardLarge };
|
|
76
|
+
//# sourceMappingURL=CardLarge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardLarge.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardLarge.mjs';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CardSmallProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
picture?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
meta?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Custom link component (e.g., Next.js Link)
|
|
10
|
+
* @example linkComponent={NextLink}
|
|
11
|
+
*/
|
|
12
|
+
linkComponent?: React.ComponentType<any>;
|
|
13
|
+
/** Test identifier for automated testing */
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const CardSmall: React.FC<CardSmallProps>;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { Stack } from '../../atoms/Stack/Stack.mjs';
|
|
7
|
+
import { Typography } from '../../atoms/Typography/Typography.mjs';
|
|
8
|
+
import { Picture } from '../../atoms/Picture/Picture.mjs';
|
|
9
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
10
|
+
|
|
11
|
+
// The whole card is one link (#185): hovering anywhere fades its image, pressing fades it one step
|
|
12
|
+
// further, and keyboard focus draws the system focus ring around the card (decision 0029)
|
|
13
|
+
var CardSmallStyled = /*#__PURE__*/styled.div.withConfig({
|
|
14
|
+
displayName: "CardSmall__CardSmallStyled",
|
|
15
|
+
componentId: "sc-jpcqvd-0"
|
|
16
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n a {\n display: block;\n text-decoration: none;\n border-radius: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n a:hover img {\n opacity: ", ";\n }\n\n a:active img {\n opacity: ", ";\n }\n\n a:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n a {\n display: block;\n text-decoration: none;\n border-radius: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n a:hover img {\n opacity: ", ";\n }\n\n a:active img {\n opacity: ", ";\n }\n\n a:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), tokens.semantic.radius.sm, tokens.semantic.radius.sm, tokens.semantic.motion.transition.press, tokens.semantic.opacity.hover, tokens.semantic.opacity.pressed, tokens.semantic.border.focus, tokens.semantic.border.focusOffset);
|
|
17
|
+
var CardSmall = function CardSmall(_a) {
|
|
18
|
+
var title = _a.title,
|
|
19
|
+
picture = _a.picture,
|
|
20
|
+
subtitle = _a.subtitle,
|
|
21
|
+
meta = _a.meta,
|
|
22
|
+
href = _a.href,
|
|
23
|
+
LinkComponent = _a.linkComponent,
|
|
24
|
+
dataTestId = _a["data-testid"];
|
|
25
|
+
if (!picture || !meta) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
var content = jsxs(Stack, {
|
|
29
|
+
direction: "column",
|
|
30
|
+
gap: 'sm',
|
|
31
|
+
children: [jsx(Picture, {
|
|
32
|
+
title: title,
|
|
33
|
+
src: picture,
|
|
34
|
+
width: 300,
|
|
35
|
+
height: 300
|
|
36
|
+
}), jsxs(Stack, {
|
|
37
|
+
direction: "column",
|
|
38
|
+
gap: 'xs',
|
|
39
|
+
children: [jsx(Typography, {
|
|
40
|
+
variant: "small",
|
|
41
|
+
children: title
|
|
42
|
+
}), jsxs(Stack, {
|
|
43
|
+
direction: "column",
|
|
44
|
+
gap: 'none',
|
|
45
|
+
children: [subtitle && jsx(Typography, {
|
|
46
|
+
variant: "label",
|
|
47
|
+
color: "subdued",
|
|
48
|
+
children: subtitle
|
|
49
|
+
}), meta && jsx(Typography, {
|
|
50
|
+
variant: "label",
|
|
51
|
+
color: "subdued",
|
|
52
|
+
children: meta
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
return jsx(CardSmallStyled, {
|
|
58
|
+
"data-testid": dataTestId,
|
|
59
|
+
children: LinkComponent && href ? jsx(LinkComponent, {
|
|
60
|
+
href: href,
|
|
61
|
+
"aria-label": title,
|
|
62
|
+
children: content
|
|
63
|
+
}) : jsx("a", {
|
|
64
|
+
href: href || '#',
|
|
65
|
+
"aria-label": title,
|
|
66
|
+
children: content
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
var templateObject_1;
|
|
71
|
+
|
|
72
|
+
export { CardSmall };
|
|
73
|
+
//# sourceMappingURL=CardSmall.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardSmall.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardSmall.mjs';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
/**
|
|
4
|
+
* The label text for the checkbox
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the checkbox is checked
|
|
9
|
+
*/
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the checkbox is in an indeterminate state
|
|
13
|
+
* Useful for "select all" scenarios where some but not all items are selected
|
|
14
|
+
*/
|
|
15
|
+
indeterminate?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Position of the label relative to the checkbox
|
|
18
|
+
* @default 'right'
|
|
19
|
+
*/
|
|
20
|
+
labelPosition?: 'left' | 'right';
|
|
21
|
+
/**
|
|
22
|
+
* Helper text displayed below the checkbox
|
|
23
|
+
*/
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Error message to display. When provided, checkbox enters error state
|
|
27
|
+
*/
|
|
28
|
+
error?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the checkbox is disabled
|
|
31
|
+
*/
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Callback fired when the checkbox state changes
|
|
35
|
+
*/
|
|
36
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Additional ARIA description for accessibility
|
|
39
|
+
*/
|
|
40
|
+
'aria-describedby'?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
44
|
+
*
|
|
45
|
+
* Features:
|
|
46
|
+
* - Custom styled checkbox with clear visual states
|
|
47
|
+
* - Integrated label with configurable positioning
|
|
48
|
+
* - Helper text and error messaging
|
|
49
|
+
* - Indeterminate state support
|
|
50
|
+
* - Full keyboard navigation (Space to toggle)
|
|
51
|
+
* - ARIA attributes for screen readers
|
|
52
|
+
* - 8px grid aligned (48px touch target)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <Checkbox
|
|
57
|
+
* label="Accept terms and conditions"
|
|
58
|
+
* checked={accepted}
|
|
59
|
+
* onChange={(e) => setAccepted(e.target.checked)}
|
|
60
|
+
* required
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject, __rest, __assign } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import React, { forwardRef, useId } 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
|
+
import { StyledCheckboxContainer, HiddenCheckboxInput, StyledCheckbox, StyledCheckboxLabel } from './SelectableInputBase.mjs';
|
|
9
|
+
|
|
10
|
+
var StyledFieldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
11
|
+
displayName: "Checkbox__StyledFieldContainer",
|
|
12
|
+
componentId: "sc-vquz3v-0"
|
|
13
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), tokens.semantic.space[100]);
|
|
14
|
+
var StyledHelperText = /*#__PURE__*/styled.span.withConfig({
|
|
15
|
+
displayName: "Checkbox__StyledHelperText",
|
|
16
|
+
componentId: "sc-vquz3v-1"
|
|
17
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"], ["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"
|
|
18
|
+
/**
|
|
19
|
+
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
20
|
+
*
|
|
21
|
+
* Features:
|
|
22
|
+
* - Custom styled checkbox with clear visual states
|
|
23
|
+
* - Integrated label with configurable positioning
|
|
24
|
+
* - Helper text and error messaging
|
|
25
|
+
* - Indeterminate state support
|
|
26
|
+
* - Full keyboard navigation (Space to toggle)
|
|
27
|
+
* - ARIA attributes for screen readers
|
|
28
|
+
* - 8px grid aligned (48px touch target)
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Checkbox
|
|
33
|
+
* label="Accept terms and conditions"
|
|
34
|
+
* checked={accepted}
|
|
35
|
+
* onChange={(e) => setAccepted(e.target.checked)}
|
|
36
|
+
* required
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/])), tokens.component.field.helperText.typography, function (props) {
|
|
40
|
+
return props.$error ? tokens.component.field.helperText.colorError : tokens.component.field.helperText.color;
|
|
41
|
+
}, tokens.semantic.space[900]);
|
|
42
|
+
/**
|
|
43
|
+
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
44
|
+
*
|
|
45
|
+
* Features:
|
|
46
|
+
* - Custom styled checkbox with clear visual states
|
|
47
|
+
* - Integrated label with configurable positioning
|
|
48
|
+
* - Helper text and error messaging
|
|
49
|
+
* - Indeterminate state support
|
|
50
|
+
* - Full keyboard navigation (Space to toggle)
|
|
51
|
+
* - ARIA attributes for screen readers
|
|
52
|
+
* - 8px grid aligned (48px touch target)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <Checkbox
|
|
57
|
+
* label="Accept terms and conditions"
|
|
58
|
+
* checked={accepted}
|
|
59
|
+
* onChange={(e) => setAccepted(e.target.checked)}
|
|
60
|
+
* required
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
var Checkbox = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
65
|
+
var label = _a.label,
|
|
66
|
+
_b = _a.checked,
|
|
67
|
+
checked = _b === void 0 ? false : _b,
|
|
68
|
+
_c = _a.indeterminate,
|
|
69
|
+
indeterminate = _c === void 0 ? false : _c,
|
|
70
|
+
_d = _a.labelPosition,
|
|
71
|
+
labelPosition = _d === void 0 ? 'right' : _d,
|
|
72
|
+
helperText = _a.helperText,
|
|
73
|
+
error = _a.error,
|
|
74
|
+
_e = _a.disabled,
|
|
75
|
+
disabled = _e === void 0 ? false : _e,
|
|
76
|
+
onChange = _a.onChange,
|
|
77
|
+
providedId = _a.id,
|
|
78
|
+
ariaDescribedby = _a["aria-describedby"],
|
|
79
|
+
rest = __rest(_a, ["label", "checked", "indeterminate", "labelPosition", "helperText", "error", "disabled", "onChange", "id", 'aria-describedby']);
|
|
80
|
+
var generatedId = useId();
|
|
81
|
+
var id = providedId || generatedId;
|
|
82
|
+
var helperTextId = "".concat(id, "-helper-text");
|
|
83
|
+
var errorId = "".concat(id, "-error");
|
|
84
|
+
// Determine the state for styling
|
|
85
|
+
var state = disabled ? 'disabled' : error ? 'error' : 'default';
|
|
86
|
+
// Set up ARIA describedby
|
|
87
|
+
var describedBy = [ariaDescribedby, helperText ? helperTextId : undefined, error ? errorId : undefined].filter(Boolean).join(' ');
|
|
88
|
+
// Update indeterminate property on the input element
|
|
89
|
+
var inputRef = React.useRef(null);
|
|
90
|
+
React.useImperativeHandle(ref, function () {
|
|
91
|
+
return inputRef.current;
|
|
92
|
+
});
|
|
93
|
+
React.useEffect(function () {
|
|
94
|
+
if (inputRef.current) {
|
|
95
|
+
inputRef.current.indeterminate = indeterminate;
|
|
96
|
+
}
|
|
97
|
+
}, [indeterminate]);
|
|
98
|
+
return jsxs(StyledFieldContainer, {
|
|
99
|
+
children: [jsxs(StyledCheckboxContainer, {
|
|
100
|
+
"$disabled": disabled,
|
|
101
|
+
"$labelPosition": labelPosition,
|
|
102
|
+
children: [jsx(HiddenCheckboxInput, __assign({
|
|
103
|
+
ref: inputRef,
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
id: id,
|
|
106
|
+
checked: checked,
|
|
107
|
+
disabled: disabled,
|
|
108
|
+
onChange: onChange,
|
|
109
|
+
"aria-describedby": describedBy || undefined,
|
|
110
|
+
"aria-invalid": error ? true : undefined,
|
|
111
|
+
"$state": state,
|
|
112
|
+
"$checked": checked,
|
|
113
|
+
"$indeterminate": indeterminate
|
|
114
|
+
}, rest)), jsx(StyledCheckbox, {
|
|
115
|
+
"$state": state,
|
|
116
|
+
"$checked": checked,
|
|
117
|
+
"$indeterminate": indeterminate,
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
}), jsx(StyledCheckboxLabel, {
|
|
120
|
+
"$disabled": disabled,
|
|
121
|
+
children: label
|
|
122
|
+
})]
|
|
123
|
+
}), helperText && !error && jsx(StyledHelperText, {
|
|
124
|
+
id: helperTextId,
|
|
125
|
+
children: helperText
|
|
126
|
+
}), error && jsx(StyledHelperText, {
|
|
127
|
+
id: errorId,
|
|
128
|
+
"$error": true,
|
|
129
|
+
role: "alert",
|
|
130
|
+
"aria-live": "polite",
|
|
131
|
+
children: error
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
Checkbox.displayName = 'Checkbox';
|
|
136
|
+
var templateObject_1, templateObject_2;
|
|
137
|
+
|
|
138
|
+
export { Checkbox };
|
|
139
|
+
//# sourceMappingURL=Checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type SelectableInputState = 'default' | 'error' | 'disabled';
|
|
2
|
+
interface StyledCheckboxInputProps {
|
|
3
|
+
$state: SelectableInputState;
|
|
4
|
+
$checked: boolean;
|
|
5
|
+
$indeterminate?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Hidden native checkbox input for accessibility
|
|
9
|
+
* Maintains keyboard navigation and screen reader support
|
|
10
|
+
*/
|
|
11
|
+
export declare const HiddenCheckboxInput: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Merged<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
12
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types.js").CSSPropertiesWithVars | undefined;
|
|
13
|
+
}, StyledCheckboxInputProps>> & string;
|
|
14
|
+
/**
|
|
15
|
+
* Custom checkbox visual component
|
|
16
|
+
* 24px × 24px for 8px grid alignment
|
|
17
|
+
* Uses component.input.* tokens for consistency with TextField
|
|
18
|
+
*/
|
|
19
|
+
export declare const StyledCheckbox: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
20
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types.js").CSSPropertiesWithVars | undefined;
|
|
21
|
+
}, StyledCheckboxInputProps>> & string;
|
|
22
|
+
/**
|
|
23
|
+
* Container for checkbox with proper spacing and alignment
|
|
24
|
+
* 48px min-height for touch target (8px grid aligned)
|
|
25
|
+
*/
|
|
26
|
+
export declare const StyledCheckboxContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Merged<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "style"> & {
|
|
27
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types.js").CSSPropertiesWithVars | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
$disabled: boolean;
|
|
30
|
+
$labelPosition: "left" | "right";
|
|
31
|
+
}>> & string;
|
|
32
|
+
/**
|
|
33
|
+
* Label text with proper typography
|
|
34
|
+
*/
|
|
35
|
+
export declare const StyledCheckboxLabel: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
36
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types.js").CSSPropertiesWithVars | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
$disabled: boolean;
|
|
39
|
+
}>> & string;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
|
+
import styled$module from 'styled-components';
|
|
4
|
+
const styled = styled$module.default || styled$module;
|
|
5
|
+
import tokens from '../../../lib/cssTokens.mjs';
|
|
6
|
+
import { forcedColors } from '../../../lib/styleUtils.mjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Hidden native checkbox input for accessibility
|
|
10
|
+
* Maintains keyboard navigation and screen reader support
|
|
11
|
+
*/
|
|
12
|
+
var HiddenCheckboxInput = /*#__PURE__*/styled.input.withConfig({
|
|
13
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
14
|
+
return !prop.startsWith('$');
|
|
15
|
+
},
|
|
16
|
+
displayName: "SelectableInputBase__HiddenCheckboxInput",
|
|
17
|
+
componentId: "sc-1ddpctx-0"
|
|
18
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"
|
|
19
|
+
/**
|
|
20
|
+
* Custom checkbox visual component
|
|
21
|
+
* 24px × 24px for 8px grid alignment
|
|
22
|
+
* Uses component.input.* tokens for consistency with TextField
|
|
23
|
+
*/])));
|
|
24
|
+
/**
|
|
25
|
+
* Custom checkbox visual component
|
|
26
|
+
* 24px × 24px for 8px grid alignment
|
|
27
|
+
* Uses component.input.* tokens for consistency with TextField
|
|
28
|
+
*/
|
|
29
|
+
var StyledCheckbox = /*#__PURE__*/styled.span.withConfig({
|
|
30
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
31
|
+
return !prop.startsWith('$');
|
|
32
|
+
},
|
|
33
|
+
displayName: "SelectableInputBase__StyledCheckbox",
|
|
34
|
+
componentId: "sc-1ddpctx-1"
|
|
35
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n min-width: ", ";\n min-height: ", ";\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: background-color ", " ", ",\n border-color ", " ", ",\n ", ";\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n\n /* Forced colours drop fills (decision 0038): a checked or indeterminate box takes the system\n selection colour, or GrayText when disabled, and its mark the matching text colour. The\n indeterminate dash is a fill, so it needs the same treatment. */\n ", "\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n min-width: ", ";\n min-height: ", ";\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: background-color ", " ", ",\n border-color ", " ", ",\n ", ";\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n\n /* Forced colours drop fills (decision 0038): a checked or indeterminate box takes the system\n selection colour, or GrayText when disabled, and its mark the matching text colour. The\n indeterminate dash is a fill, so it needs the same treatment. */\n ", "\n"
|
|
36
|
+
/**
|
|
37
|
+
* Container for checkbox with proper spacing and alignment
|
|
38
|
+
* 48px min-height for touch target (8px grid aligned)
|
|
39
|
+
*/])), tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.input["default"].borderRadius, tokens.component.input["default"].borderWidth, function (props) {
|
|
40
|
+
return props.$checked || props.$indeterminate ? tokens.semantic.color.fill.inverse : tokens.component.input["default"].backgroundColor;
|
|
41
|
+
}, function (props) {
|
|
42
|
+
if (props.$state === 'error') return tokens.component.input.error.borderColor;
|
|
43
|
+
// A checked box's border matches its fill, so the box reads as solid
|
|
44
|
+
if (props.$checked || props.$indeterminate) return tokens.semantic.color.fill.inverse;
|
|
45
|
+
return tokens.component.input["default"].borderColor;
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
48
|
+
}, tokens.semantic.motion.duration.fast, tokens.semantic.motion.easing.decelerate, tokens.semantic.motion.duration.fast, tokens.semantic.motion.easing.decelerate, tokens.semantic.motion.transition.focus, HiddenCheckboxInput, function (props) {
|
|
49
|
+
return props.$state === 'error' ? tokens.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? tokens.semantic.color.fill.inverse : tokens.component.input.hover.borderColor;
|
|
50
|
+
}, HiddenCheckboxInput, tokens.component.input.focus.outline, tokens.semantic.border.focusOffset, function (props) {
|
|
51
|
+
return props.$state === 'error' ? tokens.component.input.error.focus.borderColor : tokens.component.input.focus.borderColor;
|
|
52
|
+
}, function (props) {
|
|
53
|
+
return props.$state === 'disabled' && "\n background-color: ".concat(tokens.component.input.disabled.backgroundColor, ";\n border-color: ").concat(tokens.component.input.disabled.borderColor, ";\n ");
|
|
54
|
+
}, function (props) {
|
|
55
|
+
return props.$checked ? 'block' : 'none';
|
|
56
|
+
}, tokens.semantic.color.text.inverse, function (props) {
|
|
57
|
+
return props.$indeterminate ? 'block' : 'none';
|
|
58
|
+
}, tokens.semantic.color.text.inverse, function (props) {
|
|
59
|
+
var on = props.$checked || props.$indeterminate;
|
|
60
|
+
var disabled = props.$state === 'disabled';
|
|
61
|
+
if (!on) return disabled ? "".concat(forcedColors, " { border-color: GrayText; }") : '';
|
|
62
|
+
var fill = disabled ? 'GrayText' : 'Highlight';
|
|
63
|
+
var mark = disabled ? 'Canvas' : 'HighlightText';
|
|
64
|
+
return "".concat(forcedColors, " {\n forced-color-adjust: none;\n background-color: ").concat(fill, ";\n border-color: ").concat(fill, ";\n &::after { border-color: ").concat(mark, "; }\n &::before { background-color: ").concat(mark, "; }\n }");
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* Container for checkbox with proper spacing and alignment
|
|
68
|
+
* 48px min-height for touch target (8px grid aligned)
|
|
69
|
+
*/
|
|
70
|
+
var StyledCheckboxContainer = /*#__PURE__*/styled.label.withConfig({
|
|
71
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
72
|
+
return !prop.startsWith('$');
|
|
73
|
+
},
|
|
74
|
+
displayName: "SelectableInputBase__StyledCheckboxContainer",
|
|
75
|
+
componentId: "sc-1ddpctx-2"
|
|
76
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: ", ";\n flex-direction: ", ";\n user-select: none;\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: ", ";\n flex-direction: ", ";\n user-select: none;\n"
|
|
77
|
+
/**
|
|
78
|
+
* Label text with proper typography
|
|
79
|
+
*/])), tokens.semantic.space[300], function (props) {
|
|
80
|
+
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
81
|
+
}, tokens.component.checkbox.row.minHeight, function (props) {
|
|
82
|
+
return props.$labelPosition === 'left' ? 'row-reverse' : 'row';
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* Label text with proper typography
|
|
86
|
+
*/
|
|
87
|
+
var StyledCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
|
|
88
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
89
|
+
return !prop.startsWith('$');
|
|
90
|
+
},
|
|
91
|
+
displayName: "SelectableInputBase__StyledCheckboxLabel",
|
|
92
|
+
componentId: "sc-1ddpctx-3"
|
|
93
|
+
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), tokens.component.input["default"].font, function (props) {
|
|
94
|
+
return props.$disabled ? tokens.component.input.disabled.textColor : tokens.component.input["default"].textColor;
|
|
95
|
+
});
|
|
96
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
97
|
+
|
|
98
|
+
export { HiddenCheckboxInput, StyledCheckbox, StyledCheckboxContainer, StyledCheckboxLabel };
|
|
99
|
+
//# sourceMappingURL=SelectableInputBase.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableInputBase.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|