@7shifts/sous-chef 4.7.1 → 4.8.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.
Files changed (72) hide show
  1. package/dist/empty_states/EmptyState/EmptyState.d.ts +3 -0
  2. package/dist/empty_states/Paywall/Paywall.d.ts +3 -0
  3. package/dist/feedback/CircularProgress/CircularProgress.d.ts +3 -0
  4. package/dist/feedback/InlineBanner/InlineBanner.d.ts +3 -0
  5. package/dist/feedback/MicroBanner/MicroBanner.d.ts +3 -0
  6. package/dist/feedback/PersistentBanner/PersistentBanner.d.ts +3 -0
  7. package/dist/feedback/ProgressBar/ProgressBar.d.ts +3 -0
  8. package/dist/feedback/Skeleton/Skeleton.d.ts +3 -0
  9. package/dist/forms/ColorField/ColorField.d.ts +3 -0
  10. package/dist/forms/FormFeedback/FormFeedback.d.ts +3 -0
  11. package/dist/forms/FormFooter/FormFooter.d.ts +3 -0
  12. package/dist/forms/FormSection/FormSection.d.ts +3 -0
  13. package/dist/forms/PhoneField/PhoneField.d.ts +3 -0
  14. package/dist/forms/TextField/TextField.d.ts +3 -1
  15. package/dist/forms/WeekSelectField/WeekSelectField.d.ts +3 -0
  16. package/dist/icons/components/arrows/IconArrowLeftRight.d.ts +10 -0
  17. package/dist/icons/components/arrows/index.d.ts +1 -0
  18. package/dist/icons/components/communication/IconLanguage.d.ts +10 -0
  19. package/dist/icons/components/communication/index.d.ts +1 -0
  20. package/dist/icons/components/controls/IconInputText.d.ts +10 -0
  21. package/dist/icons/components/controls/IconListRadio.d.ts +10 -0
  22. package/dist/icons/components/controls/index.d.ts +2 -0
  23. package/dist/index.css +1 -1
  24. package/dist/index.css.map +1 -1
  25. package/dist/index.js +433 -152
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.modern.js +430 -153
  28. package/dist/index.modern.js.map +1 -1
  29. package/dist/layout/Card/Card.d.ts +3 -0
  30. package/dist/layout/Page/Page.d.ts +3 -0
  31. package/dist/lists/Accordion/Accordion.d.ts +3 -0
  32. package/dist/lists/ActionList/ActionList.d.ts +3 -0
  33. package/dist/lists/DataTable/DataTable.d.ts +3 -0
  34. package/dist/media/Avatar/Avatar.d.ts +3 -0
  35. package/dist/media/Badge/Badge.d.ts +4 -1
  36. package/dist/media/Chip/Chip.d.ts +3 -0
  37. package/dist/media/Pill/Pill.d.ts +3 -0
  38. package/dist/navigation/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  39. package/dist/navigation/PrimaryNav/PrimaryNav.d.ts +3 -0
  40. package/dist/navigation/Tabs/Tabs.d.ts +3 -0
  41. package/dist/overlay/Calendar/Calendar.d.ts +3 -1
  42. package/dist/overlay/Dropdown/Dropdown.d.ts +3 -0
  43. package/dist/overlay/HintModal/HintModal.d.ts +3 -0
  44. package/dist/overlay/Modal/Modal.d.ts +3 -0
  45. package/dist/overlay/Popover/Popover.d.ts +3 -0
  46. package/dist/overlay/Tooltip/Tooltip.d.ts +3 -0
  47. package/llms-instructions/guidelines/AsyncSelectField.guidelines.md +20 -0
  48. package/llms-instructions/guidelines/Avatar.guidelines.md +1 -0
  49. package/llms-instructions/guidelines/Breadcrumbs.guidelines.md +1 -0
  50. package/llms-instructions/guidelines/CheckboxField.guidelines.md +20 -0
  51. package/llms-instructions/guidelines/ColorField.guidelines.md +18 -0
  52. package/llms-instructions/guidelines/CurrencyField.guidelines.md +28 -0
  53. package/llms-instructions/guidelines/DateField.guidelines.md +22 -0
  54. package/llms-instructions/guidelines/DateRangeField.guidelines.md +21 -0
  55. package/llms-instructions/guidelines/MultiSelectField.guidelines.md +22 -0
  56. package/llms-instructions/guidelines/NumberField.guidelines.md +29 -0
  57. package/llms-instructions/guidelines/PaginationControls.guidelines.md +1 -0
  58. package/llms-instructions/guidelines/PasswordField.guidelines.md +20 -0
  59. package/llms-instructions/guidelines/PercentageField.guidelines.md +22 -0
  60. package/llms-instructions/guidelines/PhoneField.guidelines.md +23 -0
  61. package/llms-instructions/guidelines/PillSelectField.guidelines.md +22 -0
  62. package/llms-instructions/guidelines/RadioGroupField.guidelines.md +20 -0
  63. package/llms-instructions/guidelines/SelectField.guidelines.md +24 -0
  64. package/llms-instructions/guidelines/Tabs.guidelines.md +4 -0
  65. package/llms-instructions/guidelines/TextAreaField.guidelines.md +25 -0
  66. package/llms-instructions/guidelines/TextField.guidelines.md +22 -0
  67. package/llms-instructions/guidelines/TimeField.guidelines.md +23 -0
  68. package/llms-instructions/guidelines/TimeRangeField.guidelines.md +19 -0
  69. package/llms-instructions/guidelines/WeekField.guidelines.md +20 -0
  70. package/llms-instructions/guidelines/WeekSelectField.guidelines.md +1 -0
  71. package/llms-instructions/llms-components.md +80 -0
  72. package/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ ## When to Use
