@brandsync/wc 1.9.0 → 1.10.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/custom-elements.json +4520 -3613
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-c4de155c.entry.js → p-0132a2d1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-051d3064.entry.js → p-041776c0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a09e157f.entry.js → p-08c99a60.entry.js} +1 -1
- package/dist/brandsync-wc/{p-70f64b25.entry.js → p-18c3c22c.entry.js} +1 -1
- package/dist/brandsync-wc/p-1c3a43c7.entry.js +1 -0
- package/dist/brandsync-wc/{p-fddc7bd1.entry.js → p-1c427ffb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-29027559.entry.js → p-2e958566.entry.js} +1 -1
- package/dist/brandsync-wc/{p-235ae012.entry.js → p-301b2455.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8ee0153b.entry.js → p-32cd69f1.entry.js} +1 -1
- package/dist/brandsync-wc/p-4f2c4929.entry.js +1 -0
- package/dist/brandsync-wc/{p-a0d5a620.entry.js → p-50a251a4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0e39b9cc.entry.js → p-5f3cd501.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fc240aa0.entry.js → p-701ebf4a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0eed6813.entry.js → p-763876f5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f7d47c17.entry.js → p-76e1c295.entry.js} +1 -1
- package/dist/brandsync-wc/p-790db8b3.entry.js +1 -0
- package/dist/brandsync-wc/{p-4e5dcaff.entry.js → p-796a1860.entry.js} +1 -1
- package/dist/brandsync-wc/{p-36bf37d9.entry.js → p-806a5347.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6331de9c.entry.js → p-8eba7f90.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6fd7dd6a.entry.js → p-96ed9386.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cfcf3f0a.entry.js → p-9e88f19c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-de7c946d.entry.js → p-a71d2811.entry.js} +1 -1
- package/dist/brandsync-wc/{p-33e44094.entry.js → p-a8e2a829.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3b64e3cd.entry.js → p-addfa0a0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4574a707.entry.js → p-af2bf957.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6bf2f116.entry.js → p-b2074a32.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7c94e6ae.entry.js → p-c99b6a66.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2891d40b.entry.js → p-c9a72416.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9f65f998.entry.js → p-d3f44cb7.entry.js} +1 -1
- package/dist/brandsync-wc/p-d42b1c2b.entry.js +1 -0
- package/dist/brandsync-wc/{p-3ec74d35.entry.js → p-daab6b22.entry.js} +1 -1
- package/dist/brandsync-wc/{p-107b1c5d.entry.js → p-dbcbe682.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3176d1d3.entry.js → p-e8a5b8eb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-062cfa34.entry.js → p-ea4e20ef.entry.js} +1 -1
- package/dist/brandsync-wc/{p-27bbed83.entry.js → p-f370b8fa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-05c7de28.entry.js → p-f89de457.entry.js} +1 -1
- package/dist/brandsync-wc/{p-114d2fd8.entry.js → p-fd254972.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-datepicker.cjs.entry.js +410 -0
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/{bs-input.cjs.entry.js → bs-input_2.cjs.entry.js} +37 -4
- package/dist/cjs/bs-menu.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/bs-timepicker.cjs.entry.js +209 -0
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/bs-a11y.cmp.test.js +4 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-datepicker/bs-datepicker.cmp.test.js +182 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.css +315 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +782 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.stories.js +63 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-input/bs-input.js +7 -4
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.cmp.test.js +141 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.css +200 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +509 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.stories.js +44 -0
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-datepicker.d.ts +11 -0
- package/dist/components/bs-datepicker.js +1 -0
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.d.ts +11 -0
- package/dist/components/bs-timepicker.js +1 -0
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/{p-BA3c9Rom.js → p-B7Icv1ho.js} +1 -1
- package/dist/components/{p-wei0Ija2.js → p-BTvme8CE.js} +1 -1
- package/dist/components/{p-BoeorHNv.js → p-BYR_ZC8v.js} +1 -1
- package/dist/components/p-Ba860ej1.js +1 -0
- package/dist/components/p-CPvqZNO8.js +1 -0
- package/dist/components/{p-EtXc94lJ.js → p-DkIVyFOP.js} +1 -1
- package/dist/components/{p-BfEyD6Ku.js → p-ZK8p5zax.js} +1 -1
- package/dist/components/p-jDO25SfF.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-datepicker.entry.js +408 -0
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-icon-button.entry.js +1 -1
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/{bs-input.entry.js → bs-input_2.entry.js} +37 -5
- package/dist/esm/bs-menu.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab.entry.js +1 -1
- package/dist/esm/bs-tabs.entry.js +1 -1
- package/dist/esm/bs-timepicker.entry.js +207 -0
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-datepicker/bs-datepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.d.ts +136 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.stories.d.ts +20 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +101 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.stories.d.ts +14 -0
- package/dist/types/components.d.ts +515 -0
- package/package.json +1 -1
- package/dist/brandsync-wc/p-7b00dd36.entry.js +0 -1
- package/dist/brandsync-wc/p-ae978c9a.entry.js +0 -1
- package/dist/brandsync-wc/p-c10d2529.entry.js +0 -1
- package/dist/cjs/bs-menu-item.cjs.entry.js +0 -34
- package/dist/components/p-Buly0d5G.js +0 -1
- package/dist/esm/bs-menu-item.entry.js +0 -32
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface BsDatepickerChange {
|
|
3
|
+
/** Single mode: the selected date as `YYYY-MM-DD` (empty string when cleared). */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Range mode: the range start as `YYYY-MM-DD`. */
|
|
6
|
+
start?: string;
|
|
7
|
+
/** Range mode: the range end as `YYYY-MM-DD`. Empty while only the start has been picked. */
|
|
8
|
+
end?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An inline calendar for picking a single date, or a start/end date range. Matches the Figma
|
|
12
|
+
* "Date picker" component's two types: "Default" (month and year dropdowns above the grid) and
|
|
13
|
+
* "Range" (start and end date fields above the grid, with the days between highlighted).
|
|
14
|
+
*
|
|
15
|
+
* Dates are always `YYYY-MM-DD` strings, interpreted in the user's local time zone -- never full
|
|
16
|
+
* ISO timestamps -- so a date can't shift by a day across time zones.
|
|
17
|
+
*
|
|
18
|
+
* The calendar renders inline at a fixed width; to show it as a popover, put it inside a
|
|
19
|
+
* `bs-menu` or your own overlay.
|
|
20
|
+
*
|
|
21
|
+
* ## When to use
|
|
22
|
+
* - Picking a date where seeing the surrounding days of the week/month helps (a booking, a
|
|
23
|
+
* deadline, a report window).
|
|
24
|
+
* - Picking a period (`range`) such as a start and end date.
|
|
25
|
+
*
|
|
26
|
+
* ## When not to use
|
|
27
|
+
* - A date the user knows by heart and can type quickly (a birth date) -- `bs-input type="date"`
|
|
28
|
+
* is faster there.
|
|
29
|
+
*
|
|
30
|
+
* ## Keyboard
|
|
31
|
+
* Arrow keys move by day/week, Home/End jump to the start/end of the week, PageUp/PageDown move by
|
|
32
|
+
* month (with Shift, by year), Enter/Space select the focused day.
|
|
33
|
+
*
|
|
34
|
+
* @part container - The outer card.
|
|
35
|
+
* @part header - The row of month/year dropdowns (default) or start/end fields (range).
|
|
36
|
+
* @part menu - The month/year dropdown list, when open (default mode).
|
|
37
|
+
* @part nav - The row holding the previous/next buttons and the title.
|
|
38
|
+
* @part prev - The previous-month button.
|
|
39
|
+
* @part next - The next-month button.
|
|
40
|
+
* @part title - The title between the nav buttons.
|
|
41
|
+
* @part weekday - Each weekday column header.
|
|
42
|
+
* @part grid - The day grid.
|
|
43
|
+
* @part day - Each day button.
|
|
44
|
+
* @part selected - A selected day (the single date, or either end of a range), in addition to `day`.
|
|
45
|
+
* @part in-range - A day strictly between the range start and end, in addition to `day`.
|
|
46
|
+
* @part outside - A day from the previous/next month, in addition to `day`.
|
|
47
|
+
* @part today - Today's day button, in addition to `day`.
|
|
48
|
+
*/
|
|
49
|
+
export declare class BsDatepicker {
|
|
50
|
+
el: HTMLElement;
|
|
51
|
+
internals: ElementInternals;
|
|
52
|
+
private initialValue;
|
|
53
|
+
private initialStart;
|
|
54
|
+
private initialEnd;
|
|
55
|
+
/** The `name` the value is submitted under in a surrounding `<form>`. In `range` mode the dates
|
|
56
|
+
* are submitted as `<name>-start` and `<name>-end`. */
|
|
57
|
+
name?: string;
|
|
58
|
+
/** Select a start/end range instead of a single date. */
|
|
59
|
+
range: boolean;
|
|
60
|
+
/** The selected date (`YYYY-MM-DD`) in single mode. Mutable so a click updates it directly;
|
|
61
|
+
* `bsChange` still fires for the consumer to react. Ignored when `range` is set. */
|
|
62
|
+
value: string;
|
|
63
|
+
/** The range start (`YYYY-MM-DD`) in `range` mode. */
|
|
64
|
+
start: string;
|
|
65
|
+
/** The range end (`YYYY-MM-DD`) in `range` mode. */
|
|
66
|
+
end: string;
|
|
67
|
+
/** Earliest selectable date (`YYYY-MM-DD`). Earlier days render disabled. */
|
|
68
|
+
min?: string;
|
|
69
|
+
/** Latest selectable date (`YYYY-MM-DD`). Later days render disabled. */
|
|
70
|
+
max?: string;
|
|
71
|
+
/** BCP 47 locale used for month names, weekday names and the title. */
|
|
72
|
+
locale: string;
|
|
73
|
+
/** First column of the grid: `0` for Sunday (the Figma spec), `1` for Monday, ... `6`. */
|
|
74
|
+
firstDayOfWeek: number;
|
|
75
|
+
/** Label above the start field in `range` mode. */
|
|
76
|
+
startLabel: string;
|
|
77
|
+
/** Label above the end field in `range` mode. */
|
|
78
|
+
endLabel: string;
|
|
79
|
+
/** Accessible name for the month dropdown (single mode). */
|
|
80
|
+
monthLabel: string;
|
|
81
|
+
/** Accessible name for the year dropdown (single mode). */
|
|
82
|
+
yearLabel: string;
|
|
83
|
+
/** Accessible name for the previous-month button. */
|
|
84
|
+
previousLabel: string;
|
|
85
|
+
/** Accessible name for the next-month button. */
|
|
86
|
+
nextLabel: string;
|
|
87
|
+
/** Fires when the user changes the selection. Single mode: `{ value }`. Range mode: `{ start,
|
|
88
|
+
* end }` -- fired once for the first click (with an empty `end`) and again when the range is
|
|
89
|
+
* completed. Not fired when the props are set programmatically. */
|
|
90
|
+
bsChange: EventEmitter<BsDatepickerChange>;
|
|
91
|
+
/** First day of the month currently displayed. */
|
|
92
|
+
viewDate: Date;
|
|
93
|
+
/** The day holding the roving tabindex. */
|
|
94
|
+
focusedIso: string;
|
|
95
|
+
/** The day the pointer is over while a range is half-picked, for the live range preview. */
|
|
96
|
+
hoverIso: string;
|
|
97
|
+
/** Text the user is typing into a range field, keyed by which field. Cleared on commit. */
|
|
98
|
+
draft: {
|
|
99
|
+
start?: string;
|
|
100
|
+
end?: string;
|
|
101
|
+
};
|
|
102
|
+
/** Which header dropdown (single mode) is open. */
|
|
103
|
+
openMenu: 'month' | 'year' | null;
|
|
104
|
+
private shouldFocusDay;
|
|
105
|
+
private menuToScroll;
|
|
106
|
+
componentWillLoad(): void;
|
|
107
|
+
componentDidRender(): void;
|
|
108
|
+
onSelectionChange(): void;
|
|
109
|
+
onSelectionJump(): void;
|
|
110
|
+
/** Called by the browser when the surrounding `<form>` is reset. */
|
|
111
|
+
formResetCallback(): void;
|
|
112
|
+
private showSelection;
|
|
113
|
+
private syncFormValue;
|
|
114
|
+
private isDisabled;
|
|
115
|
+
private selectDay;
|
|
116
|
+
private commitDraft;
|
|
117
|
+
private moveView;
|
|
118
|
+
private onKeyDown;
|
|
119
|
+
private get safeFirstDay();
|
|
120
|
+
private get fmt();
|
|
121
|
+
private formatField;
|
|
122
|
+
private titleText;
|
|
123
|
+
private monthOptions;
|
|
124
|
+
private yearOptions;
|
|
125
|
+
private weekdays;
|
|
126
|
+
private gridDays;
|
|
127
|
+
private renderHeader;
|
|
128
|
+
/** A `bs-input type="dropdown"` trigger with our own `bs-menu` list below it. bs-input's built-in
|
|
129
|
+
* menu has no checkmark or scroll limit, so it's used only as the field look: it gets no
|
|
130
|
+
* `options` (so renders no menu of its own) and its `bsOpen` toggles ours. */
|
|
131
|
+
private renderDropdown;
|
|
132
|
+
render(): any;
|
|
133
|
+
/** The day that should be reachable with Tab when nothing in view has been focused yet: the
|
|
134
|
+
* selection if it's in the displayed month, else today if it is, else the 1st. */
|
|
135
|
+
private defaultTabbable;
|
|
136
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
interface BsDatepickerArgs {
|
|
3
|
+
range: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
start: string;
|
|
6
|
+
end: string;
|
|
7
|
+
min: string;
|
|
8
|
+
max: string;
|
|
9
|
+
locale: string;
|
|
10
|
+
firstDayOfWeek: number;
|
|
11
|
+
}
|
|
12
|
+
declare const meta: Meta<BsDatepickerArgs>;
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<BsDatepickerArgs>;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Range: Story;
|
|
17
|
+
export declare const RangeAcrossWeeks: Story;
|
|
18
|
+
export declare const MinMax: Story;
|
|
19
|
+
export declare const MondayFirst: Story;
|
|
20
|
+
export declare const Danish: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface BsTimepickerChange {
|
|
3
|
+
/** The confirmed time as 24-hour `HH:mm`, whatever `format` is displayed. */
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* An inline time picker: hour and minute spinners (up/down carets, or the arrow keys on the value),
|
|
8
|
+
* an AM/PM dropdown in 12-hour mode, a 24h switch, and Cancel/Confirm buttons. Matches the Figma
|
|
9
|
+
* "Time picker" component's two formats (12h with AM/PM, and 24h).
|
|
10
|
+
*
|
|
11
|
+
* The picker works on a draft: nothing is committed until the user presses Confirm, which updates
|
|
12
|
+
* `value` and fires `bsChange`. Cancel discards the draft and fires `bsCancel`.
|
|
13
|
+
*
|
|
14
|
+
* `value` is always 24-hour `HH:mm` (e.g. `"14:30"`), regardless of the displayed `format`.
|
|
15
|
+
*
|
|
16
|
+
* The picker renders inline at a fixed width; to show it as a popover, put it in your own overlay
|
|
17
|
+
* and close that overlay from `bsChange`/`bsCancel`.
|
|
18
|
+
*
|
|
19
|
+
* ## When to use
|
|
20
|
+
* - Picking a time of day where the user steps through hours and minutes.
|
|
21
|
+
*
|
|
22
|
+
* ## When not to use
|
|
23
|
+
* - A time the user can type faster than step to -- a plain `bs-input` is quicker.
|
|
24
|
+
*
|
|
25
|
+
* ## Keyboard
|
|
26
|
+
* Tab to the hour or minute value, then ArrowUp/ArrowDown step it (wrapping), Home/End jump to the
|
|
27
|
+
* first/last value, and typing digits sets it directly.
|
|
28
|
+
*
|
|
29
|
+
* @part container - The outer card.
|
|
30
|
+
* @part header - The title row.
|
|
31
|
+
* @part title - The heading text.
|
|
32
|
+
* @part format-toggle - The 24h switch.
|
|
33
|
+
* @part selector - The row of spinners.
|
|
34
|
+
* @part spinner - Each hour/minute column.
|
|
35
|
+
* @part step - Each up/down caret button.
|
|
36
|
+
* @part value - Each hour/minute value (a `spinbutton`).
|
|
37
|
+
* @part separator - The colon between hours and minutes.
|
|
38
|
+
* @part period - The AM/PM dropdown (12h only).
|
|
39
|
+
* @part footer - The Cancel/Confirm row.
|
|
40
|
+
* @part cancel - The Cancel button.
|
|
41
|
+
* @part confirm - The Confirm button.
|
|
42
|
+
*/
|
|
43
|
+
export declare class BsTimepicker {
|
|
44
|
+
el: HTMLElement;
|
|
45
|
+
internals: ElementInternals;
|
|
46
|
+
private initialValue;
|
|
47
|
+
private typed;
|
|
48
|
+
/** The `name` the confirmed value is submitted under in a surrounding `<form>`. */
|
|
49
|
+
name?: string;
|
|
50
|
+
/** The confirmed time, 24-hour `HH:mm`. Empty means no time chosen yet (the picker opens on
|
|
51
|
+
* 00:00). Mutable so Confirm updates it directly; `bsChange` still fires. */
|
|
52
|
+
value: string;
|
|
53
|
+
/** Display format: `12h` (with an AM/PM dropdown) or `24h`. The user can switch it with the
|
|
54
|
+
* 24h switch. Does not change `value`, which is always 24-hour. */
|
|
55
|
+
format: '12h' | '24h';
|
|
56
|
+
/** Step, in minutes, of the minute spinner's carets and arrow keys. Typing is not constrained. */
|
|
57
|
+
minuteStep: number;
|
|
58
|
+
/** Heading text. */
|
|
59
|
+
heading: string;
|
|
60
|
+
/** Label of the 24h switch. */
|
|
61
|
+
formatLabel: string;
|
|
62
|
+
/** Label of the Confirm button. */
|
|
63
|
+
confirmLabel: string;
|
|
64
|
+
/** Label of the Cancel button. */
|
|
65
|
+
cancelLabel: string;
|
|
66
|
+
/** Accessible name of the hour spinner. */
|
|
67
|
+
hourLabel: string;
|
|
68
|
+
/** Accessible name of the minute spinner. */
|
|
69
|
+
minuteLabel: string;
|
|
70
|
+
/** Accessible name of the AM/PM dropdown. */
|
|
71
|
+
periodLabel: string;
|
|
72
|
+
/** Fires when the user presses Confirm: `{ value }` as 24-hour `HH:mm`. Not fired when `value` is
|
|
73
|
+
* set programmatically. */
|
|
74
|
+
bsChange: EventEmitter<BsTimepickerChange>;
|
|
75
|
+
/** Fires when the user presses Cancel. The draft is reset to `value`. */
|
|
76
|
+
bsCancel: EventEmitter<void>;
|
|
77
|
+
/** Draft hour, 0-23. */
|
|
78
|
+
hour: number;
|
|
79
|
+
/** Draft minute, 0-59. */
|
|
80
|
+
minute: number;
|
|
81
|
+
componentWillLoad(): void;
|
|
82
|
+
onValueChange(): void;
|
|
83
|
+
onNameChange(): void;
|
|
84
|
+
/** Called by the browser when the surrounding `<form>` is reset. */
|
|
85
|
+
formResetCallback(): void;
|
|
86
|
+
private resetDraft;
|
|
87
|
+
private syncFormValue;
|
|
88
|
+
private get step();
|
|
89
|
+
private get is12h();
|
|
90
|
+
private get isPm();
|
|
91
|
+
/** The number shown in a column. In 12h mode the hour reads 1-12. */
|
|
92
|
+
private shown;
|
|
93
|
+
private bounds;
|
|
94
|
+
private setShown;
|
|
95
|
+
private stepBy;
|
|
96
|
+
private onKeyDown;
|
|
97
|
+
private confirm;
|
|
98
|
+
private cancel;
|
|
99
|
+
private renderColumn;
|
|
100
|
+
render(): any;
|
|
101
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
interface BsTimepickerArgs {
|
|
3
|
+
value: string;
|
|
4
|
+
format: '12h' | '24h';
|
|
5
|
+
minuteStep: number;
|
|
6
|
+
heading: string;
|
|
7
|
+
}
|
|
8
|
+
declare const meta: Meta<BsTimepickerArgs>;
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<BsTimepickerArgs>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const TwentyFourHour: Story;
|
|
13
|
+
export declare const WithValue: Story;
|
|
14
|
+
export declare const FifteenMinuteStep: Story;
|