braid-design-system 33.10.0 → 33.10.1
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 +20 -41
- package/dist/index.d.mts +12 -8
- package/dist/index.d.ts +12 -8
- package/dist/lib/components/Badge/Badge.cjs +2 -2
- package/dist/lib/components/Badge/Badge.mjs +2 -2
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.cjs +13 -10
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.mjs +13 -10
- package/dist/lib/components/Button/Button.css.cjs +3 -1
- package/dist/lib/components/Button/Button.css.mjs +3 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.cjs +0 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.mjs +0 -1
- package/dist/lib/components/ButtonLink/ButtonLink.cjs +1 -0
- package/dist/lib/components/ButtonLink/ButtonLink.mjs +1 -0
- package/dist/lib/components/Pagination/Pagination.cjs +6 -4
- package/dist/lib/components/Pagination/Pagination.css.cjs +12 -0
- package/dist/lib/components/Pagination/Pagination.css.mjs +12 -0
- package/dist/lib/components/Pagination/Pagination.mjs +4 -2
- package/dist/lib/components/Table/Table.css.cjs +9 -4
- package/dist/lib/components/Table/Table.css.mjs +10 -5
- package/dist/lib/components/Table/TableCell.cjs +1 -1
- package/dist/lib/components/Table/TableCell.mjs +2 -2
- package/dist/lib/components/TextLinkButton/TextLinkButton.cjs +1 -0
- package/dist/lib/components/TextLinkButton/TextLinkButton.mjs +1 -0
- package/dist/lib/components/Textarea/Textarea.cjs +1 -0
- package/dist/lib/components/Textarea/Textarea.mjs +1 -0
- package/dist/lib/components/private/Modal/ModalContent.cjs +9 -8
- package/dist/lib/components/private/Modal/ModalContent.mjs +9 -8
- package/dist/lib/components/useToast/ToastContext.cjs +1 -4
- package/dist/lib/components/useToast/ToastContext.mjs +1 -4
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 33.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **useToast:** Clean up internal refactor ([#1837](https://github.com/seek-oss/braid-design-system/pull/1837))
|
|
8
|
+
|
|
9
|
+
- **Dialog, Drawer:** Refactor layout, ensure content area is the full height ([#1834](https://github.com/seek-oss/braid-design-system/pull/1834))
|
|
10
|
+
|
|
11
|
+
This change allows you to spread content to the bottom of a `Drawer`, for example with a `vertical` direction `Spread`.
|
|
12
|
+
|
|
13
|
+
- Ensure focus rings are consistent across components ([#1828](https://github.com/seek-oss/braid-design-system/pull/1828))
|
|
14
|
+
|
|
15
|
+
Aligns a few edge cases where focus rings were not consistent due to elements or aria roles not captured by the reset.
|
|
16
|
+
|
|
17
|
+
- **BraidTestProvider:** Align mock with real IntersectionObserver API ([#1837](https://github.com/seek-oss/braid-design-system/pull/1837))
|
|
18
|
+
|
|
19
|
+
- **Table:** Ensure `alignY` prop is applied consistently across browsers ([#1832](https://github.com/seek-oss/braid-design-system/pull/1832))
|
|
20
|
+
|
|
21
|
+
Fixes an issue where setting the `alignY` prop to `top` would not apply the `vertical-align` CSS property — instead falling through to our CSS reset which sets `vertical-align: baseline` (rendering inconsistently across browsers).
|
|
22
|
+
|
|
3
23
|
## 33.10.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -21,7 +41,6 @@
|
|
|
21
41
|
**MIGRATION GUIDE:**
|
|
22
42
|
|
|
23
43
|
For styling the focus ring via `Box`:
|
|
24
|
-
|
|
25
44
|
1. Remove usage of `outline="none"` and `boxShadow="outlineFocus"`
|
|
26
45
|
2. Refer to [`focus outlines`] for guidance on leveraging Braid's focus outline styles.
|
|
27
46
|
|
|
@@ -1024,7 +1043,6 @@ See full changelog below 👇
|
|
|
1024
1043
|
- Standardise `disabled` & `critical` state across form fields ([#1564](https://github.com/seek-oss/braid-design-system/pull/1564))
|
|
1025
1044
|
|
|
1026
1045
|
Improves the consistency of form fields when combining both `disabled` and `critical` tone, which includes:
|
|
1027
|
-
|
|
1028
1046
|
- Hiding `critical` borders
|
|
1029
1047
|
- Hiding `message` and not reserving space for it unless explicitly providing the `reserveMessageSpace` prop.
|
|
1030
1048
|
|
|
@@ -1656,7 +1674,6 @@ See full changelog below 👇
|
|
|
1656
1674
|
Our different approach to using colour has seen links dialled back to compete less with other messaging and CTAs.
|
|
1657
1675
|
|
|
1658
1676
|
This affects the following usages across the system:
|
|
1659
|
-
|
|
1660
1677
|
- `vars.foregroundColor.link`
|
|
1661
1678
|
- `Text` (using `tone="link"`)
|
|
1662
1679
|
- `TextLink` and (`TextLinkButton`)
|
|
@@ -2468,7 +2485,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
2468
2485
|
- **Tab, Tabs:** Updated visual design ([#1180](https://github.com/seek-oss/braid-design-system/pull/1180))
|
|
2469
2486
|
|
|
2470
2487
|
The appearance of a `Tab` has been updated. Changes include:
|
|
2471
|
-
|
|
2472
2488
|
- Tab button use `regular` text weight
|
|
2473
2489
|
- Hover state of inactive tab toggles `neutral` tone instead of underline
|
|
2474
2490
|
- Active tab indicator underlines content only, without the horizontal gutter and animates between tabs
|
|
@@ -3508,7 +3524,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3508
3524
|
|
|
3509
3525
|
**New foregrounds**
|
|
3510
3526
|
The following foregrounds are now available on the `vars.foregroundColor` theme object:
|
|
3511
|
-
|
|
3512
3527
|
- `cautionLight`
|
|
3513
3528
|
- `infoLight`
|
|
3514
3529
|
- `linkLight`
|
|
@@ -3769,12 +3784,10 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3769
3784
|
**TOKEN CHANGES**
|
|
3770
3785
|
|
|
3771
3786
|
**New**
|
|
3772
|
-
|
|
3773
3787
|
- **backgroundColor:** `surface`, `neutralSoft`
|
|
3774
3788
|
- **borderColor:** `neutral`, `neutralInverted`, `neutralLight`
|
|
3775
3789
|
|
|
3776
3790
|
**Removed**
|
|
3777
|
-
|
|
3778
3791
|
- **backgroundColor:** `card`, `formAccentDisabled`, `input`, `inputDisabled`, `selection`
|
|
3779
3792
|
- **borderColor:** `formHover`, `standard`, `standardInverted`
|
|
3780
3793
|
|
|
@@ -3868,7 +3881,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3868
3881
|
|
|
3869
3882
|
**New backgrounds**
|
|
3870
3883
|
The following backgrounds are now available:
|
|
3871
|
-
|
|
3872
3884
|
- `neutralActive`
|
|
3873
3885
|
- `neutralHover`
|
|
3874
3886
|
- `neutralSoftActive`
|
|
@@ -3876,7 +3888,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3876
3888
|
|
|
3877
3889
|
**New boxShadows**
|
|
3878
3890
|
The following box shadows are now available:
|
|
3879
|
-
|
|
3880
3891
|
- `borderBrandAccentLightLarge`
|
|
3881
3892
|
- `borderCriticalLightLarge`
|
|
3882
3893
|
- `borderFormAccentLight`
|
|
@@ -3886,7 +3897,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3886
3897
|
|
|
3887
3898
|
**New boxShadows**
|
|
3888
3899
|
The following box shadows are now available:
|
|
3889
|
-
|
|
3890
3900
|
- `borderBrandAccentLightLarge`
|
|
3891
3901
|
- `borderCriticalLightLarge`
|
|
3892
3902
|
- `borderFormAccentLight`
|
|
@@ -3900,7 +3910,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3900
3910
|
|
|
3901
3911
|
**New backgrounds**
|
|
3902
3912
|
The following backgrounds are now available on the `vars.backgroundColor` theme object:
|
|
3903
|
-
|
|
3904
3913
|
- `neutralActive`
|
|
3905
3914
|
- `neutralHover`
|
|
3906
3915
|
- `neutralSoftActive`
|
|
@@ -3908,7 +3917,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3908
3917
|
|
|
3909
3918
|
**New borderColors**
|
|
3910
3919
|
The following border colors are now available on the `vars.borderColor` theme object:
|
|
3911
|
-
|
|
3912
3920
|
- `brandAccentLight`
|
|
3913
3921
|
- `criticalLight`
|
|
3914
3922
|
- `formAccentLight`
|
|
@@ -3996,7 +4004,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3996
4004
|
- **Box:** Add new background and border colours ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
3997
4005
|
|
|
3998
4006
|
New `background` values:
|
|
3999
|
-
|
|
4000
4007
|
- `brandAccentSoft`
|
|
4001
4008
|
- `brandAccentSoftActive`
|
|
4002
4009
|
- `brandAccentSoftHover`
|
|
@@ -4008,7 +4015,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4008
4015
|
- `formAccentSoftHover`
|
|
4009
4016
|
|
|
4010
4017
|
New `boxShadow` values:
|
|
4011
|
-
|
|
4012
4018
|
- `borderCautionLight`
|
|
4013
4019
|
- `borderCriticalLight`
|
|
4014
4020
|
- `borderInfoLight`
|
|
@@ -4016,7 +4022,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4016
4022
|
- `borderPromoteLight`
|
|
4017
4023
|
|
|
4018
4024
|
- **atoms:** Add new `boxShadow` values: ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
4019
|
-
|
|
4020
4025
|
- `borderCautionLight`
|
|
4021
4026
|
- `borderCriticalLight`
|
|
4022
4027
|
- `borderInfoLight`
|
|
@@ -4026,7 +4031,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4026
4031
|
- **vars:** Add new background and border colours ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
4027
4032
|
|
|
4028
4033
|
New `backgroundColor` values:
|
|
4029
|
-
|
|
4030
4034
|
- `brandAccentSoft`
|
|
4031
4035
|
- `brandAccentSoftActive`
|
|
4032
4036
|
- `brandAccentSoftHover`
|
|
@@ -4038,7 +4042,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4038
4042
|
- `formAccentSoftHover`
|
|
4039
4043
|
|
|
4040
4044
|
New `borderColor` values:
|
|
4041
|
-
|
|
4042
4045
|
- `cautionLight`
|
|
4043
4046
|
- `criticalLight`
|
|
4044
4047
|
- `infoLight`
|
|
@@ -4116,7 +4119,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4116
4119
|
- Add `wide` breakpoint of 1200px ([#960](https://github.com/seek-oss/braid-design-system/pull/960))
|
|
4117
4120
|
|
|
4118
4121
|
This adds support for `wide` to the following touchpoints:
|
|
4119
|
-
|
|
4120
4122
|
- Responsive values, e.g.
|
|
4121
4123
|
```ts
|
|
4122
4124
|
{ mobile: 'small', wide: 'large' }
|
|
@@ -4255,7 +4257,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4255
4257
|
- Updated minimum browser requirement to browsers that support CSS variables ([#947](https://github.com/seek-oss/braid-design-system/pull/947))
|
|
4256
4258
|
|
|
4257
4259
|
For the major browsers this includes:
|
|
4258
|
-
|
|
4259
4260
|
- Chrome 49+
|
|
4260
4261
|
- iOS 9.3+
|
|
4261
4262
|
- Safari 9.1+
|
|
@@ -4272,7 +4273,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4272
4273
|
- Standardise breakpoints across all themes ([#947](https://github.com/seek-oss/braid-design-system/pull/947))
|
|
4273
4274
|
|
|
4274
4275
|
All themes now use the following breakpoints:
|
|
4275
|
-
|
|
4276
4276
|
- Mobile: `0px`
|
|
4277
4277
|
- Tablet: `740px`
|
|
4278
4278
|
- Desktop: `992px`
|
|
@@ -4282,16 +4282,13 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4282
4282
|
This is a change for the following themes:
|
|
4283
4283
|
|
|
4284
4284
|
**jobStreet, jobStreetClassic, jobsDb, occ, wireframe**
|
|
4285
|
-
|
|
4286
4285
|
- Tablet: `768px` → `740px`
|
|
4287
4286
|
|
|
4288
4287
|
**catho**
|
|
4289
|
-
|
|
4290
4288
|
- Tablet: `600px` → `740px`
|
|
4291
4289
|
- Desktop: `1024px` → `992px`
|
|
4292
4290
|
|
|
4293
4291
|
**docs**
|
|
4294
|
-
|
|
4295
4292
|
- Tablet: `768px` → `740px`
|
|
4296
4293
|
- Desktop: `1136px` → `992px`
|
|
4297
4294
|
|
|
@@ -4495,7 +4492,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4495
4492
|
To maintain accessibility, it is required to provide either a **aria-label** or **aria-labelledby** property, to describe the field's intent.
|
|
4496
4493
|
|
|
4497
4494
|
Given there is no visual label, the following features from a standard Checkbox cannot be supported:
|
|
4498
|
-
|
|
4499
4495
|
- description
|
|
4500
4496
|
- message
|
|
4501
4497
|
- badge
|
|
@@ -5543,13 +5539,11 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5543
5539
|
The following z-index palette is now available on `Box`:
|
|
5544
5540
|
|
|
5545
5541
|
**Local stacking**
|
|
5546
|
-
|
|
5547
5542
|
- `0`
|
|
5548
5543
|
- `1`
|
|
5549
5544
|
- `2`
|
|
5550
5545
|
|
|
5551
5546
|
**Global stacking**
|
|
5552
|
-
|
|
5553
5547
|
- `"dropdownBackdrop"`
|
|
5554
5548
|
- `"dropdown"`
|
|
5555
5549
|
- `"sticky"`
|
|
@@ -5673,7 +5667,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5673
5667
|
- Add `List` component ([#710](https://github.com/seek-oss/braid-design-system/pull/710))
|
|
5674
5668
|
|
|
5675
5669
|
`List` serves as a replacement for the `BulletList` and `Bullet` components which adds the following improvements:
|
|
5676
|
-
|
|
5677
5670
|
- Support for numbers and alpha characters as bullets
|
|
5678
5671
|
- Support for custom start positions in number/alpha lists
|
|
5679
5672
|
- Rich content support, e.g. list items with multiple paragraphs, nested lists, etc.
|
|
@@ -5738,7 +5731,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5738
5731
|
The `_LEGACY_SPACE_` prop was provided to support consumers migrating to [`v14`](https://github.com/seek-oss/braid-design-system/releases/tag/v14.0.0) when the white space cropping and layout components were originally introduced. This has now been removed to allow us to further improve on our approach.
|
|
5739
5732
|
|
|
5740
5733
|
Migrating off this prop will require consumers to perform the following steps:
|
|
5741
|
-
|
|
5742
5734
|
- Remove the usage of `_LEGACY_SPACE_` on a component
|
|
5743
5735
|
- Conduct a visual review of the impact (component will appear closer to neighbouring elements)
|
|
5744
5736
|
- Use existing layout components, e.g. `Stack`, to define/control the reintroduction of the desired space.
|
|
@@ -5823,7 +5815,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5823
5815
|
- **`seekBusiness` theme:** Inherit from new `apac` theme rather than the deprecated `seekAnz` theme ([#694](https://github.com/seek-oss/braid-design-system/pull/694))
|
|
5824
5816
|
|
|
5825
5817
|
Just like the migration from `seekAnz` to `apac`, the visual changes are as follows:
|
|
5826
|
-
|
|
5827
5818
|
- The body background has changed from `#eeeeee` to `#f5f6f8`.
|
|
5828
5819
|
- All grey colours now have a hint of blue.
|
|
5829
5820
|
- Buttons and form fields have decreased in height from `48px` to `44px`.
|
|
@@ -5854,7 +5845,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5854
5845
|
This component serves as a replacement for `ToggleContent` from [SEEK Style Guide.](https://github.com/seek-oss/seek-style-guide)
|
|
5855
5846
|
|
|
5856
5847
|
**SEEK STYLE GUIDE MIGRATION GUIDE**
|
|
5857
|
-
|
|
5858
5848
|
- `ToggleContent` has been renamed to `Disclosure`.
|
|
5859
5849
|
- The `onShowMore` prop has been renamed to `onToggle`.
|
|
5860
5850
|
- The spacing around the button has changed to follow [Braid's layout guidelines.](https://seek-oss.github.io/braid-design-system/foundations/layout) Design review is recommeded.
|
|
@@ -5895,7 +5885,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5895
5885
|
Consumers of the `seekAnz` theme are under no immediate pressure to migrate and both themes will be provided for the forseeable future. For now, this theme is aimed at those teams that are explicitly wanting to adopt newer design standards.
|
|
5896
5886
|
|
|
5897
5887
|
The visual changes to `seekAnz` are as follows:
|
|
5898
|
-
|
|
5899
5888
|
- The body background has changed from `#eeeeee` to `#f5f6f8`.
|
|
5900
5889
|
- All grey colours now have a hint of blue.
|
|
5901
5890
|
- Buttons and form fields have decreased in height from 48px to 44px.
|
|
@@ -5938,7 +5927,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5938
5927
|
- MonthPicker: Support custom month and year labels ([#672](https://github.com/seek-oss/braid-design-system/pull/672))
|
|
5939
5928
|
|
|
5940
5929
|
To support internationalisation, you can now pass the following props to `MonthPicker`:
|
|
5941
|
-
|
|
5942
5930
|
- **monthLabel** (`string`)
|
|
5943
5931
|
- **yearLabel** (`string`)
|
|
5944
5932
|
- **monthNames** (`string[]`)
|
|
@@ -6120,7 +6108,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6120
6108
|
- Improve field border contrast ratio ([#638](https://github.com/seek-oss/braid-design-system/pull/638))
|
|
6121
6109
|
|
|
6122
6110
|
To improve accessibility, field borders have been darkened for the following themes:
|
|
6123
|
-
|
|
6124
6111
|
- `seekAnz`
|
|
6125
6112
|
- `seekBusiness`
|
|
6126
6113
|
- `seekUnifiedBeta`
|
|
@@ -6329,7 +6316,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6329
6316
|
The implementation of internal spacing within fields has been adjusted to better support browser extensions for password managers.
|
|
6330
6317
|
|
|
6331
6318
|
Affects the following components:
|
|
6332
|
-
|
|
6333
6319
|
- PasswordField: visibility toggle button
|
|
6334
6320
|
- TextField: clear button
|
|
6335
6321
|
- Autosuggest: clear button
|
|
@@ -6343,7 +6329,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6343
6329
|
Field buttons, such as clear and password visibility toggle, fire on mouse down to ensure focus is retained on the relevant field. We now ensure that the button only recognises left mouse button clicks.
|
|
6344
6330
|
|
|
6345
6331
|
Affects the following components:
|
|
6346
|
-
|
|
6347
6332
|
- PasswordField: visibility toggle button
|
|
6348
6333
|
- TextField: clear button
|
|
6349
6334
|
- Autosuggest: clear button
|
|
@@ -6553,7 +6538,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6553
6538
|
- Drop lodash usage to decrease bundle size. ([#585](https://github.com/seek-oss/braid-design-system/pull/585))
|
|
6554
6539
|
|
|
6555
6540
|
This directly affects `MonthPicker` and any components using the `data` prop:
|
|
6556
|
-
|
|
6557
6541
|
- All field components
|
|
6558
6542
|
- OverflowMenu
|
|
6559
6543
|
- MenuRenderer
|
|
@@ -6610,7 +6594,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6610
6594
|
In order to make your custom link component available for any type of link (not just usages of `TextLink`), this release introduces a new `Link` component which renders an unstyled `a` tag by default.
|
|
6611
6595
|
|
|
6612
6596
|
**BREAKING CHANGES**
|
|
6613
|
-
|
|
6614
6597
|
- `TextLink` now requires an `href` prop. Even though this is unlikely to affect anyone (a `TextLink` without an `href` isn't terribly useful), this is still technically a breaking change.
|
|
6615
6598
|
|
|
6616
6599
|
However, if you find an instance of `TextLink` that you think _shouldn't_ have an `href`, this is a sign that it's not _actually_ a link and you should use a [`TextLinkRenderer`](https://seek-oss.github.io/braid-design-system/components/TextLinkRenderer) instead. Unfortunately, because there's no way for us to know the semantics of your usage ahead of time, we're unable to provide a migration guide, so you'll need to be mindful of how this might impact accessibility.
|
|
@@ -6737,7 +6720,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6737
6720
|
- Add customisable `MenuRenderer` component ([#514](https://github.com/seek-oss/braid-design-system/pull/514))
|
|
6738
6721
|
|
|
6739
6722
|
**BREAKING CHANGES**
|
|
6740
|
-
|
|
6741
6723
|
- Rename `OverflowMenuItem` to `MenuItem`.
|
|
6742
6724
|
- Removed `type="link"` from `OverflowMenuItem` due to an accessibility issue with the approach (based on review of consumer usage, it did not seem to be used).
|
|
6743
6725
|
|
|
@@ -6746,7 +6728,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6746
6728
|
**`MenuRenderer`**
|
|
6747
6729
|
|
|
6748
6730
|
Encapsulates all the behaviours of an accessible menu button, allowing consumers to define a custom `trigger` to open the menu. The trigger function receives two arguments:
|
|
6749
|
-
|
|
6750
6731
|
1. Props required for accessibility, including mouse/keyboard interactions
|
|
6751
6732
|
2. Menu state object containing the `open` state.
|
|
6752
6733
|
|
|
@@ -6807,7 +6788,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6807
6788
|
- Only show focus rings on buttons for keyboard navigation. ([#526](https://github.com/seek-oss/braid-design-system/pull/526))
|
|
6808
6789
|
|
|
6809
6790
|
This impacts the following components:
|
|
6810
|
-
|
|
6811
6791
|
- `Button`
|
|
6812
6792
|
- `ButtonRenderer`
|
|
6813
6793
|
- `OverflowMenu`
|
|
@@ -6854,5 +6834,4 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6854
6834
|
- 33139c8: Clone seekAnz theme to seekUnifiedBeta
|
|
6855
6835
|
|
|
6856
6836
|
BREAKING CHANGE
|
|
6857
|
-
|
|
6858
6837
|
- `jobsDbRebrand` theme has been removed
|
package/dist/index.d.mts
CHANGED
|
@@ -2811,10 +2811,10 @@ interface TextProps extends TypographyProps {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
declare const Text: ({ size: sizeProp, tone: toneProp, weight: weightProp, maxLines: maxLinesProp, baseline, ...typographyProps }: TextProps) => react.JSX.Element;
|
|
2813
2813
|
|
|
2814
|
-
declare const validTones
|
|
2814
|
+
declare const validTones: readonly ["neutral", "secondary"];
|
|
2815
2815
|
interface AccordionContextValue {
|
|
2816
2816
|
size?: TextProps['size'];
|
|
2817
|
-
tone?: (typeof validTones
|
|
2817
|
+
tone?: (typeof validTones)[number];
|
|
2818
2818
|
weight?: TextProps['weight'];
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
@@ -2831,12 +2831,13 @@ interface AccordionProps {
|
|
|
2831
2831
|
declare const Accordion$1: ({ children, size, tone, weight, space: spaceProp, dividers, data, ...restProps }: AccordionProps) => react.JSX.Element;
|
|
2832
2832
|
|
|
2833
2833
|
type ValueOrArray<T> = T | T[];
|
|
2834
|
-
declare const
|
|
2835
|
-
type Tone$2 = (typeof
|
|
2836
|
-
|
|
2834
|
+
declare const validBadgeTones: readonly ["promote", "info", "neutral", "positive", "caution", "critical"];
|
|
2835
|
+
type Tone$2 = (typeof validBadgeTones)[number];
|
|
2836
|
+
declare const validBadgeWeights: readonly ["strong", "regular"];
|
|
2837
|
+
type Weight = (typeof validBadgeWeights)[number];
|
|
2837
2838
|
interface BadgeProps {
|
|
2838
2839
|
tone?: Tone$2;
|
|
2839
|
-
weight?:
|
|
2840
|
+
weight?: Weight;
|
|
2840
2841
|
bleedY?: boolean;
|
|
2841
2842
|
title?: string;
|
|
2842
2843
|
children: ValueOrArray<string | number>;
|
|
@@ -2872,7 +2873,8 @@ declare const AccordionItem$1: ({ id, label, children, badge, size: sizeProp, to
|
|
|
2872
2873
|
declare const buttonTones: readonly ["formAccent", "brandAccent", "critical", "neutral"];
|
|
2873
2874
|
|
|
2874
2875
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
2875
|
-
|
|
2876
|
+
declare const buttonSizes: readonly ["standard", "small"];
|
|
2877
|
+
type ButtonSize = (typeof buttonSizes)[number];
|
|
2876
2878
|
type ButtonTone = (typeof buttonTones)[number];
|
|
2877
2879
|
type ButtonVariant = (typeof buttonVariants)[number];
|
|
2878
2880
|
interface ButtonStyleProps {
|
|
@@ -3754,10 +3756,12 @@ interface StrongProps {
|
|
|
3754
3756
|
}
|
|
3755
3757
|
declare const Strong: ({ children, data, id, ...restProps }: StrongProps) => react.JSX.Element;
|
|
3756
3758
|
|
|
3759
|
+
declare const alignY: Record<"top" | "center", string>;
|
|
3760
|
+
|
|
3757
3761
|
interface TableProps {
|
|
3758
3762
|
label: string;
|
|
3759
3763
|
children: ReactNode;
|
|
3760
|
-
alignY?:
|
|
3764
|
+
alignY?: keyof typeof alignY;
|
|
3761
3765
|
data?: DataAttributeMap;
|
|
3762
3766
|
}
|
|
3763
3767
|
declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2811,10 +2811,10 @@ interface TextProps extends TypographyProps {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
declare const Text: ({ size: sizeProp, tone: toneProp, weight: weightProp, maxLines: maxLinesProp, baseline, ...typographyProps }: TextProps) => react.JSX.Element;
|
|
2813
2813
|
|
|
2814
|
-
declare const validTones
|
|
2814
|
+
declare const validTones: readonly ["neutral", "secondary"];
|
|
2815
2815
|
interface AccordionContextValue {
|
|
2816
2816
|
size?: TextProps['size'];
|
|
2817
|
-
tone?: (typeof validTones
|
|
2817
|
+
tone?: (typeof validTones)[number];
|
|
2818
2818
|
weight?: TextProps['weight'];
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
@@ -2831,12 +2831,13 @@ interface AccordionProps {
|
|
|
2831
2831
|
declare const Accordion$1: ({ children, size, tone, weight, space: spaceProp, dividers, data, ...restProps }: AccordionProps) => react.JSX.Element;
|
|
2832
2832
|
|
|
2833
2833
|
type ValueOrArray<T> = T | T[];
|
|
2834
|
-
declare const
|
|
2835
|
-
type Tone$2 = (typeof
|
|
2836
|
-
|
|
2834
|
+
declare const validBadgeTones: readonly ["promote", "info", "neutral", "positive", "caution", "critical"];
|
|
2835
|
+
type Tone$2 = (typeof validBadgeTones)[number];
|
|
2836
|
+
declare const validBadgeWeights: readonly ["strong", "regular"];
|
|
2837
|
+
type Weight = (typeof validBadgeWeights)[number];
|
|
2837
2838
|
interface BadgeProps {
|
|
2838
2839
|
tone?: Tone$2;
|
|
2839
|
-
weight?:
|
|
2840
|
+
weight?: Weight;
|
|
2840
2841
|
bleedY?: boolean;
|
|
2841
2842
|
title?: string;
|
|
2842
2843
|
children: ValueOrArray<string | number>;
|
|
@@ -2872,7 +2873,8 @@ declare const AccordionItem$1: ({ id, label, children, badge, size: sizeProp, to
|
|
|
2872
2873
|
declare const buttonTones: readonly ["formAccent", "brandAccent", "critical", "neutral"];
|
|
2873
2874
|
|
|
2874
2875
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
2875
|
-
|
|
2876
|
+
declare const buttonSizes: readonly ["standard", "small"];
|
|
2877
|
+
type ButtonSize = (typeof buttonSizes)[number];
|
|
2876
2878
|
type ButtonTone = (typeof buttonTones)[number];
|
|
2877
2879
|
type ButtonVariant = (typeof buttonVariants)[number];
|
|
2878
2880
|
interface ButtonStyleProps {
|
|
@@ -3754,10 +3756,12 @@ interface StrongProps {
|
|
|
3754
3756
|
}
|
|
3755
3757
|
declare const Strong: ({ children, data, id, ...restProps }: StrongProps) => react.JSX.Element;
|
|
3756
3758
|
|
|
3759
|
+
declare const alignY: Record<"top" | "center", string>;
|
|
3760
|
+
|
|
3757
3761
|
interface TableProps {
|
|
3758
3762
|
label: string;
|
|
3759
3763
|
children: ReactNode;
|
|
3760
|
-
alignY?:
|
|
3764
|
+
alignY?: keyof typeof alignY;
|
|
3761
3765
|
data?: DataAttributeMap;
|
|
3762
3766
|
}
|
|
3763
3767
|
declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
|
@@ -13,7 +13,7 @@ const lib_components_Badge_defaultBadgeProps_cjs = require("./defaultBadgeProps.
|
|
|
13
13
|
const lib_components_Badge_Badge_css_cjs = require("./Badge.css.cjs");
|
|
14
14
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
15
15
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
16
|
-
const
|
|
16
|
+
const validBadgeTones = [
|
|
17
17
|
"promote",
|
|
18
18
|
"info",
|
|
19
19
|
"neutral",
|
|
@@ -52,7 +52,7 @@ const Badge = react.forwardRef(
|
|
|
52
52
|
...restProps
|
|
53
53
|
}, ref) => {
|
|
54
54
|
assert__default.default(
|
|
55
|
-
|
|
55
|
+
validBadgeTones.indexOf(tone) >= 0,
|
|
56
56
|
`Badge tone of "${tone}" is not valid.`
|
|
57
57
|
);
|
|
58
58
|
assert__default.default(
|
|
@@ -10,7 +10,7 @@ import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
|
10
10
|
import { DefaultTextPropsProvider } from "../private/defaultTextProps.mjs";
|
|
11
11
|
import { useDefaultBadgeProps } from "./defaultBadgeProps.mjs";
|
|
12
12
|
import { inline, verticalPadding } from "./Badge.css.mjs";
|
|
13
|
-
const
|
|
13
|
+
const validBadgeTones = [
|
|
14
14
|
"promote",
|
|
15
15
|
"info",
|
|
16
16
|
"neutral",
|
|
@@ -49,7 +49,7 @@ const Badge = forwardRef(
|
|
|
49
49
|
...restProps
|
|
50
50
|
}, ref) => {
|
|
51
51
|
assert(
|
|
52
|
-
|
|
52
|
+
validBadgeTones.indexOf(tone) >= 0,
|
|
53
53
|
`Badge tone of "${tone}" is not valid.`
|
|
54
54
|
);
|
|
55
55
|
assert(
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2
5
|
var _a;
|
|
3
6
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
7
|
const lib_themes_index_cjs = require("../../themes/index.cjs");
|
|
@@ -12,21 +15,21 @@ if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navi
|
|
|
12
15
|
});
|
|
13
16
|
class MockResizeObserver {
|
|
14
17
|
constructor() {
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
-
this
|
|
18
|
+
__publicField(this, "observe", noop);
|
|
19
|
+
__publicField(this, "unobserve", noop);
|
|
20
|
+
__publicField(this, "disconnect", noop);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
window.ResizeObserver = MockResizeObserver;
|
|
21
24
|
class MockIntersectionObserver {
|
|
22
25
|
constructor() {
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
29
|
-
this
|
|
26
|
+
__publicField(this, "root", null);
|
|
27
|
+
__publicField(this, "rootMargin", "");
|
|
28
|
+
__publicField(this, "thresholds", []);
|
|
29
|
+
__publicField(this, "observe", noop);
|
|
30
|
+
__publicField(this, "unobserve", noop);
|
|
31
|
+
__publicField(this, "disconnect", noop);
|
|
32
|
+
__publicField(this, "takeRecords", () => []);
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
window.IntersectionObserver = MockIntersectionObserver;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
var _a;
|
|
2
5
|
import { jsx } from "react/jsx-runtime";
|
|
3
6
|
import { themes } from "../../themes/index.mjs";
|
|
@@ -11,21 +14,21 @@ if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navi
|
|
|
11
14
|
});
|
|
12
15
|
class MockResizeObserver {
|
|
13
16
|
constructor() {
|
|
14
|
-
this
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
+
__publicField(this, "observe", noop);
|
|
18
|
+
__publicField(this, "unobserve", noop);
|
|
19
|
+
__publicField(this, "disconnect", noop);
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
window.ResizeObserver = MockResizeObserver;
|
|
20
23
|
class MockIntersectionObserver {
|
|
21
24
|
constructor() {
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
25
|
+
__publicField(this, "root", null);
|
|
26
|
+
__publicField(this, "rootMargin", "");
|
|
27
|
+
__publicField(this, "thresholds", []);
|
|
28
|
+
__publicField(this, "observe", noop);
|
|
29
|
+
__publicField(this, "unobserve", noop);
|
|
30
|
+
__publicField(this, "disconnect", noop);
|
|
31
|
+
__publicField(this, "takeRecords", () => []);
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
window.IntersectionObserver = MockIntersectionObserver;
|
|
@@ -10,7 +10,9 @@ fileScope.setFileScope("src/lib/components/Button/Button.css.ts", "braid-design-
|
|
|
10
10
|
const root = css.style({
|
|
11
11
|
textDecoration: "none",
|
|
12
12
|
// Necessary to overwrite Safari's default value for 'align-items' in 'button' elements (which is 'flex-start')
|
|
13
|
-
alignItems: "stretch"
|
|
13
|
+
alignItems: "stretch",
|
|
14
|
+
// Necessary to overwrite browser default for 'a' elements (which is '1px'), keeping Button & ButtonLink uniform.
|
|
15
|
+
outlineOffset: 0
|
|
14
16
|
}, "root");
|
|
15
17
|
const forceActive = css.style({}, "forceActive");
|
|
16
18
|
const activeAnimation = css.style({
|
|
@@ -9,7 +9,9 @@ setFileScope("src/lib/components/Button/Button.css.ts", "braid-design-system");
|
|
|
9
9
|
const root = style({
|
|
10
10
|
textDecoration: "none",
|
|
11
11
|
// Necessary to overwrite Safari's default value for 'align-items' in 'button' elements (which is 'flex-start')
|
|
12
|
-
alignItems: "stretch"
|
|
12
|
+
alignItems: "stretch",
|
|
13
|
+
// Necessary to overwrite browser default for 'a' elements (which is '1px'), keeping Button & ButtonLink uniform.
|
|
14
|
+
outlineOffset: 0
|
|
13
15
|
}, "root");
|
|
14
16
|
const forceActive = style({}, "forceActive");
|
|
15
17
|
const activeAnimation = style({
|
|
@@ -13,7 +13,6 @@ const lib_components_Pagination_Pagination_css_cjs = require("./Pagination.css.c
|
|
|
13
13
|
const lib_components_icons_IconChevron_IconChevron_cjs = require("../icons/IconChevron/IconChevron.cjs");
|
|
14
14
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
15
15
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
16
|
-
const borderRadius = "standard";
|
|
17
16
|
const PageNav = ({
|
|
18
17
|
label,
|
|
19
18
|
direction
|
|
@@ -37,7 +36,7 @@ const PageNav = ({
|
|
|
37
36
|
{
|
|
38
37
|
component: "span",
|
|
39
38
|
background: "formAccentSoft",
|
|
40
|
-
borderRadius,
|
|
39
|
+
borderRadius: lib_components_Pagination_Pagination_css_cjs.borderRadius,
|
|
41
40
|
transition: "fast",
|
|
42
41
|
className: lib_components_Pagination_Pagination_css_cjs.background
|
|
43
42
|
}
|
|
@@ -82,7 +81,7 @@ const Page = ({ number, current }) => {
|
|
|
82
81
|
component: "span",
|
|
83
82
|
background: current ? "formAccent" : "formAccentSoft",
|
|
84
83
|
transition: current ? void 0 : "fast",
|
|
85
|
-
borderRadius,
|
|
84
|
+
borderRadius: lib_components_Pagination_Pagination_css_cjs.borderRadius,
|
|
86
85
|
className: [lib_components_Pagination_Pagination_css_cjs.background, current ? lib_components_Pagination_Pagination_css_cjs.current : void 0]
|
|
87
86
|
}
|
|
88
87
|
),
|
|
@@ -90,7 +89,7 @@ const Page = ({ number, current }) => {
|
|
|
90
89
|
lib_components_private_Overlay_Overlay_cjs.Overlay,
|
|
91
90
|
{
|
|
92
91
|
component: "span",
|
|
93
|
-
borderRadius,
|
|
92
|
+
borderRadius: lib_components_Pagination_Pagination_css_cjs.borderRadius,
|
|
94
93
|
boxShadow: "borderFormAccent",
|
|
95
94
|
className: {
|
|
96
95
|
[lib_components_Pagination_Pagination_css_cjs.lightModeCurrentKeyline]: isLegacyTheme && parentBackground.lightMode !== "surface" && current,
|
|
@@ -161,6 +160,7 @@ const Pagination = ({
|
|
|
161
160
|
title: previousLabel,
|
|
162
161
|
"aria-hidden": !showPrevious,
|
|
163
162
|
tabIndex: !showPrevious ? -1 : void 0,
|
|
163
|
+
className: lib_components_Pagination_Pagination_css_cjs.focusRing,
|
|
164
164
|
children: /* @__PURE__ */ jsxRuntime.jsx(PageNav, { label: previousLabel, direction: "prev" })
|
|
165
165
|
}
|
|
166
166
|
)
|
|
@@ -184,6 +184,7 @@ const Pagination = ({
|
|
|
184
184
|
"aria-label": pageLabel(pageNumber),
|
|
185
185
|
"aria-current": current ? "page" : void 0,
|
|
186
186
|
title: pageLabel(pageNumber),
|
|
187
|
+
className: lib_components_Pagination_Pagination_css_cjs.focusRing,
|
|
187
188
|
children: /* @__PURE__ */ jsxRuntime.jsx(Page, { number: pageNumber, current })
|
|
188
189
|
}
|
|
189
190
|
)
|
|
@@ -211,6 +212,7 @@ const Pagination = ({
|
|
|
211
212
|
title: nextLabel,
|
|
212
213
|
"aria-hidden": !showNext,
|
|
213
214
|
tabIndex: !showNext ? -1 : void 0,
|
|
215
|
+
className: lib_components_Pagination_Pagination_css_cjs.focusRing,
|
|
214
216
|
children: /* @__PURE__ */ jsxRuntime.jsx(PageNav, { label: nextLabel, direction: "next" })
|
|
215
217
|
}
|
|
216
218
|
)
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
3
|
const css = require("@vanilla-extract/css");
|
|
4
|
+
const lib_css_atoms_atoms_cjs = require("../../css/atoms/atoms.cjs");
|
|
4
5
|
const lib_css_colorModeStyle_cjs = require("../../css/colorModeStyle.cjs");
|
|
5
6
|
fileScope.setFileScope("src/lib/components/Pagination/Pagination.css.ts", "braid-design-system");
|
|
7
|
+
const borderRadius = "standard";
|
|
8
|
+
const focusRing = css.style([{
|
|
9
|
+
// Necessary to overwrite browser default for 'a' elements (which is '1px').
|
|
10
|
+
outlineOffset: 0
|
|
11
|
+
}, lib_css_atoms_atoms_cjs.atoms({
|
|
12
|
+
display: "block",
|
|
13
|
+
outline: "focus",
|
|
14
|
+
borderRadius
|
|
15
|
+
})], "focusRing");
|
|
6
16
|
const hover = css.style({}, "hover");
|
|
7
17
|
const lightModeCurrentKeyline = css.style(lib_css_colorModeStyle_cjs.colorModeStyle({
|
|
8
18
|
lightMode: {
|
|
@@ -26,7 +36,9 @@ const background = css.style({
|
|
|
26
36
|
}, "background");
|
|
27
37
|
fileScope.endFileScope();
|
|
28
38
|
exports.background = background;
|
|
39
|
+
exports.borderRadius = borderRadius;
|
|
29
40
|
exports.current = current;
|
|
30
41
|
exports.darkModeCurrentKeyline = darkModeCurrentKeyline;
|
|
42
|
+
exports.focusRing = focusRing;
|
|
31
43
|
exports.hover = hover;
|
|
32
44
|
exports.lightModeCurrentKeyline = lightModeCurrentKeyline;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { atoms } from "../../css/atoms/atoms.mjs";
|
|
3
4
|
import { colorModeStyle } from "../../css/colorModeStyle.mjs";
|
|
4
5
|
setFileScope("src/lib/components/Pagination/Pagination.css.ts", "braid-design-system");
|
|
6
|
+
const borderRadius = "standard";
|
|
7
|
+
const focusRing = style([{
|
|
8
|
+
// Necessary to overwrite browser default for 'a' elements (which is '1px').
|
|
9
|
+
outlineOffset: 0
|
|
10
|
+
}, atoms({
|
|
11
|
+
display: "block",
|
|
12
|
+
outline: "focus",
|
|
13
|
+
borderRadius
|
|
14
|
+
})], "focusRing");
|
|
5
15
|
const hover = style({}, "hover");
|
|
6
16
|
const lightModeCurrentKeyline = style(colorModeStyle({
|
|
7
17
|
lightMode: {
|
|
@@ -26,8 +36,10 @@ const background = style({
|
|
|
26
36
|
endFileScope();
|
|
27
37
|
export {
|
|
28
38
|
background,
|
|
39
|
+
borderRadius,
|
|
29
40
|
current,
|
|
30
41
|
darkModeCurrentKeyline,
|
|
42
|
+
focusRing,
|
|
31
43
|
hover,
|
|
32
44
|
lightModeCurrentKeyline
|
|
33
45
|
};
|
|
@@ -8,9 +8,8 @@ import { Text } from "../Text/Text.mjs";
|
|
|
8
8
|
import { Overlay } from "../private/Overlay/Overlay.mjs";
|
|
9
9
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
10
10
|
import { paginate } from "./paginate.mjs";
|
|
11
|
-
import { hover, background, current, darkModeCurrentKeyline, lightModeCurrentKeyline } from "./Pagination.css.mjs";
|
|
11
|
+
import { focusRing, hover, background, borderRadius, current, darkModeCurrentKeyline, lightModeCurrentKeyline } from "./Pagination.css.mjs";
|
|
12
12
|
import { IconChevron } from "../icons/IconChevron/IconChevron.mjs";
|
|
13
|
-
const borderRadius = "standard";
|
|
14
13
|
const PageNav = ({
|
|
15
14
|
label,
|
|
16
15
|
direction
|
|
@@ -158,6 +157,7 @@ const Pagination = ({
|
|
|
158
157
|
title: previousLabel,
|
|
159
158
|
"aria-hidden": !showPrevious,
|
|
160
159
|
tabIndex: !showPrevious ? -1 : void 0,
|
|
160
|
+
className: focusRing,
|
|
161
161
|
children: /* @__PURE__ */ jsx(PageNav, { label: previousLabel, direction: "prev" })
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -181,6 +181,7 @@ const Pagination = ({
|
|
|
181
181
|
"aria-label": pageLabel(pageNumber),
|
|
182
182
|
"aria-current": current2 ? "page" : void 0,
|
|
183
183
|
title: pageLabel(pageNumber),
|
|
184
|
+
className: focusRing,
|
|
184
185
|
children: /* @__PURE__ */ jsx(Page, { number: pageNumber, current: current2 })
|
|
185
186
|
}
|
|
186
187
|
)
|
|
@@ -208,6 +209,7 @@ const Pagination = ({
|
|
|
208
209
|
title: nextLabel,
|
|
209
210
|
"aria-hidden": !showNext,
|
|
210
211
|
tabIndex: !showNext ? -1 : void 0,
|
|
212
|
+
className: focusRing,
|
|
211
213
|
children: /* @__PURE__ */ jsx(PageNav, { label: nextLabel, direction: "next" })
|
|
212
214
|
}
|
|
213
215
|
)
|
|
@@ -42,9 +42,14 @@ css.globalStyle(`${tableSection}:not(${tableHeader}) > ${row} > ${headCell}:not(
|
|
|
42
42
|
css.globalStyle(`${tableSection}:not(:first-child) > ${row}:first-child > ${cell}`, {
|
|
43
43
|
borderTop: sectionBorder
|
|
44
44
|
});
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const alignY = css.styleVariants({
|
|
46
|
+
center: {
|
|
47
|
+
verticalAlign: "middle"
|
|
48
|
+
},
|
|
49
|
+
top: {
|
|
50
|
+
verticalAlign: "top"
|
|
51
|
+
}
|
|
52
|
+
}, "alignY");
|
|
48
53
|
const nowrap = css.style({
|
|
49
54
|
whiteSpace: "nowrap"
|
|
50
55
|
}, "nowrap");
|
|
@@ -76,7 +81,7 @@ const showOnWide = css.style(lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
|
76
81
|
}
|
|
77
82
|
}), "showOnWide");
|
|
78
83
|
fileScope.endFileScope();
|
|
79
|
-
exports.
|
|
84
|
+
exports.alignY = alignY;
|
|
80
85
|
exports.cell = cell;
|
|
81
86
|
exports.headCell = headCell;
|
|
82
87
|
exports.maxWidth = maxWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style, createVar, globalStyle } from "@vanilla-extract/css";
|
|
2
|
+
import { style, createVar, styleVariants, globalStyle } from "@vanilla-extract/css";
|
|
3
3
|
import { colorModeStyle } from "../../css/colorModeStyle.mjs";
|
|
4
4
|
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
5
5
|
import { vars } from "../../themes/vars.css.mjs";
|
|
@@ -41,9 +41,14 @@ globalStyle(`${tableSection}:not(${tableHeader}) > ${row} > ${headCell}:not(:las
|
|
|
41
41
|
globalStyle(`${tableSection}:not(:first-child) > ${row}:first-child > ${cell}`, {
|
|
42
42
|
borderTop: sectionBorder
|
|
43
43
|
});
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const alignY = styleVariants({
|
|
45
|
+
center: {
|
|
46
|
+
verticalAlign: "middle"
|
|
47
|
+
},
|
|
48
|
+
top: {
|
|
49
|
+
verticalAlign: "top"
|
|
50
|
+
}
|
|
51
|
+
}, "alignY");
|
|
47
52
|
const nowrap = style({
|
|
48
53
|
whiteSpace: "nowrap"
|
|
49
54
|
}, "nowrap");
|
|
@@ -76,7 +81,7 @@ const showOnWide = style(responsiveStyle({
|
|
|
76
81
|
}), "showOnWide");
|
|
77
82
|
endFileScope();
|
|
78
83
|
export {
|
|
79
|
-
|
|
84
|
+
alignY,
|
|
80
85
|
cell,
|
|
81
86
|
headCell,
|
|
82
87
|
maxWidth,
|
|
@@ -70,7 +70,7 @@ const Cell = react.forwardRef(
|
|
|
70
70
|
[lib_components_Table_Table_css_cjs.softWidth]: softWidth,
|
|
71
71
|
[lib_components_Table_Table_css_cjs.minWidth]: typeof minWidth !== "undefined",
|
|
72
72
|
[lib_components_Table_Table_css_cjs.maxWidth]: hasMaxWidth,
|
|
73
|
-
[lib_components_Table_Table_css_cjs.
|
|
73
|
+
[lib_components_Table_Table_css_cjs.alignY[tableContext.alignY]]: true,
|
|
74
74
|
[lib_components_Table_Table_css_cjs.showOnTablet]: !hideOnTablet && hideOnMobile,
|
|
75
75
|
[lib_components_Table_Table_css_cjs.showOnDesktop]: !hideOnDesktop && (hideOnTablet || hideOnMobile),
|
|
76
76
|
[lib_components_Table_Table_css_cjs.showOnWide]: !hideOnWide && (hideOnDesktop || hideOnTablet || hideOnMobile)
|
|
@@ -9,7 +9,7 @@ import { Inline } from "../Inline/Inline.mjs";
|
|
|
9
9
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
10
10
|
import { DefaultTextPropsProvider } from "../private/defaultTextProps.mjs";
|
|
11
11
|
import { TableHeaderContext, TableRowContext, TableFooterContext, TableContext } from "./TableContext.mjs";
|
|
12
|
-
import { maxWidthVar, minWidthVar, softWidthVar, showOnWide, showOnDesktop, showOnTablet,
|
|
12
|
+
import { maxWidthVar, minWidthVar, softWidthVar, showOnWide, showOnDesktop, showOnTablet, alignY, maxWidth, minWidth, softWidth, nowrap, headCell, cell } from "./Table.css.mjs";
|
|
13
13
|
const resolveSoftWidth = (width) => {
|
|
14
14
|
if (width === "content") {
|
|
15
15
|
return "1%";
|
|
@@ -67,7 +67,7 @@ const Cell = forwardRef(
|
|
|
67
67
|
[softWidth]: softWidth$1,
|
|
68
68
|
[minWidth]: typeof minWidth$1 !== "undefined",
|
|
69
69
|
[maxWidth]: hasMaxWidth,
|
|
70
|
-
[
|
|
70
|
+
[alignY[tableContext.alignY]]: true,
|
|
71
71
|
[showOnTablet]: !hideOnTablet && hideOnMobile,
|
|
72
72
|
[showOnDesktop]: !hideOnDesktop && (hideOnTablet || hideOnMobile),
|
|
73
73
|
[showOnWide]: !hideOnWide && (hideOnDesktop || hideOnTablet || hideOnMobile)
|
|
@@ -6,8 +6,6 @@ const lib_hooks_useFallbackId_cjs = require("../../../hooks/useFallbackId.cjs");
|
|
|
6
6
|
const lib_components_Bleed_Bleed_cjs = require("../../Bleed/Bleed.cjs");
|
|
7
7
|
const lib_components_Box_Box_cjs = require("../../Box/Box.cjs");
|
|
8
8
|
const lib_components_ButtonIcon_ButtonIcon_cjs = require("../../ButtonIcon/ButtonIcon.cjs");
|
|
9
|
-
const lib_components_Column_Column_cjs = require("../../Column/Column.cjs");
|
|
10
|
-
const lib_components_Columns_Columns_cjs = require("../../Columns/Columns.cjs");
|
|
11
9
|
const lib_components_Heading_Heading_cjs = require("../../Heading/Heading.cjs");
|
|
12
10
|
const lib_components_PageBlock_PageBlock_cjs = require("../../PageBlock/PageBlock.cjs");
|
|
13
11
|
const lib_components_Stack_Stack_cjs = require("../../Stack/Stack.cjs");
|
|
@@ -109,9 +107,12 @@ const ModalContent = ({
|
|
|
109
107
|
noRelative: true,
|
|
110
108
|
forwardProps: true,
|
|
111
109
|
enabled: scrollLock,
|
|
112
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
110
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
111
|
lib_components_Box_Box_cjs.Box,
|
|
114
112
|
{
|
|
113
|
+
display: "flex",
|
|
114
|
+
gap: "large",
|
|
115
|
+
flexDirection: "column",
|
|
115
116
|
background: "surface",
|
|
116
117
|
borderRadius: modalRadius,
|
|
117
118
|
overflow: "auto",
|
|
@@ -125,7 +126,7 @@ const ModalContent = ({
|
|
|
125
126
|
position === "center" && lib_components_private_Modal_Modal_css_cjs.maxSize[position]
|
|
126
127
|
],
|
|
127
128
|
...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
|
|
128
|
-
children:
|
|
129
|
+
children: [
|
|
129
130
|
illustration ? /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Stack_Stack_cjs.Stack, { space: "medium", align: "center", children: [
|
|
130
131
|
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { paddingX: "gutter", children: illustration }),
|
|
131
132
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -139,8 +140,8 @@ const ModalContent = ({
|
|
|
139
140
|
ref: headingRef
|
|
140
141
|
}
|
|
141
142
|
)
|
|
142
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
143
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
143
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(lib_components_Box_Box_cjs.Box, { display: "flex", children: [
|
|
144
|
+
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { width: "full", minWidth: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
144
145
|
ModalContentHeader,
|
|
145
146
|
{
|
|
146
147
|
title,
|
|
@@ -151,10 +152,10 @@ const ModalContent = ({
|
|
|
151
152
|
ref: headingRef
|
|
152
153
|
}
|
|
153
154
|
) }),
|
|
154
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
/* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { width: "touchable", flexShrink: 0, flexGrow: 0 })
|
|
155
156
|
] }),
|
|
156
157
|
/* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children })
|
|
157
|
-
]
|
|
158
|
+
]
|
|
158
159
|
}
|
|
159
160
|
)
|
|
160
161
|
}
|
|
@@ -5,8 +5,6 @@ import { useFallbackId } from "../../../hooks/useFallbackId.mjs";
|
|
|
5
5
|
import { Bleed } from "../../Bleed/Bleed.mjs";
|
|
6
6
|
import { Box } from "../../Box/Box.mjs";
|
|
7
7
|
import { ButtonIcon } from "../../ButtonIcon/ButtonIcon.mjs";
|
|
8
|
-
import { Column } from "../../Column/Column.mjs";
|
|
9
|
-
import { Columns } from "../../Columns/Columns.mjs";
|
|
10
8
|
import { Heading } from "../../Heading/Heading.mjs";
|
|
11
9
|
import { gutters } from "../../PageBlock/PageBlock.mjs";
|
|
12
10
|
import { Stack } from "../../Stack/Stack.mjs";
|
|
@@ -108,9 +106,12 @@ const ModalContent = ({
|
|
|
108
106
|
noRelative: true,
|
|
109
107
|
forwardProps: true,
|
|
110
108
|
enabled: scrollLock,
|
|
111
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ jsxs(
|
|
112
110
|
Box,
|
|
113
111
|
{
|
|
112
|
+
display: "flex",
|
|
113
|
+
gap: "large",
|
|
114
|
+
flexDirection: "column",
|
|
114
115
|
background: "surface",
|
|
115
116
|
borderRadius: modalRadius,
|
|
116
117
|
overflow: "auto",
|
|
@@ -124,7 +125,7 @@ const ModalContent = ({
|
|
|
124
125
|
position === "center" && maxSize[position]
|
|
125
126
|
],
|
|
126
127
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
127
|
-
children:
|
|
128
|
+
children: [
|
|
128
129
|
illustration ? /* @__PURE__ */ jsxs(Stack, { space: "medium", align: "center", children: [
|
|
129
130
|
/* @__PURE__ */ jsx(Box, { paddingX: "gutter", children: illustration }),
|
|
130
131
|
/* @__PURE__ */ jsx(
|
|
@@ -138,8 +139,8 @@ const ModalContent = ({
|
|
|
138
139
|
ref: headingRef
|
|
139
140
|
}
|
|
140
141
|
)
|
|
141
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
142
|
-
/* @__PURE__ */ jsx(
|
|
142
|
+
] }) : /* @__PURE__ */ jsxs(Box, { display: "flex", children: [
|
|
143
|
+
/* @__PURE__ */ jsx(Box, { width: "full", minWidth: 0, children: /* @__PURE__ */ jsx(
|
|
143
144
|
ModalContentHeader,
|
|
144
145
|
{
|
|
145
146
|
title,
|
|
@@ -150,10 +151,10 @@ const ModalContent = ({
|
|
|
150
151
|
ref: headingRef
|
|
151
152
|
}
|
|
152
153
|
) }),
|
|
153
|
-
/* @__PURE__ */ jsx(
|
|
154
|
+
/* @__PURE__ */ jsx(Box, { width: "touchable", flexShrink: 0, flexGrow: 0 })
|
|
154
155
|
] }),
|
|
155
156
|
/* @__PURE__ */ jsx(Fragment, { children })
|
|
156
|
-
]
|
|
157
|
+
]
|
|
157
158
|
}
|
|
158
159
|
)
|
|
159
160
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const react = require("react");
|
|
4
4
|
const lib_components_BraidPortal_BraidPortal_cjs = require("../BraidPortal/BraidPortal.cjs");
|
|
5
|
-
const lib_components_BraidProvider_BraidThemeContext_cjs = require("../BraidProvider/BraidThemeContext.cjs");
|
|
6
5
|
const lib_components_useToast_Toaster_cjs = require("./Toaster.cjs");
|
|
7
6
|
let toastCounter = 0;
|
|
8
7
|
const ToastControllerContext = react.createContext(null);
|
|
@@ -102,7 +101,6 @@ const ToastPortal = ({ children }) => {
|
|
|
102
101
|
return /* @__PURE__ */ jsxRuntime.jsx(lib_components_BraidPortal_BraidPortal_cjs.BraidPortal, { container: toastElement, children });
|
|
103
102
|
};
|
|
104
103
|
const useToast = () => {
|
|
105
|
-
const { vanillaTheme } = lib_components_BraidProvider_BraidThemeContext_cjs.useBraidTheme();
|
|
106
104
|
const addToast = react.useContext(ToastControllerContext);
|
|
107
105
|
if (addToast === null) {
|
|
108
106
|
throw new Error('No "ToastProvider" configured');
|
|
@@ -114,13 +112,12 @@ const useToast = () => {
|
|
|
114
112
|
const dedupeKey = key ?? toastKey;
|
|
115
113
|
addToast({
|
|
116
114
|
...rest,
|
|
117
|
-
vanillaTheme,
|
|
118
115
|
toastKey,
|
|
119
116
|
dedupeKey,
|
|
120
117
|
shouldRemove: false
|
|
121
118
|
});
|
|
122
119
|
},
|
|
123
|
-
[
|
|
120
|
+
[addToast]
|
|
124
121
|
);
|
|
125
122
|
};
|
|
126
123
|
exports.ToastProvider = ToastProvider;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useContext, createContext, Fragment, useCallback, useReducer, useState, useEffect } from "react";
|
|
3
3
|
import { BraidPortal } from "../BraidPortal/BraidPortal.mjs";
|
|
4
|
-
import { useBraidTheme } from "../BraidProvider/BraidThemeContext.mjs";
|
|
5
4
|
import { Toaster } from "./Toaster.mjs";
|
|
6
5
|
let toastCounter = 0;
|
|
7
6
|
const ToastControllerContext = createContext(null);
|
|
@@ -101,7 +100,6 @@ const ToastPortal = ({ children }) => {
|
|
|
101
100
|
return /* @__PURE__ */ jsx(BraidPortal, { container: toastElement, children });
|
|
102
101
|
};
|
|
103
102
|
const useToast = () => {
|
|
104
|
-
const { vanillaTheme } = useBraidTheme();
|
|
105
103
|
const addToast = useContext(ToastControllerContext);
|
|
106
104
|
if (addToast === null) {
|
|
107
105
|
throw new Error('No "ToastProvider" configured');
|
|
@@ -113,13 +111,12 @@ const useToast = () => {
|
|
|
113
111
|
const dedupeKey = key ?? toastKey;
|
|
114
112
|
addToast({
|
|
115
113
|
...rest,
|
|
116
|
-
vanillaTheme,
|
|
117
114
|
toastKey,
|
|
118
115
|
dedupeKey,
|
|
119
116
|
shouldRemove: false
|
|
120
117
|
});
|
|
121
118
|
},
|
|
122
|
-
[
|
|
119
|
+
[addToast]
|
|
123
120
|
);
|
|
124
121
|
};
|
|
125
122
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "33.10.
|
|
3
|
+
"version": "33.10.1",
|
|
4
4
|
"description": "Themeable design system for the SEEK Group",
|
|
5
5
|
"homepage": "https://seek-oss.github.io/braid-design-system/",
|
|
6
6
|
"bugs": {
|
|
@@ -186,8 +186,7 @@
|
|
|
186
186
|
"devDependencies": {
|
|
187
187
|
"@babel/core": "^7.26.0",
|
|
188
188
|
"@babel/plugin-transform-typescript": "^7.20.13",
|
|
189
|
-
"@storybook/react": "
|
|
190
|
-
"@storybook/react-webpack5": "7.6.20",
|
|
189
|
+
"@storybook/react-webpack5": "9.0.15",
|
|
191
190
|
"@svgr/core": "^5.5.0",
|
|
192
191
|
"@svgr/plugin-jsx": "^5.5.0",
|
|
193
192
|
"@svgr/plugin-prettier": "^5.5.0",
|
|
@@ -197,8 +196,9 @@
|
|
|
197
196
|
"@testing-library/user-event": "^14.4.3",
|
|
198
197
|
"@types/autosuggest-highlight": "^3.1.1",
|
|
199
198
|
"@types/babel__core": "^7.20.1",
|
|
199
|
+
"@types/gradient-parser": "^0.1.5",
|
|
200
200
|
"@types/lodash.curry": "^4.1.9",
|
|
201
|
-
"@types/node": "^
|
|
201
|
+
"@types/node": "^22.16.0",
|
|
202
202
|
"@types/react": "^18.3.18",
|
|
203
203
|
"@types/react-dom": "^18.3.0",
|
|
204
204
|
"@types/react-is": "^18.3.0",
|
|
@@ -210,18 +210,18 @@
|
|
|
210
210
|
"babel-plugin-transform-remove-imports": "^1.7.0",
|
|
211
211
|
"change-case": "^4.1.2",
|
|
212
212
|
"cheerio": "1.0.0-rc.11",
|
|
213
|
-
"chromatic": "^
|
|
213
|
+
"chromatic": "^13.1.2",
|
|
214
214
|
"fast-glob": "^3.3.2",
|
|
215
215
|
"fs-extra": "^10.1.0",
|
|
216
|
-
"html-validate": "^9.7.
|
|
216
|
+
"html-validate": "^9.7.1",
|
|
217
217
|
"playroom": "0.44.0",
|
|
218
218
|
"prettier": "^3.4.1",
|
|
219
219
|
"react": "^18.3.1",
|
|
220
220
|
"react-dom": "^18.3.1",
|
|
221
221
|
"react-router-dom": "^6.3.0",
|
|
222
222
|
"sanitize-html": "^2.12.1",
|
|
223
|
-
"sku": "14.
|
|
224
|
-
"storybook": "
|
|
223
|
+
"sku": "14.8.0",
|
|
224
|
+
"storybook": "9.0.15",
|
|
225
225
|
"svgo": "^2.8.0",
|
|
226
226
|
"title-case": "^3.0.3",
|
|
227
227
|
"@braid-design-system/source.macro": "1.0.0"
|
|
@@ -241,8 +241,8 @@
|
|
|
241
241
|
"lint:prettier": "prettier --cache --list-different .",
|
|
242
242
|
"lint:tsc": "tsc",
|
|
243
243
|
"storybook": "storybook dev",
|
|
244
|
-
"storybook:build": "storybook build",
|
|
245
|
-
"storybook:chromatic": "chromatic --storybook-build-dir ./storybook-static --exit-zero-on-changes --exit-once-uploaded --auto-accept-changes master",
|
|
244
|
+
"storybook:build": "storybook build --stats-json",
|
|
245
|
+
"storybook:chromatic": "chromatic --only-changed --untraced './packages/!(braid-design-system)/**' --storybook-build-dir ./storybook-static --exit-zero-on-changes --exit-once-uploaded --auto-accept-changes master",
|
|
246
246
|
"%skott": "skott --displayMode=file-tree --showCircularDependencies --no-trackTypeOnlyDependencies",
|
|
247
247
|
"validate:src": "pnpm %skott src",
|
|
248
248
|
"validate:dist": "pnpm %skott dist/index.mjs"
|