@7shifts/sous-chef 4.10.3 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foundation/tokens/color/color-codes.d.ts +3 -1
- package/dist/foundation/tokens/color/color-constants.d.ts +2 -0
- package/dist/foundation/tokens/color/color-types.d.ts +1 -1
- package/dist/hooks/useScrollDetector.d.ts +2 -2
- package/dist/icons/components/status/IconInfinity.d.ts +10 -0
- package/dist/icons/components/status/index.d.ts +1 -0
- package/dist/index.css +85 -51
- package/dist/index.css.map +1 -1
- package/dist/index.js +480 -450
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +527 -491
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/Modal/Modal.d.ts +3 -1
- package/dist/overlay/Modal/ModalContext.d.ts +1 -0
- package/dist/overlay/Modal/ModalHeader/ModalHeader.d.ts +2 -1
- package/llms-instructions/guidelines/Pill.guidelines.md +0 -1
- package/llms-instructions/guidelines/ShortcutKey.guidelines.md +61 -0
- package/llms-instructions/llms-components.md +4 -0
- package/llms-instructions/llms-icons-and-illustrations.md +5 -0
- package/llms-instructions/llms-tokens.md +6 -5
- package/package.json +1 -1
|
@@ -17,6 +17,8 @@ type Props = {
|
|
|
17
17
|
maxWidth?: number | string;
|
|
18
18
|
shouldReturnFocusAfterClose?: boolean;
|
|
19
19
|
testId?: string;
|
|
20
|
+
/** The source URL for the image to be displayed in the modal header. */
|
|
21
|
+
imageSrc?: string;
|
|
20
22
|
/** Enables drag-to-reposition. The overlay becomes transparent and the modal can be moved by dragging its header. */
|
|
21
23
|
draggable?: boolean;
|
|
22
24
|
/** Initial screen position when draggable is true. Defaults to centered horizontally at 25% from top. */
|
|
@@ -29,7 +31,7 @@ type Props = {
|
|
|
29
31
|
* Modal is a focused overlay that interrupts the current experience and demands the user's attention. It blocks all interaction with the rest of the page until the user responds — making it best suited for decisions, confirmations, and self-contained flows where that level of focus is warranted.
|
|
30
32
|
*/
|
|
31
33
|
declare const Modal: {
|
|
32
|
-
({ children, header, subHeader, onClose, loading, zIndex, rootElementId, width, height, maxWidth, shouldReturnFocusAfterClose, testId, draggable, initialPosition, ...otherProps }: Props): React.JSX.Element;
|
|
34
|
+
({ children, header, subHeader, onClose, loading, zIndex, rootElementId, width, height, maxWidth, shouldReturnFocusAfterClose, testId, imageSrc, draggable, initialPosition, ...otherProps }: Props): React.JSX.Element;
|
|
33
35
|
setAppElement(rootElement: string | HTMLElement): void;
|
|
34
36
|
};
|
|
35
37
|
export default Modal;
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
subHeader?: React.ReactNode;
|
|
5
5
|
onClose?: () => void;
|
|
6
6
|
loading?: boolean;
|
|
7
|
+
imageSrc?: string;
|
|
7
8
|
};
|
|
8
|
-
declare const ModalHeader: ({ header, subHeader, onClose, loading }: Props) => React.JSX.Element
|
|
9
|
+
declare const ModalHeader: ({ header, subHeader, onClose, loading, imageSrc }: Props) => React.JSX.Element;
|
|
9
10
|
export default ModalHeader;
|
|
@@ -51,5 +51,4 @@ Pill's theme controls its colour and signals the nature of the status at a glanc
|
|
|
51
51
|
## Additional Rules
|
|
52
52
|
|
|
53
53
|
- `theme` defaults to `default` if not specified.
|
|
54
|
-
- When `children` is a string or non-numeric value, an `alphabetical` style variant is applied automatically for appropriate letter-spacing and padding.
|
|
55
54
|
- Pill accepts a forwarded ref, making it usable as an anchor for tooltips or popovers when additional context is needed.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED by scripts/build-llms-guidelines.js. Do not edit manually. Run `yarn build-llms-guidelines` to regenerate. -->
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
|
|
5
|
+
- As a suffix in a dropdown menu item to show the keyboard shortcut for that action
|
|
6
|
+
- Inside a tooltip associated with a button or icon to reveal its shortcut
|
|
7
|
+
- In body copy or instructional text when teaching a user a specific key combination
|
|
8
|
+
- Anywhere a keyboard shortcut needs to be communicated inline alongside its associated action
|
|
9
|
+
|
|
10
|
+
## When Not to Use
|
|
11
|
+
|
|
12
|
+
- As a standalone element without a clear association to a command, tool, or action — ShortcutKey must always appear next to what it triggers so users understand what the shortcut does
|
|
13
|
+
- To communicate more than three keys — the maximum supported is three
|
|
14
|
+
- As an interactive element — ShortcutKey is display-only and has no hover, focus, or active states
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Key combinations
|
|
19
|
+
|
|
20
|
+
ShortcutKey supports one, two, or three key slots. Use the minimum number of keys that accurately represent the shortcut:
|
|
21
|
+
|
|
22
|
+
| Combo | When to use | Example |
|
|
23
|
+
| ------ | --------------------------------------------------------------- | --------------- |
|
|
24
|
+
| 1 key | Single-key shortcuts — a letter, number, function key, or arrow | `Z`, `F5`, `↑` |
|
|
25
|
+
| 2 keys | Two-key combinations — typically a modifier + a key | `⌘ Z`, `Ctrl V` |
|
|
26
|
+
| 3 keys | Three-key combinations — modifier + modifier + key | `⌘ ⇧ Z` |
|
|
27
|
+
|
|
28
|
+
Do not use more than three keys. If a shortcut requires four or more keys, it is too complex to represent with this component.
|
|
29
|
+
|
|
30
|
+
### Key types
|
|
31
|
+
|
|
32
|
+
The `keys` prop accepts named special keys and plain character strings:
|
|
33
|
+
|
|
34
|
+
| Category | `keys` value(s) | Displays |
|
|
35
|
+
| ----------------- | ----------------------------------------------------------------------- | ------------------------- |
|
|
36
|
+
| Alphanumeric | Any single character A-Z, 0-9 or punctuation keys — `'Z'`, `'1'`, `'/'` | The character, uppercased |
|
|
37
|
+
| Mac modifiers | `'command'`, `'option'`, `'shift'`, `'control'`, `'fn'` | ⌘ ⌥ ⇧ ⌃ Fn |
|
|
38
|
+
| Windows modifiers | `'ctrl'`, `'alt'`, `'shift'` | Ctrl Alt ⇧ |
|
|
39
|
+
| Special keys | `'enter'`, `'delete'`, `'escape'`, `'tab'`, `'capslock'` | ⏎ ⌫ Esc ↹ ⇪ |
|
|
40
|
+
| Arrow keys | `'arrow-left'`, `'arrow-right'`, `'arrow-up'`, `'arrow-down'` | ← → ↑ ↓ |
|
|
41
|
+
| Function keys | `'f1'` through `'f12'` | F1 … F12 |
|
|
42
|
+
|
|
43
|
+
### Mac vs. Windows
|
|
44
|
+
|
|
45
|
+
Use platform-appropriate modifier keys for the audience. When showing Mac shortcuts, use `'command'`, `'option'`, and `'control'`. When showing Windows shortcuts, use `'ctrl'` and `'alt'`. `'shift'` is shared across both platforms.
|
|
46
|
+
|
|
47
|
+
## Tips & Tricks
|
|
48
|
+
|
|
49
|
+
- ShortcutKey should never appear without its associated command in view. A user seeing `⌘ Z` in isolation cannot know what it does — place it where the action label or context makes it self-evident.
|
|
50
|
+
- Modifier keys should come first in the key order, followed by the primary key. Conventional order: Ctrl/Command → Alt/Option → Shift → Key.
|
|
51
|
+
- Use ShortcutKey consistently. If `⌘ Z` is shown for "Undo" in one menu, it should use the same component anywhere else in the product where the same shortcut is referenced.
|
|
52
|
+
- Do not use ShortcutKey to label shortcuts that do not actually work in the current context — showing a shortcut that doesn't function erodes trust.
|
|
53
|
+
- When using a key that shares characters (such as `? and /`, `: and ;` or `+ and =`) always use the character that does not require the shift modifyer to input.
|
|
54
|
+
|
|
55
|
+
## Additional Rules
|
|
56
|
+
|
|
57
|
+
- `keys` accepts 1, 2, or 3 values. Passing an empty array or more than 3 values is not supported.
|
|
58
|
+
- Alphanumeric key values are displayed uppercase regardless of how they are passed.
|
|
59
|
+
- The component renders with `role="img"` and an auto-generated `aria-label` that describes the full key combination in plain English (e.g. "Command + Shift + Z"). No manual `aria-label` is needed.
|
|
60
|
+
- ShortcutKey has no hover, active, or focus states — it is purely presentational.
|
|
61
|
+
- `user-select: none` is applied so users cannot accidentally select the key cap characters when selecting nearby text.
|
|
@@ -216,6 +216,10 @@ A chip is similar looking to pill, but is instead used to convey system status s
|
|
|
216
216
|
|
|
217
217
|
A Pill is used to inform users on the status of a nearby object or of an action that’s been taken. The default state is used to convey general status or state, such as: Pending Unavailable, Inactive.
|
|
218
218
|
|
|
219
|
+
### ShortcutKey
|
|
220
|
+
|
|
221
|
+
ShortcutKey is a display-only component used to communicate a keyboard shortcut associated with an action, tool, or command. It supports 1–3 key combinations and should always appear alongside the action it triggers.
|
|
222
|
+
|
|
219
223
|
## Layout
|
|
220
224
|
|
|
221
225
|
Layout components structure and arrange the content of a page.
|
|
@@ -47,6 +47,7 @@ Available icon components:
|
|
|
47
47
|
- IconArrowDown
|
|
48
48
|
- IconArrowDownWideShort
|
|
49
49
|
- IconArrowLeft
|
|
50
|
+
- IconArrowLeftRight
|
|
50
51
|
- IconArrowRight
|
|
51
52
|
- IconArrowToTop
|
|
52
53
|
- IconArrowTurnDownRight
|
|
@@ -94,6 +95,7 @@ Available icon components:
|
|
|
94
95
|
- IconComment
|
|
95
96
|
- IconCommentLines
|
|
96
97
|
- IconEnvelope
|
|
98
|
+
- IconLanguage
|
|
97
99
|
- IconMessages
|
|
98
100
|
- IconMicrophone
|
|
99
101
|
- IconMobile
|
|
@@ -119,10 +121,12 @@ Available icon components:
|
|
|
119
121
|
- IconGripVertical
|
|
120
122
|
- IconHouse
|
|
121
123
|
- IconImage
|
|
124
|
+
- IconInputText
|
|
122
125
|
- IconItalic
|
|
123
126
|
- IconLink
|
|
124
127
|
- IconList
|
|
125
128
|
- IconListOl
|
|
129
|
+
- IconListRadio
|
|
126
130
|
- IconLock
|
|
127
131
|
- IconMemoMagnifyingGlass
|
|
128
132
|
- IconMinus
|
|
@@ -233,6 +237,7 @@ Available icon components:
|
|
|
233
237
|
- IconDeleteLeft
|
|
234
238
|
- IconExclamation
|
|
235
239
|
- IconExclamationTriangle
|
|
240
|
+
- IconInfinity
|
|
236
241
|
- IconInfoCircle
|
|
237
242
|
- IconQuestionCircle
|
|
238
243
|
- IconTimesOctagon
|
|
@@ -83,7 +83,7 @@ Instead, try to use a semantic color token instead.
|
|
|
83
83
|
| --color-oat-300 | #c7c0b2 |
|
|
84
84
|
| --color-oat-400 | #6e6d6c |
|
|
85
85
|
| --color-oat-500 | #4c4b49 |
|
|
86
|
-
| --color-oat-600 | #
|
|
86
|
+
| --color-oat-600 | #413E3E |
|
|
87
87
|
| --color-lime-100 | #efffe0 |
|
|
88
88
|
| --color-lime-200 | #c6ff94 |
|
|
89
89
|
| --color-lime-300 | #81ffac |
|
|
@@ -366,10 +366,11 @@ Ideally, you won't need to use the typography tokens, as you will be using the S
|
|
|
366
366
|
|
|
367
367
|
### Font family
|
|
368
368
|
|
|
369
|
-
| Token | Value
|
|
370
|
-
| --------------------- |
|
|
371
|
-
| --font-family-heading | '
|
|
372
|
-
| --font-family-body | '
|
|
369
|
+
| Token | Value |
|
|
370
|
+
| --------------------- | ------------------- |
|
|
371
|
+
| --font-family-heading | 'Inter', sans-serif |
|
|
372
|
+
| --font-family-body | 'Inter', sans-serif |
|
|
373
|
+
| --font-family-primary | 'Inter', sans-serif |
|
|
373
374
|
|
|
374
375
|
### Font size
|
|
375
376
|
|