2
+
3
+ - When the user needs to select a specific time of day — clock-in/clock-out, shift start/end, appointment scheduling, or any similar time-entry scenario
4
+ - When you want to offer preset time options at a configurable interval while still allowing the user to type a time directly
5
+ - When time display format must match user locale or account preference (12-hour AM/PM vs. 24-hour)
6
+
7
+ ## When Not to Use
8
+
9
+ - When the user needs to select both a start and end time together — use `TimeRangeField` instead
10
+ - When the user needs to pick a date as well as a time — combine `DateField` with `TimeField` rather than overloading one field
11
+ - When the value is a duration or elapsed time rather than a clock time — use a `NumberField` or `TextField` with explicit unit labeling instead
12
+ - When the user must choose from a small, fixed set of named options — use `SelectField` instead
13
+
14
+ ## Usage
15
+
16
+ > Note: The component formats the raw input on blur but does **not** parse or validate it for you. You are responsible for validating the string value and converting it to whatever representation your application needs.
17
+
18
+ ### Copy
19
+
20
+ - Use sentence case for labels and captions
21
+ - Keep labels short and specific to the time being captured — "Start time", "Clocked in", "Appointment" are all good examples
22
+ - Write captions as clarifying context, not as instructions — prefer "The time you clocked in at work" over "Enter your clock-in time"
23
+ - Do not use placeholder text as a label substitute
@@ -0,0 +1,19 @@
1
+ ## When to Use
2
+
3
+ - When the user needs to select both a start time and an end time as a single input — for example, scheduling a shift, booking a meeting room, or defining an availability window
4
+ - When the time range must be captured as a pair (start + end) rather than two independent time fields
5
+ - When you want the component to automatically calculate and display the duration between the two selected times
6
+
7
+ ## When Not to Use
8
+
9
+ - When only a single point in time is needed — use `TimeField` instead
10
+ - When the user needs to select a range of dates, not times — use `DateRangeField` instead
11
+ - When start and end times are logically independent and do not form a range — use two separate `TimeField` instances instead
12
+
13
+ ## Usage
14
+
15
+ ### Copy
16
+
17
+ - Use sentence case for labels and captions
18
+ - Keep labels short and descriptive of what the range represents — e.g. "Shift time", "Meeting hours", "Availability window"
19
+ - Use caption text to clarify the purpose or constraints — e.g. "Set the start and end of the shift"
@@ -0,0 +1,20 @@
1
+ ## When to Use
2
+
3
+ - When the user must select a single week (always 7 consecutive days) from a calendar widget
4
+ - When the week boundary matters — e.g. pay periods, schedule weeks, billing cycles — and the selection must snap to a whole week rather than an arbitrary date range
5
+ - When the start day of the week is configurable (e.g. Sunday vs. Monday) to match business rules
6
+
7
+ ## When Not to Use
8
+
9
+ - When the user needs to pick a single day — use `DateField` instead
10
+ - When the user needs an arbitrary start and end date that do not have to align with week boundaries — use `DateRangeField` instead
11
+ - When the user needs to pick a specific time — use `TimeField` or `TimeRangeField` instead
12
+ - When the selectable unit is a month or a custom period rather than a week — use `DateField` and enforce the constraint in application logic instead
13
+
14
+ ## Usage
15
+
16
+ ### Copy
17
+
18
+ - Use sentence case for labels, captions, and placeholder text
19
+ - Keep labels concise and specific to the week-selection context — e.g. "Schedule week", "Pay period", "Billing week"
20
+ - Captions should explain what selecting a week will affect — e.g. "Select the week you want to schedule shifts for"
@@ -10,6 +10,7 @@
10
10
  - When no specific calendar week is involved and only weekday names matter — use `PillSelectField` with day-of-week options instead
