frontile 0.18.5 → 0.18.7
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/declarations/-private/icons.d.ts +4 -0
- package/declarations/-private/icons.d.ts.map +1 -1
- package/declarations/-private/reveal-within.d.ts +19 -0
- package/declarations/-private/reveal-within.d.ts.map +1 -0
- package/declarations/components/collections/calendar/year-grid.d.ts.map +1 -1
- package/declarations/components/collections/dropdown/dropdown.d.ts +50 -53
- package/declarations/components/collections/dropdown/dropdown.d.ts.map +1 -1
- package/declarations/components/collections/listbox/item.d.ts +52 -1
- package/declarations/components/collections/listbox/item.d.ts.map +1 -1
- package/declarations/components/forms/date-input/segment-group.d.ts +2 -1
- package/declarations/components/forms/date-input/segment-group.d.ts.map +1 -1
- package/declarations/components/forms/date-input/segments.d.ts +3 -1
- package/declarations/components/forms/date-input/segments.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/date-picker.d.ts +119 -1
- package/declarations/components/forms/date-picker/date-picker.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/time-columns.d.ts +87 -0
- package/declarations/components/forms/date-picker/time-columns.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/types.d.ts +28 -0
- package/declarations/components/forms/date-picker/types.d.ts.map +1 -1
- package/declarations/components/forms/select/native-mirror.d.ts +3 -2
- package/declarations/components/forms/select/native-mirror.d.ts.map +1 -1
- package/declarations/components/forms/select/select.d.ts +31 -2
- package/declarations/components/forms/select/select.d.ts.map +1 -1
- package/declarations/components/forms/select/types.d.ts +3 -2
- package/declarations/components/forms/select/types.d.ts.map +1 -1
- package/declarations/components/layout/app-layout-state.d.ts +32 -0
- package/declarations/components/layout/app-layout-state.d.ts.map +1 -0
- package/declarations/components/layout/app-layout.d.ts +954 -0
- package/declarations/components/layout/app-layout.d.ts.map +1 -0
- package/declarations/components/layout/aside-toggle.d.ts +55 -0
- package/declarations/components/layout/aside-toggle.d.ts.map +1 -0
- package/declarations/components/layout/aside.d.ts +761 -0
- package/declarations/components/layout/aside.d.ts.map +1 -0
- package/declarations/components/layout/bottom-nav-more.d.ts +123 -0
- package/declarations/components/layout/bottom-nav-more.d.ts.map +1 -0
- package/declarations/components/layout/bottom-nav.d.ts +60 -0
- package/declarations/components/layout/bottom-nav.d.ts.map +1 -0
- package/declarations/components/layout/context.d.ts +134 -0
- package/declarations/components/layout/context.d.ts.map +1 -0
- package/declarations/components/layout/index.d.ts +14 -0
- package/declarations/components/layout/index.d.ts.map +1 -0
- package/declarations/components/layout/main.d.ts +28 -0
- package/declarations/components/layout/main.d.ts.map +1 -0
- package/declarations/components/layout/menu-toggle.d.ts +58 -0
- package/declarations/components/layout/menu-toggle.d.ts.map +1 -0
- package/declarations/components/layout/nav-context.d.ts +45 -0
- package/declarations/components/layout/nav-context.d.ts.map +1 -0
- package/declarations/components/layout/nav-folder.d.ts +216 -0
- package/declarations/components/layout/nav-folder.d.ts.map +1 -0
- package/declarations/components/layout/nav-item.d.ts +220 -0
- package/declarations/components/layout/nav-item.d.ts.map +1 -0
- package/declarations/components/layout/nav-link.d.ts +67 -0
- package/declarations/components/layout/nav-link.d.ts.map +1 -0
- package/declarations/components/layout/navbar.d.ts +27 -0
- package/declarations/components/layout/navbar.d.ts.map +1 -0
- package/declarations/components/layout/page-header.d.ts +40 -0
- package/declarations/components/layout/page-header.d.ts.map +1 -0
- package/declarations/components/layout/sidebar-group.d.ts +41 -0
- package/declarations/components/layout/sidebar-group.d.ts.map +1 -0
- package/declarations/components/layout/sidebar-toggle.d.ts +71 -0
- package/declarations/components/layout/sidebar-toggle.d.ts.map +1 -0
- package/declarations/components/layout/sidebar.d.ts +904 -0
- package/declarations/components/layout/sidebar.d.ts.map +1 -0
- package/declarations/components/navigation/index.d.ts +1 -0
- package/declarations/components/navigation/index.d.ts.map +1 -1
- package/declarations/components/navigation/stepper/collapse-menu.d.ts +42 -0
- package/declarations/components/navigation/stepper/collapse-menu.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/list.d.ts +24 -0
- package/declarations/components/navigation/stepper/list.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/panel.d.ts +42 -0
- package/declarations/components/navigation/stepper/panel.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/step.d.ts +123 -0
- package/declarations/components/navigation/stepper/step.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/stepper.d.ts +947 -0
- package/declarations/components/navigation/stepper/stepper.d.ts.map +1 -0
- package/declarations/components/navigation/stepper.d.ts +6 -0
- package/declarations/components/navigation/stepper.d.ts.map +1 -0
- package/declarations/components/navigation/tab-nav/item.d.ts +2 -2
- package/declarations/components/navigation/tab-nav/item.d.ts.map +1 -1
- package/declarations/components/overlays/overlay.d.ts +17 -2
- package/declarations/components/overlays/overlay.d.ts.map +1 -1
- package/declarations/components/overlays/portal.d.ts.map +1 -1
- package/declarations/components/utilities/collapsible.d.ts +19 -2
- package/declarations/components/utilities/collapsible.d.ts.map +1 -1
- package/declarations/index.d.ts +1 -0
- package/declarations/index.d.ts.map +1 -1
- package/declarations/layout.d.ts +2 -0
- package/declarations/layout.d.ts.map +1 -0
- package/declarations/test-support.d.ts.map +1 -1
- package/declarations/utils/breakpoint.d.ts +16 -0
- package/declarations/utils/breakpoint.d.ts.map +1 -0
- package/declarations/utils/document-listener.d.ts +6 -0
- package/declarations/utils/document-listener.d.ts.map +1 -0
- package/declarations/utils/listManager.d.ts +7 -1
- package/declarations/utils/listManager.d.ts.map +1 -1
- package/declarations/utils/route-active.d.ts +34 -0
- package/declarations/utils/route-active.d.ts.map +1 -0
- package/declarations/utils/selection-indicator.d.ts +7 -4
- package/declarations/utils/selection-indicator.d.ts.map +1 -1
- package/dist/components/collections/calendar/header.js +1 -1
- package/dist/components/collections/calendar/year-grid.js +1 -30
- package/dist/components/collections/calendar/year-grid.js.map +1 -1
- package/dist/components/collections/dropdown/dropdown.js +172 -48
- package/dist/components/collections/dropdown/dropdown.js.map +1 -1
- package/dist/components/collections/listbox/item.js +36 -2
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +1 -1
- package/dist/components/collections/table/sort-button.js +1 -1
- package/dist/components/disclosure/accordion/item.js +1 -1
- package/dist/components/forms/autocomplete.js +1 -1
- package/dist/components/forms/date-input/segment-group.js +1 -1
- package/dist/components/forms/date-input/segment-group.js.map +1 -1
- package/dist/components/forms/date-input/segments.js +1 -1
- package/dist/components/forms/date-input/segments.js.map +1 -1
- package/dist/components/forms/date-input.js +1 -1
- package/dist/components/forms/date-picker/date-picker.js +57 -6
- package/dist/components/forms/date-picker/date-picker.js.map +1 -1
- package/dist/components/forms/date-picker/end-content.js +1 -1
- package/dist/components/forms/date-picker/time-columns.js +238 -0
- package/dist/components/forms/date-picker/time-columns.js.map +1 -0
- package/dist/components/forms/index.js +1 -1
- package/dist/components/forms/native-select.js +1 -1
- package/dist/components/forms/select/end-content.js +1 -1
- package/dist/components/forms/select/native-mirror.js.map +1 -1
- package/dist/components/forms/select/select.js +24 -5
- package/dist/components/forms/select/select.js.map +1 -1
- package/dist/components/layout/app-layout-state.js +64 -0
- package/dist/components/layout/app-layout-state.js.map +1 -0
- package/dist/components/layout/app-layout.js +416 -0
- package/dist/components/layout/app-layout.js.map +1 -0
- package/dist/components/layout/aside-toggle.js +55 -0
- package/dist/components/layout/aside-toggle.js.map +1 -0
- package/dist/components/layout/aside.js +100 -0
- package/dist/components/layout/aside.js.map +1 -0
- package/dist/components/layout/bottom-nav-more.js +150 -0
- package/dist/components/layout/bottom-nav-more.js.map +1 -0
- package/dist/components/layout/bottom-nav.js +65 -0
- package/dist/components/layout/bottom-nav.js.map +1 -0
- package/dist/components/layout/context.js +89 -0
- package/dist/components/layout/context.js.map +1 -0
- package/dist/components/layout/index.js +14 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/main.js +34 -0
- package/dist/components/layout/main.js.map +1 -0
- package/dist/components/layout/menu-toggle.js +61 -0
- package/dist/components/layout/menu-toggle.js.map +1 -0
- package/dist/components/layout/nav-context.js +85 -0
- package/dist/components/layout/nav-context.js.map +1 -0
- package/dist/components/layout/nav-folder.js +271 -0
- package/dist/components/layout/nav-folder.js.map +1 -0
- package/dist/components/layout/nav-item.js +192 -0
- package/dist/components/layout/nav-item.js.map +1 -0
- package/dist/components/layout/nav-link.js +58 -0
- package/dist/components/layout/nav-link.js.map +1 -0
- package/dist/components/layout/navbar.js +30 -0
- package/dist/components/layout/navbar.js.map +1 -0
- package/dist/components/layout/page-header.js +45 -0
- package/dist/components/layout/page-header.js.map +1 -0
- package/dist/components/layout/sidebar-group.js +41 -0
- package/dist/components/layout/sidebar-group.js.map +1 -0
- package/dist/components/layout/sidebar-toggle.js +82 -0
- package/dist/components/layout/sidebar-toggle.js.map +1 -0
- package/dist/components/layout/sidebar.js +249 -0
- package/dist/components/layout/sidebar.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/separator.js +1 -1
- package/dist/components/navigation/index.js +4 -0
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +1 -1
- package/dist/components/navigation/stepper/collapse-menu.js +128 -0
- package/dist/components/navigation/stepper/collapse-menu.js.map +1 -0
- package/dist/components/navigation/stepper/list.js +17 -0
- package/dist/components/navigation/stepper/list.js.map +1 -0
- package/dist/components/navigation/stepper/panel.js +26 -0
- package/dist/components/navigation/stepper/panel.js.map +1 -0
- package/dist/components/navigation/stepper/step.js +130 -0
- package/dist/components/navigation/stepper/step.js.map +1 -0
- package/dist/components/navigation/stepper/stepper.js +475 -0
- package/dist/components/navigation/stepper/stepper.js.map +1 -0
- package/dist/components/navigation/stepper.js +5 -0
- package/dist/components/navigation/stepper.js.map +1 -0
- package/dist/components/navigation/tab-nav/item.js +6 -40
- package/dist/components/navigation/tab-nav/item.js.map +1 -1
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/notifications/notification-card.js +2 -2
- package/dist/components/notifications/notifications-container.js +1 -1
- package/dist/components/overlays/overlay.js +55 -7
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/overlays/portal.js +11 -2
- package/dist/components/overlays/portal.js.map +1 -1
- package/dist/components/status/alert.js +1 -1
- package/dist/components/utilities/collapsible.js +33 -5
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/{icons-DZ61nCzv.js → icons-55dthVFk.js} +14 -2
- package/dist/{icons-DZ61nCzv.js.map → icons-55dthVFk.js.map} +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/layout.js +14 -0
- package/dist/layout.js.map +1 -0
- package/dist/navigation.js +4 -0
- package/dist/navigation.js.map +1 -1
- package/dist/{notification-card-dz-eE6z9.js → notification-card-BPfDo-Gf.js} +2 -2
- package/dist/{notification-card-dz-eE6z9.js.map → notification-card-BPfDo-Gf.js.map} +1 -1
- package/dist/notifications.js +1 -1
- package/dist/reveal-within-BcqpOmSI.js +33 -0
- package/dist/reveal-within-BcqpOmSI.js.map +1 -0
- package/dist/test-support.js +3 -1
- package/dist/test-support.js.map +1 -1
- package/dist/utils/breakpoint.js +56 -0
- package/dist/utils/breakpoint.js.map +1 -0
- package/dist/utils/document-listener.js +10 -0
- package/dist/utils/document-listener.js.map +1 -0
- package/dist/utils/listManager.js +12 -2
- package/dist/utils/listManager.js.map +1 -1
- package/dist/utils/route-active.js +70 -0
- package/dist/utils/route-active.js.map +1 -0
- package/dist/utils/selection-indicator.js +25 -5
- package/dist/utils/selection-indicator.js.map +1 -1
- package/package.json +7 -3
|
@@ -20,4 +20,8 @@ export declare const IconInfo: TOC<IconSignature>;
|
|
|
20
20
|
export declare const IconSuccess: TOC<IconSignature>;
|
|
21
21
|
export declare const IconWarning: TOC<IconSignature>;
|
|
22
22
|
export declare const IconDanger: TOC<IconSignature>;
|
|
23
|
+
export declare const EllipsisHorizontalIcon: TOC<IconSignature>;
|
|
24
|
+
export declare const SidebarLeftIcon: TOC<IconSignature>;
|
|
25
|
+
export declare const SidebarRightIcon: TOC<IconSignature>;
|
|
26
|
+
export declare const MenuIcon: TOC<IconSignature>;
|
|
23
27
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/-private/icons.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/-private/icons.gts"],"names":[],"mappings":"AAmUA;;;;GAIG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,aAAa,CAoC7C,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,aAAa,CAoC3C,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,aAAa,CAoC7C,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,aAAa,CAoC9C,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,GAAG,CAAC,aAAa,CAoCnD,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,aAAa,CAoCpD,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,aAAa,CAoC/C,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,aAAa,CAoC1C,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,GAAG,CAAC,aAAa,CAiClD,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,aAAa,CAuCtC,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,aAAa,CAuCzC,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,aAAa,CAuCzC,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,aAAa,CAuCxC,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,aAAa,CA0CpD,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,aAAa,CA4D7C,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,aAAa,CA4D9C,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,aAAa,CA0CtC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll `target` into view inside `panel` and nowhere else.
|
|
3
|
+
*
|
|
4
|
+
* `scrollIntoView` and a plain `focus()` both scroll *every* scrollable
|
|
5
|
+
* ancestor up to the document, so either one makes the host page jump when a
|
|
6
|
+
* panel opens or when arrow keys walk past its edge. Adjusting `scrollTop`
|
|
7
|
+
* directly keeps the movement inside the panel.
|
|
8
|
+
*
|
|
9
|
+
* The measurements come from `offsetTop`, not `getBoundingClientRect()`:
|
|
10
|
+
* client rects are in transformed pixels, so under any ancestor `scale()` they
|
|
11
|
+
* would not agree with `scrollTop`. This relies on the panel being the
|
|
12
|
+
* target's `offsetParent`, so the panel has to be positioned.
|
|
13
|
+
*
|
|
14
|
+
* `center` places the target mid-panel, for the opening jump to a value that
|
|
15
|
+
* is usually a long way down the list; otherwise the target is brought just
|
|
16
|
+
* far enough into view, which is what stepping key by key wants.
|
|
17
|
+
*/
|
|
18
|
+
export declare function revealWithin(panel: HTMLElement, target: HTMLElement, center: boolean): void;
|
|
19
|
+
//# sourceMappingURL=reveal-within.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveal-within.d.ts","sourceRoot":"","sources":["../../src/-private/reveal-within.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,OAAO,GACd,IAAI,CAcN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"year-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/collections/calendar/year-grid.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"year-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/collections/calendar/year-grid.gts"],"names":[],"mappings":"AAgKA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACjC,SAAS,EAAE,MAAM,IAAI,CAAC;QACtB,kCAAkC;QAClC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACjD,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAKD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;;IAGhE,SAAS,GAAI,MAAM,MAAM,KAAG,OAAO,CAAmC;IAEtE;;;;OAIG;IACH,KAAK;;;;;;OAuBF;IAuBH,aAAa,GAAI,OAAO,aAAa,KAAG,IAAI,CAgD1C;CA+DH;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@ import type { MenuContext, OpenSource } from './menu-context';
|
|
|
7
7
|
import type { ModifierLike } from '@glint/template';
|
|
8
8
|
import type { ListboxItem } from '../listbox/item';
|
|
9
9
|
import type { WithBoundArgs } from '@glint/template';
|
|
10
|
-
interface DropdownArgs extends Pick<PopoverSignature['Args'], 'placement' | 'flipOptions' | 'middleware' | 'shiftOptions' | 'offsetOptions' | 'strategy' | 'didClose'> {
|
|
10
|
+
interface DropdownArgs extends Pick<PopoverSignature['Args'], 'placement' | 'flipOptions' | 'middleware' | 'shiftOptions' | 'offsetOptions' | 'strategy' | 'didClose' | 'isOpen' | 'onOpenChange'> {
|
|
11
11
|
/**
|
|
12
12
|
* Whether the dropdown should close upon selecting an item.
|
|
13
13
|
*
|
|
@@ -21,7 +21,20 @@ interface DropdownSignature {
|
|
|
21
21
|
Blocks: {
|
|
22
22
|
default: [
|
|
23
23
|
{
|
|
24
|
-
Trigger: WithBoundArgs<typeof Trigger, '
|
|
24
|
+
Trigger: WithBoundArgs<typeof Trigger, 'triggerModifier'>;
|
|
25
|
+
/**
|
|
26
|
+
* Makes the element it is placed on the dropdown's anchor and trigger,
|
|
27
|
+
* wired exactly like `Trigger`: it positions the menu, opens it on
|
|
28
|
+
* click, and opens it onto the first item on ArrowDown, ArrowUp, Enter
|
|
29
|
+
* or Space. Use it to make something other than a `Button` -- a link, a
|
|
30
|
+
* nav item -- the trigger.
|
|
31
|
+
*
|
|
32
|
+
* The element should be focusable and announce itself as a button (a
|
|
33
|
+
* `<button>`, or `role="button"` with `tabindex="0"`). Enter and Space
|
|
34
|
+
* are cancelled on it, so an `<a href>` does not follow its link from
|
|
35
|
+
* the keyboard; a pointer click on one still does (see the docs).
|
|
36
|
+
*/
|
|
37
|
+
triggerModifier: TriggerModifier;
|
|
25
38
|
Menu: WithBoundArgs<typeof Menu, 'toggle' | 'close' | 'Content' | 'closeOnItemSelect'>;
|
|
26
39
|
}
|
|
27
40
|
];
|
|
@@ -40,30 +53,19 @@ declare class Dropdown extends Component<DropdownSignature> {
|
|
|
40
53
|
openSource: OpenSource;
|
|
41
54
|
setOpenSource: (source: OpenSource) => void;
|
|
42
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* The public shape of the modifier `Dropdown` yields as `triggerModifier`.
|
|
58
|
+
*/
|
|
59
|
+
type TriggerModifier = ModifierLike<{
|
|
60
|
+
Element: HTMLElement;
|
|
61
|
+
}>;
|
|
43
62
|
interface TriggerArgs extends Pick<ButtonSignature['Args'], 'variant' | 'appearance' | 'color' | 'intent' | 'size' | 'isInGroup' | 'class'> {
|
|
44
|
-
/**
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
anchor: ModifierLike<{
|
|
48
|
-
Element: HTMLElement;
|
|
49
|
-
}>;
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
trigger: ModifierLike<{
|
|
54
|
-
Element: HTMLElement;
|
|
55
|
-
}>;
|
|
56
63
|
/**
|
|
57
64
|
* @internal
|
|
58
65
|
*
|
|
59
|
-
*
|
|
60
|
-
* land on an item.
|
|
66
|
+
* The dropdown's own `triggerModifier`, bound by `Dropdown`.
|
|
61
67
|
*/
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
toggle: () => void;
|
|
68
|
+
triggerModifier: TriggerModifier;
|
|
67
69
|
}
|
|
68
70
|
export interface TriggerSignature {
|
|
69
71
|
Args: TriggerArgs;
|
|
@@ -72,38 +74,11 @@ export interface TriggerSignature {
|
|
|
72
74
|
default: [];
|
|
73
75
|
};
|
|
74
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* The button form of the trigger: Frontile's `Button` with `triggerModifier`
|
|
79
|
+
* on it, so all of the open/close behaviour lives in one place.
|
|
80
|
+
*/
|
|
75
81
|
declare class Trigger extends Component<TriggerSignature> {
|
|
76
|
-
get anchor(): ModifierLike<{
|
|
77
|
-
Element: HTMLElement;
|
|
78
|
-
}>;
|
|
79
|
-
get trigger(): ModifierLike<{
|
|
80
|
-
Element: HTMLElement;
|
|
81
|
-
}>;
|
|
82
|
-
handleKeyDown: (event: KeyboardEvent) => void;
|
|
83
|
-
/**
|
|
84
|
-
* A pointer press opens onto nothing: moving the highlight somewhere the
|
|
85
|
-
* user never pointed is exactly what the menu button pattern avoids.
|
|
86
|
-
*
|
|
87
|
-
* On `pointerup` rather than `pointerdown`: the two are equivalent here
|
|
88
|
-
* because `pointerup` still precedes the `click` that Popover's `trigger`
|
|
89
|
-
* opens on, and binding the down event trips `no-pointer-down-event-binding`
|
|
90
|
-
* -- a rule worth keeping, since a press the user drags away from and
|
|
91
|
-
* cancels should leave nothing behind.
|
|
92
|
-
*/
|
|
93
|
-
handlePointerUp: () => void;
|
|
94
|
-
/**
|
|
95
|
-
* Enter and Space have to be handled here rather than left to the button's
|
|
96
|
-
* native activation. The trigger renders Frontile's Button, whose `press`
|
|
97
|
-
* modifier calls preventDefault on Enter/Space keydown — that is deliberate,
|
|
98
|
-
* since press synthesises its own press event for `@onPress` consumers — but
|
|
99
|
-
* it also cancels the native click, and Popover's `trigger` modifier opens on
|
|
100
|
-
* click. Without this the menu could only be opened with the arrow keys.
|
|
101
|
-
*
|
|
102
|
-
* Select is unaffected because its trigger is a plain `<button>` with no press
|
|
103
|
-
* modifier, so its native click still fires. Handling this in Popover instead
|
|
104
|
-
* would double-toggle there.
|
|
105
|
-
*/
|
|
106
|
-
handleKeyUp: (event: KeyboardEvent) => void;
|
|
107
82
|
}
|
|
108
83
|
interface MenuArgs extends Pick<ListboxSignature<unknown>['Args'], 'variant' | 'appearance' | 'color' | 'intent' | 'class' | 'selectionMode' | 'selectedKeys' | 'disabledKeys' | 'allowEmpty' | 'onSelectionChange' | 'shortcutVariant'>, Pick<ContentSignature['Args'], 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition' | 'transition'> {
|
|
109
84
|
/**
|
|
@@ -178,7 +153,7 @@ export interface MenuSignature {
|
|
|
178
153
|
Element: HTMLUListElement;
|
|
179
154
|
Blocks: {
|
|
180
155
|
default: [
|
|
181
|
-
item: WithBoundArgs<typeof ListboxItem, 'manager'>,
|
|
156
|
+
item: WithBoundArgs<typeof ListboxItem, 'manager' | 'onLinkActivate'>,
|
|
182
157
|
sub: WithBoundArgs<typeof Sub, 'item' | 'menu' | 'parentContext'>
|
|
183
158
|
];
|
|
184
159
|
};
|
|
@@ -217,11 +192,33 @@ declare class Menu extends Component<MenuSignature> {
|
|
|
217
192
|
get context(): MenuContext;
|
|
218
193
|
closeRoot: () => void;
|
|
219
194
|
onAction: (key: string) => void;
|
|
195
|
+
/**
|
|
196
|
+
* A link item is followed by the browser (or `LinkTo`), not selected, so it
|
|
197
|
+
* must skip `onAction` -- but it still dismisses the menu like any other
|
|
198
|
+
* choice, and under the same `closeOnItemSelect` rule.
|
|
199
|
+
*/
|
|
200
|
+
onLinkActivate: () => void;
|
|
220
201
|
/**
|
|
221
202
|
* Only the root locks the page scroll. A submenu is a second overlay over
|
|
222
203
|
* the same interaction; locking again would just churn the reference count.
|
|
223
204
|
*/
|
|
224
205
|
get blockScroll(): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Focus goes into the menu as soon as it renders, not a timer later (focus
|
|
208
|
+
* trap's default `delayInitialFocus`). Until it does, keys still land on
|
|
209
|
+
* the trigger: a quick ArrowDown after Enter would reach the trigger
|
|
210
|
+
* instead of moving through the menu. Nothing needs the delay here: the
|
|
211
|
+
* menu opens on a click, an Enter/Space keyup, or an arrow keydown whose
|
|
212
|
+
* keyup the menu ignores (it acts on keydown).
|
|
213
|
+
*
|
|
214
|
+
* `preventScroll`, because at that moment the menu has not been positioned
|
|
215
|
+
* yet (Velcro places it a promise later): focusing it would scroll the page
|
|
216
|
+
* to where it sits before then, carrying the trigger out of view, which
|
|
217
|
+
* hides the menu (Velcro's `hide`) and drops focus to the body.
|
|
218
|
+
*
|
|
219
|
+
* A consumer's options still win.
|
|
220
|
+
*/
|
|
221
|
+
get focusTrapOptions(): MenuArgs['focusTrapOptions'];
|
|
225
222
|
get disableFocusTrap(): boolean;
|
|
226
223
|
/**
|
|
227
224
|
* The one place an open source becomes an activation mode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/collections/dropdown/dropdown.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../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EF,QAAQ,GAAI,KAAK,MAAM,UAYrB;IAEF;;;;OAIG;IACH,cAAc,aAMZ;IAEF;;;OAGG;IACH,IAAI,WAAW,YAKd;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,gBAAgB,IAAI,QAAQ,CAAC,kBAAkB,CAAC,CAMnD;IAED,IAAI,gBAAgB,YAKnB;IAED;;;;;;;OAOG;IACH,IAAI,gBAAgB,IAAI,MAAM,GAAG,OAAO,CAMvC;IAED;;;;;;OAMG;IACM,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,GAAI,MAAM,MAAM,UAMhC;IAEF;;;;;;;OAOG;IACH,eAAe,GAAI,OAAO,aAAa,UAqBrC;CAgDH;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAAC;AACvD,eAAe,QAAQ,CAAC"}
|
|
@@ -71,6 +71,41 @@ export interface ListboxItemSignature {
|
|
|
71
71
|
* `aria-controls`. Only meaningful alongside `@hasSubmenu`.
|
|
72
72
|
*/
|
|
73
73
|
submenuId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Renders the item as a link to this URL (a plain `<a>`, no router
|
|
76
|
+
* needed). Only honoured inside a `Dropdown` menu (`@type="menu"`).
|
|
77
|
+
*
|
|
78
|
+
* A link item follows its link instead of selecting: `@onAction` and
|
|
79
|
+
* `@onSelectionChange` are not called, and the menu closes.
|
|
80
|
+
*/
|
|
81
|
+
href?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Renders the item as a router link to this route. Only honoured inside
|
|
84
|
+
* a `Dropdown` menu. See `@href` for what a link item does on activation.
|
|
85
|
+
*/
|
|
86
|
+
route?: string;
|
|
87
|
+
/** Dynamic segments for `@route`. */
|
|
88
|
+
models?: unknown[];
|
|
89
|
+
/** A single dynamic segment for `@route`. */
|
|
90
|
+
model?: unknown;
|
|
91
|
+
/** Query params for `@route`. */
|
|
92
|
+
query?: Record<string, unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*
|
|
96
|
+
* Disables this one item, on top of the list's `@disabledKeys`: it is
|
|
97
|
+
* skipped by the arrow keys and type-ahead, cannot be chosen, and is
|
|
98
|
+
* marked `aria-disabled`. Supplied by `NavFolder` for its menu items,
|
|
99
|
+
* whose disabled state is known per item rather than as a list of keys.
|
|
100
|
+
*/
|
|
101
|
+
isDisabled?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*
|
|
105
|
+
* Called after a link item is activated. The `Dropdown` menu binds this
|
|
106
|
+
* to dismiss itself (honouring `@closeOnItemSelect`).
|
|
107
|
+
*/
|
|
108
|
+
onLinkActivate?: () => void;
|
|
74
109
|
};
|
|
75
110
|
Element: HTMLLIElement;
|
|
76
111
|
Blocks: {
|
|
@@ -87,7 +122,23 @@ declare class ListboxItem extends Component<ListboxItemSignature> {
|
|
|
87
122
|
get manager(): ListManager;
|
|
88
123
|
get key(): string;
|
|
89
124
|
onRegister: (item: ListItem) => void;
|
|
90
|
-
|
|
125
|
+
/**
|
|
126
|
+
* A link item exists only in a menu. `@type="listbox"` ignores the link
|
|
127
|
+
* args, so Listbox and Select are unchanged.
|
|
128
|
+
*/
|
|
129
|
+
get isLink(): boolean;
|
|
130
|
+
onClick: (event: MouseEvent) => void;
|
|
131
|
+
/**
|
|
132
|
+
* A link item never goes through `selectItem`, which is what fires
|
|
133
|
+
* `onAction` and `onSelectionChange`: following a link is not choosing.
|
|
134
|
+
*
|
|
135
|
+
* A click that did not start on the anchor -- Enter and Space (the listbox
|
|
136
|
+
* clicks the active `li`) or a click on the row's padding -- is forwarded to
|
|
137
|
+
* the anchor, so the browser or `LinkTo` does the navigating. That click
|
|
138
|
+
* bubbles back here with the anchor as its target, and only then does the
|
|
139
|
+
* menu close.
|
|
140
|
+
*/
|
|
141
|
+
private activateLink;
|
|
91
142
|
/**
|
|
92
143
|
* A roving tabindex: the manager nominates one option as the composite's tab
|
|
93
144
|
* stop and every other option stays out of the tab order, as the ARIA
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/components/collections/listbox/item.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/components/collections/listbox/item.gts"],"names":[],"mappings":"AA0lBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAIxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW,CAAC;QACrB,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;WAIG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,eAAe,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAClD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;QAEzC;;;WAGG;QACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;QAE9C;;WAEG;QACH,KAAK,CAAC,EACF,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;QAEb;;WAEG;QACH,MAAM,CAAC,EACH,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,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;IACH,IAAI,QAAQ,WAEX;IAED;;;;OAIG;IACH,IACI,OAAO,IAAI,OAAO,GAAG,SAAS,GAAG,QAAQ,CAc5C;IAED;;;;OAIG;IACH,IACI,KAAK,IAAI,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAc9D;IAED,IAAI,UAAU;;;;;;MAoBb;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAkB9C;IAED,IAAI,eAAe,yDAElB;IAED;;;;;;;OAOG;IACH,IAAI,kBAAkB,IAAI,OAAO,CAMhC;IAED,IAAI,IAAI,iEAYP;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,OAAO,GAAG,SAAS,CAE/C;IAED,gFAAgF;IAChF,OAAO,KAAK,aAAa,GAExB;IAED;;;;;;;OAOG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,OAAO,GAAG,SAAS,CAE9C;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAErC;IAED;;;;OAIG;IACH;;;;OAIG;IACH,IAAI,gBAAgB,IAAI,MAAM,GAAG,OAAO,GAAG,SAAS,CAKnD;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,OAAO,GAAG,SAAS,CAE/C;IAED,IAAI,eAAe,IAAI,MAAM,GAAG,OAAO,GAAG,SAAS,CAElD;CAmOF;AA4ED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -37,6 +37,7 @@ interface SegmentGroupSignature {
|
|
|
37
37
|
};
|
|
38
38
|
Element: HTMLDivElement;
|
|
39
39
|
}
|
|
40
|
+
declare const DEFAULT_LABELS: Record<SegmentType, string>;
|
|
40
41
|
/**
|
|
41
42
|
* Everything one rendered part needs, resolved to primitives.
|
|
42
43
|
*
|
|
@@ -127,6 +128,6 @@ declare class SegmentGroup extends Component<SegmentGroupSignature> {
|
|
|
127
128
|
handleCopy: (event: ClipboardEvent) => void;
|
|
128
129
|
handleCut: (event: ClipboardEvent) => void;
|
|
129
130
|
}
|
|
130
|
-
export { SegmentGroup, type SegmentGroupSignature };
|
|
131
|
+
export { SegmentGroup, DEFAULT_LABELS as DEFAULT_SEGMENT_LABELS, type SegmentGroupSignature };
|
|
131
132
|
export default SegmentGroup;
|
|
132
133
|
//# sourceMappingURL=segment-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-group.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segment-group.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"segment-group.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segment-group.gts"],"names":[],"mappings":"AA+bA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAe3C,OAAO,KAAK,EACV,IAAI,EACJ,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,UAAU,qBAAqB;IAC7B,IAAI,EAAE;QACJ,KAAK,EAAE,IAAI,EAAE,CAAC;QACd,sEAAsE;QACtE,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;QACvC;;;;;WAKG;QACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;QACpD,MAAM,EAAE,MAAM,CAAC;QACf,gBAAgB,EAAE,IAAI,CAAC;QACvB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,wEAAwE;QACxE,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAA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Aa,GAAI,OAAO,MAAM,EAAE,OAAO,aAAa,KAAG,IAAI,CAmFzD;IAEF;;;;;OAKG;IACH,cAAc,GAAI,OAAO,MAAM,KAAG,IAAI,CASpC;IAEF;;;;OAIG;IACH,iBAAiB,GAAI,OAAO,KAAK,KAAG,IAAI,CAEtC;IAEF;;;;;OAKG;IACH,WAAW,GAAI,OAAO,cAAc,KAAG,IAAI,CAYzC;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAYrB,UAAU,GAAI,OAAO,cAAc,KAAG,IAAI,CAMxC;IAEF,SAAS,GAAI,OAAO,cAAc,KAAG,IAAI,CAOvC;CAoIH;AAED,OAAO,EACL,YAAY,EACZ,cAAc,IAAI,sBAAsB,EACxC,KAAK,qBAAqB,EAC3B,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -81,6 +81,8 @@ declare function deleteDigit(segment: Segment): Segment;
|
|
|
81
81
|
declare function hourOnCycle(hours: number, cycle: HourCycle): number;
|
|
82
82
|
/** The 0-23 hour an hour segment and an AM/PM (0 or 1) stand for. */
|
|
83
83
|
declare function hourOfDay(hour: number, cycle: HourCycle, dayPeriod: number): number;
|
|
84
|
+
/** The unit of `date` this segment holds: what it seeds from, or is set to. */
|
|
85
|
+
declare function seedFrom(segment: Segment, date: Date): number;
|
|
84
86
|
/**
|
|
85
87
|
* Arrow and page keys. An empty segment does not step from zero -- it adopts
|
|
86
88
|
* `placeholderValue`, so ArrowUp on a blank year offers this year rather than
|
|
@@ -159,5 +161,5 @@ declare function resolveSegmentFormat(given: Intl.DateTimeFormatOptions | undefi
|
|
|
159
161
|
declare function hasDateChanged(before: Date | null, after: Date | null): boolean;
|
|
160
162
|
/** Writes a value across the segments, leaving literals untouched. */
|
|
161
163
|
declare function fromDate(parts: Part[], date: Date | null): Part[];
|
|
162
|
-
export { buildParts, withTime, applyLetter, timeOf, hourOnCycle, hourOfDay, isSegment, emptySegment, DEFAULT_FORMAT, BOUNDS, applyDigit, commitSegment, clearSegment, deleteDigit, step, toDate, fromDate, findSegment, resolveTwoDigitYear, daysInMonth, displaySegment, withValue, carryOver, hasTextualMonth, toNumericFormat, resolveSegmentFormat, hasDateChanged };
|
|
164
|
+
export { buildParts, withTime, applyLetter, timeOf, hourOnCycle, hourOfDay, seedFrom, isSegment, emptySegment, DEFAULT_FORMAT, BOUNDS, applyDigit, commitSegment, clearSegment, deleteDigit, step, toDate, fromDate, findSegment, resolveTwoDigitYear, daysInMonth, displaySegment, withValue, carryOver, hasTextualMonth, toNumericFormat, resolveSegmentFormat, hasDateChanged };
|
|
163
165
|
//# sourceMappingURL=segments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,IAAI,EACJ,OAAO,EACP,WAAW,EACX,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,IAAI,CAAC,qBAI1B,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,CAClB,WAAW,EACX;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAajE,CAAC;AAcF,iBAAS,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,OAAO,CAE9C;AAED,iBAAS,YAAY,CACnB,IAAI,EAAE,WAAW,EACjB,SAAS,GAAE,OAAO,CAAC,OAAO,CAAM,GAC/B,OAAO,CAcT;AAED;;;GAGG;AACH,iBAAS,QAAQ,CACf,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAClC,EAAE,WAAmB,EAAE,SAAS,EAAE,EAAE,WAAW,GAC9C,IAAI,CAAC,qBAAqB,CAS5B;AAgBD;;;;;;;;GAQG;AACH,iBAAS,UAAU,CACjB,MAAM,EAAE,MAAM,EACd,aAAa,GAAE,IAAI,CAAC,qBAAsC,EAC1D,IAAI,GAAE,WAAgB,GACrB,IAAI,EAAE,CA8BR;AA0BD;;;;;GAKG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,CAS3E;AAiBD;;;;;;;GAOG;AACH,iBAAS,UAAU,CACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAqCvC;AAED;;;;;;;GAOG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAYhD;AAED;;;;;;GAMG;AACH,iBAAS,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAO3D;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAClB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,GACV;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAQvC;AAED,sDAAsD;AACtD,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED,iDAAiD;AACjD,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAU9C;AAED,gDAAgD;AAChD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,CAK5D;AAED,qEAAqE;AACrE,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAG5E;
|
|
1
|
+
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,IAA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