@cboxdk/cbox-ui 0.19.2 → 0.19.3
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/README.md +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ below 768px so iOS does not zoom. The few words the components say themselves ("
|
|
|
133
133
|
| `Sheet` / `SheetClose` / `useSheetClose` | A modal sheet portalled to `<body>`, never a centred modal: a panel sliding in from the right from 768px (`size` sm / md / lg: 26, 30 or 44rem wide), a bottom sheet on a phone that drags down to close. `title`, `description`, `footer`. Focus moves in (to `autoFocus` / `data-autofocus`, else the first field, else Close, never a footer action), Tab stays inside, the page behind is `inert` and does not scroll, Escape / Close / the scrim close it (`dismissible={false}` keeps the scrim from closing it), and focus goes back to the opener. `SheetClose` is a Button that closes the sheet it is in. `Dialog` / `DialogClose` / `useDialogClose` are deprecated aliases that render the same sheet. |
|
|
134
134
|
| `Combobox` | The select (native `<select>` is not used). A 36px trigger that never changes size; the panel is portalled (into the Sheet it sits in, else `<body>`) and placed against the trigger, so an `overflow: hidden` parent never clips it, it opens upwards near the bottom of the screen, and it is at least 16rem wide (up to 22rem for long labels). Search, groups, avatars, `footerLink`, value mode (`value` + `onChange`) or navigation mode (`href` + `LinkComponent`). `onCreate(query)` adds a "Create “…”" row when what was typed matches no label; return a promise to show a spinner until it settles. `createLabel(query)` changes its text. Escape closes only the panel. |
|
|
135
135
|
| `TagInput` | Tags as chips in one field: Enter adds the highlighted suggestion or what was typed, a comma (or a pasted list) adds the text as typed, Backspace in the empty input removes the last chip, × removes one. `suggestions` (Combobox options) filter as the person types; `creatable={false}` allows suggestions only. `normalize` cleans what was typed into a tag (do the housekeeping there: lower case, spaces to dashes; the "Add “…”" row shows the result), `maxLength` cuts a longer tag to length, `validate(tag)` for what cannot be cleaned up, `maxTags`: a problem shows in the list's place and is announced, the field does not move. Takes its label, hint and error from a `Field`. |
|
|
136
|
-
| `DatePicker` | A calendar day as `YYYY-MM-DD` (or `null`), never a timestamp: a 36px trigger like the Combobox and a month calendar in a portalled panel sized to the calendar, not the trigger. Month and weekday names, the format and the first day of the week follow the host's locale. `min`/`max` refuse days outside, `presets` adds quick picks beside "Today", "Clear" empties it unless `required`. Arrows move a day or a week, Page Up/Down a month (Shift: a year), Home/End the week, Enter picks, Escape returns to the trigger; focus moves into the calendar with a keyboard or mouse, never on a tap. Takes its label, hint and error from a `Field`. |
|
|
136
|
+
| `DatePicker` | A calendar day as `YYYY-MM-DD` (or `null`), never a timestamp: a 36px trigger like the Combobox and a month calendar in a portalled panel sized to the calendar, not the trigger. Month and weekday names, the format and the first day of the week follow the host's locale (Monday when it names no country, such as `en`). `min`/`max` refuse days outside, `presets` adds quick picks beside "Today", "Clear" empties it unless `required`. Arrows move a day or a week, Page Up/Down a month (Shift: a year), Home/End the week, Enter picks, Escape returns to the trigger; focus moves into the calendar with a keyboard or mouse, never on a tap. Takes its label, hint and error from a `Field`. |
|
|
137
137
|
| `TimePicker` | A time of day as `HH:MM` (24-hour) or `null`, shown in the locale (24-hour or AM/PM): a field to type in and the times at `step` minutes (default 15). Typing understands "930", "9.30", "21:30", "9pm"; Enter takes a typed time even off the step. `min`/`max`, `clearable`, `required`. |
|
|
138
138
|
| `DateTimePicker` | A DatePicker and a TimePicker side by side, valued as `YYYY-MM-DDTHH:MM` like `<input type="datetime-local">`. A day picked first gets `defaultTime` (09:00); `min`/`max` bound both. |
|
|
139
139
|
| `Spinner` | The indeterminate progress ring. Silent by default; `label` makes it a live status. |
|
package/dist/index.js
CHANGED
|
@@ -6176,6 +6176,7 @@ function monthGrid(month, firstDay) {
|
|
|
6176
6176
|
function firstDayOfWeek(locale) {
|
|
6177
6177
|
try {
|
|
6178
6178
|
const tag = new Intl.Locale(locale.replace("_", "-"));
|
|
6179
|
+
if (tag.region === void 0) return 1;
|
|
6179
6180
|
const info = tag.getWeekInfo?.() ?? tag.weekInfo;
|
|
6180
6181
|
if (info !== void 0) return info.firstDay % 7;
|
|
6181
6182
|
const region = tag.maximize().region;
|