11
11
  - When users need to pick dates across multiple weeks or a date range — use `DateRangeField`
12
12
  - When the user needs to see the full calendar for additional context.
13
+ - When the user needs to select an entire week, instead of individual days within a week - use `WeekField` instead.
13
14
 
14
15
  ## Usage
15
16
 
@@ -96,10 +96,30 @@ Toasts are used to inform the user about an action that happened.
96
96
 
97
97
  Form components are used to collect user input and data.
98
98
 
99
+ ### AsyncSelectField
100
+
101
+ A variation of select field that loads a dynamic list of options from a source rather than a fixed set of options. Use when you need to select from a dynamic list that can change such as roles, employees, locations, etc. Instead of passing a `options` props, this component requires a `loadOptions` prop.
102
+
103
+ ### CheckboxField
104
+
105
+ A simple check box with an option beside it. Allows the user to confirm a statement or enable an option with a simple boolean action. Use for things like agreeing to terms, or enabling one or more options in a list (where multiple selections are allowed).
106
+
99
107
  ### ColorField
100
108
 
101
109
  Color fields allow users to select a color from a predefined set of options, or pick a custom color via the native color picker. They are ideal for settings or configurations where color selection is necessary.
102
110
 
111
+ ### CurrencyField
112
+
113
+ A variation of a TextField, but it only accepts numbers, and will auto format the number into a currency format when the user leaves the field. Use anytime the user must enter a currency value and nothing else. **You are in charge of validating the value and parsing it back to a value that you can use on your application**.
114
+
115
+ ### DateField
116
+
117
+ A dropdown style field for selecting a single specific date. It will load a calendar widget when activated allowing the user to find and pick a day.
118
+
119
+ ### DateRangeField
120
+
121
+ A dropdown style field with 2 inputs. It allows the user to select a specific start date and end date separately to create a range of dates. .
122
+
103
123
  ### FormFeedback
104
124
 
105
125
  FormFeedback is used to indicate an error within a form, for example when there is invalid or missing data in a form field.
@@ -108,14 +128,70 @@ FormFeedback is used to indicate an error within a form, for example when there
108
128
 
