@soxa-ui/plugins 0.0.0-stage → 0.3.0-beta.1
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/LICENSE +21 -0
- package/README.md +125 -2
- package/dist/base/base.class.d.ts +54 -0
- package/dist/base/base.class.js +69 -0
- package/dist/base/bundle.class.d.ts +25 -0
- package/dist/base/bundle.class.js +68 -0
- package/dist/base/index.d.ts +3 -0
- package/dist/base/types.d.ts +147 -0
- package/dist/custom/accordion/header.d.ts +19 -0
- package/dist/custom/accordion/header.js +38 -0
- package/dist/custom/accordion/index.d.ts +2 -0
- package/dist/custom/accordion/item-ids/index.d.ts +1 -0
- package/dist/custom/accordion/item-ids/item-ids.plugin.d.ts +24 -0
- package/dist/custom/accordion/item-ids/item-ids.plugin.js +44 -0
- package/dist/custom/action/action.plugin.d.ts +178 -0
- package/dist/custom/action/action.plugin.js +339 -0
- package/dist/custom/action/index.d.ts +2 -0
- package/dist/custom/action/types.d.ts +65 -0
- package/dist/custom/calendar/ids/ids.plugin.d.ts +25 -0
- package/dist/custom/calendar/ids/ids.plugin.js +44 -0
- package/dist/custom/calendar/ids/index.d.ts +1 -0
- package/dist/custom/calendar/index.d.ts +5 -0
- package/dist/custom/calendar/keyboard/index.d.ts +2 -0
- package/dist/custom/calendar/keyboard/keyboard.plugin.d.ts +114 -0
- package/dist/custom/calendar/keyboard/keyboard.plugin.js +249 -0
- package/dist/custom/calendar/keyboard/types.d.ts +16 -0
- package/dist/custom/calendar/names/index.d.ts +1 -0
- package/dist/custom/calendar/names/names.plugin.d.ts +24 -0
- package/dist/custom/calendar/names/names.plugin.js +45 -0
- package/dist/custom/calendar/parts.d.ts +58 -0
- package/dist/custom/calendar/parts.js +119 -0
- package/dist/custom/calendar/pointer/index.d.ts +2 -0
- package/dist/custom/calendar/pointer/pointer.plugin.d.ts +58 -0
- package/dist/custom/calendar/pointer/pointer.plugin.js +144 -0
- package/dist/custom/calendar/pointer/types.d.ts +6 -0
- package/dist/custom/calendar/stop.d.ts +20 -0
- package/dist/custom/calendar/stop.js +32 -0
- package/dist/custom/calendar/types.d.ts +16 -0
- package/dist/custom/clearable/index.d.ts +1 -0
- package/dist/custom/clearable/names/index.d.ts +1 -0
- package/dist/custom/clearable/names/names.plugin.d.ts +24 -0
- package/dist/custom/clearable/names/names.plugin.js +29 -0
- package/dist/custom/collection/bundles.plugin.d.ts +55 -0
- package/dist/custom/collection/bundles.plugin.js +100 -0
- package/dist/custom/collection/collection-bundles-access.plugin.d.ts +29 -0
- package/dist/custom/collection/collection-bundles-access.plugin.js +44 -0
- package/dist/custom/collection/collection-elements.plugin.d.ts +55 -0
- package/dist/custom/collection/collection-elements.plugin.js +100 -0
- package/dist/custom/collection/index.d.ts +4 -0
- package/dist/custom/collection/leaving-focus.d.ts +119 -0
- package/dist/custom/collection/leaving-focus.js +164 -0
- package/dist/custom/collection/reachable.d.ts +14 -0
- package/dist/custom/collection/reachable.js +18 -0
- package/dist/custom/collection/types.d.ts +14 -0
- package/dist/custom/component-view/aria.plugin.d.ts +102 -0
- package/dist/custom/component-view/aria.plugin.js +190 -0
- package/dist/custom/component-view/index.d.ts +2 -0
- package/dist/custom/component-view/types.d.ts +62 -0
- package/dist/custom/date-input/clipboard/clipboard.plugin.d.ts +41 -0
- package/dist/custom/date-input/clipboard/clipboard.plugin.js +98 -0
- package/dist/custom/date-input/clipboard/index.d.ts +2 -0
- package/dist/custom/date-input/clipboard/types.d.ts +6 -0
- package/dist/custom/date-input/ids/ids.plugin.d.ts +21 -0
- package/dist/custom/date-input/ids/ids.plugin.js +28 -0
- package/dist/custom/date-input/ids/index.d.ts +1 -0
- package/dist/custom/date-input/index.d.ts +6 -0
- package/dist/custom/date-input/keyboard/index.d.ts +2 -0
- package/dist/custom/date-input/keyboard/keyboard.plugin.d.ts +54 -0
- package/dist/custom/date-input/keyboard/keyboard.plugin.js +154 -0
- package/dist/custom/date-input/keyboard/types.d.ts +9 -0
- package/dist/custom/date-input/parts.d.ts +49 -0
- package/dist/custom/date-input/parts.js +127 -0
- package/dist/custom/date-input/pointer/index.d.ts +2 -0
- package/dist/custom/date-input/pointer/pointer.plugin.d.ts +51 -0
- package/dist/custom/date-input/pointer/pointer.plugin.js +141 -0
- package/dist/custom/date-input/pointer/types.d.ts +6 -0
- package/dist/custom/date-input/touch/index.d.ts +2 -0
- package/dist/custom/date-input/touch/touch.plugin.d.ts +100 -0
- package/dist/custom/date-input/touch/touch.plugin.js +276 -0
- package/dist/custom/date-input/touch/types.d.ts +6 -0
- package/dist/custom/date-input/types.d.ts +6 -0
- package/dist/custom/date-picker/field.d.ts +20 -0
- package/dist/custom/date-picker/field.js +27 -0
- package/dist/custom/date-picker/focus/focus.plugin.d.ts +56 -0
- package/dist/custom/date-picker/focus/focus.plugin.js +81 -0
- package/dist/custom/date-picker/focus/index.d.ts +2 -0
- package/dist/custom/date-picker/focus/types.d.ts +3 -0
- package/dist/custom/date-picker/ids/ids.plugin.d.ts +19 -0
- package/dist/custom/date-picker/ids/ids.plugin.js +28 -0
- package/dist/custom/date-picker/ids/index.d.ts +1 -0
- package/dist/custom/date-picker/index.d.ts +5 -0
- package/dist/custom/date-picker/names/index.d.ts +2 -0
- package/dist/custom/date-picker/names/names.plugin.d.ts +33 -0
- package/dist/custom/date-picker/names/names.plugin.js +80 -0
- package/dist/custom/date-picker/names/types.d.ts +12 -0
- package/dist/custom/date-picker/trigger/index.d.ts +2 -0
- package/dist/custom/date-picker/trigger/trigger.plugin.d.ts +37 -0
- package/dist/custom/date-picker/trigger/trigger.plugin.js +69 -0
- package/dist/custom/date-picker/trigger/types.d.ts +3 -0
- package/dist/custom/dialog/ids/ids.plugin.d.ts +15 -0
- package/dist/custom/dialog/ids/ids.plugin.js +28 -0
- package/dist/custom/dialog/ids/index.d.ts +1 -0
- package/dist/custom/dialog/index.d.ts +3 -0
- package/dist/custom/dialog/layout/index.d.ts +3 -0
- package/dist/custom/dialog/layout/layout.plugin.d.ts +42 -0
- package/dist/custom/dialog/layout/layout.plugin.js +78 -0
- package/dist/custom/dialog/layout/offset-event.d.ts +35 -0
- package/dist/custom/dialog/layout/offset-event.js +44 -0
- package/dist/custom/dialog/layout/types.d.ts +12 -0
- package/dist/custom/dialog/names/index.d.ts +1 -0
- package/dist/custom/dialog/names/names.plugin.d.ts +13 -0
- package/dist/custom/dialog/names/names.plugin.js +17 -0
- package/dist/custom/dismiss/dismiss.plugin.d.ts +174 -0
- package/dist/custom/dismiss/dismiss.plugin.js +287 -0
- package/dist/custom/dismiss/index.d.ts +2 -0
- package/dist/custom/dismiss/types.d.ts +59 -0
- package/dist/custom/drag-and-drop/drag.plugin.d.ts +87 -0
- package/dist/custom/drag-and-drop/drag.plugin.js +310 -0
- package/dist/custom/drag-and-drop/index.d.ts +2 -0
- package/dist/custom/drag-and-drop/types.d.ts +13 -0
- package/dist/custom/drawer/index.d.ts +1 -0
- package/dist/custom/drawer/layout/index.d.ts +2 -0
- package/dist/custom/drawer/layout/layout.plugin.d.ts +17 -0
- package/dist/custom/drawer/layout/layout.plugin.js +22 -0
- package/dist/custom/drawer/layout/types.d.ts +3 -0
- package/dist/custom/element/element.plugin.d.ts +35 -0
- package/dist/custom/element/element.plugin.js +58 -0
- package/dist/custom/element/index.d.ts +2 -0
- package/dist/custom/element/types.d.ts +18 -0
- package/dist/custom/field/ids/ids.plugin.d.ts +64 -0
- package/dist/custom/field/ids/ids.plugin.js +126 -0
- package/dist/custom/field/ids/index.d.ts +2 -0
- package/dist/custom/field/ids/types.d.ts +28 -0
- package/dist/custom/field/index.d.ts +1 -0
- package/dist/custom/frame/anchor/anchor.plugin.d.ts +483 -0
- package/dist/custom/frame/anchor/anchor.plugin.js +820 -0
- package/dist/custom/frame/anchor/index.d.ts +2 -0
- package/dist/custom/frame/anchor/types.d.ts +83 -0
- package/dist/custom/frame/index.d.ts +2 -0
- package/dist/custom/frame/layout/index.d.ts +2 -0
- package/dist/custom/frame/layout/layout.plugin.d.ts +24 -0
- package/dist/custom/frame/layout/layout.plugin.js +65 -0
- package/dist/custom/frame/layout/types.d.ts +5 -0
- package/dist/custom/icon/index.d.ts +2 -0
- package/dist/custom/icon/layout.plugin.d.ts +21 -0
- package/dist/custom/icon/layout.plugin.js +51 -0
- package/dist/custom/icon/types.d.ts +5 -0
- package/dist/custom/id/id.plugin.d.ts +32 -0
- package/dist/custom/id/id.plugin.js +42 -0
- package/dist/custom/id/index.d.ts +2 -0
- package/dist/custom/id/types.d.ts +6 -0
- package/dist/custom/index.d.ts +42 -0
- package/dist/custom/input/field.d.ts +16 -0
- package/dist/custom/input/field.js +27 -0
- package/dist/custom/input/index.d.ts +3 -0
- package/dist/custom/input/input.plugin.d.ts +12 -0
- package/dist/custom/input/input.plugin.js +46 -0
- package/dist/custom/input/types.d.ts +2 -0
- package/dist/custom/input-bool/index.d.ts +2 -0
- package/dist/custom/input-bool/input-bool.plugin.d.ts +30 -0
- package/dist/custom/input-bool/input-bool.plugin.js +77 -0
- package/dist/custom/input-bool/types.d.ts +5 -0
- package/dist/custom/input-control/index.d.ts +2 -0
- package/dist/custom/input-control/input-control.plugin.d.ts +12 -0
- package/dist/custom/input-control/input-control.plugin.js +40 -0
- package/dist/custom/input-control/types.d.ts +2 -0
- package/dist/custom/item-group/ids/ids.plugin.d.ts +19 -0
- package/dist/custom/item-group/ids/ids.plugin.js +32 -0
- package/dist/custom/item-group/ids/index.d.ts +1 -0
- package/dist/custom/item-group/index.d.ts +1 -0
- package/dist/custom/label/index.d.ts +1 -0
- package/dist/custom/label/nested-warn/index.d.ts +1 -0
- package/dist/custom/label/nested-warn/nested-warn.plugin.d.ts +21 -0
- package/dist/custom/label/nested-warn/nested-warn.plugin.js +41 -0
- package/dist/custom/list/height/height.plugin.d.ts +129 -0
- package/dist/custom/list/height/height.plugin.js +272 -0
- package/dist/custom/list/height/index.d.ts +2 -0
- package/dist/custom/list/height/types.d.ts +10 -0
- package/dist/custom/list/index.d.ts +7 -0
- package/dist/custom/list/item/index.d.ts +2 -0
- package/dist/custom/list/item/item.plugin.d.ts +25 -0
- package/dist/custom/list/item/item.plugin.js +46 -0
- package/dist/custom/list/item/types.d.ts +5 -0
- package/dist/custom/list/keyboard/index.d.ts +2 -0
- package/dist/custom/list/keyboard/keyboard.plugin.d.ts +133 -0
- package/dist/custom/list/keyboard/keyboard.plugin.js +199 -0
- package/dist/custom/list/keyboard/types.d.ts +3 -0
- package/dist/custom/list/navigation/index.d.ts +2 -0
- package/dist/custom/list/navigation/navigation.plugin.d.ts +262 -0
- package/dist/custom/list/navigation/navigation.plugin.js +402 -0
- package/dist/custom/list/navigation/types.d.ts +25 -0
- package/dist/custom/list/newly-selected.d.ts +17 -0
- package/dist/custom/list/newly-selected.js +22 -0
- package/dist/custom/list/option-ids/index.d.ts +1 -0
- package/dist/custom/list/option-ids/option-ids.plugin.d.ts +29 -0
- package/dist/custom/list/option-ids/option-ids.plugin.js +43 -0
- package/dist/custom/list/row.d.ts +50 -0
- package/dist/custom/list/row.js +99 -0
- package/dist/custom/list/scroll/index.d.ts +2 -0
- package/dist/custom/list/scroll/scroll.plugin.d.ts +132 -0
- package/dist/custom/list/scroll/scroll.plugin.js +286 -0
- package/dist/custom/list/scroll/types.d.ts +21 -0
- package/dist/custom/list/typeahead.d.ts +53 -0
- package/dist/custom/list/typeahead.js +58 -0
- package/dist/custom/menu/focus/focus.plugin.d.ts +61 -0
- package/dist/custom/menu/focus/focus.plugin.js +105 -0
- package/dist/custom/menu/focus/index.d.ts +2 -0
- package/dist/custom/menu/focus/types.d.ts +2 -0
- package/dist/custom/menu/hover/hover.plugin.d.ts +99 -0
- package/dist/custom/menu/hover/hover.plugin.js +235 -0
- package/dist/custom/menu/hover/index.d.ts +2 -0
- package/dist/custom/menu/hover/types.d.ts +2 -0
- package/dist/custom/menu/ids/ids.plugin.d.ts +29 -0
- package/dist/custom/menu/ids/ids.plugin.js +46 -0
- package/dist/custom/menu/ids/index.d.ts +1 -0
- package/dist/custom/menu/index.d.ts +11 -0
- package/dist/custom/menu/keyboard/index.d.ts +2 -0
- package/dist/custom/menu/keyboard/keyboard.plugin.d.ts +41 -0
- package/dist/custom/menu/keyboard/keyboard.plugin.js +68 -0
- package/dist/custom/menu/keyboard/types.d.ts +2 -0
- package/dist/custom/menu/navigation/index.d.ts +2 -0
- package/dist/custom/menu/navigation/navigation.plugin.d.ts +116 -0
- package/dist/custom/menu/navigation/navigation.plugin.js +222 -0
- package/dist/custom/menu/navigation/types.d.ts +2 -0
- package/dist/custom/menu/nested-layer.d.ts +13 -0
- package/dist/custom/menu/nested-layer.js +20 -0
- package/dist/custom/menu/pointer/index.d.ts +2 -0
- package/dist/custom/menu/pointer/pointer.plugin.d.ts +45 -0
- package/dist/custom/menu/pointer/pointer.plugin.js +95 -0
- package/dist/custom/menu/pointer/strategies/context.strategy.d.ts +70 -0
- package/dist/custom/menu/pointer/strategies/context.strategy.js +170 -0
- package/dist/custom/menu/pointer/strategies/index.d.ts +3 -0
- package/dist/custom/menu/pointer/strategies/press.strategy.d.ts +23 -0
- package/dist/custom/menu/pointer/strategies/press.strategy.js +33 -0
- package/dist/custom/menu/pointer/strategies/types.d.ts +49 -0
- package/dist/custom/menu/pointer/types.d.ts +2 -0
- package/dist/custom/menu/popover-item-focus/focus.plugin.d.ts +54 -0
- package/dist/custom/menu/popover-item-focus/focus.plugin.js +70 -0
- package/dist/custom/menu/popover-item-focus/index.d.ts +2 -0
- package/dist/custom/menu/popover-item-focus/types.d.ts +10 -0
- package/dist/custom/menu/popover-item-keyboard/index.d.ts +2 -0
- package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.d.ts +43 -0
- package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.js +79 -0
- package/dist/custom/menu/popover-item-keyboard/types.d.ts +2 -0
- package/dist/custom/menu/popup-ids/ids.plugin.d.ts +27 -0
- package/dist/custom/menu/popup-ids/ids.plugin.js +47 -0
- package/dist/custom/menu/popup-ids/index.d.ts +1 -0
- package/dist/custom/menu/submenu-focus/focus.plugin.d.ts +53 -0
- package/dist/custom/menu/submenu-focus/focus.plugin.js +84 -0
- package/dist/custom/menu/submenu-focus/index.d.ts +2 -0
- package/dist/custom/menu/submenu-focus/types.d.ts +10 -0
- package/dist/custom/menu/submenu-keyboard/index.d.ts +2 -0
- package/dist/custom/menu/submenu-keyboard/keyboard.plugin.d.ts +43 -0
- package/dist/custom/menu/submenu-keyboard/keyboard.plugin.js +74 -0
- package/dist/custom/menu/submenu-keyboard/types.d.ts +2 -0
- package/dist/custom/number-input/index.d.ts +5 -0
- package/dist/custom/number-input/keyboard/index.d.ts +2 -0
- package/dist/custom/number-input/keyboard/keyboard.plugin.d.ts +36 -0
- package/dist/custom/number-input/keyboard/keyboard.plugin.js +80 -0
- package/dist/custom/number-input/keyboard/types.d.ts +3 -0
- package/dist/custom/number-input/names/index.d.ts +1 -0
- package/dist/custom/number-input/names/names.plugin.d.ts +17 -0
- package/dist/custom/number-input/names/names.plugin.js +24 -0
- package/dist/custom/number-input/parts.d.ts +21 -0
- package/dist/custom/number-input/parts.js +39 -0
- package/dist/custom/number-input/stepper/index.d.ts +2 -0
- package/dist/custom/number-input/stepper/stepper.plugin.d.ts +59 -0
- package/dist/custom/number-input/stepper/stepper.plugin.js +166 -0
- package/dist/custom/number-input/stepper/types.d.ts +19 -0
- package/dist/custom/number-input/touch/index.d.ts +2 -0
- package/dist/custom/number-input/touch/touch.plugin.d.ts +25 -0
- package/dist/custom/number-input/touch/touch.plugin.js +53 -0
- package/dist/custom/number-input/touch/types.d.ts +3 -0
- package/dist/custom/number-input/types.d.ts +8 -0
- package/dist/custom/number-input/typing/index.d.ts +2 -0
- package/dist/custom/number-input/typing/types.d.ts +6 -0
- package/dist/custom/number-input/typing/typing.plugin.d.ts +47 -0
- package/dist/custom/number-input/typing/typing.plugin.js +149 -0
- package/dist/custom/overlay/focus/focus.plugin.d.ts +150 -0
- package/dist/custom/overlay/focus/focus.plugin.js +242 -0
- package/dist/custom/overlay/focus/index.d.ts +1 -0
- package/dist/custom/overlay/hide-outside/hide-outside.plugin.d.ts +84 -0
- package/dist/custom/overlay/hide-outside/hide-outside.plugin.js +187 -0
- package/dist/custom/overlay/hide-outside/index.d.ts +2 -0
- package/dist/custom/overlay/hide-outside/marks.d.ts +19 -0
- package/dist/custom/overlay/hide-outside/marks.js +43 -0
- package/dist/custom/overlay/hide-outside/types.d.ts +17 -0
- package/dist/custom/overlay/index.d.ts +9 -0
- package/dist/custom/overlay/modal-focus/index.d.ts +1 -0
- package/dist/custom/overlay/modal-focus/modal-focus.plugin.d.ts +72 -0
- package/dist/custom/overlay/modal-focus/modal-focus.plugin.js +109 -0
- package/dist/custom/overlay/modal-ids/index.d.ts +1 -0
- package/dist/custom/overlay/modal-ids/modal-ids.plugin.d.ts +21 -0
- package/dist/custom/overlay/modal-ids/modal-ids.plugin.js +30 -0
- package/dist/custom/overlay/modal-layout/index.d.ts +2 -0
- package/dist/custom/overlay/modal-layout/modal-layout.plugin.d.ts +66 -0
- package/dist/custom/overlay/modal-layout/modal-layout.plugin.js +119 -0
- package/dist/custom/overlay/modal-layout/types.d.ts +13 -0
- package/dist/custom/overlay/modal-names/index.d.ts +1 -0
- package/dist/custom/overlay/modal-names/modal-names.plugin.d.ts +14 -0
- package/dist/custom/overlay/modal-names/modal-names.plugin.js +17 -0
- package/dist/custom/overlay/open-state.d.ts +12 -0
- package/dist/custom/overlay/open-state.js +42 -0
- package/dist/custom/overlay/scroll-lock/index.d.ts +2 -0
- package/dist/custom/overlay/scroll-lock/lock.d.ts +17 -0
- package/dist/custom/overlay/scroll-lock/lock.js +83 -0
- package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.d.ts +78 -0
- package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.js +134 -0
- package/dist/custom/overlay/scroll-lock/types.d.ts +17 -0
- package/dist/custom/overlay/swipe/index.d.ts +2 -0
- package/dist/custom/overlay/swipe/swipe.plugin.d.ts +150 -0
- package/dist/custom/overlay/swipe/swipe.plugin.js +432 -0
- package/dist/custom/overlay/swipe/types.d.ts +62 -0
- package/dist/custom/overlay/types.d.ts +40 -0
- package/dist/custom/pagination/current.d.ts +24 -0
- package/dist/custom/pagination/current.js +34 -0
- package/dist/custom/pagination/focus/focus.plugin.d.ts +57 -0
- package/dist/custom/pagination/focus/focus.plugin.js +106 -0
- package/dist/custom/pagination/focus/index.d.ts +2 -0
- package/dist/custom/pagination/focus/types.d.ts +8 -0
- package/dist/custom/pagination/index.d.ts +3 -0
- package/dist/custom/pagination/names/index.d.ts +1 -0
- package/dist/custom/pagination/names/names.plugin.d.ts +15 -0
- package/dist/custom/pagination/names/names.plugin.js +19 -0
- package/dist/custom/popover/focus/focus.plugin.d.ts +69 -0
- package/dist/custom/popover/focus/focus.plugin.js +107 -0
- package/dist/custom/popover/focus/index.d.ts +2 -0
- package/dist/custom/popover/focus/types.d.ts +2 -0
- package/dist/custom/popover/ids/ids.plugin.d.ts +18 -0
- package/dist/custom/popover/ids/ids.plugin.js +27 -0
- package/dist/custom/popover/ids/index.d.ts +1 -0
- package/dist/custom/popover/index.d.ts +4 -0
- package/dist/custom/popover/names/index.d.ts +1 -0
- package/dist/custom/popover/names/names.plugin.d.ts +7 -0
- package/dist/custom/popover/names/names.plugin.js +10 -0
- package/dist/custom/popover/pointer/index.d.ts +2 -0
- package/dist/custom/popover/pointer/pointer.plugin.d.ts +35 -0
- package/dist/custom/popover/pointer/pointer.plugin.js +65 -0
- package/dist/custom/popover/pointer/types.d.ts +2 -0
- package/dist/custom/radio-group/checked/checked.plugin.d.ts +45 -0
- package/dist/custom/radio-group/checked/checked.plugin.js +81 -0
- package/dist/custom/radio-group/checked/index.d.ts +1 -0
- package/dist/custom/radio-group/index.d.ts +3 -0
- package/dist/custom/radio-group/name/index.d.ts +1 -0
- package/dist/custom/radio-group/name/name.plugin.d.ts +21 -0
- package/dist/custom/radio-group/name/name.plugin.js +39 -0
- package/dist/custom/radio-group/stop.d.ts +17 -0
- package/dist/custom/radio-group/stop.js +30 -0
- package/dist/custom/rating/hover/hover.plugin.d.ts +36 -0
- package/dist/custom/rating/hover/hover.plugin.js +71 -0
- package/dist/custom/rating/hover/index.d.ts +2 -0
- package/dist/custom/rating/hover/types.d.ts +7 -0
- package/dist/custom/rating/index.d.ts +3 -0
- package/dist/custom/rating/names/index.d.ts +1 -0
- package/dist/custom/rating/names/names.plugin.d.ts +25 -0
- package/dist/custom/rating/names/names.plugin.js +45 -0
- package/dist/custom/rating/validity/index.d.ts +2 -0
- package/dist/custom/rating/validity/types.d.ts +7 -0
- package/dist/custom/rating/validity/validity.plugin.d.ts +48 -0
- package/dist/custom/rating/validity/validity.plugin.js +91 -0
- package/dist/custom/ready/index.d.ts +1 -0
- package/dist/custom/ready/ready.plugin.d.ts +14 -0
- package/dist/custom/ready/ready.plugin.js +28 -0
- package/dist/custom/scroller/index.d.ts +2 -0
- package/dist/custom/scroller/names/index.d.ts +1 -0
- package/dist/custom/scroller/names/names.plugin.d.ts +11 -0
- package/dist/custom/scroller/names/names.plugin.js +15 -0
- package/dist/custom/scroller/viewport/edges.d.ts +34 -0
- package/dist/custom/scroller/viewport/edges.js +29 -0
- package/dist/custom/scroller/viewport/focus.d.ts +39 -0
- package/dist/custom/scroller/viewport/focus.js +61 -0
- package/dist/custom/scroller/viewport/index.d.ts +6 -0
- package/dist/custom/scroller/viewport/stop.d.ts +24 -0
- package/dist/custom/scroller/viewport/stop.js +34 -0
- package/dist/custom/scroller/viewport/types.d.ts +31 -0
- package/dist/custom/scroller/viewport/viewport.plugin.d.ts +163 -0
- package/dist/custom/scroller/viewport/viewport.plugin.js +352 -0
- package/dist/custom/select/backspace/backspace.plugin.d.ts +50 -0
- package/dist/custom/select/backspace/backspace.plugin.js +125 -0
- package/dist/custom/select/backspace/index.d.ts +2 -0
- package/dist/custom/select/backspace/types.d.ts +2 -0
- package/dist/custom/select/editable/editable.plugin.d.ts +193 -0
- package/dist/custom/select/editable/editable.plugin.js +347 -0
- package/dist/custom/select/editable/index.d.ts +2 -0
- package/dist/custom/select/editable/types.d.ts +6 -0
- package/dist/custom/select/ids/ids.plugin.d.ts +22 -0
- package/dist/custom/select/ids/ids.plugin.js +31 -0
- package/dist/custom/select/ids/index.d.ts +1 -0
- package/dist/custom/select/index.d.ts +5 -0
- package/dist/custom/select/keyboard/index.d.ts +2 -0
- package/dist/custom/select/keyboard/keyboard.plugin.d.ts +125 -0
- package/dist/custom/select/keyboard/keyboard.plugin.js +205 -0
- package/dist/custom/select/keyboard/strategies/base.strategy.d.ts +37 -0
- package/dist/custom/select/keyboard/strategies/base.strategy.js +81 -0
- package/dist/custom/select/keyboard/strategies/editable.strategy.d.ts +16 -0
- package/dist/custom/select/keyboard/strategies/editable.strategy.js +20 -0
- package/dist/custom/select/keyboard/strategies/index.d.ts +4 -0
- package/dist/custom/select/keyboard/strategies/select-only.strategy.d.ts +13 -0
- package/dist/custom/select/keyboard/strategies/select-only.strategy.js +59 -0
- package/dist/custom/select/keyboard/strategies/types.d.ts +29 -0
- package/dist/custom/select/keyboard/types.d.ts +18 -0
- package/dist/custom/select/pointer/index.d.ts +2 -0
- package/dist/custom/select/pointer/pointer.plugin.d.ts +59 -0
- package/dist/custom/select/pointer/pointer.plugin.js +104 -0
- package/dist/custom/select/pointer/types.d.ts +2 -0
- package/dist/custom/skeleton/index.d.ts +2 -0
- package/dist/custom/skeleton/layout.plugin.d.ts +18 -0
- package/dist/custom/skeleton/layout.plugin.js +47 -0
- package/dist/custom/skeleton/types.d.ts +5 -0
- package/dist/custom/slide/direction.d.ts +30 -0
- package/dist/custom/slide/direction.js +75 -0
- package/dist/custom/slide/index.d.ts +4 -0
- package/dist/custom/slide/keyboard/index.d.ts +2 -0
- package/dist/custom/slide/keyboard/keyboard.plugin.d.ts +46 -0
- package/dist/custom/slide/keyboard/keyboard.plugin.js +106 -0
- package/dist/custom/slide/keyboard/types.d.ts +6 -0
- package/dist/custom/slide/parts.d.ts +7 -0
- package/dist/custom/slide/parts.js +26 -0
- package/dist/custom/slide/pointer/index.d.ts +2 -0
- package/dist/custom/slide/pointer/pointer.plugin.d.ts +100 -0
- package/dist/custom/slide/pointer/pointer.plugin.js +268 -0
- package/dist/custom/slide/pointer/strategies/base.strategy.d.ts +16 -0
- package/dist/custom/slide/pointer/strategies/base.strategy.js +23 -0
- package/dist/custom/slide/pointer/strategies/hold.strategy.d.ts +28 -0
- package/dist/custom/slide/pointer/strategies/hold.strategy.js +48 -0
- package/dist/custom/slide/pointer/strategies/index.d.ts +7 -0
- package/dist/custom/slide/pointer/strategies/magnet.strategy.d.ts +11 -0
- package/dist/custom/slide/pointer/strategies/magnet.strategy.js +17 -0
- package/dist/custom/slide/pointer/strategies/none.strategy.d.ts +7 -0
- package/dist/custom/slide/pointer/strategies/none.strategy.js +9 -0
- package/dist/custom/slide/pointer/strategies/plateau.strategy.d.ts +24 -0
- package/dist/custom/slide/pointer/strategies/plateau.strategy.js +81 -0
- package/dist/custom/slide/pointer/strategies/points.d.ts +16 -0
- package/dist/custom/slide/pointer/strategies/points.js +32 -0
- package/dist/custom/slide/pointer/strategies/settle.strategy.d.ts +11 -0
- package/dist/custom/slide/pointer/strategies/settle.strategy.js +17 -0
- package/dist/custom/slide/pointer/strategies/types.d.ts +57 -0
- package/dist/custom/slide/pointer/types.d.ts +46 -0
- package/dist/custom/slide/types.d.ts +14 -0
- package/dist/custom/table/column-ids/column-ids.plugin.d.ts +26 -0
- package/dist/custom/table/column-ids/column-ids.plugin.js +36 -0
- package/dist/custom/table/column-ids/index.d.ts +1 -0
- package/dist/custom/table/column-names/column-names.plugin.d.ts +18 -0
- package/dist/custom/table/column-names/column-names.plugin.js +24 -0
- package/dist/custom/table/column-names/index.d.ts +1 -0
- package/dist/custom/table/column-reorder/column-reorder.plugin.d.ts +169 -0
- package/dist/custom/table/column-reorder/column-reorder.plugin.js +465 -0
- package/dist/custom/table/column-reorder/index.d.ts +2 -0
- package/dist/custom/table/column-reorder/types.d.ts +81 -0
- package/dist/custom/table/column-resize/column-resize.plugin.d.ts +96 -0
- package/dist/custom/table/column-resize/column-resize.plugin.js +271 -0
- package/dist/custom/table/column-resize/index.d.ts +2 -0
- package/dist/custom/table/column-resize/types.d.ts +38 -0
- package/dist/custom/table/grid/grid.plugin.d.ts +119 -0
- package/dist/custom/table/grid/grid.plugin.js +356 -0
- package/dist/custom/table/grid/index.d.ts +2 -0
- package/dist/custom/table/grid/types.d.ts +22 -0
- package/dist/custom/table/index.d.ts +8 -0
- package/dist/custom/table/layout/index.d.ts +2 -0
- package/dist/custom/table/layout/layout.plugin.d.ts +52 -0
- package/dist/custom/table/layout/layout.plugin.js +122 -0
- package/dist/custom/table/layout/types.d.ts +7 -0
- package/dist/custom/table/names/index.d.ts +2 -0
- package/dist/custom/table/names/names.plugin.d.ts +18 -0
- package/dist/custom/table/names/names.plugin.js +31 -0
- package/dist/custom/table/names/types.d.ts +6 -0
- package/dist/custom/table/row-ids/index.d.ts +1 -0
- package/dist/custom/table/row-ids/row-ids.plugin.d.ts +21 -0
- package/dist/custom/table/row-ids/row-ids.plugin.js +28 -0
- package/dist/custom/tabs/active-tab/active-tab.plugin.d.ts +42 -0
- package/dist/custom/tabs/active-tab/active-tab.plugin.js +103 -0
- package/dist/custom/tabs/active-tab/index.d.ts +2 -0
- package/dist/custom/tabs/active-tab/types.d.ts +17 -0
- package/dist/custom/tabs/content-warn/content-warn.plugin.d.ts +21 -0
- package/dist/custom/tabs/content-warn/content-warn.plugin.js +41 -0
- package/dist/custom/tabs/content-warn/index.d.ts +1 -0
- package/dist/custom/tabs/index.d.ts +7 -0
- package/dist/custom/tabs/item-ids/index.d.ts +1 -0
- package/dist/custom/tabs/item-ids/item-ids.plugin.d.ts +60 -0
- package/dist/custom/tabs/item-ids/item-ids.plugin.js +94 -0
- package/dist/custom/tabs/item-names/index.d.ts +1 -0
- package/dist/custom/tabs/item-names/item-names.plugin.d.ts +17 -0
- package/dist/custom/tabs/item-names/item-names.plugin.js +23 -0
- package/dist/custom/tabs/keyboard/index.d.ts +2 -0
- package/dist/custom/tabs/keyboard/keyboard.plugin.d.ts +105 -0
- package/dist/custom/tabs/keyboard/keyboard.plugin.js +206 -0
- package/dist/custom/tabs/keyboard/types.d.ts +6 -0
- package/dist/custom/tabs/layout/index.d.ts +2 -0
- package/dist/custom/tabs/layout/layout.plugin.d.ts +37 -0
- package/dist/custom/tabs/layout/layout.plugin.js +81 -0
- package/dist/custom/tabs/layout/types.d.ts +4 -0
- package/dist/custom/tabs/parts.d.ts +15 -0
- package/dist/custom/tabs/parts.js +21 -0
- package/dist/custom/tabs/tab.d.ts +29 -0
- package/dist/custom/tabs/tab.js +44 -0
- package/dist/custom/tags/index.d.ts +4 -0
- package/dist/custom/tags/item-names/index.d.ts +1 -0
- package/dist/custom/tags/item-names/item-names.plugin.d.ts +12 -0
- package/dist/custom/tags/item-names/item-names.plugin.js +18 -0
- package/dist/custom/tags/keyboard/index.d.ts +2 -0
- package/dist/custom/tags/keyboard/keyboard.plugin.d.ts +133 -0
- package/dist/custom/tags/keyboard/keyboard.plugin.js +253 -0
- package/dist/custom/tags/keyboard/types.d.ts +6 -0
- package/dist/custom/tags/scroll/index.d.ts +2 -0
- package/dist/custom/tags/scroll/scroll.plugin.d.ts +68 -0
- package/dist/custom/tags/scroll/scroll.plugin.js +120 -0
- package/dist/custom/tags/scroll/types.d.ts +6 -0
- package/dist/custom/tags/tag.d.ts +41 -0
- package/dist/custom/tags/tag.js +66 -0
- package/dist/custom/textarea/autoresize/autoresize.plugin.d.ts +70 -0
- package/dist/custom/textarea/autoresize/autoresize.plugin.js +176 -0
- package/dist/custom/textarea/autoresize/index.d.ts +2 -0
- package/dist/custom/textarea/autoresize/types.d.ts +6 -0
- package/dist/custom/textarea/ids/ids.plugin.d.ts +26 -0
- package/dist/custom/textarea/ids/ids.plugin.js +44 -0
- package/dist/custom/textarea/ids/index.d.ts +1 -0
- package/dist/custom/textarea/index.d.ts +3 -0
- package/dist/custom/textarea/names/index.d.ts +2 -0
- package/dist/custom/textarea/names/names.plugin.d.ts +33 -0
- package/dist/custom/textarea/names/names.plugin.js +65 -0
- package/dist/custom/textarea/names/types.d.ts +8 -0
- package/dist/custom/toasts/cascade/cascade.plugin.d.ts +81 -0
- package/dist/custom/toasts/cascade/cascade.plugin.js +214 -0
- package/dist/custom/toasts/cascade/index.d.ts +2 -0
- package/dist/custom/toasts/cascade/types.d.ts +15 -0
- package/dist/custom/toasts/index.d.ts +7 -0
- package/dist/custom/toasts/item-names/index.d.ts +1 -0
- package/dist/custom/toasts/item-names/item-names.plugin.d.ts +12 -0
- package/dist/custom/toasts/item-names/item-names.plugin.js +18 -0
- package/dist/custom/toasts/keyboard/index.d.ts +2 -0
- package/dist/custom/toasts/keyboard/keyboard.plugin.d.ts +57 -0
- package/dist/custom/toasts/keyboard/keyboard.plugin.js +136 -0
- package/dist/custom/toasts/keyboard/types.d.ts +6 -0
- package/dist/custom/toasts/layout/index.d.ts +2 -0
- package/dist/custom/toasts/layout/layout.plugin.d.ts +23 -0
- package/dist/custom/toasts/layout/layout.plugin.js +39 -0
- package/dist/custom/toasts/layout/types.d.ts +5 -0
- package/dist/custom/toasts/names/index.d.ts +1 -0
- package/dist/custom/toasts/names/names.plugin.d.ts +10 -0
- package/dist/custom/toasts/names/names.plugin.js +13 -0
- package/dist/custom/toasts/removal/index.d.ts +2 -0
- package/dist/custom/toasts/removal/removal.plugin.d.ts +35 -0
- package/dist/custom/toasts/removal/removal.plugin.js +69 -0
- package/dist/custom/toasts/removal/types.d.ts +6 -0
- package/dist/custom/toasts/timer/index.d.ts +2 -0
- package/dist/custom/toasts/timer/timer.plugin.d.ts +71 -0
- package/dist/custom/toasts/timer/timer.plugin.js +213 -0
- package/dist/custom/toasts/timer/types.d.ts +15 -0
- package/dist/custom/tooltip/ids/ids.plugin.d.ts +22 -0
- package/dist/custom/tooltip/ids/ids.plugin.js +42 -0
- package/dist/custom/tooltip/ids/index.d.ts +1 -0
- package/dist/custom/tooltip/index.d.ts +2 -0
- package/dist/custom/tooltip/trigger/document-state.d.ts +42 -0
- package/dist/custom/tooltip/trigger/document-state.js +50 -0
- package/dist/custom/tooltip/trigger/index.d.ts +2 -0
- package/dist/custom/tooltip/trigger/trigger.plugin.d.ts +133 -0
- package/dist/custom/tooltip/trigger/trigger.plugin.js +271 -0
- package/dist/custom/tooltip/trigger/types.d.ts +20 -0
- package/dist/custom/virtual/index.d.ts +2 -0
- package/dist/custom/virtual/types.d.ts +6 -0
- package/dist/custom/virtual/virtual.plugin.d.ts +126 -0
- package/dist/custom/virtual/virtual.plugin.js +311 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +149 -0
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/locale.d.ts +38 -0
- package/dist/locale/locale.js +93 -0
- package/dist/locale/locale.plugin.d.ts +26 -0
- package/dist/locale/locale.plugin.js +35 -0
- package/dist/locale/locales/ar.d.ts +5 -0
- package/dist/locale/locales/ar.js +59 -0
- package/dist/locale/locales/en.d.ts +7 -0
- package/dist/locale/locales/en.js +61 -0
- package/dist/locale/locales/es.d.ts +2 -0
- package/dist/locale/locales/es.js +56 -0
- package/dist/locale/locales/fr.d.ts +2 -0
- package/dist/locale/locales/fr.js +56 -0
- package/dist/locale/locales/index.d.ts +6 -0
- package/dist/locale/locales/ru.d.ts +2 -0
- package/dist/locale/locales/ru.js +56 -0
- package/dist/locale/locales/zh.d.ts +2 -0
- package/dist/locale/locales/zh.js +56 -0
- package/dist/locale/names.plugin.d.ts +32 -0
- package/dist/locale/names.plugin.js +39 -0
- package/dist/locale/source.class.d.ts +22 -0
- package/dist/locale/source.class.js +32 -0
- package/dist/locale/types.d.ts +197 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/motion/motion.d.ts +28 -0
- package/dist/motion/motion.js +67 -0
- package/dist/motion/types.d.ts +14 -0
- package/dist/utils/afterTransitions.d.ts +49 -0
- package/dist/utils/afterTransitions.js +79 -0
- package/dist/utils/focusFirst.d.ts +13 -0
- package/dist/utils/focusFirst.js +24 -0
- package/dist/utils/graceArea.d.ts +21 -0
- package/dist/utils/graceArea.js +66 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/isAboveLayer.d.ts +14 -0
- package/dist/utils/isAboveLayer.js +24 -0
- package/dist/utils/isAppleTouch.d.ts +10 -0
- package/dist/utils/isAppleTouch.js +17 -0
- package/dist/utils/isFocusableElement.d.ts +8 -0
- package/dist/utils/isFocusableElement.js +13 -0
- package/dist/utils/isMeasurableElement.d.ts +11 -0
- package/dist/utils/isMeasurableElement.js +16 -0
- package/dist/utils/isPrintableKey.d.ts +7 -0
- package/dist/utils/isPrintableKey.js +12 -0
- package/dist/utils/layerOf.d.ts +12 -0
- package/dist/utils/layerOf.js +21 -0
- package/dist/utils/nearestShift.d.ts +19 -0
- package/dist/utils/nearestShift.js +58 -0
- package/dist/utils/positionOrigin.d.ts +34 -0
- package/dist/utils/positionOrigin.js +71 -0
- package/dist/utils/scrollParent.d.ts +12 -0
- package/dist/utils/scrollParent.js +23 -0
- package/dist/utils/scrollWindow.d.ts +27 -0
- package/dist/utils/scrollWindow.js +50 -0
- package/dist/utils/tabStops.d.ts +44 -0
- package/dist/utils/tabStops.js +102 -0
- package/dist/utils/tabStopsAfter.d.ts +10 -0
- package/dist/utils/tabStopsAfter.js +16 -0
- package/dist/utils/tabStopsBefore.d.ts +11 -0
- package/dist/utils/tabStopsBefore.js +17 -0
- package/dist/utils/toCssValue.d.ts +8 -0
- package/dist/utils/toCssValue.js +17 -0
- package/dist/utils/trapTab.d.ts +16 -0
- package/dist/utils/trapTab.js +36 -0
- package/dist/utils/types.d.ts +64 -0
- package/package.json +43 -4
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { TClearableNamesPlugin } from "../../clearable/names/names.plugin.js";
|
|
2
|
+
//#region src/custom/date-picker/names/names.plugin.ts
|
|
3
|
+
/**
|
|
4
|
+
* TDatePickerNamesPlugin — имена DatePicker от локали.
|
|
5
|
+
*
|
|
6
|
+
* Имя кнопки очистки — как у любого поля (`TClearableNamesPlugin`): DatePicker —
|
|
7
|
+
* поле, и имя его кнопки собирается с его именем (`field.clear`). Имя кнопки
|
|
8
|
+
* календаря — в её набор (`triggerAria`) и в набор панели (`panelAria`):
|
|
9
|
+
* панель называется так же, как кнопка, которая её открывает. Имена полей
|
|
10
|
+
* концов диапазона — выходами (`start`, `end`): поля — свои компоненты, и имя
|
|
11
|
+
* им разметка отдаёт пропом `aria_label`, который пишет их собственный
|
|
12
|
+
* `TAriaPlugin`. Текст кнопок подвала панели при `confirmable` — тоже выходами
|
|
13
|
+
* (`confirm`, `cancel`): кнопки — свои компоненты, и текст им разметка отдаёт
|
|
14
|
+
* пропом `text`.
|
|
15
|
+
*/
|
|
16
|
+
var TDatePickerNamesPlugin = class extends TClearableNamesPlugin {
|
|
17
|
+
_start = "";
|
|
18
|
+
_end = "";
|
|
19
|
+
_confirm = "";
|
|
20
|
+
_cancel = "";
|
|
21
|
+
/** Имя поля начала диапазона. */
|
|
22
|
+
get start() {
|
|
23
|
+
return this._start;
|
|
24
|
+
}
|
|
25
|
+
/** Имя поля конца диапазона. */
|
|
26
|
+
get end() {
|
|
27
|
+
return this._end;
|
|
28
|
+
}
|
|
29
|
+
/** Текст кнопки «OK» подвала панели. */
|
|
30
|
+
get confirm() {
|
|
31
|
+
return this._confirm;
|
|
32
|
+
}
|
|
33
|
+
/** Текст кнопки «Отмена» подвала панели. */
|
|
34
|
+
get cancel() {
|
|
35
|
+
return this._cancel;
|
|
36
|
+
}
|
|
37
|
+
get _sink() {
|
|
38
|
+
return this.events;
|
|
39
|
+
}
|
|
40
|
+
_name(owner, translations) {
|
|
41
|
+
const oldStart = this.start;
|
|
42
|
+
const oldEnd = this.end;
|
|
43
|
+
const oldConfirm = this.confirm;
|
|
44
|
+
const oldCancel = this.cancel;
|
|
45
|
+
super._name(owner, translations);
|
|
46
|
+
const { trigger, start, end, confirm, cancel } = translations.datePicker;
|
|
47
|
+
owner.triggerAria.add("aria-label", trigger);
|
|
48
|
+
owner.panelAria.add("aria-label", trigger);
|
|
49
|
+
if (this._start !== start) {
|
|
50
|
+
this._start = start;
|
|
51
|
+
this._sink.emit("change:start", {
|
|
52
|
+
newValue: start,
|
|
53
|
+
oldValue: oldStart
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (this._end !== end) {
|
|
57
|
+
this._end = end;
|
|
58
|
+
this._sink.emit("change:end", {
|
|
59
|
+
newValue: end,
|
|
60
|
+
oldValue: oldEnd
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (this._confirm !== confirm) {
|
|
64
|
+
this._confirm = confirm;
|
|
65
|
+
this._sink.emit("change:confirm", {
|
|
66
|
+
newValue: confirm,
|
|
67
|
+
oldValue: oldConfirm
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (this._cancel !== cancel) {
|
|
71
|
+
this._cancel = cancel;
|
|
72
|
+
this._sink.emit("change:cancel", {
|
|
73
|
+
newValue: cancel,
|
|
74
|
+
oldValue: oldCancel
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { TDatePickerNamesPlugin };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TValuePayload } from '@soxa-ui/core';
|
|
2
|
+
import type { TPluginEvents } from '../../../base';
|
|
3
|
+
export type TDatePickerNamesPluginEvents = TPluginEvents & {
|
|
4
|
+
/** change:start — имя поля начала диапазона сменилось вместе с локалью */
|
|
5
|
+
'change:start': (payload: TValuePayload<string>) => void;
|
|
6
|
+
/** change:end — имя поля конца диапазона сменилось вместе с локалью */
|
|
7
|
+
'change:end': (payload: TValuePayload<string>) => void;
|
|
8
|
+
/** change:confirm — текст кнопки «OK» сменился вместе с локалью */
|
|
9
|
+
'change:confirm': (payload: TValuePayload<string>) => void;
|
|
10
|
+
/** change:cancel — текст кнопки «Отмена» сменился вместе с локалью */
|
|
11
|
+
'change:cancel': (payload: TValuePayload<string>) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TBasePlugin } from '../../../base';
|
|
2
|
+
import type { IPluginContext } from '../../../base';
|
|
3
|
+
import type { TDatePickerTriggerPluginEvents } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* TDatePickerTriggerPlugin — что открывает панель DatePicker: кнопка
|
|
6
|
+
* календаря и Alt+↓ на поле. Ввод в поле её не открывает: части поля
|
|
7
|
+
* набирают дату, а календарь — второй путь к ней, по запросу.
|
|
8
|
+
*
|
|
9
|
+
* Слушает корень, как плагины указателя Select и Popover: кнопка лежит в нём —
|
|
10
|
+
* в слоте поля одной даты или после поля конца диапазона, — и клик по ней
|
|
11
|
+
* всплывает до корня одинаково во всех адаптерах, чем бы её ни нарисовали.
|
|
12
|
+
* Клик из Enter и пробела браузер у `<button>` делает сам, так что клавиатура
|
|
13
|
+
* кнопки приходит тем же путём. Кнопку плагин узнаёт по классу её части
|
|
14
|
+
* (`__trigger`), а разметка про открытие не знает ничего.
|
|
15
|
+
*
|
|
16
|
+
* - **Клик по кнопке** — тумблер (`toggleOpen`). По открытой панели он
|
|
17
|
+
* закрывает её без мигания: кнопка — внутри корня, и `TDismissPlugin`
|
|
18
|
+
* нажатие перед кликом мимо не считает.
|
|
19
|
+
* - **Alt+↓** — только открыть, как у APG (Date Picker Dialog, комбобокс):
|
|
20
|
+
* клавишу поле не трогает — с модификатором она не его. Обработанная
|
|
21
|
+
* клавиша гасится `preventDefault`; та, что уже обработал кто-то другой
|
|
22
|
+
* (`defaultPrevented`), не наша.
|
|
23
|
+
*
|
|
24
|
+
* Панель телепортирована, и её клики и клавиши до корня не доходят.
|
|
25
|
+
*/
|
|
26
|
+
export declare class TDatePickerTriggerPlugin extends TBasePlugin<any, TDatePickerTriggerPluginEvents> {
|
|
27
|
+
private _owner;
|
|
28
|
+
private _root;
|
|
29
|
+
install(ctx: IPluginContext): void;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
/** Корень сменился — слушатели переезжают. */
|
|
32
|
+
private _bind;
|
|
33
|
+
/** Клик по кнопке календаря — тумблер панели. */
|
|
34
|
+
private readonly _onClick;
|
|
35
|
+
/** Alt+↓ — открыть; открыть нельзя — клавиша не наша. */
|
|
36
|
+
private readonly _onKeyDown;
|
|
37
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { TBasePlugin } from "../../../base/base.class.js";
|
|
2
|
+
import { TElementPlugin } from "../../element/element.plugin.js";
|
|
3
|
+
//#region src/custom/date-picker/trigger/trigger.plugin.ts
|
|
4
|
+
/**
|
|
5
|
+
* TDatePickerTriggerPlugin — что открывает панель DatePicker: кнопка
|
|
6
|
+
* календаря и Alt+↓ на поле. Ввод в поле её не открывает: части поля
|
|
7
|
+
* набирают дату, а календарь — второй путь к ней, по запросу.
|
|
8
|
+
*
|
|
9
|
+
* Слушает корень, как плагины указателя Select и Popover: кнопка лежит в нём —
|
|
10
|
+
* в слоте поля одной даты или после поля конца диапазона, — и клик по ней
|
|
11
|
+
* всплывает до корня одинаково во всех адаптерах, чем бы её ни нарисовали.
|
|
12
|
+
* Клик из Enter и пробела браузер у `<button>` делает сам, так что клавиатура
|
|
13
|
+
* кнопки приходит тем же путём. Кнопку плагин узнаёт по классу её части
|
|
14
|
+
* (`__trigger`), а разметка про открытие не знает ничего.
|
|
15
|
+
*
|
|
16
|
+
* - **Клик по кнопке** — тумблер (`toggleOpen`). По открытой панели он
|
|
17
|
+
* закрывает её без мигания: кнопка — внутри корня, и `TDismissPlugin`
|
|
18
|
+
* нажатие перед кликом мимо не считает.
|
|
19
|
+
* - **Alt+↓** — только открыть, как у APG (Date Picker Dialog, комбобокс):
|
|
20
|
+
* клавишу поле не трогает — с модификатором она не его. Обработанная
|
|
21
|
+
* клавиша гасится `preventDefault`; та, что уже обработал кто-то другой
|
|
22
|
+
* (`defaultPrevented`), не наша.
|
|
23
|
+
*
|
|
24
|
+
* Панель телепортирована, и её клики и клавиши до корня не доходят.
|
|
25
|
+
*/
|
|
26
|
+
var TDatePickerTriggerPlugin = class extends TBasePlugin {
|
|
27
|
+
_owner = null;
|
|
28
|
+
_root = null;
|
|
29
|
+
install(ctx) {
|
|
30
|
+
super.install(ctx);
|
|
31
|
+
this._owner = ctx.getInstance() ?? null;
|
|
32
|
+
const elementPlugin = ctx.get(TElementPlugin);
|
|
33
|
+
elementPlugin?.events.on("ready", (element) => this._bind(element));
|
|
34
|
+
elementPlugin?.events.on("removed", () => this._bind(null));
|
|
35
|
+
}
|
|
36
|
+
destroy() {
|
|
37
|
+
this._bind(null);
|
|
38
|
+
this._owner = null;
|
|
39
|
+
super.destroy();
|
|
40
|
+
}
|
|
41
|
+
/** Корень сменился — слушатели переезжают. */
|
|
42
|
+
_bind(root) {
|
|
43
|
+
const previous = this._root;
|
|
44
|
+
previous?.removeEventListener("click", this._onClick);
|
|
45
|
+
previous?.removeEventListener("keydown", this._onKeyDown);
|
|
46
|
+
this._root = root;
|
|
47
|
+
const target = root;
|
|
48
|
+
target?.addEventListener("click", this._onClick);
|
|
49
|
+
target?.addEventListener("keydown", this._onKeyDown);
|
|
50
|
+
}
|
|
51
|
+
/** Клик по кнопке календаря — тумблер панели. */
|
|
52
|
+
_onClick = (event) => {
|
|
53
|
+
const owner = this._owner;
|
|
54
|
+
const root = this._root;
|
|
55
|
+
if (!owner || !root || !(event.target instanceof Element)) return;
|
|
56
|
+
const trigger = event.target.closest(owner.classes.resolve("__trigger", { point: true }));
|
|
57
|
+
if (trigger && root.contains(trigger)) owner.toggleOpen();
|
|
58
|
+
};
|
|
59
|
+
/** Alt+↓ — открыть; открыть нельзя — клавиша не наша. */
|
|
60
|
+
_onKeyDown = (event) => {
|
|
61
|
+
const owner = this._owner;
|
|
62
|
+
if (!owner || event.defaultPrevented || event.key !== "ArrowDown") return;
|
|
63
|
+
if (!event.altKey || event.ctrlKey || event.metaKey || !owner.openable) return;
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
owner.open = true;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { TDatePickerTriggerPlugin };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IPluginContext } from '../../../base';
|
|
2
|
+
import { TModalIdsPlugin } from '../../overlay/modal-ids';
|
|
3
|
+
/**
|
|
4
|
+
* TDialogIdsPlugin — связки окна в документе: имя от заголовка, как у любого
|
|
5
|
+
* модального слоя (`TModalIdsPlugin`), и описание предупреждения.
|
|
6
|
+
*
|
|
7
|
+
* `id` тела — в `bodyAria`, который разметка раскладывает на тело, всегда.
|
|
8
|
+
* Ссылка на него `aria-describedby` — в `aria` окна, и только у
|
|
9
|
+
* предупреждения (`alert`): его тело и есть то, о чём спрашивают. У обычного
|
|
10
|
+
* окна тело — форма, и скринридер зачитал бы её целиком. Сменился режим
|
|
11
|
+
* (`change:alert`) — ссылка ставится или снимается.
|
|
12
|
+
*/
|
|
13
|
+
export declare class TDialogIdsPlugin extends TModalIdsPlugin {
|
|
14
|
+
install(ctx: IPluginContext): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TModalIdsPlugin } from "../../overlay/modal-ids/modal-ids.plugin.js";
|
|
2
|
+
//#region src/custom/dialog/ids/ids.plugin.ts
|
|
3
|
+
/**
|
|
4
|
+
* TDialogIdsPlugin — связки окна в документе: имя от заголовка, как у любого
|
|
5
|
+
* модального слоя (`TModalIdsPlugin`), и описание предупреждения.
|
|
6
|
+
*
|
|
7
|
+
* `id` тела — в `bodyAria`, который разметка раскладывает на тело, всегда.
|
|
8
|
+
* Ссылка на него `aria-describedby` — в `aria` окна, и только у
|
|
9
|
+
* предупреждения (`alert`): его тело и есть то, о чём спрашивают. У обычного
|
|
10
|
+
* окна тело — форма, и скринридер зачитал бы её целиком. Сменился режим
|
|
11
|
+
* (`change:alert`) — ссылка ставится или снимается.
|
|
12
|
+
*/
|
|
13
|
+
var TDialogIdsPlugin = class extends TModalIdsPlugin {
|
|
14
|
+
install(ctx) {
|
|
15
|
+
super.install(ctx);
|
|
16
|
+
const dialog = ctx.getInstance();
|
|
17
|
+
if (!dialog) return;
|
|
18
|
+
const bodyId = ctx.createId("body");
|
|
19
|
+
const describe = (alert) => {
|
|
20
|
+
dialog.aria.add("aria-describedby", alert ? bodyId : null);
|
|
21
|
+
};
|
|
22
|
+
dialog.bodyAria.add("id", bodyId);
|
|
23
|
+
describe(dialog.alert);
|
|
24
|
+
this._listenTo(dialog.events, "change:alert", ({ newValue }) => describe(newValue));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { TDialogIdsPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ids.plugin';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IPluginContext } from '../../../base';
|
|
2
|
+
import { TModalLayoutPlugin } from '../../overlay/modal-layout';
|
|
3
|
+
import type { TModalLayoutVariables } from '../../overlay/modal-layout';
|
|
4
|
+
import type { TDialogLayoutPluginEvents } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Раскладка модального окна: слой, размер и отступ от краёв экрана — в
|
|
7
|
+
* объекты стилей для разметки.
|
|
8
|
+
*
|
|
9
|
+
* Расчёт общий с выезжающей панелью — `TModalLayoutPlugin`: `styles` панели
|
|
10
|
+
* (`z-index` слоя и размер переменными) и `backdropStyles` подложки. Своё у
|
|
11
|
+
* окна — имена переменных, которые читает тема (`--so-dialog-width`,
|
|
12
|
+
* `--so-dialog-height`), и отступ: по стороне на переменную
|
|
13
|
+
* (`--so-dialog-offset-top`, `-bottom`, `-start`, `-end`). Место и разворот
|
|
14
|
+
* раскладывает тема по модификатору и `data-maximized`.
|
|
15
|
+
*
|
|
16
|
+
* **Отступ** — проп окна `offset`, один на все стороны. Стороны по
|
|
17
|
+
* отдельности правит подписчик `offset:before` (`TDialogOffsetEvent`):
|
|
18
|
+
* событие приходит на каждый пересчёт стилей — установку, объявление
|
|
19
|
+
* плагина (`created()`), показ, смену размера, отступа и места. Сторона без
|
|
20
|
+
* значения переменной не даёт — тогда отступ темы; отменённое событие не даёт
|
|
21
|
+
* ни одной.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // dialog.width = 480 → styles: { 'z-index': 1001, '--so-dialog-width': '480px' }
|
|
25
|
+
* // dialog.offset = 24 → и '--so-dialog-offset-top': '24px' — так на все стороны
|
|
26
|
+
*/
|
|
27
|
+
export declare class TDialogLayoutPlugin extends TModalLayoutPlugin<TDialogLayoutPluginEvents> {
|
|
28
|
+
protected readonly _variables: TModalLayoutVariables;
|
|
29
|
+
private _dialog;
|
|
30
|
+
install(ctx: IPluginContext): void;
|
|
31
|
+
/**
|
|
32
|
+
* Объявить плагин и пересчитать стили. Подписчики `offset:before` к этому
|
|
33
|
+
* моменту уже есть: `bundle:create` и `layout:create` прошли, адаптер
|
|
34
|
+
* слушает события с монтирования. Пересчёт — до первого кадра, поэтому
|
|
35
|
+
* поправку получает и окно, созданное видимым: показа, который пересчитал
|
|
36
|
+
* бы стили, у него не будет.
|
|
37
|
+
*/
|
|
38
|
+
created(): void;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
/** Отступ по сторонам — после поправки подписчиков `offset:before`. */
|
|
41
|
+
protected _panelVariables(): Record<string, string>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { toCssValue } from "../../../utils/toCssValue.js";
|
|
2
|
+
import { TModalLayoutPlugin } from "../../overlay/modal-layout/modal-layout.plugin.js";
|
|
3
|
+
import { TDialogOffsetEvent } from "./offset-event.js";
|
|
4
|
+
//#region src/custom/dialog/layout/layout.plugin.ts
|
|
5
|
+
/** Сторона отступа → переменная, которую читает CSS блока `so-dialog`. */
|
|
6
|
+
var OFFSET_VARIABLES = [
|
|
7
|
+
["top", "--so-dialog-offset-top"],
|
|
8
|
+
["bottom", "--so-dialog-offset-bottom"],
|
|
9
|
+
["start", "--so-dialog-offset-start"],
|
|
10
|
+
["end", "--so-dialog-offset-end"]
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Раскладка модального окна: слой, размер и отступ от краёв экрана — в
|
|
14
|
+
* объекты стилей для разметки.
|
|
15
|
+
*
|
|
16
|
+
* Расчёт общий с выезжающей панелью — `TModalLayoutPlugin`: `styles` панели
|
|
17
|
+
* (`z-index` слоя и размер переменными) и `backdropStyles` подложки. Своё у
|
|
18
|
+
* окна — имена переменных, которые читает тема (`--so-dialog-width`,
|
|
19
|
+
* `--so-dialog-height`), и отступ: по стороне на переменную
|
|
20
|
+
* (`--so-dialog-offset-top`, `-bottom`, `-start`, `-end`). Место и разворот
|
|
21
|
+
* раскладывает тема по модификатору и `data-maximized`.
|
|
22
|
+
*
|
|
23
|
+
* **Отступ** — проп окна `offset`, один на все стороны. Стороны по
|
|
24
|
+
* отдельности правит подписчик `offset:before` (`TDialogOffsetEvent`):
|
|
25
|
+
* событие приходит на каждый пересчёт стилей — установку, объявление
|
|
26
|
+
* плагина (`created()`), показ, смену размера, отступа и места. Сторона без
|
|
27
|
+
* значения переменной не даёт — тогда отступ темы; отменённое событие не даёт
|
|
28
|
+
* ни одной.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // dialog.width = 480 → styles: { 'z-index': 1001, '--so-dialog-width': '480px' }
|
|
32
|
+
* // dialog.offset = 24 → и '--so-dialog-offset-top': '24px' — так на все стороны
|
|
33
|
+
*/
|
|
34
|
+
var TDialogLayoutPlugin = class extends TModalLayoutPlugin {
|
|
35
|
+
_variables = {
|
|
36
|
+
width: "--so-dialog-width",
|
|
37
|
+
height: "--so-dialog-height"
|
|
38
|
+
};
|
|
39
|
+
_dialog = null;
|
|
40
|
+
install(ctx) {
|
|
41
|
+
this._dialog = ctx.getInstance();
|
|
42
|
+
super.install(ctx);
|
|
43
|
+
const updateStyles = () => this._updateStyles();
|
|
44
|
+
this._listenTo(this._dialog?.events, "change:offset", updateStyles);
|
|
45
|
+
this._listenTo(this._dialog?.events, "change:placement", updateStyles);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Объявить плагин и пересчитать стили. Подписчики `offset:before` к этому
|
|
49
|
+
* моменту уже есть: `bundle:create` и `layout:create` прошли, адаптер
|
|
50
|
+
* слушает события с монтирования. Пересчёт — до первого кадра, поэтому
|
|
51
|
+
* поправку получает и окно, созданное видимым: показа, который пересчитал
|
|
52
|
+
* бы стили, у него не будет.
|
|
53
|
+
*/
|
|
54
|
+
created() {
|
|
55
|
+
super.created();
|
|
56
|
+
this._updateStyles();
|
|
57
|
+
}
|
|
58
|
+
destroy() {
|
|
59
|
+
this._dialog = null;
|
|
60
|
+
super.destroy();
|
|
61
|
+
}
|
|
62
|
+
/** Отступ по сторонам — после поправки подписчиков `offset:before`. */
|
|
63
|
+
_panelVariables() {
|
|
64
|
+
const dialog = this._dialog;
|
|
65
|
+
if (!dialog) return {};
|
|
66
|
+
const event = new TDialogOffsetEvent(dialog.placement, dialog.offset);
|
|
67
|
+
this.events.emit("offset:before", event);
|
|
68
|
+
if (event.defaultPrevented) return {};
|
|
69
|
+
const variables = {};
|
|
70
|
+
for (const [side, variable] of OFFSET_VARIABLES) {
|
|
71
|
+
const value = event[side];
|
|
72
|
+
if (value !== void 0) variables[variable] = toCssValue(value);
|
|
73
|
+
}
|
|
74
|
+
return variables;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { TDialogLayoutPlugin };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TActionEvent } from '@soxa-ui/core';
|
|
2
|
+
import type { TDialogPlacement } from '@soxa-ui/core';
|
|
3
|
+
/**
|
|
4
|
+
* Отступы окна от краёв экрана перед раскладкой — аргумент `offset:before`
|
|
5
|
+
* (`layout:offset:before` у компонента).
|
|
6
|
+
*
|
|
7
|
+
* Проп `offset` задаёт один отступ на все стороны, а подписчик правит их по
|
|
8
|
+
* отдельности — например, сверху отступает больше, чем снизу, — как
|
|
9
|
+
* подписчик `item:add:before` правит данные вставки (`TInsertEvent`). Стороны
|
|
10
|
+
* логические, как место окна: `start` и `end` в RTL меняются местами сами.
|
|
11
|
+
* Значение стороны — то же, что у пропа: число — px, строка — CSS-значение,
|
|
12
|
+
* `0` — вплотную, `undefined` — отступ темы. `preventDefault()` отменяет
|
|
13
|
+
* отступы целиком: все стороны — от темы.
|
|
14
|
+
*
|
|
15
|
+
* Событие приходит на каждый пересчёт стилей окна, и каждый раз стороны
|
|
16
|
+
* заново берутся из `offset`: поправку подписчик вносит всякий раз, а не
|
|
17
|
+
* однажды.
|
|
18
|
+
*/
|
|
19
|
+
export declare class TDialogOffsetEvent extends TActionEvent {
|
|
20
|
+
readonly placement: TDialogPlacement;
|
|
21
|
+
/** Отступ от верхнего края экрана. */
|
|
22
|
+
top: number | string | undefined;
|
|
23
|
+
/** Отступ от нижнего края экрана. */
|
|
24
|
+
bottom: number | string | undefined;
|
|
25
|
+
/** Отступ от начала строки: от левого края, в RTL — от правого. */
|
|
26
|
+
start: number | string | undefined;
|
|
27
|
+
/** Отступ от конца строки: от правого края, в RTL — от левого. */
|
|
28
|
+
end: number | string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* @param placement где стоит окно: по нему подписчик решает, какую
|
|
31
|
+
* сторону править
|
|
32
|
+
* @param offset отступ из пропа — начальное значение всех четырёх сторон
|
|
33
|
+
*/
|
|
34
|
+
constructor(placement: TDialogPlacement, offset: number | string | undefined);
|
|
35
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TActionEvent } from "@soxa-ui/core";
|
|
2
|
+
//#region src/custom/dialog/layout/offset-event.ts
|
|
3
|
+
/**
|
|
4
|
+
* Отступы окна от краёв экрана перед раскладкой — аргумент `offset:before`
|
|
5
|
+
* (`layout:offset:before` у компонента).
|
|
6
|
+
*
|
|
7
|
+
* Проп `offset` задаёт один отступ на все стороны, а подписчик правит их по
|
|
8
|
+
* отдельности — например, сверху отступает больше, чем снизу, — как
|
|
9
|
+
* подписчик `item:add:before` правит данные вставки (`TInsertEvent`). Стороны
|
|
10
|
+
* логические, как место окна: `start` и `end` в RTL меняются местами сами.
|
|
11
|
+
* Значение стороны — то же, что у пропа: число — px, строка — CSS-значение,
|
|
12
|
+
* `0` — вплотную, `undefined` — отступ темы. `preventDefault()` отменяет
|
|
13
|
+
* отступы целиком: все стороны — от темы.
|
|
14
|
+
*
|
|
15
|
+
* Событие приходит на каждый пересчёт стилей окна, и каждый раз стороны
|
|
16
|
+
* заново берутся из `offset`: поправку подписчик вносит всякий раз, а не
|
|
17
|
+
* однажды.
|
|
18
|
+
*/
|
|
19
|
+
var TDialogOffsetEvent = class extends TActionEvent {
|
|
20
|
+
placement;
|
|
21
|
+
/** Отступ от верхнего края экрана. */
|
|
22
|
+
top;
|
|
23
|
+
/** Отступ от нижнего края экрана. */
|
|
24
|
+
bottom;
|
|
25
|
+
/** Отступ от начала строки: от левого края, в RTL — от правого. */
|
|
26
|
+
start;
|
|
27
|
+
/** Отступ от конца строки: от правого края, в RTL — от левого. */
|
|
28
|
+
end;
|
|
29
|
+
/**
|
|
30
|
+
* @param placement где стоит окно: по нему подписчик решает, какую
|
|
31
|
+
* сторону править
|
|
32
|
+
* @param offset отступ из пропа — начальное значение всех четырёх сторон
|
|
33
|
+
*/
|
|
34
|
+
constructor(placement, offset) {
|
|
35
|
+
super();
|
|
36
|
+
this.placement = placement;
|
|
37
|
+
this.top = offset;
|
|
38
|
+
this.bottom = offset;
|
|
39
|
+
this.start = offset;
|
|
40
|
+
this.end = offset;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { TDialogOffsetEvent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TModalLayoutPluginEvents } from '../../overlay/modal-layout';
|
|
2
|
+
import type { TDialogOffsetEvent } from './offset-event';
|
|
3
|
+
/** События раскладки окна: общие с раскладкой модального слоя и отступ окна. */
|
|
4
|
+
export type TDialogLayoutPluginEvents = TModalLayoutPluginEvents & {
|
|
5
|
+
/**
|
|
6
|
+
* offset:before — отступы окна от краёв экрана перед раскладкой. Подписчик
|
|
7
|
+
* правит стороны по отдельности (`e.top`, `e.bottom`, `e.start`, `e.end`)
|
|
8
|
+
* или отменяет отступы целиком (`e.preventDefault()`). Приходит на каждый
|
|
9
|
+
* пересчёт стилей окна.
|
|
10
|
+
*/
|
|
11
|
+
'offset:before': (e: TDialogOffsetEvent) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './names.plugin';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IDialog } from '@soxa-ui/core';
|
|
2
|
+
import { TModalNamesPlugin } from '../../overlay/modal-names';
|
|
3
|
+
import type { TTranslations } from '../../../locale/types';
|
|
4
|
+
/**
|
|
5
|
+
* TDialogNamesPlugin — имена кнопок окна от локали: закрытия, как у любого
|
|
6
|
+
* модального слоя (`TModalNamesPlugin`), и разворота — в `maximizeAria`.
|
|
7
|
+
*
|
|
8
|
+
* Имя разворота одно на оба состояния: кнопка — переключатель, и состояние
|
|
9
|
+
* она сообщает `aria-pressed`, который пишет само окно.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TDialogNamesPlugin extends TModalNamesPlugin<IDialog> {
|
|
12
|
+
protected _name(owner: IDialog, translations: TTranslations): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TModalNamesPlugin } from "../../overlay/modal-names/modal-names.plugin.js";
|
|
2
|
+
//#region src/custom/dialog/names/names.plugin.ts
|
|
3
|
+
/**
|
|
4
|
+
* TDialogNamesPlugin — имена кнопок окна от локали: закрытия, как у любого
|
|
5
|
+
* модального слоя (`TModalNamesPlugin`), и разворота — в `maximizeAria`.
|
|
6
|
+
*
|
|
7
|
+
* Имя разворота одно на оба состояния: кнопка — переключатель, и состояние
|
|
8
|
+
* она сообщает `aria-pressed`, который пишет само окно.
|
|
9
|
+
*/
|
|
10
|
+
var TDialogNamesPlugin = class extends TModalNamesPlugin {
|
|
11
|
+
_name(owner, translations) {
|
|
12
|
+
super._name(owner, translations);
|
|
13
|
+
owner.maximizeAria.add("aria-label", translations.dialog.maximize);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TDialogNamesPlugin };
|