braid-design-system 33.0.0 → 33.1.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 +59 -1
- package/dist/index.cjs +4 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -0
- package/dist/lib/components/Accordion/AccordionItem.cjs +2 -1
- package/dist/lib/components/Accordion/AccordionItem.mjs +2 -1
- package/dist/lib/components/Button/Button.cjs +0 -2
- package/dist/lib/components/Button/Button.mjs +0 -2
- package/dist/lib/components/Disclosure/Disclosure.cjs +24 -4
- package/dist/lib/components/Disclosure/Disclosure.mjs +24 -4
- package/dist/lib/components/Inline/Inline.playroom.cjs +1 -7
- package/dist/lib/components/Inline/Inline.playroom.mjs +1 -7
- package/dist/lib/components/MenuItem/useMenuItem.cjs +9 -4
- package/dist/lib/components/MenuItem/useMenuItem.mjs +9 -4
- package/dist/lib/components/MenuItemCheckbox/MenuItemCheckbox.cjs +5 -1
- package/dist/lib/components/MenuItemCheckbox/MenuItemCheckbox.mjs +5 -1
- package/dist/lib/components/Notice/Notice.cjs +2 -1
- package/dist/lib/components/Notice/Notice.mjs +2 -1
- package/dist/lib/components/Rating/Rating.cjs +8 -20
- package/dist/lib/components/Rating/Rating.css.cjs +5 -8
- package/dist/lib/components/Rating/Rating.css.mjs +6 -9
- package/dist/lib/components/Rating/Rating.mjs +9 -21
- package/dist/lib/components/Stack/Stack.playroom.cjs +1 -6
- package/dist/lib/components/Stack/Stack.playroom.mjs +1 -6
- package/dist/lib/components/Tabs/Tab.cjs +2 -1
- package/dist/lib/components/Tabs/Tab.mjs +2 -1
- package/dist/lib/components/icons/IconAttachment/IconAttachment.cjs +7 -0
- package/dist/lib/components/icons/IconAttachment/IconAttachment.mjs +8 -0
- package/dist/lib/components/icons/IconAttachment/IconAttachmentSvg.cjs +28 -0
- package/dist/lib/components/icons/IconAttachment/IconAttachmentSvg.mjs +29 -0
- package/dist/lib/components/icons/IconLicence/IconLicence.cjs +7 -0
- package/dist/lib/components/icons/IconLicence/IconLicence.mjs +8 -0
- package/dist/lib/components/icons/IconLicence/IconLicenceSvg.cjs +23 -0
- package/dist/lib/components/icons/IconLicence/IconLicenceSvg.mjs +24 -0
- package/dist/lib/components/icons/IconRocket/IconRocketSvg.cjs +2 -1
- package/dist/lib/components/icons/IconRocket/IconRocketSvg.mjs +2 -1
- package/dist/lib/components/private/AvoidWidowIcon/AvoidWidowIcon.cjs +3 -3
- package/dist/lib/components/private/AvoidWidowIcon/AvoidWidowIcon.mjs +3 -3
- package/dist/lib/components/private/InlineField/InlineField.cjs +2 -1
- package/dist/lib/components/private/InlineField/InlineField.mjs +2 -1
- package/dist/lib/components/private/Typography/Typography.cjs +2 -1
- package/dist/lib/components/private/Typography/Typography.mjs +2 -1
- package/dist/lib/components/private/badgeSlotSpace.cjs +3 -0
- package/dist/lib/components/private/badgeSlotSpace.mjs +4 -0
- package/dist/lib/components/private/iconSlotSpace.cjs +3 -0
- package/dist/lib/components/private/iconSlotSpace.mjs +4 -0
- package/dist/lib/components/useToast/Toast.cjs +1 -0
- package/dist/lib/components/useToast/Toast.mjs +1 -0
- package/dist/lib/css/responsiveStyle.cjs +5 -8
- package/dist/lib/css/responsiveStyle.mjs +4 -4
- package/dist/lib/playroom/playroomState.cjs +1 -1
- package/dist/lib/playroom/playroomState.mjs +1 -1
- package/dist/lib/playroom/snippets/Disclosure.cjs +1 -1
- package/dist/lib/playroom/snippets/Disclosure.mjs +1 -1
- package/dist/lib/themes/baseTokens/apac.cjs +1 -1
- package/dist/lib/themes/baseTokens/apac.mjs +1 -1
- package/dist/lib/themes/makeRuntimeTokens.cjs +2 -4
- package/dist/lib/themes/makeRuntimeTokens.mjs +1 -1
- package/dist/lib/themes/makeVanillaTheme.cjs +8 -10
- package/dist/lib/themes/makeVanillaTheme.mjs +1 -1
- package/dist/lib/utils/mapValues.cjs +11 -0
- package/dist/lib/utils/mapValues.mjs +12 -0
- package/dist/playroom/components.cjs +4 -0
- package/dist/playroom/components.d.mts +1 -1
- package/dist/playroom/components.d.ts +1 -1
- package/dist/playroom/components.mjs +4 -0
- package/dist/wireframe.chunk.d.ts +54 -288
- package/package.json +7 -5
- package/LICENSE +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,66 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 33.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **IconLicence:** Add component ([#1640](https://github.com/seek-oss/braid-design-system/pull/1640))
|
|
8
|
+
|
|
9
|
+
Add `IconLicence` to icon suite
|
|
10
|
+
|
|
11
|
+
**EXAMPLE USAGE:**
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
<IconLicence />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- **IconAttachment:** Add component ([#1635](https://github.com/seek-oss/braid-design-system/pull/1635))
|
|
18
|
+
|
|
19
|
+
Add `IconAttachment` to icon suite
|
|
20
|
+
|
|
21
|
+
**EXAMPLE USAGE:**
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
<IconAttachment />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- **Disclosure:** Add `size` support ([#1633](https://github.com/seek-oss/braid-design-system/pull/1633))
|
|
28
|
+
|
|
29
|
+
Introduce the `size` prop to the `Disclosure` component, providing the same options as the `Text` component.
|
|
30
|
+
|
|
31
|
+
**EXAMPLE USAGE:**
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<Disclosure size="small">...</Disclosure>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Standardise icon slot spacing ([#1638](https://github.com/seek-oss/braid-design-system/pull/1638))
|
|
40
|
+
|
|
41
|
+
Normalise the space between the `icon` slot and component content across the system.
|
|
42
|
+
|
|
43
|
+
- **Rating:** Simplify internal layout ([#1638](https://github.com/seek-oss/braid-design-system/pull/1638))
|
|
44
|
+
|
|
45
|
+
Simplify the internal HTML and layout of the `Rating` component.
|
|
46
|
+
This change should not affect the appearance or behavior of the component.
|
|
47
|
+
|
|
48
|
+
- Remove lodash dependency ([#1639](https://github.com/seek-oss/braid-design-system/pull/1639))
|
|
49
|
+
|
|
50
|
+
- **useToast**: Ensure content is left aligned ([#1630](https://github.com/seek-oss/braid-design-system/pull/1630))
|
|
51
|
+
|
|
52
|
+
Applies left alignment to `Toast` content to ensure intended alignment, regardless of other styles applied.
|
|
53
|
+
|
|
54
|
+
- **IconRocket:** Update design ([#1636](https://github.com/seek-oss/braid-design-system/pull/1636))
|
|
55
|
+
|
|
56
|
+
Update the design asset for `IconRocket`
|
|
57
|
+
|
|
3
58
|
## 33.0.0
|
|
4
59
|
|
|
5
60
|
This release is a huge milestone for Braid with upgrades occurring across a number of key areas:
|
|
6
61
|
|
|
7
62
|
### Migrate layout components to [CSS Gap]
|
|
63
|
+
|
|
8
64
|
With SEEKs Browser Support Policy now enabling adoption of [CSS gap], Braid's layout components are now able to lean into the platform directly for its declarative, parent-driven approach to white space management.
|
|
9
65
|
|
|
10
66
|
The result is on average our experiences receive around a 20% reduction in DOM elements, more performant rendering, better composability without the introduction of intermediary elements and a better debug experience in dev tools.
|
|
@@ -12,17 +68,19 @@ The result is on average our experiences receive around a 20% reduction in DOM e
|
|
|
12
68
|
The key tradeoff is the removal of `dividers` functionality which is explained further [here].
|
|
13
69
|
|
|
14
70
|
### Reduce `gutter` size in `seekJobs` theme
|
|
71
|
+
|
|
15
72
|
The size of the `gutter` token on the `seekJobs` theme has been reduced from `large` (i.e. 32px), to `medium` (i.e. 24px).
|
|
16
73
|
This is a semantic token that runs through many system components, and consumer should perform a visual design audit to ensure experiences are laid out as intended.
|
|
17
74
|
|
|
18
75
|
### Other key changes
|
|
76
|
+
|
|
19
77
|
- Remove support for React v17.x
|
|
20
78
|
- Removal of deprecated features
|
|
21
79
|
|
|
22
80
|
[CSS Gap]: https://developer.mozilla.org/en-US/docs/Web/CSS/gap
|
|
23
81
|
[here]: https://github.com/seek-oss/braid-design-system/blob/8177e4c6b502536e8f37811f5eef735ff265f1c6/docs/Removing%20dividers%20support%20from%20layout%20components.md
|
|
24
82
|
|
|
25
|
-
See full changelog below 👇
|
|
83
|
+
See full changelog below 👇
|
|
26
84
|
|
|
27
85
|
### Major Changes
|
|
28
86
|
|
package/dist/index.cjs
CHANGED
|
@@ -81,6 +81,7 @@ const lib_components_TooltipRenderer_TooltipRenderer_cjs = require("./lib/compon
|
|
|
81
81
|
const lib_components_icons_IconAI_IconAI_cjs = require("./lib/components/icons/IconAI/IconAI.cjs");
|
|
82
82
|
const lib_components_icons_IconAdd_IconAdd_cjs = require("./lib/components/icons/IconAdd/IconAdd.cjs");
|
|
83
83
|
const lib_components_icons_IconArrow_IconArrow_cjs = require("./lib/components/icons/IconArrow/IconArrow.cjs");
|
|
84
|
+
const lib_components_icons_IconAttachment_IconAttachment_cjs = require("./lib/components/icons/IconAttachment/IconAttachment.cjs");
|
|
84
85
|
const lib_components_icons_IconBookmark_IconBookmark_cjs = require("./lib/components/icons/IconBookmark/IconBookmark.cjs");
|
|
85
86
|
const lib_components_icons_IconCareer_IconCareer_cjs = require("./lib/components/icons/IconCareer/IconCareer.cjs");
|
|
86
87
|
const lib_components_icons_IconCategory_IconCategory_cjs = require("./lib/components/icons/IconCategory/IconCategory.cjs");
|
|
@@ -116,6 +117,7 @@ const lib_components_icons_IconImage_IconImage_cjs = require("./lib/components/i
|
|
|
116
117
|
const lib_components_icons_IconInfo_IconInfo_cjs = require("./lib/components/icons/IconInfo/IconInfo.cjs");
|
|
117
118
|
const lib_components_icons_IconInvoice_IconInvoice_cjs = require("./lib/components/icons/IconInvoice/IconInvoice.cjs");
|
|
118
119
|
const lib_components_icons_IconLanguage_IconLanguage_cjs = require("./lib/components/icons/IconLanguage/IconLanguage.cjs");
|
|
120
|
+
const lib_components_icons_IconLicence_IconLicence_cjs = require("./lib/components/icons/IconLicence/IconLicence.cjs");
|
|
119
121
|
const lib_components_icons_IconLink_IconLink_cjs = require("./lib/components/icons/IconLink/IconLink.cjs");
|
|
120
122
|
const lib_components_icons_IconLinkBroken_IconLinkBroken_cjs = require("./lib/components/icons/IconLinkBroken/IconLinkBroken.cjs");
|
|
121
123
|
const lib_components_icons_IconList_IconList_cjs = require("./lib/components/icons/IconList/IconList.cjs");
|
|
@@ -256,6 +258,7 @@ exports.TooltipRenderer = lib_components_TooltipRenderer_TooltipRenderer_cjs.Too
|
|
|
256
258
|
exports.IconAI = lib_components_icons_IconAI_IconAI_cjs.IconAI;
|
|
257
259
|
exports.IconAdd = lib_components_icons_IconAdd_IconAdd_cjs.IconAdd;
|
|
258
260
|
exports.IconArrow = lib_components_icons_IconArrow_IconArrow_cjs.IconArrow;
|
|
261
|
+
exports.IconAttachment = lib_components_icons_IconAttachment_IconAttachment_cjs.IconAttachment;
|
|
259
262
|
exports.IconBookmark = lib_components_icons_IconBookmark_IconBookmark_cjs.IconBookmark;
|
|
260
263
|
exports.IconCareer = lib_components_icons_IconCareer_IconCareer_cjs.IconCareer;
|
|
261
264
|
exports.IconCategory = lib_components_icons_IconCategory_IconCategory_cjs.IconCategory;
|
|
@@ -291,6 +294,7 @@ exports.IconImage = lib_components_icons_IconImage_IconImage_cjs.IconImage;
|
|
|
291
294
|
exports.IconInfo = lib_components_icons_IconInfo_IconInfo_cjs.IconInfo;
|
|
292
295
|
exports.IconInvoice = lib_components_icons_IconInvoice_IconInvoice_cjs.IconInvoice;
|
|
293
296
|
exports.IconLanguage = lib_components_icons_IconLanguage_IconLanguage_cjs.IconLanguage;
|
|
297
|
+
exports.IconLicence = lib_components_icons_IconLicence_IconLicence_cjs.IconLicence;
|
|
294
298
|
exports.IconLink = lib_components_icons_IconLink_IconLink_cjs.IconLink;
|
|
295
299
|
exports.IconLinkBroken = lib_components_icons_IconLinkBroken_IconLinkBroken_cjs.IconLinkBroken;
|
|
296
300
|
exports.IconList = lib_components_icons_IconList_IconList_cjs.IconList;
|
package/dist/index.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Accordion, AccordionItem, Actions, Alert, Autosuggest, Badge, Bleed, PublicBox as Box, BoxRenderer, BraidPortal, BraidProvider, Button, ButtonIcon, ButtonLink, Card, Checkbox, CheckboxStandalone, Column, Columns, ContentBlock, Dialog, Disclosure, Divider, Drawer, Dropdown, FieldLabel, FieldMessage, Heading, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconBookmark, IconCareer, IconCategory, IconCaution, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconLanguage, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconRecommended, 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, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline, Link, LinkComponent, List, Loader, MenuItem, MenuItemCheckbox, MenuItemDivider, MenuItemLink, MenuRenderer, MonthPicker, Notice, OverflowMenu, Page, PageBlock, Pagination, PasswordField, RadioGroup, RadioItem, Rating, Secondary, Spread, Stack, Step, Stepper, Strong, Tab, TabPanel, TabPanels, Tabs, TabsProvider, Tag, Text, TextDropdown, TextField, TextLink, TextLinkButton, Textarea, ThemeNameConsumer, Tiles, ToastProvider, Toggle, TooltipRenderer, filterSuggestions, makeLinkComponent, useColor, useResponsiveValue, useSpace, useThemeName, useToast } from './wireframe.chunk.js';
|
|
1
|
+
export { Accordion, AccordionItem, Actions, Alert, Autosuggest, Badge, Bleed, PublicBox as Box, BoxRenderer, BraidPortal, BraidProvider, Button, ButtonIcon, ButtonLink, Card, Checkbox, CheckboxStandalone, Column, Columns, ContentBlock, Dialog, Disclosure, Divider, Drawer, Dropdown, FieldLabel, FieldMessage, Heading, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBookmark, IconCareer, IconCategory, IconCaution, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconRecommended, 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, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline, Link, LinkComponent, List, Loader, MenuItem, MenuItemCheckbox, MenuItemDivider, MenuItemLink, MenuRenderer, MonthPicker, Notice, OverflowMenu, Page, PageBlock, Pagination, PasswordField, RadioGroup, RadioItem, Rating, Secondary, Spread, Stack, Step, Stepper, Strong, Tab, TabPanel, TabPanels, Tabs, TabsProvider, Tag, Text, TextDropdown, TextField, TextLink, TextLinkButton, Textarea, ThemeNameConsumer, Tiles, ToastProvider, Toggle, TooltipRenderer, filterSuggestions, makeLinkComponent, useColor, useResponsiveValue, useSpace, useThemeName, useToast } from './wireframe.chunk.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Accordion, AccordionItem, Actions, Alert, Autosuggest, Badge, Bleed, PublicBox as Box, BoxRenderer, BraidPortal, BraidProvider, Button, ButtonIcon, ButtonLink, Card, Checkbox, CheckboxStandalone, Column, Columns, ContentBlock, Dialog, Disclosure, Divider, Drawer, Dropdown, FieldLabel, FieldMessage, Heading, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconBookmark, IconCareer, IconCategory, IconCaution, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconLanguage, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconRecommended, 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, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline, Link, LinkComponent, List, Loader, MenuItem, MenuItemCheckbox, MenuItemDivider, MenuItemLink, MenuRenderer, MonthPicker, Notice, OverflowMenu, Page, PageBlock, Pagination, PasswordField, RadioGroup, RadioItem, Rating, Secondary, Spread, Stack, Step, Stepper, Strong, Tab, TabPanel, TabPanels, Tabs, TabsProvider, Tag, Text, TextDropdown, TextField, TextLink, TextLinkButton, Textarea, ThemeNameConsumer, Tiles, ToastProvider, Toggle, TooltipRenderer, filterSuggestions, makeLinkComponent, useColor, useResponsiveValue, useSpace, useThemeName, useToast } from './wireframe.chunk.js';
|
|
1
|
+
export { Accordion, AccordionItem, Actions, Alert, Autosuggest, Badge, Bleed, PublicBox as Box, BoxRenderer, BraidPortal, BraidProvider, Button, ButtonIcon, ButtonLink, Card, Checkbox, CheckboxStandalone, Column, Columns, ContentBlock, Dialog, Disclosure, Divider, Drawer, Dropdown, FieldLabel, FieldMessage, Heading, Hidden, HiddenVisually, IconAI, IconAdd, IconArrow, IconAttachment, IconBookmark, IconCareer, IconCategory, IconCaution, IconChevron, IconClear, IconCompany, IconCompose, IconCopy, IconCreditCard, IconCritical, IconDate, IconDelete, IconDesktop, IconDocument, IconDocumentBroken, IconDownload, IconEdit, IconEducation, IconEnlarge, IconExperience, IconFilter, IconFlag, IconGift, IconGlobe, IconGrid, IconHash, IconHeart, IconHelp, IconHistory, IconHome, IconImage, IconInfo, IconInvoice, IconLanguage, IconLicence, IconLink, IconLinkBroken, IconList, IconLocation, IconMail, IconMessage, IconMinus, IconMobile, IconMoney, IconNewWindow, IconNote, IconNotification, IconOverflow, IconPeople, IconPersonAdd, IconPersonVerified, IconPhone, IconPlatformAndroid, IconPlatformApple, IconPositive, IconPrint, IconProfile, IconPromote, IconRecommended, 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, IconUpload, IconVideo, IconVisibility, IconWorkExperience, IconZoomIn, IconZoomOut, Inline, Link, LinkComponent, List, Loader, MenuItem, MenuItemCheckbox, MenuItemDivider, MenuItemLink, MenuRenderer, MonthPicker, Notice, OverflowMenu, Page, PageBlock, Pagination, PasswordField, RadioGroup, RadioItem, Rating, Secondary, Spread, Stack, Step, Stepper, Strong, Tab, TabPanel, TabPanels, Tabs, TabsProvider, Tag, Text, TextDropdown, TextField, TextLink, TextLinkButton, Textarea, ThemeNameConsumer, Tiles, ToastProvider, Toggle, TooltipRenderer, filterSuggestions, makeLinkComponent, useColor, useResponsiveValue, useSpace, useThemeName, useToast } from './wireframe.chunk.js';
|
package/dist/index.mjs
CHANGED
|
@@ -79,6 +79,7 @@ import { TooltipRenderer } from "./lib/components/TooltipRenderer/TooltipRendere
|
|
|
79
79
|
import { IconAI } from "./lib/components/icons/IconAI/IconAI.mjs";
|
|
80
80
|
import { IconAdd } from "./lib/components/icons/IconAdd/IconAdd.mjs";
|
|
81
81
|
import { IconArrow } from "./lib/components/icons/IconArrow/IconArrow.mjs";
|
|
82
|
+
import { IconAttachment } from "./lib/components/icons/IconAttachment/IconAttachment.mjs";
|
|
82
83
|
import { IconBookmark } from "./lib/components/icons/IconBookmark/IconBookmark.mjs";
|
|
83
84
|
import { IconCareer } from "./lib/components/icons/IconCareer/IconCareer.mjs";
|
|
84
85
|
import { IconCategory } from "./lib/components/icons/IconCategory/IconCategory.mjs";
|
|
@@ -114,6 +115,7 @@ import { IconImage } from "./lib/components/icons/IconImage/IconImage.mjs";
|
|
|
114
115
|
import { IconInfo } from "./lib/components/icons/IconInfo/IconInfo.mjs";
|
|
115
116
|
import { IconInvoice } from "./lib/components/icons/IconInvoice/IconInvoice.mjs";
|
|
116
117
|
import { IconLanguage } from "./lib/components/icons/IconLanguage/IconLanguage.mjs";
|
|
118
|
+
import { IconLicence } from "./lib/components/icons/IconLicence/IconLicence.mjs";
|
|
117
119
|
import { IconLink } from "./lib/components/icons/IconLink/IconLink.mjs";
|
|
118
120
|
import { IconLinkBroken } from "./lib/components/icons/IconLinkBroken/IconLinkBroken.mjs";
|
|
119
121
|
import { IconList } from "./lib/components/icons/IconList/IconList.mjs";
|
|
@@ -205,6 +207,7 @@ export {
|
|
|
205
207
|
IconAI,
|
|
206
208
|
IconAdd,
|
|
207
209
|
IconArrow,
|
|
210
|
+
IconAttachment,
|
|
208
211
|
IconBookmark,
|
|
209
212
|
IconCareer,
|
|
210
213
|
IconCategory,
|
|
@@ -240,6 +243,7 @@ export {
|
|
|
240
243
|
IconInfo,
|
|
241
244
|
IconInvoice,
|
|
242
245
|
IconLanguage,
|
|
246
|
+
IconLicence,
|
|
243
247
|
IconLink,
|
|
244
248
|
IconLinkBroken,
|
|
245
249
|
IconList,
|
|
@@ -10,6 +10,7 @@ const lib_components_Disclosure_useDisclosure_cjs = require("../Disclosure/useDi
|
|
|
10
10
|
const lib_components_private_Overlay_Overlay_cjs = require("../private/Overlay/Overlay.cjs");
|
|
11
11
|
const lib_components_Accordion_AccordionContext_cjs = require("./AccordionContext.cjs");
|
|
12
12
|
const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
|
|
13
|
+
const lib_components_private_badgeSlotSpace_cjs = require("../private/badgeSlotSpace.cjs");
|
|
13
14
|
const lib_components_Accordion_AccordionItem_css_cjs = require("./AccordionItem.css.cjs");
|
|
14
15
|
const lib_components_icons_IconChevron_IconChevron_cjs = require("../icons/IconChevron/IconChevron.cjs");
|
|
15
16
|
const lib_components_private_hideFocusRings_hideFocusRings_css_cjs = require("../private/hideFocusRings/hideFocusRings.css.cjs");
|
|
@@ -95,7 +96,7 @@ const AccordionItem = ({
|
|
|
95
96
|
...buttonProps,
|
|
96
97
|
children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { component: "span", position: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Columns_Columns_cjs.Columns, { component: "span", space: itemSpace, children: [
|
|
97
98
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Column_Column_cjs.Column, { children: /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Text_Text_cjs.Text, { size, weight, tone, icon, children: [
|
|
98
|
-
badge ? /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { component: "span", paddingRight:
|
|
99
|
+
badge ? /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { component: "span", paddingRight: lib_components_private_badgeSlotSpace_cjs.badgeSlotSpace, children: label }) : label,
|
|
99
100
|
badge ? React.cloneElement(badge, {}) : null
|
|
100
101
|
] }) }),
|
|
101
102
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Column_Column_cjs.Column, { width: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9,6 +9,7 @@ import { useDisclosure } from "../Disclosure/useDisclosure.mjs";
|
|
|
9
9
|
import { Overlay } from "../private/Overlay/Overlay.mjs";
|
|
10
10
|
import { AccordionContext, validTones } from "./AccordionContext.mjs";
|
|
11
11
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
12
|
+
import { badgeSlotSpace } from "../private/badgeSlotSpace.mjs";
|
|
12
13
|
import { button, focusRing } from "./AccordionItem.css.mjs";
|
|
13
14
|
import { IconChevron } from "../icons/IconChevron/IconChevron.mjs";
|
|
14
15
|
import { hideFocusRingsClassName } from "../private/hideFocusRings/hideFocusRings.css.mjs";
|
|
@@ -92,7 +93,7 @@ const AccordionItem = ({
|
|
|
92
93
|
...buttonProps,
|
|
93
94
|
children: /* @__PURE__ */ jsx(Box, { component: "span", position: "relative", children: /* @__PURE__ */ jsxs(Columns, { component: "span", space: itemSpace, children: [
|
|
94
95
|
/* @__PURE__ */ jsx(Column, { children: /* @__PURE__ */ jsxs(Text, { size, weight, tone, icon, children: [
|
|
95
|
-
badge ? /* @__PURE__ */ jsx(Box, { component: "span", paddingRight:
|
|
96
|
+
badge ? /* @__PURE__ */ jsx(Box, { component: "span", paddingRight: badgeSlotSpace, children: label }) : label,
|
|
96
97
|
badge ? cloneElement(badge, {}) : null
|
|
97
98
|
] }) }),
|
|
98
99
|
/* @__PURE__ */ jsx(Column, { width: "content", children: /* @__PURE__ */ jsx(
|
|
@@ -285,7 +285,6 @@ const ButtonText = ({
|
|
|
285
285
|
lib_components_private_AvoidWidowIcon_AvoidWidowIcon_cjs.AvoidWidowIcon,
|
|
286
286
|
{
|
|
287
287
|
iconPosition,
|
|
288
|
-
space: "xsmall",
|
|
289
288
|
className: shouldReducePaddingX || bleed ? null : lib_css_negativeMargin_negativeMargin_cjs.negativeMargin("left", "xxsmall"),
|
|
290
289
|
children: icon
|
|
291
290
|
}
|
|
@@ -296,7 +295,6 @@ const ButtonText = ({
|
|
|
296
295
|
lib_components_private_AvoidWidowIcon_AvoidWidowIcon_cjs.AvoidWidowIcon,
|
|
297
296
|
{
|
|
298
297
|
iconPosition,
|
|
299
|
-
space: "xsmall",
|
|
300
298
|
className: shouldReducePaddingX || bleed ? null : lib_css_negativeMargin_negativeMargin_cjs.negativeMargin("right", "xxsmall"),
|
|
301
299
|
children: icon
|
|
302
300
|
}
|
|
@@ -282,7 +282,6 @@ const ButtonText = ({
|
|
|
282
282
|
AvoidWidowIcon,
|
|
283
283
|
{
|
|
284
284
|
iconPosition,
|
|
285
|
-
space: "xsmall",
|
|
286
285
|
className: shouldReducePaddingX || bleed ? null : negativeMargin("left", "xxsmall"),
|
|
287
286
|
children: icon
|
|
288
287
|
}
|
|
@@ -293,7 +292,6 @@ const ButtonText = ({
|
|
|
293
292
|
AvoidWidowIcon,
|
|
294
293
|
{
|
|
295
294
|
iconPosition,
|
|
296
|
-
space: "xsmall",
|
|
297
295
|
className: shouldReducePaddingX || bleed ? null : negativeMargin("right", "xxsmall"),
|
|
298
296
|
children: icon
|
|
299
297
|
}
|
|
@@ -10,14 +10,22 @@ const lib_components_private_AvoidWidowIcon_AvoidWidowIcon_cjs = require("../pri
|
|
|
10
10
|
const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
|
|
11
11
|
const lib_components_Text_TextContext_cjs = require("../Text/TextContext.cjs");
|
|
12
12
|
const lib_components_Heading_HeadingContext_cjs = require("../Heading/HeadingContext.cjs");
|
|
13
|
+
const lib_components_private_defaultTextProps_cjs = require("../private/defaultTextProps.cjs");
|
|
13
14
|
const lib_components_icons_IconChevron_IconChevron_cjs = require("../icons/IconChevron/IconChevron.cjs");
|
|
14
15
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
15
16
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
17
|
+
const defaultSpaceForSize = {
|
|
18
|
+
large: "medium",
|
|
19
|
+
standard: "medium",
|
|
20
|
+
xsmall: "small",
|
|
21
|
+
small: "small"
|
|
22
|
+
};
|
|
16
23
|
const Disclosure = ({
|
|
17
24
|
id,
|
|
18
25
|
expandLabel,
|
|
19
26
|
collapseLabel = expandLabel,
|
|
20
|
-
space
|
|
27
|
+
space,
|
|
28
|
+
size: sizeProp,
|
|
21
29
|
children,
|
|
22
30
|
data,
|
|
23
31
|
weight,
|
|
@@ -34,6 +42,10 @@ const Disclosure = ({
|
|
|
34
42
|
const textContext = React.useContext(lib_components_Text_TextContext_cjs.TextContext);
|
|
35
43
|
const headingContext = React.useContext(lib_components_Heading_HeadingContext_cjs.HeadingContext);
|
|
36
44
|
const isInline = Boolean(textContext || headingContext);
|
|
45
|
+
assert__default.default(
|
|
46
|
+
typeof sizeProp === "undefined" || !isInline,
|
|
47
|
+
`Specifying a custom \`size\` for a \`Disclosure\` inside the context of a \`<${textContext ? "Text" : "Heading"}>\` component is invalid. See the documentation for correct usage: https://seek-oss.github.io/braid-design-system/components/Disclosure`
|
|
48
|
+
);
|
|
37
49
|
const { expanded, buttonProps, contentProps } = lib_components_Disclosure_useDisclosure_cjs.useDisclosure({
|
|
38
50
|
id,
|
|
39
51
|
...restProps.expanded !== void 0 ? {
|
|
@@ -43,6 +55,14 @@ const Disclosure = ({
|
|
|
43
55
|
onToggle: restProps.onToggle
|
|
44
56
|
}
|
|
45
57
|
});
|
|
58
|
+
const size = sizeProp ?? (textContext == null ? void 0 : textContext.size) ?? "standard";
|
|
59
|
+
const defaultSpace = isInline ? (
|
|
60
|
+
/*
|
|
61
|
+
* If inline, only use `xxsmall` space between the trigger and the content
|
|
62
|
+
* to compensate for the additional space created by the line height of text.
|
|
63
|
+
*/
|
|
64
|
+
"xxsmall"
|
|
65
|
+
) : defaultSpaceForSize[size];
|
|
46
66
|
const trigger = /* @__PURE__ */ jsxRuntime.jsxs(lib_components_TextLinkButton_TextLinkButton_cjs.TextLinkButton, { hitArea: "large", weight, ...buttonProps, children: [
|
|
47
67
|
expanded ? collapseLabel : expandLabel,
|
|
48
68
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_private_AvoidWidowIcon_AvoidWidowIcon_cjs.AvoidWidowIcon, { iconPosition: "trailing", children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_icons_IconChevron_IconChevron_cjs.IconChevron, { direction: expanded ? "up" : "down", alignY: "lowercase" }) })
|
|
@@ -64,17 +84,17 @@ const Disclosure = ({
|
|
|
64
84
|
children: isInline ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
65
85
|
" ",
|
|
66
86
|
trigger
|
|
67
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(lib_components_Text_Text_cjs.Text, { children: trigger })
|
|
87
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(lib_components_Text_Text_cjs.Text, { size, children: trigger })
|
|
68
88
|
}
|
|
69
89
|
),
|
|
70
90
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
91
|
lib_components_Box_Box_cjs.Box,
|
|
72
92
|
{
|
|
73
93
|
component,
|
|
74
|
-
paddingTop: space,
|
|
94
|
+
paddingTop: space ?? defaultSpace,
|
|
75
95
|
display: expanded ? "block" : "none",
|
|
76
96
|
...contentProps,
|
|
77
|
-
children
|
|
97
|
+
children: isInline ? children : /* @__PURE__ */ jsxRuntime.jsx(lib_components_private_defaultTextProps_cjs.DefaultTextPropsProvider, { size, children })
|
|
78
98
|
}
|
|
79
99
|
)
|
|
80
100
|
]
|
|
@@ -9,12 +9,20 @@ import { AvoidWidowIcon } from "../private/AvoidWidowIcon/AvoidWidowIcon.mjs";
|
|
|
9
9
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
10
10
|
import { TextContext } from "../Text/TextContext.mjs";
|
|
11
11
|
import { HeadingContext } from "../Heading/HeadingContext.mjs";
|
|
12
|
+
import { DefaultTextPropsProvider } from "../private/defaultTextProps.mjs";
|
|
12
13
|
import { IconChevron } from "../icons/IconChevron/IconChevron.mjs";
|
|
14
|
+
const defaultSpaceForSize = {
|
|
15
|
+
large: "medium",
|
|
16
|
+
standard: "medium",
|
|
17
|
+
xsmall: "small",
|
|
18
|
+
small: "small"
|
|
19
|
+
};
|
|
13
20
|
const Disclosure = ({
|
|
14
21
|
id,
|
|
15
22
|
expandLabel,
|
|
16
23
|
collapseLabel = expandLabel,
|
|
17
|
-
space
|
|
24
|
+
space,
|
|
25
|
+
size: sizeProp,
|
|
18
26
|
children,
|
|
19
27
|
data,
|
|
20
28
|
weight,
|
|
@@ -31,6 +39,10 @@ const Disclosure = ({
|
|
|
31
39
|
const textContext = useContext(TextContext);
|
|
32
40
|
const headingContext = useContext(HeadingContext);
|
|
33
41
|
const isInline = Boolean(textContext || headingContext);
|
|
42
|
+
assert(
|
|
43
|
+
typeof sizeProp === "undefined" || !isInline,
|
|
44
|
+
`Specifying a custom \`size\` for a \`Disclosure\` inside the context of a \`<${textContext ? "Text" : "Heading"}>\` component is invalid. See the documentation for correct usage: https://seek-oss.github.io/braid-design-system/components/Disclosure`
|
|
45
|
+
);
|
|
34
46
|
const { expanded, buttonProps, contentProps } = useDisclosure({
|
|
35
47
|
id,
|
|
36
48
|
...restProps.expanded !== void 0 ? {
|
|
@@ -40,6 +52,14 @@ const Disclosure = ({
|
|
|
40
52
|
onToggle: restProps.onToggle
|
|
41
53
|
}
|
|
42
54
|
});
|
|
55
|
+
const size = sizeProp ?? (textContext == null ? void 0 : textContext.size) ?? "standard";
|
|
56
|
+
const defaultSpace = isInline ? (
|
|
57
|
+
/*
|
|
58
|
+
* If inline, only use `xxsmall` space between the trigger and the content
|
|
59
|
+
* to compensate for the additional space created by the line height of text.
|
|
60
|
+
*/
|
|
61
|
+
"xxsmall"
|
|
62
|
+
) : defaultSpaceForSize[size];
|
|
43
63
|
const trigger = /* @__PURE__ */ jsxs(TextLinkButton, { hitArea: "large", weight, ...buttonProps, children: [
|
|
44
64
|
expanded ? collapseLabel : expandLabel,
|
|
45
65
|
/* @__PURE__ */ jsx(AvoidWidowIcon, { iconPosition: "trailing", children: /* @__PURE__ */ jsx(IconChevron, { direction: expanded ? "up" : "down", alignY: "lowercase" }) })
|
|
@@ -61,17 +81,17 @@ const Disclosure = ({
|
|
|
61
81
|
children: isInline ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
62
82
|
" ",
|
|
63
83
|
trigger
|
|
64
|
-
] }) : /* @__PURE__ */ jsx(Text, { children: trigger })
|
|
84
|
+
] }) : /* @__PURE__ */ jsx(Text, { size, children: trigger })
|
|
65
85
|
}
|
|
66
86
|
),
|
|
67
87
|
/* @__PURE__ */ jsx(
|
|
68
88
|
Box,
|
|
69
89
|
{
|
|
70
90
|
component,
|
|
71
|
-
paddingTop: space,
|
|
91
|
+
paddingTop: space ?? defaultSpace,
|
|
72
92
|
display: expanded ? "block" : "none",
|
|
73
93
|
...contentProps,
|
|
74
|
-
children
|
|
94
|
+
children: isInline ? children : /* @__PURE__ */ jsx(DefaultTextPropsProvider, { size, children })
|
|
75
95
|
}
|
|
76
96
|
)
|
|
77
97
|
]
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const lib_playroom_cleanSpaceValue_cjs = require("../../playroom/cleanSpaceValue.cjs");
|
|
4
4
|
const lib_components_Inline_Inline_cjs = require("./Inline.cjs");
|
|
5
|
-
const Inline = ({
|
|
6
|
-
space,
|
|
7
|
-
align,
|
|
8
|
-
alignY,
|
|
9
|
-
component,
|
|
10
|
-
...restProps
|
|
11
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5
|
+
const Inline = ({ space, align, alignY, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12
6
|
lib_components_Inline_Inline_cjs.Inline,
|
|
13
7
|
{
|
|
14
8
|
space: lib_playroom_cleanSpaceValue_cjs.cleanSpaceValue(space) || "none",
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cleanSpaceValue } from "../../playroom/cleanSpaceValue.mjs";
|
|
3
3
|
import { Inline as Inline$1 } from "./Inline.mjs";
|
|
4
|
-
const Inline = ({
|
|
5
|
-
space,
|
|
6
|
-
align,
|
|
7
|
-
alignY,
|
|
8
|
-
component,
|
|
9
|
-
...restProps
|
|
10
|
-
}) => /* @__PURE__ */ jsx(
|
|
4
|
+
const Inline = ({ space, align, alignY, ...restProps }) => /* @__PURE__ */ jsx(
|
|
11
5
|
Inline$1,
|
|
12
6
|
{
|
|
13
7
|
space: cleanSpaceValue(space) || "none",
|
|
@@ -13,6 +13,9 @@ const lib_css_atoms_atoms_cjs = require("../../css/atoms/atoms.cjs");
|
|
|
13
13
|
const lib_hooks_useIcon_index_cjs = require("../../hooks/useIcon/index.cjs");
|
|
14
14
|
const lib_components_MenuItem_useMenuItem_css_cjs = require("./useMenuItem.css.cjs");
|
|
15
15
|
const lib_components_MenuRenderer_MenuRendererContext_cjs = require("../MenuRenderer/MenuRendererContext.cjs");
|
|
16
|
+
const lib_components_BraidProvider_BraidThemeContext_cjs = require("../BraidProvider/BraidThemeContext.cjs");
|
|
17
|
+
const lib_components_private_iconSlotSpace_cjs = require("../private/iconSlotSpace.cjs");
|
|
18
|
+
const lib_components_private_badgeSlotSpace_cjs = require("../private/badgeSlotSpace.cjs");
|
|
16
19
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
17
20
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
18
21
|
const {
|
|
@@ -26,7 +29,6 @@ const {
|
|
|
26
29
|
MENU_ITEM_HOVER
|
|
27
30
|
} = lib_components_MenuRenderer_MenuRenderer_actions_cjs.actionTypes;
|
|
28
31
|
const menuItemChildrenSize = "standard";
|
|
29
|
-
const menuItemPaddingSize = "small";
|
|
30
32
|
function useMenuItem({
|
|
31
33
|
displayName = "MenuItem",
|
|
32
34
|
formElement = false,
|
|
@@ -109,7 +111,7 @@ function useMenuItem({
|
|
|
109
111
|
lib_css_atoms_atoms_cjs.atoms({
|
|
110
112
|
display: "block",
|
|
111
113
|
width: "full",
|
|
112
|
-
paddingX:
|
|
114
|
+
paddingX: "small",
|
|
113
115
|
cursor: "pointer",
|
|
114
116
|
textAlign: "left",
|
|
115
117
|
outline: "none"
|
|
@@ -127,6 +129,9 @@ function MenuItemChildren({
|
|
|
127
129
|
formElement = false
|
|
128
130
|
}) {
|
|
129
131
|
const menuRendererContext = React.useContext(lib_components_MenuRenderer_MenuRendererContext_cjs.MenuRendererContext);
|
|
132
|
+
const legacy = lib_components_BraidProvider_BraidThemeContext_cjs.useBraidTheme().legacy;
|
|
133
|
+
const iconSpace = legacy ? "small" : lib_components_private_iconSlotSpace_cjs.iconSlotSpace;
|
|
134
|
+
const badgeSpace = legacy ? "small" : lib_components_private_badgeSlotSpace_cjs.badgeSlotSpace;
|
|
130
135
|
assert__default.default(
|
|
131
136
|
menuRendererContext !== null,
|
|
132
137
|
`MenuItem must be rendered as an immediate child of a menu. See the documentation for correct usage: https://seek-oss.github.io/braid-design-system/components/MenuItem`
|
|
@@ -157,7 +162,7 @@ function MenuItemChildren({
|
|
|
157
162
|
lib_components_Box_Box_cjs.Box,
|
|
158
163
|
{
|
|
159
164
|
component: "span",
|
|
160
|
-
paddingRight:
|
|
165
|
+
paddingRight: iconSpace,
|
|
161
166
|
flexShrink: 0,
|
|
162
167
|
minWidth: 0,
|
|
163
168
|
children: leftSlot
|
|
@@ -177,7 +182,7 @@ function MenuItemChildren({
|
|
|
177
182
|
lib_components_Box_Box_cjs.Box,
|
|
178
183
|
{
|
|
179
184
|
component: "span",
|
|
180
|
-
paddingLeft:
|
|
185
|
+
paddingLeft: badgeSpace,
|
|
181
186
|
flexShrink: 0,
|
|
182
187
|
minWidth: 0,
|
|
183
188
|
children: badge
|
|
@@ -12,6 +12,9 @@ import { atoms } from "../../css/atoms/atoms.mjs";
|
|
|
12
12
|
import { iconSize } from "../../hooks/useIcon/index.mjs";
|
|
13
13
|
import { menuItem } from "./useMenuItem.css.mjs";
|
|
14
14
|
import { MenuRendererContext } from "../MenuRenderer/MenuRendererContext.mjs";
|
|
15
|
+
import { useBraidTheme } from "../BraidProvider/BraidThemeContext.mjs";
|
|
16
|
+
import { iconSlotSpace } from "../private/iconSlotSpace.mjs";
|
|
17
|
+
import { badgeSlotSpace } from "../private/badgeSlotSpace.mjs";
|
|
15
18
|
const {
|
|
16
19
|
MENU_ITEM_UP,
|
|
17
20
|
MENU_ITEM_DOWN,
|
|
@@ -23,7 +26,6 @@ const {
|
|
|
23
26
|
MENU_ITEM_HOVER
|
|
24
27
|
} = actionTypes;
|
|
25
28
|
const menuItemChildrenSize = "standard";
|
|
26
|
-
const menuItemPaddingSize = "small";
|
|
27
29
|
function useMenuItem({
|
|
28
30
|
displayName = "MenuItem",
|
|
29
31
|
formElement = false,
|
|
@@ -106,7 +108,7 @@ function useMenuItem({
|
|
|
106
108
|
atoms({
|
|
107
109
|
display: "block",
|
|
108
110
|
width: "full",
|
|
109
|
-
paddingX:
|
|
111
|
+
paddingX: "small",
|
|
110
112
|
cursor: "pointer",
|
|
111
113
|
textAlign: "left",
|
|
112
114
|
outline: "none"
|
|
@@ -124,6 +126,9 @@ function MenuItemChildren({
|
|
|
124
126
|
formElement = false
|
|
125
127
|
}) {
|
|
126
128
|
const menuRendererContext = useContext(MenuRendererContext);
|
|
129
|
+
const legacy = useBraidTheme().legacy;
|
|
130
|
+
const iconSpace = legacy ? "small" : iconSlotSpace;
|
|
131
|
+
const badgeSpace = legacy ? "small" : badgeSlotSpace;
|
|
127
132
|
assert(
|
|
128
133
|
menuRendererContext !== null,
|
|
129
134
|
`MenuItem must be rendered as an immediate child of a menu. See the documentation for correct usage: https://seek-oss.github.io/braid-design-system/components/MenuItem`
|
|
@@ -154,7 +159,7 @@ function MenuItemChildren({
|
|
|
154
159
|
Box,
|
|
155
160
|
{
|
|
156
161
|
component: "span",
|
|
157
|
-
paddingRight:
|
|
162
|
+
paddingRight: iconSpace,
|
|
158
163
|
flexShrink: 0,
|
|
159
164
|
minWidth: 0,
|
|
160
165
|
children: leftSlot
|
|
@@ -174,7 +179,7 @@ function MenuItemChildren({
|
|
|
174
179
|
Box,
|
|
175
180
|
{
|
|
176
181
|
component: "span",
|
|
177
|
-
paddingLeft:
|
|
182
|
+
paddingLeft: badgeSpace,
|
|
178
183
|
flexShrink: 0,
|
|
179
184
|
minWidth: 0,
|
|
180
185
|
children: badge
|
|
@@ -3,6 +3,8 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
3
3
|
const lib_components_Box_Box_cjs = require("../Box/Box.cjs");
|
|
4
4
|
const lib_components_icons_IconTick_IconTick_cjs = require("../icons/IconTick/IconTick.cjs");
|
|
5
5
|
const lib_components_MenuItem_useMenuItem_cjs = require("../MenuItem/useMenuItem.cjs");
|
|
6
|
+
const lib_components_private_iconSlotSpace_cjs = require("../private/iconSlotSpace.cjs");
|
|
7
|
+
const lib_components_BraidProvider_BraidThemeContext_cjs = require("../BraidProvider/BraidThemeContext.cjs");
|
|
6
8
|
const lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs = require("./MenuItemCheckbox.css.cjs");
|
|
7
9
|
const MenuItemCheckbox = ({
|
|
8
10
|
children,
|
|
@@ -18,6 +20,8 @@ const MenuItemCheckbox = ({
|
|
|
18
20
|
data,
|
|
19
21
|
id
|
|
20
22
|
});
|
|
23
|
+
const legacy = lib_components_BraidProvider_BraidThemeContext_cjs.useBraidTheme().legacy;
|
|
24
|
+
const iconSpace = legacy ? "xsmall" : lib_components_private_iconSlotSpace_cjs.iconSlotSpace;
|
|
21
25
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22
26
|
lib_components_Box_Box_cjs.Box,
|
|
23
27
|
{
|
|
@@ -37,7 +41,7 @@ const MenuItemCheckbox = ({
|
|
|
37
41
|
boxShadow: "borderField",
|
|
38
42
|
position: "relative",
|
|
39
43
|
background: { lightMode: "surface" },
|
|
40
|
-
marginRight:
|
|
44
|
+
marginRight: iconSpace,
|
|
41
45
|
flexShrink: 0,
|
|
42
46
|
className: lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs.checkboxSize,
|
|
43
47
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2,6 +2,8 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from "../Box/Box.mjs";
|
|
3
3
|
import { IconTick } from "../icons/IconTick/IconTick.mjs";
|
|
4
4
|
import { useMenuItem } from "../MenuItem/useMenuItem.mjs";
|
|
5
|
+
import { iconSlotSpace } from "../private/iconSlotSpace.mjs";
|
|
6
|
+
import { useBraidTheme } from "../BraidProvider/BraidThemeContext.mjs";
|
|
5
7
|
import { checkboxSize } from "./MenuItemCheckbox.css.mjs";
|
|
6
8
|
const MenuItemCheckbox = ({
|
|
7
9
|
children,
|
|
@@ -17,6 +19,8 @@ const MenuItemCheckbox = ({
|
|
|
17
19
|
data,
|
|
18
20
|
id
|
|
19
21
|
});
|
|
22
|
+
const legacy = useBraidTheme().legacy;
|
|
23
|
+
const iconSpace = legacy ? "xsmall" : iconSlotSpace;
|
|
20
24
|
return /* @__PURE__ */ jsxs(
|
|
21
25
|
Box,
|
|
22
26
|
{
|
|
@@ -36,7 +40,7 @@ const MenuItemCheckbox = ({
|
|
|
36
40
|
boxShadow: "borderField",
|
|
37
41
|
position: "relative",
|
|
38
42
|
background: { lightMode: "surface" },
|
|
39
|
-
marginRight:
|
|
43
|
+
marginRight: iconSpace,
|
|
40
44
|
flexShrink: 0,
|
|
41
45
|
className: checkboxSize,
|
|
42
46
|
children: /* @__PURE__ */ jsx(
|
|
@@ -6,6 +6,7 @@ const lib_components_Box_Box_cjs = require("../Box/Box.cjs");
|
|
|
6
6
|
const lib_components_Text_Text_cjs = require("../Text/Text.cjs");
|
|
7
7
|
const lib_components_private_defaultTextProps_cjs = require("../private/defaultTextProps.cjs");
|
|
8
8
|
const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
|
|
9
|
+
const lib_components_private_iconSlotSpace_cjs = require("../private/iconSlotSpace.cjs");
|
|
9
10
|
const lib_components_icons_IconPositive_IconPositive_cjs = require("../icons/IconPositive/IconPositive.cjs");
|
|
10
11
|
const lib_components_icons_IconInfo_IconInfo_cjs = require("../icons/IconInfo/IconInfo.cjs");
|
|
11
12
|
const lib_components_icons_IconPromote_IconPromote_cjs = require("../icons/IconPromote/IconPromote.cjs");
|
|
@@ -30,7 +31,7 @@ const Notice = ({
|
|
|
30
31
|
"aria-live": "polite",
|
|
31
32
|
textAlign: "left",
|
|
32
33
|
...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
|
|
33
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_private_defaultTextProps_cjs.DefaultTextPropsProvider, { tone, children: /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Columns_Columns_cjs.Columns, { space:
|
|
34
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_private_defaultTextProps_cjs.DefaultTextPropsProvider, { tone, children: /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Columns_Columns_cjs.Columns, { space: lib_components_private_iconSlotSpace_cjs.iconSlotSpace, children: [
|
|
34
35
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Column_Column_cjs.Column, { width: "content", children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Text_Text_cjs.Text, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) }),
|
|
35
36
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Column_Column_cjs.Column, { children })
|
|
36
37
|
] }) })
|
|
@@ -5,6 +5,7 @@ import { Box } from "../Box/Box.mjs";
|
|
|
5
5
|
import { Text } from "../Text/Text.mjs";
|
|
6
6
|
import { DefaultTextPropsProvider } from "../private/defaultTextProps.mjs";
|
|
7
7
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
8
|
+
import { iconSlotSpace } from "../private/iconSlotSpace.mjs";
|
|
8
9
|
import { IconPositive } from "../icons/IconPositive/IconPositive.mjs";
|
|
9
10
|
import { IconInfo } from "../icons/IconInfo/IconInfo.mjs";
|
|
10
11
|
import { IconPromote } from "../icons/IconPromote/IconPromote.mjs";
|
|
@@ -29,7 +30,7 @@ const Notice = ({
|
|
|
29
30
|
"aria-live": "polite",
|
|
30
31
|
textAlign: "left",
|
|
31
32
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
32
|
-
children: /* @__PURE__ */ jsx(DefaultTextPropsProvider, { tone, children: /* @__PURE__ */ jsxs(Columns, { space:
|
|
33
|
+
children: /* @__PURE__ */ jsx(DefaultTextPropsProvider, { tone, children: /* @__PURE__ */ jsxs(Columns, { space: iconSlotSpace, children: [
|
|
33
34
|
/* @__PURE__ */ jsx(Column, { width: "content", children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx(Icon, {}) }) }),
|
|
34
35
|
/* @__PURE__ */ jsx(Column, { children })
|
|
35
36
|
] }) })
|