109
129
  `FormFooter` contains the CTAs for a `Form` and handles all the `Button` styling when the `actions` prop is used.
110
130
 
131
+ ### FormRow
132
+
133
+ Easily add form fields side by side with equal size.
134
+
111
135
  ### FormSection
112
136
 
113
137
  `FormSection` provides visual seperation between sections within a `Form` and can have a title and subtitle.
114
138
 
139
+ ### MultiSelectField
140
+
141
+ A dropdown style field that lets you select and input more than one option within the field. Uses removable chips to represent selected items.
142
+
143
+ ### NumberField
144
+
145
+ A special text input field that only accepts numbers. It has validation and formatting in place to properly display number values. In its default state it only allows whole numbers, but it can be configured to allow decimals and negative values.
146
+
147
+ ### PasswordField
148
+
149
+ A field used for passwords. It obfuscates the input by default, but has the option to reveal the input. Can also include required password criteria.
150
+
151
+ ### PercentageField
152
+
153
+ A special text input field that only accepts numbers. Comes with validation and formatting in place to properly display percentage values. In its default state it only allows integers between 0 and 100, but it can be configured to allow decimals and negative values.
154
+
115
155
  ### PhoneField
116
156
 
117
157
  A field for entering phone numbers. It includes a selection field for country code and can validate phone numbers.
118
158
 
159
+ ### PillSelectField
160
+
161
+ A field where the user can select one or more from a vertical line of pills. Can also be made fully reactive allowing users to add and delete their own options. Use this to select from a more visual list with a limited number of options, like selecting the day of the week.
162
+
163
+ ### RadioGroupField
164
+
165
+ A list of radio options appearing either as an input or box. Use when the user can only select one option from a visual list and the user needs to be able to see all the options to make an informed decision.
166
+
167
+ ### RadioGroupOption
168
+
169
+ RadioGroupField form element.
170
+
171
+ ### SelectField
172
+
173
+ Simple dropdown field where the user chooses one option from a predefined list.
174
+
175
+ ### TextAreaField
176
+
177
+ A basic open input field used to get text from the user, with options to add a prefix or suffix element if necessary. Accepts any characters, so do not use it if you want to limit the format of the input to numbers only.
178
+
179
+ ### TextField
180
+
181
+ TextField is a basic open input field used to get text from the user, with options to add a prefix or suffix element if necessary. Accepts any characters, so do not use it if you want to limit the format of the input to numbers only.
182
+
183
+ ### TimeField
184
+
185
+ A special field design for selecting a specific time of the day. Users can choose from a dropdown of preset time intervals, or type directly into the field. When the user leaves the field, the input is automatically formatted into either AM/PM time or 24h time. **You are in charge of validating the value and parsing it back to a value that you can use on your application**.
186
+
187
+ ### TimeRangeField
188
+
189
+ A special input field for selecting a time range. Comprised of 2 individual time fields, the user selects a start time and an end time individually to.
190
+
191
+ ### WeekField
192
+
193
+ A special dropdown style field used to select a single week from a calendar widget. Selections must always be 7 consecutive days, but you may customize the day of the week the selectable range starts on.
194
+
119
195
  ### WeekSelectField
120
196
 
121
197
  A week-scoped day selector. Pass an array of 7 dates representing a week and let users pick which days apply. Each pill displays the 3-letter weekday abbreviation and the calendar date.
@@ -160,6 +236,10 @@ Layout component to easily line elements up in a row.
160
236
 
161
237
  The Page component is used to control the elements within a page. It can be full width or restricted using the `size` prop. To better see it, open this example on a full page.
162
238
 
239
+ ### PageLayout
240
+
241
+ PageLayouts are responsible for grouping multiple pages. It will usually render a bunch of routes on its children.
242
+
163
243
  ### Stack
164
244
 
165
245
  Layout component to easily stack elements up in a column.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "4.7.1",
3
+ "version": "4.8.0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",