braid-design-system 33.10.0-deprecate-apac-20250704003714 → 33.10.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/CHANGELOG.md +38 -1
- package/dist/css.cjs +2 -0
- package/dist/css.d.mts +1 -1
- package/dist/css.d.ts +1 -1
- package/dist/css.mjs +2 -0
- package/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/lib/components/Accordion/AccordionItem.cjs +27 -41
- package/dist/lib/components/Accordion/AccordionItem.css.cjs +6 -12
- package/dist/lib/components/Accordion/AccordionItem.css.mjs +6 -12
- package/dist/lib/components/Accordion/AccordionItem.mjs +27 -41
- package/dist/lib/components/Alert/Alert.cjs +0 -12
- package/dist/lib/components/Alert/Alert.css.cjs +0 -8
- package/dist/lib/components/Alert/Alert.css.mjs +0 -8
- package/dist/lib/components/Alert/Alert.mjs +1 -13
- package/dist/lib/components/BraidProvider/BraidProvider.cjs +0 -2
- package/dist/lib/components/BraidProvider/BraidProvider.mjs +0 -2
- package/dist/lib/components/Button/Button.cjs +0 -11
- package/dist/lib/components/Button/Button.css.cjs +0 -8
- package/dist/lib/components/Button/Button.css.mjs +0 -8
- package/dist/lib/components/Button/Button.mjs +1 -12
- package/dist/lib/components/Stepper/Step.cjs +10 -22
- package/dist/lib/components/Stepper/Step.mjs +11 -23
- package/dist/lib/components/Stepper/Stepper.css.cjs +11 -12
- package/dist/lib/components/Stepper/Stepper.css.mjs +11 -12
- package/dist/lib/components/Tabs/Tab.cjs +2 -17
- package/dist/lib/components/Tabs/Tab.mjs +3 -18
- package/dist/lib/components/Tabs/TabPanel.cjs +4 -16
- package/dist/lib/components/Tabs/TabPanel.mjs +6 -18
- package/dist/lib/components/Tabs/Tabs.css.cjs +1 -14
- package/dist/lib/components/Tabs/Tabs.css.mjs +1 -14
- package/dist/lib/components/TextDropdown/TextDropdown.cjs +5 -16
- package/dist/lib/components/TextDropdown/TextDropdown.css.cjs +8 -14
- package/dist/lib/components/TextDropdown/TextDropdown.css.mjs +8 -14
- package/dist/lib/components/TextDropdown/TextDropdown.mjs +6 -17
- package/dist/lib/components/TextLink/TextLink.css.cjs +4 -4
- package/dist/lib/components/TextLink/TextLink.css.mjs +4 -4
- package/dist/lib/components/Toggle/Toggle.cjs +0 -9
- package/dist/lib/components/Toggle/Toggle.css.cjs +8 -11
- package/dist/lib/components/Toggle/Toggle.css.mjs +8 -11
- package/dist/lib/components/Toggle/Toggle.mjs +1 -10
- package/dist/lib/components/private/Field/Field.cjs +0 -2
- package/dist/lib/components/private/Field/Field.css.cjs +0 -8
- package/dist/lib/components/private/Field/Field.css.mjs +0 -8
- package/dist/lib/components/private/Field/Field.mjs +1 -3
- package/dist/lib/components/private/FieldOverlay/FieldOverlay.cjs +0 -1
- package/dist/lib/components/private/FieldOverlay/FieldOverlay.mjs +0 -1
- package/dist/lib/components/private/InlineField/InlineField.css.cjs +3 -10
- package/dist/lib/components/private/InlineField/InlineField.css.mjs +3 -10
- package/dist/lib/components/private/InlineField/StyledInput.cjs +0 -8
- package/dist/lib/components/private/InlineField/StyledInput.mjs +1 -9
- package/dist/lib/components/private/Modal/Modal.css.cjs +0 -8
- package/dist/lib/components/private/Modal/Modal.css.mjs +0 -8
- package/dist/lib/components/private/Modal/ModalContent.cjs +5 -17
- package/dist/lib/components/private/Modal/ModalContent.mjs +6 -18
- package/dist/lib/components/private/Overlay/Overlay.cjs +1 -6
- package/dist/lib/components/private/Overlay/Overlay.mjs +1 -6
- package/dist/lib/css/atoms/atomicProperties.cjs +5 -1
- package/dist/lib/css/atoms/atomicProperties.mjs +5 -1
- package/dist/lib/css/atoms/atoms.cjs +36 -0
- package/dist/lib/css/atoms/atoms.mjs +34 -0
- package/dist/lib/css/outlineStyle.cjs +17 -0
- package/dist/lib/css/outlineStyle.mjs +18 -0
- package/dist/lib/css/reset/reset.css.cjs +7 -11
- package/dist/lib/css/reset/reset.css.mjs +7 -11
- package/package.json +1 -1
- package/dist/lib/components/private/hideFocusRings/hideFocusRings.cjs +0 -2
- package/dist/lib/components/private/hideFocusRings/hideFocusRings.css.cjs +0 -14
- package/dist/lib/components/private/hideFocusRings/hideFocusRings.css.mjs +0 -15
- package/dist/lib/components/private/hideFocusRings/hideFocusRings.mjs +0 -1
- package/dist/lib/components/private/hideFocusRings/hideFocusRingsDataAttribute.cjs +0 -3
- package/dist/lib/components/private/hideFocusRings/hideFocusRingsDataAttribute.mjs +0 -4
- package/dist/lib/components/private/hideFocusRings/useHideFocusRings.cjs +0 -18
- package/dist/lib/components/private/hideFocusRings/useHideFocusRings.mjs +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
-
## 33.10.0
|
|
3
|
+
## 33.10.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -12,6 +12,29 @@
|
|
|
12
12
|
<Box position="sticky" top={0} ... />
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
- **Box, atoms**: Deprecate `outline` value `none`, and `boxShadow` value `outlineFocus`. ([#1810](https://github.com/seek-oss/braid-design-system/pull/1810))
|
|
16
|
+
|
|
17
|
+
Previously it was recommended to hide an element's `outline` in favour of using `boxShadow="outlineFocus"`.
|
|
18
|
+
|
|
19
|
+
Braid now leverages the `outline` property directly, managing focus rings of interactive elements as part of its scoped CSS reset.
|
|
20
|
+
|
|
21
|
+
**MIGRATION GUIDE:**
|
|
22
|
+
|
|
23
|
+
For styling the focus ring via `Box`:
|
|
24
|
+
|
|
25
|
+
1. Remove usage of `outline="none"` and `boxShadow="outlineFocus"`
|
|
26
|
+
2. Refer to [`focus outlines`] for guidance on leveraging Braid's focus outline styles.
|
|
27
|
+
|
|
28
|
+
```diff
|
|
29
|
+
- <Box outline="none" className={styles.customFocusStyles} />
|
|
30
|
+
+ <Box />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For styling the focus outline of an element based on the focus of another element, see [`outlineStyle`].
|
|
34
|
+
|
|
35
|
+
[`focus outlines`]: https://seek-oss.github.io/braid-design-system/components/Box#focus-outlines
|
|
36
|
+
[`outlineStyle`]: https://seek-oss.github.io/braid-design-system/css/outlineStyle
|
|
37
|
+
|
|
15
38
|
- **seekBusiness:** Migrate to updated visual language ([#1819](https://github.com/seek-oss/braid-design-system/pull/1819))
|
|
16
39
|
|
|
17
40
|
Migrate `seekBusiness` theme to new visual language.
|
|
@@ -19,6 +42,10 @@
|
|
|
19
42
|
|
|
20
43
|
### Patch Changes
|
|
21
44
|
|
|
45
|
+
- **ButtonIcon**: Ensure the focus outline is styled consistently with other components. ([#1810](https://github.com/seek-oss/braid-design-system/pull/1810))
|
|
46
|
+
|
|
47
|
+
Fix issue which caused the Braid focus outline to show along with the native browser focus outline.
|
|
48
|
+
|
|
22
49
|
- **apac:** Deprecate theme in favour of `seekJobs` theme ([#1820](https://github.com/seek-oss/braid-design-system/pull/1820))
|
|
23
50
|
|
|
24
51
|
**MIGRATION GUIDE:**
|
|
@@ -32,6 +59,16 @@
|
|
|
32
59
|
+ <BraidProvider theme={seekJobs} ...>
|
|
33
60
|
```
|
|
34
61
|
|
|
62
|
+
- Migrate from custom focus ring visibility to native `:focus-visible` behaviour. ([#1810](https://github.com/seek-oss/braid-design-system/pull/1810))
|
|
63
|
+
|
|
64
|
+
Previously Braid would change the presentation of focus ring outlines based on the user input, i.e. mouse or keyboard,
|
|
65
|
+
to prevent showing focus rings on click.
|
|
66
|
+
With the updated Browser Support Policy, we can now leverage the native `:focus-visible` pseudo class instead.
|
|
67
|
+
|
|
68
|
+
- **Dialog, Drawer**: Ensure the focus outline is correctly applied to the title. ([#1810](https://github.com/seek-oss/braid-design-system/pull/1810))
|
|
69
|
+
|
|
70
|
+
Fix issue where focus outline would not be long enough to wrap the entire title text in certain situations.
|
|
71
|
+
|
|
35
72
|
## 33.9.1
|
|
36
73
|
|
|
37
74
|
### Patch Changes
|
package/dist/css.cjs
CHANGED
|
@@ -4,6 +4,7 @@ const lib_css_atoms_atoms_cjs = require("./lib/css/atoms/atoms.cjs");
|
|
|
4
4
|
const lib_css_breakpoints_cjs = require("./lib/css/breakpoints.cjs");
|
|
5
5
|
const lib_css_colorModeStyle_cjs = require("./lib/css/colorModeStyle.cjs");
|
|
6
6
|
const lib_css_globalTypographyStyles_cjs = require("./lib/css/globalTypographyStyles.cjs");
|
|
7
|
+
const lib_css_outlineStyle_cjs = require("./lib/css/outlineStyle.cjs");
|
|
7
8
|
const lib_css_responsiveStyle_cjs = require("./lib/css/responsiveStyle.cjs");
|
|
8
9
|
const lib_themes_vars_css_cjs = require("./lib/themes/vars.css.cjs");
|
|
9
10
|
const {
|
|
@@ -48,6 +49,7 @@ exports.breakpoints = lib_css_breakpoints_cjs.breakpoints;
|
|
|
48
49
|
exports.colorModeStyle = lib_css_colorModeStyle_cjs.colorModeStyle;
|
|
49
50
|
exports.globalHeadingStyle = lib_css_globalTypographyStyles_cjs.globalHeadingStyle;
|
|
50
51
|
exports.globalTextStyle = lib_css_globalTypographyStyles_cjs.globalTextStyle;
|
|
52
|
+
exports.outlineStyle = lib_css_outlineStyle_cjs.outlineStyle;
|
|
51
53
|
exports.responsiveStyle = lib_css_responsiveStyle_cjs.responsiveStyle;
|
|
52
54
|
exports.atoms = atoms;
|
|
53
55
|
exports.vars = vars;
|
package/dist/css.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Breakpoint, atoms, breakpoints, colorModeStyle, globalHeadingStyle, globalTextStyle, responsiveStyle, vars } from './index.js';
|
|
1
|
+
export { Breakpoint, atoms, breakpoints, colorModeStyle, globalHeadingStyle, globalTextStyle, outlineStyle, responsiveStyle, vars } from './index.js';
|
package/dist/css.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Breakpoint, atoms, breakpoints, colorModeStyle, globalHeadingStyle, globalTextStyle, responsiveStyle, vars } from './index.js';
|
|
1
|
+
export { Breakpoint, atoms, breakpoints, colorModeStyle, globalHeadingStyle, globalTextStyle, outlineStyle, responsiveStyle, vars } from './index.js';
|
package/dist/css.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { atoms as atoms$1 } from "./lib/css/atoms/atoms.mjs";
|
|
|
2
2
|
import { breakpoints } from "./lib/css/breakpoints.mjs";
|
|
3
3
|
import { colorModeStyle } from "./lib/css/colorModeStyle.mjs";
|
|
4
4
|
import { globalHeadingStyle, globalTextStyle } from "./lib/css/globalTypographyStyles.mjs";
|
|
5
|
+
import { outlineStyle } from "./lib/css/outlineStyle.mjs";
|
|
5
6
|
import { responsiveStyle } from "./lib/css/responsiveStyle.mjs";
|
|
6
7
|
import { vars as vars$1 } from "./lib/themes/vars.css.mjs";
|
|
7
8
|
const {
|
|
@@ -48,6 +49,7 @@ export {
|
|
|
48
49
|
colorModeStyle,
|
|
49
50
|
globalHeadingStyle,
|
|
50
51
|
globalTextStyle,
|
|
52
|
+
outlineStyle,
|
|
51
53
|
responsiveStyle,
|
|
52
54
|
vars
|
|
53
55
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -2194,7 +2194,7 @@ declare const responsiveAtomicProperties: {
|
|
|
2194
2194
|
declare const sprinkles: ((props: {
|
|
2195
2195
|
readonly overflow?: "hidden" | "scroll" | "visible" | "auto" | undefined;
|
|
2196
2196
|
readonly userSelect?: "none" | undefined;
|
|
2197
|
-
readonly outline?: "none" | undefined;
|
|
2197
|
+
readonly outline?: "none" | "focus" | undefined;
|
|
2198
2198
|
readonly opacity?: 0 | undefined;
|
|
2199
2199
|
readonly zIndex?: 0 | 2 | 1 | "dropdownBackdrop" | "dropdown" | "sticky" | "modalBackdrop" | "modal" | "notification" | undefined;
|
|
2200
2200
|
readonly cursor?: "default" | "pointer" | undefined;
|
|
@@ -4384,6 +4384,16 @@ interface GlobalHeadingProps {
|
|
|
4384
4384
|
}
|
|
4385
4385
|
declare const globalHeadingStyle: ({ weight, level, }: GlobalHeadingProps) => StyleRule;
|
|
4386
4386
|
|
|
4387
|
+
declare const outlineStyle: (selector: string) => {
|
|
4388
|
+
outline: string;
|
|
4389
|
+
transition: string;
|
|
4390
|
+
selectors: {
|
|
4391
|
+
[x: string]: {
|
|
4392
|
+
outlineColor: `var(--${string})`;
|
|
4393
|
+
};
|
|
4394
|
+
};
|
|
4395
|
+
};
|
|
4396
|
+
|
|
4387
4397
|
type CSSProps = Omit<StyleRule, '@media' | '@supports'>;
|
|
4388
4398
|
interface ResponsiveStyle {
|
|
4389
4399
|
mobile?: CSSProps;
|
|
@@ -5340,5 +5350,5 @@ declare const _default: {
|
|
|
5340
5350
|
code: string;
|
|
5341
5351
|
}[];
|
|
5342
5352
|
|
|
5343
|
-
export { Accordion$1 as Accordion, Accordion as Accordion$1, AccordionItem$1 as AccordionItem, AccordionItem as AccordionItem$1, Actions, Alert$1 as Alert, Alert as Alert$1, Autosuggest$1 as Autosuggest, Autosuggest as Autosuggest$1, Badge$1 as Badge, Badge as Badge$1, Bleed$1 as Bleed, Bleed as Bleed$1, PublicBox as Box, Box as Box$1, BoxRenderer, BraidPortal, BraidProvider, BraidTestProvider, Button$1 as Button, Button as Button$1, ButtonIcon$1 as ButtonIcon, ButtonIcon as ButtonIcon$1, ButtonLink$1 as ButtonLink, ButtonLink as ButtonLink$1, Card$1 as Card, Card as Card$1, Checkbox$1 as Checkbox, Checkbox as Checkbox$1, CheckboxStandalone$1 as CheckboxStandalone, CheckboxStandalone as CheckboxStandalone$1, Column, Columns$1 as Columns, Columns as Columns$1, ContentBlock, Dialog$1 as Dialog, Dialog as Dialog$1, Disclosure$1 as Disclosure, Disclosure as Disclosure$1, Divider, Drawer$1 as Drawer, Drawer as Drawer$1, Dropdown$1 as Dropdown, Dropdown as Dropdown$1, FieldLabel$1 as FieldLabel, FieldLabel as FieldLabel$1, FieldMessage$1 as FieldMessage, FieldMessage as FieldMessage$1, Heading$1 as Heading, Heading as Heading$1, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBluetooth, IconBold, IconBookmark, IconBulletList, IconCareer, IconCategory, IconCaution, IconChecklist, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCoverLetter, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDisallow, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconItalic, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconNumberedList, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconQR, IconRecommended, IconRedo, IconRefresh, IconRenderer, IconResume, IconRocket, IconSearch, IconSecurity, IconSend, IconSent, IconSentiment, IconSettings, IconShare, IconSkills, IconSocialFacebook, IconSocialGitHub, IconSocialInstagram, IconSocialLinkedIn, IconSocialMedium, IconSocialX, IconSocialYouTube, IconSort, IconStar, IconStatistics, IconSubCategory, IconTag, IconThumb, IconTick, IconTime, IconTip, IconTitle, IconUndo, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline$1 as Inline, Inline as Inline$1, Link$1 as Link, Link as Link$1, List$1 as List, List as List$1, Loader, MenuItem$1 as MenuItem, MenuItem as MenuItem$1, MenuItemCheckbox$1 as MenuItemCheckbox, MenuItemCheckbox as MenuItemCheckbox$1, MenuItemDivider, MenuItemLink$1 as MenuItemLink, MenuItemLink as MenuItemLink$1, MenuRenderer, MonthPicker$1 as MonthPicker, MonthPicker as MonthPicker$1, Notice$1 as Notice, Notice as Notice$1, OverflowMenu, Page, PageBlock, Pagination$1 as Pagination, Pagination as Pagination$1, PasswordField$1 as PasswordField, PasswordField as PasswordField$1, Placeholder, RadioGroup$1 as RadioGroup, RadioGroup as RadioGroup$1, RadioItem, Rating$1 as Rating, Rating as Rating$1, Secondary, Spread$1 as Spread, Spread as Spread$1, Stack$1 as Stack, Stack as Stack$1, Step$1 as Step, Stepper, Strong, Tab$1 as Tab, Tab as Tab$1, TabPanel, TabPanels, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Tabs$1 as Tabs, Tabs as Tabs$1, TabsProvider, Tag$1 as Tag, Tag as Tag$1, Text, TextDropdown$1 as TextDropdown, TextDropdown as TextDropdown$1, TextField$1 as TextField, TextField as TextField$1, TextLink, TextLinkButton, Textarea$1 as Textarea, Textarea as Textarea$1, ThemeNameConsumer, Tiles$1 as Tiles, Tiles as Tiles$1, ToastProvider, Toggle$1 as Toggle, Toggle as Toggle$1, TooltipRenderer, _default$1 as _default, _default as _default$1, _default$6 as _default$2, _default$2 as _default$3, _default$4, _default$5, _default$3 as _default$6, atoms, breakpoints, colorModeStyle, filterSuggestions, globalHeadingStyle, globalTextStyle, makeLinkComponent, responsiveStyle, useColor, useResponsiveValue, useScope, useSpace, useThemeName, useToast, vars };
|
|
5353
|
+
export { Accordion$1 as Accordion, Accordion as Accordion$1, AccordionItem$1 as AccordionItem, AccordionItem as AccordionItem$1, Actions, Alert$1 as Alert, Alert as Alert$1, Autosuggest$1 as Autosuggest, Autosuggest as Autosuggest$1, Badge$1 as Badge, Badge as Badge$1, Bleed$1 as Bleed, Bleed as Bleed$1, PublicBox as Box, Box as Box$1, BoxRenderer, BraidPortal, BraidProvider, BraidTestProvider, Button$1 as Button, Button as Button$1, ButtonIcon$1 as ButtonIcon, ButtonIcon as ButtonIcon$1, ButtonLink$1 as ButtonLink, ButtonLink as ButtonLink$1, Card$1 as Card, Card as Card$1, Checkbox$1 as Checkbox, Checkbox as Checkbox$1, CheckboxStandalone$1 as CheckboxStandalone, CheckboxStandalone as CheckboxStandalone$1, Column, Columns$1 as Columns, Columns as Columns$1, ContentBlock, Dialog$1 as Dialog, Dialog as Dialog$1, Disclosure$1 as Disclosure, Disclosure as Disclosure$1, Divider, Drawer$1 as Drawer, Drawer as Drawer$1, Dropdown$1 as Dropdown, Dropdown as Dropdown$1, FieldLabel$1 as FieldLabel, FieldLabel as FieldLabel$1, FieldMessage$1 as FieldMessage, FieldMessage as FieldMessage$1, Heading$1 as Heading, Heading as Heading$1, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBluetooth, IconBold, IconBookmark, IconBulletList, IconCareer, IconCategory, IconCaution, IconChecklist, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCoverLetter, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDisallow, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconItalic, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconNumberedList, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconQR, IconRecommended, IconRedo, IconRefresh, IconRenderer, IconResume, IconRocket, IconSearch, IconSecurity, IconSend, IconSent, IconSentiment, IconSettings, IconShare, IconSkills, IconSocialFacebook, IconSocialGitHub, IconSocialInstagram, IconSocialLinkedIn, IconSocialMedium, IconSocialX, IconSocialYouTube, IconSort, IconStar, IconStatistics, IconSubCategory, IconTag, IconThumb, IconTick, IconTime, IconTip, IconTitle, IconUndo, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline$1 as Inline, Inline as Inline$1, Link$1 as Link, Link as Link$1, List$1 as List, List as List$1, Loader, MenuItem$1 as MenuItem, MenuItem as MenuItem$1, MenuItemCheckbox$1 as MenuItemCheckbox, MenuItemCheckbox as MenuItemCheckbox$1, MenuItemDivider, MenuItemLink$1 as MenuItemLink, MenuItemLink as MenuItemLink$1, MenuRenderer, MonthPicker$1 as MonthPicker, MonthPicker as MonthPicker$1, Notice$1 as Notice, Notice as Notice$1, OverflowMenu, Page, PageBlock, Pagination$1 as Pagination, Pagination as Pagination$1, PasswordField$1 as PasswordField, PasswordField as PasswordField$1, Placeholder, RadioGroup$1 as RadioGroup, RadioGroup as RadioGroup$1, RadioItem, Rating$1 as Rating, Rating as Rating$1, Secondary, Spread$1 as Spread, Spread as Spread$1, Stack$1 as Stack, Stack as Stack$1, Step$1 as Step, Stepper, Strong, Tab$1 as Tab, Tab as Tab$1, TabPanel, TabPanels, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Tabs$1 as Tabs, Tabs as Tabs$1, TabsProvider, Tag$1 as Tag, Tag as Tag$1, Text, TextDropdown$1 as TextDropdown, TextDropdown as TextDropdown$1, TextField$1 as TextField, TextField as TextField$1, TextLink, TextLinkButton, Textarea$1 as Textarea, Textarea as Textarea$1, ThemeNameConsumer, Tiles$1 as Tiles, Tiles as Tiles$1, ToastProvider, Toggle$1 as Toggle, Toggle as Toggle$1, TooltipRenderer, _default$1 as _default, _default as _default$1, _default$6 as _default$2, _default$2 as _default$3, _default$4, _default$5, _default$3 as _default$6, atoms, breakpoints, colorModeStyle, filterSuggestions, globalHeadingStyle, globalTextStyle, makeLinkComponent, outlineStyle, responsiveStyle, useColor, useResponsiveValue, useScope, useSpace, useThemeName, useToast, vars };
|
|
5344
5354
|
export type { Breakpoint, LinkComponent };
|
package/dist/index.d.ts
CHANGED
|
@@ -2194,7 +2194,7 @@ declare const responsiveAtomicProperties: {
|
|
|
2194
2194
|
declare const sprinkles: ((props: {
|
|
2195
2195
|
readonly overflow?: "hidden" | "scroll" | "visible" | "auto" | undefined;
|
|
2196
2196
|
readonly userSelect?: "none" | undefined;
|
|
2197
|
-
readonly outline?: "none" | undefined;
|
|
2197
|
+
readonly outline?: "none" | "focus" | undefined;
|
|
2198
2198
|
readonly opacity?: 0 | undefined;
|
|
2199
2199
|
readonly zIndex?: 0 | 2 | 1 | "dropdownBackdrop" | "dropdown" | "sticky" | "modalBackdrop" | "modal" | "notification" | undefined;
|
|
2200
2200
|
readonly cursor?: "default" | "pointer" | undefined;
|
|
@@ -4384,6 +4384,16 @@ interface GlobalHeadingProps {
|
|
|
4384
4384
|
}
|
|
4385
4385
|
declare const globalHeadingStyle: ({ weight, level, }: GlobalHeadingProps) => StyleRule;
|
|
4386
4386
|
|
|
4387
|
+
declare const outlineStyle: (selector: string) => {
|
|
4388
|
+
outline: string;
|
|
4389
|
+
transition: string;
|
|
4390
|
+
selectors: {
|
|
4391
|
+
[x: string]: {
|
|
4392
|
+
outlineColor: `var(--${string})`;
|
|
4393
|
+
};
|
|
4394
|
+
};
|
|
4395
|
+
};
|
|
4396
|
+
|
|
4387
4397
|
type CSSProps = Omit<StyleRule, '@media' | '@supports'>;
|
|
4388
4398
|
interface ResponsiveStyle {
|
|
4389
4399
|
mobile?: CSSProps;
|
|
@@ -5340,5 +5350,5 @@ declare const _default: {
|
|
|
5340
5350
|
code: string;
|
|
5341
5351
|
}[];
|
|
5342
5352
|
|
|
5343
|
-
export { Accordion$1 as Accordion, Accordion as Accordion$1, AccordionItem$1 as AccordionItem, AccordionItem as AccordionItem$1, Actions, Alert$1 as Alert, Alert as Alert$1, Autosuggest$1 as Autosuggest, Autosuggest as Autosuggest$1, Badge$1 as Badge, Badge as Badge$1, Bleed$1 as Bleed, Bleed as Bleed$1, PublicBox as Box, Box as Box$1, BoxRenderer, BraidPortal, BraidProvider, BraidTestProvider, Button$1 as Button, Button as Button$1, ButtonIcon$1 as ButtonIcon, ButtonIcon as ButtonIcon$1, ButtonLink$1 as ButtonLink, ButtonLink as ButtonLink$1, Card$1 as Card, Card as Card$1, Checkbox$1 as Checkbox, Checkbox as Checkbox$1, CheckboxStandalone$1 as CheckboxStandalone, CheckboxStandalone as CheckboxStandalone$1, Column, Columns$1 as Columns, Columns as Columns$1, ContentBlock, Dialog$1 as Dialog, Dialog as Dialog$1, Disclosure$1 as Disclosure, Disclosure as Disclosure$1, Divider, Drawer$1 as Drawer, Drawer as Drawer$1, Dropdown$1 as Dropdown, Dropdown as Dropdown$1, FieldLabel$1 as FieldLabel, FieldLabel as FieldLabel$1, FieldMessage$1 as FieldMessage, FieldMessage as FieldMessage$1, Heading$1 as Heading, Heading as Heading$1, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBluetooth, IconBold, IconBookmark, IconBulletList, IconCareer, IconCategory, IconCaution, IconChecklist, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCoverLetter, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDisallow, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconItalic, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconNumberedList, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconQR, IconRecommended, IconRedo, IconRefresh, IconRenderer, IconResume, IconRocket, IconSearch, IconSecurity, IconSend, IconSent, IconSentiment, IconSettings, IconShare, IconSkills, IconSocialFacebook, IconSocialGitHub, IconSocialInstagram, IconSocialLinkedIn, IconSocialMedium, IconSocialX, IconSocialYouTube, IconSort, IconStar, IconStatistics, IconSubCategory, IconTag, IconThumb, IconTick, IconTime, IconTip, IconTitle, IconUndo, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline$1 as Inline, Inline as Inline$1, Link$1 as Link, Link as Link$1, List$1 as List, List as List$1, Loader, MenuItem$1 as MenuItem, MenuItem as MenuItem$1, MenuItemCheckbox$1 as MenuItemCheckbox, MenuItemCheckbox as MenuItemCheckbox$1, MenuItemDivider, MenuItemLink$1 as MenuItemLink, MenuItemLink as MenuItemLink$1, MenuRenderer, MonthPicker$1 as MonthPicker, MonthPicker as MonthPicker$1, Notice$1 as Notice, Notice as Notice$1, OverflowMenu, Page, PageBlock, Pagination$1 as Pagination, Pagination as Pagination$1, PasswordField$1 as PasswordField, PasswordField as PasswordField$1, Placeholder, RadioGroup$1 as RadioGroup, RadioGroup as RadioGroup$1, RadioItem, Rating$1 as Rating, Rating as Rating$1, Secondary, Spread$1 as Spread, Spread as Spread$1, Stack$1 as Stack, Stack as Stack$1, Step$1 as Step, Stepper, Strong, Tab$1 as Tab, Tab as Tab$1, TabPanel, TabPanels, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Tabs$1 as Tabs, Tabs as Tabs$1, TabsProvider, Tag$1 as Tag, Tag as Tag$1, Text, TextDropdown$1 as TextDropdown, TextDropdown as TextDropdown$1, TextField$1 as TextField, TextField as TextField$1, TextLink, TextLinkButton, Textarea$1 as Textarea, Textarea as Textarea$1, ThemeNameConsumer, Tiles$1 as Tiles, Tiles as Tiles$1, ToastProvider, Toggle$1 as Toggle, Toggle as Toggle$1, TooltipRenderer, _default$1 as _default, _default as _default$1, _default$6 as _default$2, _default$2 as _default$3, _default$4, _default$5, _default$3 as _default$6, atoms, breakpoints, colorModeStyle, filterSuggestions, globalHeadingStyle, globalTextStyle, makeLinkComponent, responsiveStyle, useColor, useResponsiveValue, useScope, useSpace, useThemeName, useToast, vars };
|
|
5353
|
+
export { Accordion$1 as Accordion, Accordion as Accordion$1, AccordionItem$1 as AccordionItem, AccordionItem as AccordionItem$1, Actions, Alert$1 as Alert, Alert as Alert$1, Autosuggest$1 as Autosuggest, Autosuggest as Autosuggest$1, Badge$1 as Badge, Badge as Badge$1, Bleed$1 as Bleed, Bleed as Bleed$1, PublicBox as Box, Box as Box$1, BoxRenderer, BraidPortal, BraidProvider, BraidTestProvider, Button$1 as Button, Button as Button$1, ButtonIcon$1 as ButtonIcon, ButtonIcon as ButtonIcon$1, ButtonLink$1 as ButtonLink, ButtonLink as ButtonLink$1, Card$1 as Card, Card as Card$1, Checkbox$1 as Checkbox, Checkbox as Checkbox$1, CheckboxStandalone$1 as CheckboxStandalone, CheckboxStandalone as CheckboxStandalone$1, Column, Columns$1 as Columns, Columns as Columns$1, ContentBlock, Dialog$1 as Dialog, Dialog as Dialog$1, Disclosure$1 as Disclosure, Disclosure as Disclosure$1, Divider, Drawer$1 as Drawer, Drawer as Drawer$1, Dropdown$1 as Dropdown, Dropdown as Dropdown$1, FieldLabel$1 as FieldLabel, FieldLabel as FieldLabel$1, FieldMessage$1 as FieldMessage, FieldMessage as FieldMessage$1, Heading$1 as Heading, Heading as Heading$1, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBluetooth, IconBold, IconBookmark, IconBulletList, IconCareer, IconCategory, IconCaution, IconChecklist, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCoverLetter, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDisallow, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconItalic, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconNumberedList, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconQR, IconRecommended, IconRedo, IconRefresh, IconRenderer, IconResume, IconRocket, IconSearch, IconSecurity, IconSend, IconSent, IconSentiment, IconSettings, IconShare, IconSkills, IconSocialFacebook, IconSocialGitHub, IconSocialInstagram, IconSocialLinkedIn, IconSocialMedium, IconSocialX, IconSocialYouTube, IconSort, IconStar, IconStatistics, IconSubCategory, IconTag, IconThumb, IconTick, IconTime, IconTip, IconTitle, IconUndo, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline$1 as Inline, Inline as Inline$1, Link$1 as Link, Link as Link$1, List$1 as List, List as List$1, Loader, MenuItem$1 as MenuItem, MenuItem as MenuItem$1, MenuItemCheckbox$1 as MenuItemCheckbox, MenuItemCheckbox as MenuItemCheckbox$1, MenuItemDivider, MenuItemLink$1 as MenuItemLink, MenuItemLink as MenuItemLink$1, MenuRenderer, MonthPicker$1 as MonthPicker, MonthPicker as MonthPicker$1, Notice$1 as Notice, Notice as Notice$1, OverflowMenu, Page, PageBlock, Pagination$1 as Pagination, Pagination as Pagination$1, PasswordField$1 as PasswordField, PasswordField as PasswordField$1, Placeholder, RadioGroup$1 as RadioGroup, RadioGroup as RadioGroup$1, RadioItem, Rating$1 as Rating, Rating as Rating$1, Secondary, Spread$1 as Spread, Spread as Spread$1, Stack$1 as Stack, Stack as Stack$1, Step$1 as Step, Stepper, Strong, Tab$1 as Tab, Tab as Tab$1, TabPanel, TabPanels, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Tabs$1 as Tabs, Tabs as Tabs$1, TabsProvider, Tag$1 as Tag, Tag as Tag$1, Text, TextDropdown$1 as TextDropdown, TextDropdown as TextDropdown$1, TextField$1 as TextField, TextField as TextField$1, TextLink, TextLinkButton, Textarea$1 as Textarea, Textarea as Textarea$1, ThemeNameConsumer, Tiles$1 as Tiles, Tiles as Tiles$1, ToastProvider, Toggle$1 as Toggle, Toggle as Toggle$1, TooltipRenderer, _default$1 as _default, _default as _default$1, _default$6 as _default$2, _default$2 as _default$3, _default$4, _default$5, _default$3 as _default$6, atoms, breakpoints, colorModeStyle, filterSuggestions, globalHeadingStyle, globalTextStyle, makeLinkComponent, outlineStyle, responsiveStyle, useColor, useResponsiveValue, useScope, useSpace, useThemeName, useToast, vars };
|
|
5344
5354
|
export type { Breakpoint, LinkComponent };
|
|
@@ -7,14 +7,12 @@ const lib_components_Disclosure_useDisclosure_cjs = require("../Disclosure/useDi
|
|
|
7
7
|
const lib_components_Spread_Spread_cjs = require("../Spread/Spread.cjs");
|
|
8
8
|
const lib_components_Stack_Stack_cjs = require("../Stack/Stack.cjs");
|
|
9
9
|
const lib_components_Text_Text_cjs = require("../Text/Text.cjs");
|
|
10
|
-
const lib_components_private_Overlay_Overlay_cjs = require("../private/Overlay/Overlay.cjs");
|
|
11
10
|
const lib_components_private_badgeSlotSpace_cjs = require("../private/badgeSlotSpace.cjs");
|
|
12
11
|
const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
|
|
13
12
|
const lib_components_Accordion_Accordion_cjs = require("./Accordion.cjs");
|
|
14
13
|
const lib_components_Accordion_AccordionContext_cjs = require("./AccordionContext.cjs");
|
|
15
14
|
const lib_components_Accordion_AccordionItem_css_cjs = require("./AccordionItem.css.cjs");
|
|
16
15
|
const lib_components_icons_IconChevron_IconChevron_cjs = require("../icons/IconChevron/IconChevron.cjs");
|
|
17
|
-
const lib_components_private_hideFocusRings_hideFocusRings_css_cjs = require("../private/hideFocusRings/hideFocusRings.css.cjs");
|
|
18
16
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
19
17
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
20
18
|
const itemSpaceForSize = {
|
|
@@ -86,45 +84,33 @@ const AccordionItem = ({
|
|
|
86
84
|
lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps });
|
|
87
85
|
}
|
|
88
86
|
return /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Stack_Stack_cjs.Stack, { space: itemSpace, data, children: [
|
|
89
|
-
/* @__PURE__ */ jsxRuntime.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
-
lib_components_private_Overlay_Overlay_cjs.Overlay,
|
|
120
|
-
{
|
|
121
|
-
boxShadow: "outlineFocus",
|
|
122
|
-
borderRadius: "standard",
|
|
123
|
-
transition: "fast",
|
|
124
|
-
className: [lib_components_Accordion_AccordionItem_css_cjs.focusRing, lib_components_private_hideFocusRings_hideFocusRings_css_cjs.hideFocusRingsClassName]
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
] }),
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { position: "relative", display: "flex", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
lib_components_Box_Box_cjs.Box,
|
|
89
|
+
{
|
|
90
|
+
component: "button",
|
|
91
|
+
type: "button",
|
|
92
|
+
cursor: "pointer",
|
|
93
|
+
className: [lib_components_Accordion_AccordionItem_css_cjs.button, lib_components_Accordion_AccordionItem_css_cjs.focusRing],
|
|
94
|
+
width: "full",
|
|
95
|
+
textAlign: "left",
|
|
96
|
+
...buttonProps,
|
|
97
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { component: "span", position: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Spread_Spread_cjs.Spread, { component: "span", space: itemSpace, children: [
|
|
98
|
+
/* @__PURE__ */ jsxRuntime.jsxs(lib_components_Text_Text_cjs.Text, { size, weight, tone, icon, children: [
|
|
99
|
+
badge ? /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { component: "span", paddingRight: lib_components_private_badgeSlotSpace_cjs.badgeSlotSpace, children: label }) : label,
|
|
100
|
+
badge ? react.cloneElement(badge, {}) : null
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
103
|
+
lib_components_Text_Text_cjs.Text,
|
|
104
|
+
{
|
|
105
|
+
size,
|
|
106
|
+
weight,
|
|
107
|
+
tone: tone === "neutral" ? "secondary" : tone,
|
|
108
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_icons_IconChevron_IconChevron_cjs.IconChevron, { direction: expanded ? "up" : "down" })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] }) })
|
|
112
|
+
}
|
|
113
|
+
) }),
|
|
128
114
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { display: expanded ? "block" : "none", ...contentProps, children })
|
|
129
115
|
] });
|
|
130
116
|
};
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
3
|
const css = require("@vanilla-extract/css");
|
|
4
|
-
const
|
|
4
|
+
const lib_css_atoms_atoms_cjs = require("../../css/atoms/atoms.cjs");
|
|
5
5
|
const lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
6
6
|
const lib_components_private_touchable_virtualTouchable_css_cjs = require("../private/touchable/virtualTouchable.css.cjs");
|
|
7
7
|
fileScope.setFileScope("src/lib/components/Accordion/AccordionItem.css.ts", "braid-design-system");
|
|
8
8
|
const button = css.style([{}, lib_components_private_touchable_virtualTouchable_css_cjs.virtualTouchable], "button");
|
|
9
|
-
const focusRing = css.style({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
selectors: {
|
|
15
|
-
[`${button}:focus ~ &`]: {
|
|
16
|
-
opacity: 1
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, "focusRing");
|
|
9
|
+
const focusRing = css.style([{
|
|
10
|
+
outlineOffset: lib_themes_vars_css_cjs.vars.space.xxsmall
|
|
11
|
+
}, lib_css_atoms_atoms_cjs.atoms({
|
|
12
|
+
borderRadius: "small"
|
|
13
|
+
})], "focusRing");
|
|
20
14
|
fileScope.endFileScope();
|
|
21
15
|
exports.button = button;
|
|
22
16
|
exports.focusRing = focusRing;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
3
|
+
import { atoms } from "../../css/atoms/atoms.mjs";
|
|
4
4
|
import { vars } from "../../themes/vars.css.mjs";
|
|
5
5
|
import { virtualTouchable } from "../private/touchable/virtualTouchable.css.mjs";
|
|
6
6
|
setFileScope("src/lib/components/Accordion/AccordionItem.css.ts", "braid-design-system");
|
|
7
7
|
const button = style([{}, virtualTouchable], "button");
|
|
8
|
-
const focusRing = style({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
selectors: {
|
|
14
|
-
[`${button}:focus ~ &`]: {
|
|
15
|
-
opacity: 1
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}, "focusRing");
|
|
8
|
+
const focusRing = style([{
|
|
9
|
+
outlineOffset: vars.space.xxsmall
|
|
10
|
+
}, atoms({
|
|
11
|
+
borderRadius: "small"
|
|
12
|
+
})], "focusRing");
|
|
19
13
|
endFileScope();
|
|
20
14
|
export {
|
|
21
15
|
button,
|
|
@@ -6,14 +6,12 @@ import { useDisclosure } from "../Disclosure/useDisclosure.mjs";
|
|
|
6
6
|
import { Spread } from "../Spread/Spread.mjs";
|
|
7
7
|
import { Stack } from "../Stack/Stack.mjs";
|
|
8
8
|
import { Text } from "../Text/Text.mjs";
|
|
9
|
-
import { Overlay } from "../private/Overlay/Overlay.mjs";
|
|
10
9
|
import { badgeSlotSpace } from "../private/badgeSlotSpace.mjs";
|
|
11
10
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
12
11
|
import { defaultSize } from "./Accordion.mjs";
|
|
13
12
|
import { AccordionContext, validTones } from "./AccordionContext.mjs";
|
|
14
13
|
import { button, focusRing } from "./AccordionItem.css.mjs";
|
|
15
14
|
import { IconChevron } from "../icons/IconChevron/IconChevron.mjs";
|
|
16
|
-
import { hideFocusRingsClassName } from "../private/hideFocusRings/hideFocusRings.css.mjs";
|
|
17
15
|
const itemSpaceForSize = {
|
|
18
16
|
xsmall: "small",
|
|
19
17
|
small: "small",
|
|
@@ -83,45 +81,33 @@ const AccordionItem = ({
|
|
|
83
81
|
buildDataAttributes({ data, validateRestProps: restProps });
|
|
84
82
|
}
|
|
85
83
|
return /* @__PURE__ */ jsxs(Stack, { space: itemSpace, data, children: [
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
/* @__PURE__ */ jsx(
|
|
116
|
-
Overlay,
|
|
117
|
-
{
|
|
118
|
-
boxShadow: "outlineFocus",
|
|
119
|
-
borderRadius: "standard",
|
|
120
|
-
transition: "fast",
|
|
121
|
-
className: [focusRing, hideFocusRingsClassName]
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
] }),
|
|
84
|
+
/* @__PURE__ */ jsx(Box, { position: "relative", display: "flex", children: /* @__PURE__ */ jsx(
|
|
85
|
+
Box,
|
|
86
|
+
{
|
|
87
|
+
component: "button",
|
|
88
|
+
type: "button",
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
className: [button, focusRing],
|
|
91
|
+
width: "full",
|
|
92
|
+
textAlign: "left",
|
|
93
|
+
...buttonProps,
|
|
94
|
+
children: /* @__PURE__ */ jsx(Box, { component: "span", position: "relative", children: /* @__PURE__ */ jsxs(Spread, { component: "span", space: itemSpace, children: [
|
|
95
|
+
/* @__PURE__ */ jsxs(Text, { size, weight, tone, icon, children: [
|
|
96
|
+
badge ? /* @__PURE__ */ jsx(Box, { component: "span", paddingRight: badgeSlotSpace, children: label }) : label,
|
|
97
|
+
badge ? cloneElement(badge, {}) : null
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
Text,
|
|
101
|
+
{
|
|
102
|
+
size,
|
|
103
|
+
weight,
|
|
104
|
+
tone: tone === "neutral" ? "secondary" : tone,
|
|
105
|
+
children: /* @__PURE__ */ jsx(IconChevron, { direction: expanded ? "up" : "down" })
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }) })
|
|
109
|
+
}
|
|
110
|
+
) }),
|
|
125
111
|
/* @__PURE__ */ jsx(Box, { display: expanded ? "block" : "none", ...contentProps, children })
|
|
126
112
|
] });
|
|
127
113
|
};
|
|
@@ -76,7 +76,6 @@ const Alert = ({
|
|
|
76
76
|
cursor: "pointer",
|
|
77
77
|
position: "relative",
|
|
78
78
|
onClick: onClose,
|
|
79
|
-
outline: "none",
|
|
80
79
|
transition: "touchable",
|
|
81
80
|
transform: { active: "touchable" },
|
|
82
81
|
display: "flex",
|
|
@@ -84,17 +83,6 @@ const Alert = ({
|
|
|
84
83
|
justifyContent: "center",
|
|
85
84
|
className: [lib_components_Alert_Alert_css_cjs.closeButton, lib_hooks_useIcon_index_cjs.iconContainerSize()],
|
|
86
85
|
children: [
|
|
87
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
-
lib_components_private_Overlay_Overlay_cjs.Overlay,
|
|
89
|
-
{
|
|
90
|
-
component: "span",
|
|
91
|
-
boxShadow: "outlineFocus",
|
|
92
|
-
transition: "fast",
|
|
93
|
-
onlyVisibleForKeyboardNavigation: true,
|
|
94
|
-
borderRadius: "full",
|
|
95
|
-
className: lib_components_Alert_Alert_css_cjs.closeButtonFocus
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
86
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
99
87
|
lib_components_private_Overlay_Overlay_cjs.Overlay,
|
|
100
88
|
{
|
|
@@ -4,13 +4,6 @@ const css = require("@vanilla-extract/css");
|
|
|
4
4
|
const lib_components_private_touchable_virtualTouchable_css_cjs = require("../private/touchable/virtualTouchable.css.cjs");
|
|
5
5
|
fileScope.setFileScope("src/lib/components/Alert/Alert.css.ts", "braid-design-system");
|
|
6
6
|
const closeButton = css.style([{}, lib_components_private_touchable_virtualTouchable_css_cjs.virtualTouchable], "closeButton");
|
|
7
|
-
const closeButtonFocus = css.style({
|
|
8
|
-
selectors: {
|
|
9
|
-
[`${closeButton}:focus &`]: {
|
|
10
|
-
opacity: 1
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "closeButtonFocus");
|
|
14
7
|
const closeButtonHover = css.style({
|
|
15
8
|
selectors: {
|
|
16
9
|
[`${closeButton}:focus &, ${closeButton}:hover &`]: {
|
|
@@ -20,5 +13,4 @@ const closeButtonHover = css.style({
|
|
|
20
13
|
}, "closeButtonHover");
|
|
21
14
|
fileScope.endFileScope();
|
|
22
15
|
exports.closeButton = closeButton;
|
|
23
|
-
exports.closeButtonFocus = closeButtonFocus;
|
|
24
16
|
exports.closeButtonHover = closeButtonHover;
|
|
@@ -3,13 +3,6 @@ import { style } from "@vanilla-extract/css";
|
|
|
3
3
|
import { virtualTouchable } from "../private/touchable/virtualTouchable.css.mjs";
|
|
4
4
|
setFileScope("src/lib/components/Alert/Alert.css.ts", "braid-design-system");
|
|
5
5
|
const closeButton = style([{}, virtualTouchable], "closeButton");
|
|
6
|
-
const closeButtonFocus = style({
|
|
7
|
-
selectors: {
|
|
8
|
-
[`${closeButton}:focus &`]: {
|
|
9
|
-
opacity: 1
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}, "closeButtonFocus");
|
|
13
6
|
const closeButtonHover = style({
|
|
14
7
|
selectors: {
|
|
15
8
|
[`${closeButton}:focus &, ${closeButton}:hover &`]: {
|
|
@@ -20,6 +13,5 @@ const closeButtonHover = style({
|
|
|
20
13
|
endFileScope();
|
|
21
14
|
export {
|
|
22
15
|
closeButton,
|
|
23
|
-
closeButtonFocus,
|
|
24
16
|
closeButtonHover
|
|
25
17
|
};
|
|
@@ -7,7 +7,7 @@ import { Column } from "../Column/Column.mjs";
|
|
|
7
7
|
import { Columns } from "../Columns/Columns.mjs";
|
|
8
8
|
import { Overlay } from "../private/Overlay/Overlay.mjs";
|
|
9
9
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
10
|
-
import { closeButton,
|
|
10
|
+
import { closeButton, closeButtonHover } from "./Alert.css.mjs";
|
|
11
11
|
import { textAlignedToIcon } from "../../css/textAlignedToIcon.css.mjs";
|
|
12
12
|
import { IconCritical } from "../icons/IconCritical/IconCritical.mjs";
|
|
13
13
|
import { IconCaution } from "../icons/IconCaution/IconCaution.mjs";
|
|
@@ -75,7 +75,6 @@ const Alert = ({
|
|
|
75
75
|
cursor: "pointer",
|
|
76
76
|
position: "relative",
|
|
77
77
|
onClick: onClose,
|
|
78
|
-
outline: "none",
|
|
79
78
|
transition: "touchable",
|
|
80
79
|
transform: { active: "touchable" },
|
|
81
80
|
display: "flex",
|
|
@@ -83,17 +82,6 @@ const Alert = ({
|
|
|
83
82
|
justifyContent: "center",
|
|
84
83
|
className: [closeButton, iconContainerSize()],
|
|
85
84
|
children: [
|
|
86
|
-
/* @__PURE__ */ jsx(
|
|
87
|
-
Overlay,
|
|
88
|
-
{
|
|
89
|
-
component: "span",
|
|
90
|
-
boxShadow: "outlineFocus",
|
|
91
|
-
transition: "fast",
|
|
92
|
-
onlyVisibleForKeyboardNavigation: true,
|
|
93
|
-
borderRadius: "full",
|
|
94
|
-
className: closeButtonFocus
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
85
|
/* @__PURE__ */ jsx(
|
|
98
86
|
Overlay,
|
|
99
87
|
{
|
|
@@ -5,7 +5,6 @@ const dedent = require("dedent");
|
|
|
5
5
|
const react = require("react");
|
|
6
6
|
const lib_css_reset_resetTracker_cjs = require("../../css/reset/resetTracker.cjs");
|
|
7
7
|
const lib_components_BraidTestProvider_BraidTestProviderContext_cjs = require("../BraidTestProvider/BraidTestProviderContext.cjs");
|
|
8
|
-
const lib_components_private_hideFocusRings_useHideFocusRings_cjs = require("../private/hideFocusRings/useHideFocusRings.cjs");
|
|
9
8
|
const lib_components_BraidProvider_BraidThemeContext_cjs = require("./BraidThemeContext.cjs");
|
|
10
9
|
const lib_components_BraidProvider_BreakpointContext_cjs = require("./BreakpointContext.cjs");
|
|
11
10
|
const lib_components_BraidProvider_VanillaThemeContainer_cjs = require("./VanillaThemeContainer.cjs");
|
|
@@ -45,7 +44,6 @@ const BraidProvider = ({
|
|
|
45
44
|
const alreadyInBraidProvider = Boolean(react.useContext(lib_components_BraidProvider_BraidThemeContext_cjs.BraidThemeContext));
|
|
46
45
|
const inTestProvider = react.useContext(lib_components_BraidTestProvider_BraidTestProviderContext_cjs.BraidTestProviderContext);
|
|
47
46
|
const linkComponentFromContext = react.useContext(LinkComponentContext);
|
|
48
|
-
lib_components_private_hideFocusRings_useHideFocusRings_cjs.useHideFocusRings(!(alreadyInBraidProvider || inTestProvider));
|
|
49
47
|
assert__default.default(
|
|
50
48
|
inTestProvider || typeof navigator === "undefined" || navigator.userAgent === void 0 || navigator.userAgent.indexOf("jsdom") === -1,
|
|
51
49
|
`Rendering 'BraidProvider' in Jest is not supported as it expects a browser environment. Please switch to 'BraidTestProvider'. See the docs for more info: https://seek-oss.github.io/braid-design-system/components/BraidTestProvider`
|
|
@@ -4,7 +4,6 @@ import dedent from "dedent";
|
|
|
4
4
|
import { forwardRef, useContext, createContext } from "react";
|
|
5
5
|
import { ensureResetImported } from "../../css/reset/resetTracker.mjs";
|
|
6
6
|
import { BraidTestProviderContext } from "../BraidTestProvider/BraidTestProviderContext.mjs";
|
|
7
|
-
import { useHideFocusRings } from "../private/hideFocusRings/useHideFocusRings.mjs";
|
|
8
7
|
import { BraidThemeContext } from "./BraidThemeContext.mjs";
|
|
9
8
|
import { BreakpointProvider } from "./BreakpointContext.mjs";
|
|
10
9
|
import { VanillaThemeContainer } from "./VanillaThemeContainer.mjs";
|
|
@@ -41,7 +40,6 @@ const BraidProvider = ({
|
|
|
41
40
|
const alreadyInBraidProvider = Boolean(useContext(BraidThemeContext));
|
|
42
41
|
const inTestProvider = useContext(BraidTestProviderContext);
|
|
43
42
|
const linkComponentFromContext = useContext(LinkComponentContext);
|
|
44
|
-
useHideFocusRings(!(alreadyInBraidProvider || inTestProvider));
|
|
45
43
|
assert(
|
|
46
44
|
inTestProvider || typeof navigator === "undefined" || navigator.userAgent === void 0 || navigator.userAgent.indexOf("jsdom") === -1,
|
|
47
45
|
`Rendering 'BraidProvider' in Jest is not supported as it expects a browser environment. Please switch to 'BraidTestProvider'. See the docs for more info: https://seek-oss.github.io/braid-design-system/components/BraidTestProvider`
|
|
@@ -171,7 +171,6 @@ const resolveToneAndVariant = ({
|
|
|
171
171
|
const ButtonOverlays = ({
|
|
172
172
|
variant: variantProp,
|
|
173
173
|
tone: toneProp,
|
|
174
|
-
keyboardFocusable = true,
|
|
175
174
|
forceActive = false,
|
|
176
175
|
radius = buttonRadius
|
|
177
176
|
}) => {
|
|
@@ -184,15 +183,6 @@ const ButtonOverlays = ({
|
|
|
184
183
|
const colorContrast = lib_components_Box_BackgroundContext_cjs.useColorContrast();
|
|
185
184
|
const lightness = lib_components_Box_BackgroundContext_cjs.useBackgroundLightness();
|
|
186
185
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
187
|
-
keyboardFocusable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
188
|
-
lib_components_private_FieldOverlay_FieldOverlay_cjs.FieldOverlay,
|
|
189
|
-
{
|
|
190
|
-
borderRadius: radius,
|
|
191
|
-
variant: "focus",
|
|
192
|
-
onlyVisibleForKeyboardNavigation: true,
|
|
193
|
-
className: lib_components_Button_Button_css_cjs.focusOverlay
|
|
194
|
-
}
|
|
195
|
-
) : null,
|
|
196
186
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
197
187
|
lib_components_private_FieldOverlay_FieldOverlay_cjs.FieldOverlay,
|
|
198
188
|
{
|
|
@@ -342,7 +332,6 @@ const useButtonStyles = ({
|
|
|
342
332
|
alignItems: "center",
|
|
343
333
|
justifyContent: "center",
|
|
344
334
|
transition: "touchable",
|
|
345
|
-
outline: "none",
|
|
346
335
|
textAlign: "center",
|
|
347
336
|
userSelect: "none",
|
|
348
337
|
background: stylesForVariant.background && typeof stylesForVariant.background !== "string" ? colorContrast(stylesForVariant.background) : stylesForVariant.background,
|