@7shifts/sous-chef 4.16.0 → 4.17.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.
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ type BulletSize = 'small' | 'medium' | 'large' | 'extra-large';
3
+ type Props = {
4
+ /**
5
+ * What the bullet shows: a Sous Chef icon, e.g. `<IconCheck />`, or one or two characters of text, e.g. `"A"` or `"DK"`.
6
+ * - Icon: Bullet sets the icon's `size` to fit the bullet (12, 16, 20 or 40px) and adds `aria-hidden`, so put the meaning in the text next to the bullet. The icon takes the content colour of `theme` and `emphasis`.
7
+ * - Text: shown as you pass it and read by screen readers. Bullet doesn't uppercase or shorten it, so keep it to two characters or it spills out of the circle.
8
+ */
9
+ children: React.ReactNode;
10
+ /** Colour of the bullet. Pair it with `emphasis` to choose between the solid colour and its lighter container colour. */
11
+ theme?: 'default' | 'primary' | 'secondary' | 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'upsell';
12
+ /** `bold` fills the circle with the theme colour. `subtle` uses the theme's container colour with a darker content colour, for a bullet that draws less attention. */
13
+ emphasis?: 'bold' | 'subtle';
14
+ /** How big the bullet is: `small` (20px), `medium` (30px), `large` (40px) or `extra-large` (80px). The same scale as `Avatar`, so a bullet lines up with an avatar of the same size. */
15
+ size?: BulletSize;
16
+ testId?: string;
17
+ };
18
+ /**
19
+ * Bullet shows a single icon, or one or two characters of text, inside a small coloured circle.
20
+ */
21
+ declare const Bullet: ({ children, theme, emphasis, size, testId }: Props) => React.JSX.Element;
22
+ export default Bullet;
@@ -0,0 +1 @@
1
+ export { default } from './Bullet';
@@ -1,6 +1,7 @@
1
1
  import Badge from './Badge';
2
2
  import Avatar from './Avatar';
3
+ import Bullet from './Bullet';
3
4
  import Chip from './Chip';
4
5
  import Pill from './Pill';
5
6
  import ShortcutKey from './ShortcutKey';
6
- export { Badge, Avatar, Chip, Pill, ShortcutKey };
7
+ export { Badge, Avatar, Bullet, Chip, Pill, ShortcutKey };
@@ -256,6 +256,10 @@ Avatar represents a person or entity — such as a company, location, department
256
256
 
257
257
  Badge is a small circular indicator used to draw attention to something associated with another element — a count, a status, or a quick action. It always appears in relation to something else, never on its own.
258
258
 
259
+ ### Bullet
260
+
261
+ Bullet shows a single icon, or one or two characters of text, inside a small coloured circle.
262
+
259
263
  ### Chip
260
264
 
261
265
  A chip is similar looking to pill, but is instead used to convey system status such as "New", "Beta", or "Add-on"
@@ -92,7 +92,7 @@ IconAddressBook IconFaceSmileRelaxed IconFileUser IconGrinBeam IconHand IconHand
92
92
 
93
93
  #### Image
94
94
 
95
- IconBirthdayCake IconBolt IconBriefcase IconBullseyeArrow IconClipboardList IconColorPalette IconDownload IconFilePdf IconFlag IconFourDotsCircle IconFourSquares IconGavel IconGif IconGift IconGlobe IconHatChef IconIslandTropical IconLaptopSearch IconMagic IconMapMarker IconMedal IconMugSaucer IconNotesMedical IconPlateUtensils IconPlug IconRocket IconSchool IconSparkle IconStickyNoteLines IconStore IconTachometer IconTemperature IconThreeSquares IconUniversity
95
+ IconBirthdayCake IconBolt IconBriefcase IconBullseyeArrow IconClipboardList IconColorPalette IconDownload IconFilePdf IconFlag IconFourDotsCircle IconFourSquares IconGavel IconGif IconGift IconGlobe IconHatChef IconIslandTropical IconKnifeFork IconLaptopSearch IconMagic IconMapMarker IconMedal IconMugSaucer IconNotesMedical IconPlateUtensils IconPlug IconRocket IconSchool IconSparkle IconStickyNoteLines IconStore IconTachometer IconTemperature IconThreeSquares IconUniversity
96
96
 
97
97
  #### Status
98
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",