@lt-ui/uikit 0.0.0-stage → 0.0.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/_internal/base-button/base-button.d.ts +9 -0
- package/_internal/base-button/base-button.js +47 -0
- package/_internal/base-button/index.d.ts +2 -0
- package/_internal/base-button/index.js +1 -0
- package/_internal/base-button/styles.module.css +69 -0
- package/_internal/base-button/types.d.ts +42 -0
- package/_internal/base-button/types.js +1 -0
- package/_internal/collapse-box/collapse-box.d.ts +60 -0
- package/_internal/collapse-box/collapse-box.js +30 -0
- package/_internal/collapse-box/index.d.ts +2 -0
- package/_internal/collapse-box/index.js +1 -0
- package/_internal/collapse-box/styles.module.css +30 -0
- package/_internal/compat/context-provider.d.ts +17 -0
- package/_internal/compat/context-provider.js +13 -0
- package/_internal/compat/index.d.ts +4 -0
- package/_internal/compat/index.js +4 -0
- package/_internal/compat/react-version.d.ts +5 -0
- package/_internal/compat/react-version.js +6 -0
- package/_internal/compat/use-form-pending.d.ts +5 -0
- package/_internal/compat/use-form-pending.js +8 -0
- package/_internal/compat/with-ref.d.ts +10 -0
- package/_internal/compat/with-ref.js +22 -0
- package/_internal/context-selector/context-selector.d.ts +27 -0
- package/_internal/context-selector/context-selector.js +71 -0
- package/_internal/context-selector/index.d.ts +2 -0
- package/_internal/context-selector/index.js +1 -0
- package/_internal/date/date-format.d.ts +24 -0
- package/_internal/date/date-format.js +122 -0
- package/_internal/date/date-locale.d.ts +21 -0
- package/_internal/date/date-locale.js +60 -0
- package/_internal/date/date-utils.d.ts +44 -0
- package/_internal/date/date-utils.js +75 -0
- package/_internal/date/index.d.ts +3 -0
- package/_internal/date/index.js +3 -0
- package/_internal/empty-function.d.ts +1 -0
- package/_internal/empty-function.js +4 -0
- package/_internal/field/field-caption.d.ts +12 -0
- package/_internal/field/field-caption.js +5 -0
- package/_internal/field/field-clear-button.d.ts +16 -0
- package/_internal/field/field-clear-button.js +14 -0
- package/_internal/field/field-frame.d.ts +34 -0
- package/_internal/field/field-frame.js +36 -0
- package/_internal/field/field.module.css +355 -0
- package/_internal/field/index.d.ts +7 -0
- package/_internal/field/index.js +7 -0
- package/_internal/field/props.d.ts +81 -0
- package/_internal/field/props.js +1 -0
- package/_internal/field/types.d.ts +54 -0
- package/_internal/field/types.js +1 -0
- package/_internal/field/use-field-state.d.ts +38 -0
- package/_internal/field/use-field-state.js +46 -0
- package/_internal/floating/compute-position.d.ts +11 -0
- package/_internal/floating/compute-position.js +112 -0
- package/_internal/floating/index.d.ts +4 -0
- package/_internal/floating/index.js +2 -0
- package/_internal/floating/origin.d.ts +6 -0
- package/_internal/floating/origin.js +18 -0
- package/_internal/floating/types.d.ts +52 -0
- package/_internal/floating/types.js +1 -0
- package/_internal/floating/use-floating.d.ts +35 -0
- package/_internal/floating/use-floating.js +149 -0
- package/_internal/focus-trap/focus-trap.d.ts +25 -0
- package/_internal/focus-trap/focus-trap.js +111 -0
- package/_internal/focus-trap/index.d.ts +3 -0
- package/_internal/focus-trap/index.js +3 -0
- package/_internal/focus-trap/scroll-lock.d.ts +2 -0
- package/_internal/focus-trap/scroll-lock.js +32 -0
- package/_internal/focus-trap/tabbable.d.ts +2 -0
- package/_internal/focus-trap/tabbable.js +25 -0
- package/_internal/hooks/focus-when-ready.d.ts +6 -0
- package/_internal/hooks/focus-when-ready.js +21 -0
- package/_internal/hooks/index.d.ts +15 -0
- package/_internal/hooks/index.js +15 -0
- package/_internal/hooks/restore-focus.d.ts +6 -0
- package/_internal/hooks/restore-focus.js +11 -0
- package/_internal/hooks/use-arrow-navigation.d.ts +14 -0
- package/_internal/hooks/use-arrow-navigation.js +35 -0
- package/_internal/hooks/use-chips-nav.d.ts +22 -0
- package/_internal/hooks/use-chips-nav.js +100 -0
- package/_internal/hooks/use-collapse-motion.d.ts +30 -0
- package/_internal/hooks/use-collapse-motion.js +102 -0
- package/_internal/hooks/use-controllable-state.d.ts +13 -0
- package/_internal/hooks/use-controllable-state.js +28 -0
- package/_internal/hooks/use-effect-once.d.ts +2 -0
- package/_internal/hooks/use-effect-once.js +4 -0
- package/_internal/hooks/use-focus-on-context.d.ts +2 -0
- package/_internal/hooks/use-focus-on-context.js +4 -0
- package/_internal/hooks/use-focus-on-ignore.d.ts +8 -0
- package/_internal/hooks/use-focus-on-ignore.js +19 -0
- package/_internal/hooks/use-focused-state.d.ts +5 -0
- package/_internal/hooks/use-focused-state.js +8 -0
- package/_internal/hooks/use-popover-tab-flow.d.ts +18 -0
- package/_internal/hooks/use-popover-tab-flow.js +55 -0
- package/_internal/hooks/use-resize-observer.d.ts +2 -0
- package/_internal/hooks/use-resize-observer.js +24 -0
- package/_internal/hooks/use-return-focus.d.ts +15 -0
- package/_internal/hooks/use-return-focus.js +25 -0
- package/_internal/hooks/use-scroll-edges.d.ts +6 -0
- package/_internal/hooks/use-scroll-edges.js +28 -0
- package/_internal/hooks/use-synced-animation.d.ts +12 -0
- package/_internal/hooks/use-synced-animation.js +28 -0
- package/_internal/layer/index.d.ts +2 -0
- package/_internal/layer/index.js +2 -0
- package/_internal/layer/layer-manager.d.ts +47 -0
- package/_internal/layer/layer-manager.js +93 -0
- package/_internal/layer/use-layer.d.ts +13 -0
- package/_internal/layer/use-layer.js +30 -0
- package/_internal/picker/index.d.ts +5 -0
- package/_internal/picker/index.js +5 -0
- package/_internal/picker/picker-field.d.ts +77 -0
- package/_internal/picker/picker-field.js +23 -0
- package/_internal/picker/picker-field.module.css +28 -0
- package/_internal/picker/picker-sheet-search.d.ts +9 -0
- package/_internal/picker/picker-sheet-search.js +11 -0
- package/_internal/picker/picker-sheet.d.ts +30 -0
- package/_internal/picker/picker-sheet.js +14 -0
- package/_internal/picker/picker-sheet.module.css +11 -0
- package/_internal/picker/use-date-input.d.ts +27 -0
- package/_internal/picker/use-date-input.js +74 -0
- package/_internal/picker/use-picker-presentation.d.ts +25 -0
- package/_internal/picker/use-picker-presentation.js +30 -0
- package/_internal/transition/css-transition.d.ts +22 -0
- package/_internal/transition/css-transition.js +67 -0
- package/_internal/transition/index.d.ts +3 -0
- package/_internal/transition/index.js +3 -0
- package/_internal/transition/transition-group-context.d.ts +4 -0
- package/_internal/transition/transition-group-context.js +4 -0
- package/_internal/transition/transition-group.d.ts +20 -0
- package/_internal/transition/transition-group.js +126 -0
- package/_internal/transition/transition.d.ts +40 -0
- package/_internal/transition/transition.js +125 -0
- package/accordion/accordion-item.d.ts +289 -0
- package/accordion/accordion-item.js +16 -0
- package/accordion/accordion.d.ts +301 -0
- package/accordion/accordion.js +16 -0
- package/accordion/constants.d.ts +2 -0
- package/accordion/constants.js +2 -0
- package/accordion/context.d.ts +17 -0
- package/accordion/context.js +3 -0
- package/accordion/hooks/use-accordion-item-view-model.d.ts +45 -0
- package/accordion/hooks/use-accordion-item-view-model.js +223 -0
- package/accordion/hooks/use-accordion-view-model.d.ts +25 -0
- package/accordion/hooks/use-accordion-view-model.js +121 -0
- package/accordion/index.d.ts +3 -0
- package/accordion/index.js +2 -0
- package/accordion/store.d.ts +22 -0
- package/accordion/store.js +42 -0
- package/accordion/styles.module.css +183 -0
- package/accordion/types.d.ts +196 -0
- package/accordion/types.js +1 -0
- package/accordion/utils.d.ts +29 -0
- package/accordion/utils.js +111 -0
- package/accordion/views/accordion-item-view.d.ts +6 -0
- package/accordion/views/accordion-item-view.js +22 -0
- package/accordion/views/accordion-view.d.ts +7 -0
- package/accordion/views/accordion-view.js +18 -0
- package/adaptive/adaptive.d.ts +20 -0
- package/adaptive/adaptive.js +14 -0
- package/adaptive/adaptive.module.css +189 -0
- package/adaptive/index.d.ts +2 -0
- package/adaptive/index.js +1 -0
- package/adaptive/types.d.ts +35 -0
- package/adaptive/types.js +1 -0
- package/alert/alert-actions.d.ts +6 -0
- package/alert/alert-actions.js +22 -0
- package/alert/alert-content.d.ts +6 -0
- package/alert/alert-content.js +15 -0
- package/alert/alert-icon.d.ts +4 -0
- package/alert/alert-icon.js +9 -0
- package/alert/alert.d.ts +11 -0
- package/alert/alert.js +41 -0
- package/alert/index.d.ts +2 -0
- package/alert/index.js +1 -0
- package/alert/styles/alert-variants.module.css +38 -0
- package/alert/styles/alert.module.css +51 -0
- package/alert/types.d.ts +69 -0
- package/alert/types.js +1 -0
- package/alert/use-alert.d.ts +8 -0
- package/alert/use-alert.js +14 -0
- package/avatar/avatar-group.d.ts +47 -0
- package/avatar/avatar-group.js +31 -0
- package/avatar/avatar-group.module.css +13 -0
- package/avatar/avatar-inner.d.ts +2 -0
- package/avatar/avatar-inner.js +24 -0
- package/avatar/avatar.d.ts +10 -0
- package/avatar/avatar.js +68 -0
- package/avatar/constants.d.ts +6 -0
- package/avatar/constants.js +5 -0
- package/avatar/index.d.ts +3 -0
- package/avatar/index.js +2 -0
- package/avatar/styles.module.css +292 -0
- package/avatar/types.d.ts +87 -0
- package/avatar/types.js +1 -0
- package/avatar/utils.d.ts +4 -0
- package/avatar/utils.js +10 -0
- package/badge/badge.d.ts +23 -0
- package/badge/badge.js +31 -0
- package/badge/index.d.ts +2 -0
- package/badge/index.js +2 -0
- package/badge/styles.module.css +114 -0
- package/badge/types.d.ts +58 -0
- package/badge/types.js +1 -0
- package/breadcrumbs/breadcrumbs-context.d.ts +7 -0
- package/breadcrumbs/breadcrumbs-context.js +6 -0
- package/breadcrumbs/breadcrumbs-item.d.ts +6 -0
- package/breadcrumbs/breadcrumbs-item.js +18 -0
- package/breadcrumbs/breadcrumbs-menu.d.ts +12 -0
- package/breadcrumbs/breadcrumbs-menu.js +12 -0
- package/breadcrumbs/breadcrumbs.d.ts +28 -0
- package/breadcrumbs/breadcrumbs.js +61 -0
- package/breadcrumbs/index.d.ts +3 -0
- package/breadcrumbs/index.js +2 -0
- package/breadcrumbs/styles.module.css +190 -0
- package/breadcrumbs/types.d.ts +81 -0
- package/breadcrumbs/types.js +1 -0
- package/breadcrumbs/use-breadcrumbs-fit.d.ts +21 -0
- package/breadcrumbs/use-breadcrumbs-fit.js +43 -0
- package/breadcrumbs/use-breadcrumbs.d.ts +21 -0
- package/breadcrumbs/use-breadcrumbs.js +41 -0
- package/button/button.d.ts +13 -0
- package/button/button.js +45 -0
- package/button/close-button.d.ts +14 -0
- package/button/close-button.js +17 -0
- package/button/index.d.ts +7 -0
- package/button/index.js +5 -0
- package/button/styles.module.css +288 -0
- package/button/types.d.ts +95 -0
- package/button/types.js +1 -0
- package/button/use-button.d.ts +22 -0
- package/button/use-button.js +35 -0
- package/calendar/availability.d.ts +14 -0
- package/calendar/availability.js +30 -0
- package/calendar/calendar-header.d.ts +20 -0
- package/calendar/calendar-header.js +40 -0
- package/calendar/calendar.d.ts +11 -0
- package/calendar/calendar.js +35 -0
- package/calendar/day-grid.d.ts +13 -0
- package/calendar/day-grid.js +21 -0
- package/calendar/index.d.ts +6 -0
- package/calendar/index.js +3 -0
- package/calendar/labels.d.ts +4 -0
- package/calendar/labels.js +12 -0
- package/calendar/picker-grid.d.ts +15 -0
- package/calendar/picker-grid.js +63 -0
- package/calendar/selection.d.ts +17 -0
- package/calendar/selection.js +50 -0
- package/calendar/styles.module.css +283 -0
- package/calendar/types.d.ts +169 -0
- package/calendar/types.js +1 -0
- package/calendar/use-calendar.d.ts +74 -0
- package/calendar/use-calendar.js +397 -0
- package/caption/caption.d.ts +16 -0
- package/caption/caption.js +27 -0
- package/caption/index.d.ts +2 -0
- package/caption/index.js +1 -0
- package/caption/styles.module.css +33 -0
- package/caption/types.d.ts +30 -0
- package/caption/types.js +1 -0
- package/card/card.d.ts +19 -0
- package/card/card.js +31 -0
- package/card/index.d.ts +2 -0
- package/card/index.js +1 -0
- package/card/styles.module.css +80 -0
- package/card/types.d.ts +49 -0
- package/card/types.js +1 -0
- package/card/use-card.d.ts +24 -0
- package/card/use-card.js +36 -0
- package/checkbox/checkbox.d.ts +10 -0
- package/checkbox/checkbox.js +54 -0
- package/checkbox/index.d.ts +2 -0
- package/checkbox/index.js +1 -0
- package/checkbox/styles/style.module.css +259 -0
- package/checkbox/types.d.ts +68 -0
- package/checkbox/types.js +1 -0
- package/chip/chip.d.ts +40 -0
- package/chip/chip.js +63 -0
- package/chip/index.d.ts +2 -0
- package/chip/index.js +1 -0
- package/chip/styles.module.css +65 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +1 -0
- package/chip-group/chip-group-transition-context.d.ts +9 -0
- package/chip-group/chip-group-transition-context.js +8 -0
- package/chip-group/chip-group-transition-provider.d.ts +6 -0
- package/chip-group/chip-group-transition-provider.js +11 -0
- package/chip-group/chip-group.d.ts +4 -0
- package/chip-group/chip-group.js +33 -0
- package/chip-group/index.d.ts +2 -0
- package/chip-group/index.js +1 -0
- package/chip-group/styles.module.css +4 -0
- package/chip-group/types.d.ts +5 -0
- package/chip-group/types.js +1 -0
- package/cjs/_internal/base-button/base-button.js +86 -0
- package/cjs/_internal/base-button/index.js +17 -0
- package/cjs/_internal/base-button/styles.module.css +69 -0
- package/cjs/_internal/base-button/types.js +2 -0
- package/cjs/_internal/collapse-box/collapse-box.js +69 -0
- package/cjs/_internal/collapse-box/index.js +5 -0
- package/cjs/_internal/collapse-box/styles.module.css +30 -0
- package/cjs/_internal/compat/context-provider.js +17 -0
- package/cjs/_internal/compat/index.js +11 -0
- package/cjs/_internal/compat/react-version.js +9 -0
- package/cjs/_internal/compat/use-form-pending.js +45 -0
- package/cjs/_internal/compat/with-ref.js +26 -0
- package/cjs/_internal/context-selector/context-selector.js +75 -0
- package/cjs/_internal/context-selector/index.js +6 -0
- package/cjs/_internal/date/date-format.js +129 -0
- package/cjs/_internal/date/date-locale.js +71 -0
- package/cjs/_internal/date/date-utils.js +104 -0
- package/cjs/_internal/date/index.js +19 -0
- package/cjs/_internal/empty-function.js +8 -0
- package/cjs/_internal/field/field-caption.js +12 -0
- package/cjs/_internal/field/field-clear-button.js +17 -0
- package/cjs/_internal/field/field-frame.js +42 -0
- package/cjs/_internal/field/field.module.css +355 -0
- package/cjs/_internal/field/index.js +17 -0
- package/cjs/_internal/field/props.js +2 -0
- package/cjs/_internal/field/types.js +2 -0
- package/cjs/_internal/field/use-field-state.js +49 -0
- package/cjs/_internal/floating/compute-position.js +118 -0
- package/cjs/_internal/floating/index.js +9 -0
- package/cjs/_internal/floating/origin.js +21 -0
- package/cjs/_internal/floating/types.js +2 -0
- package/cjs/_internal/floating/use-floating.js +152 -0
- package/cjs/_internal/focus-trap/focus-trap.js +148 -0
- package/cjs/_internal/focus-trap/index.js +19 -0
- package/cjs/_internal/focus-trap/scroll-lock.js +35 -0
- package/cjs/_internal/focus-trap/tabbable.js +28 -0
- package/cjs/_internal/hooks/focus-when-ready.js +24 -0
- package/cjs/_internal/hooks/index.js +31 -0
- package/cjs/_internal/hooks/restore-focus.js +14 -0
- package/cjs/_internal/hooks/use-arrow-navigation.js +38 -0
- package/cjs/_internal/hooks/use-chips-nav.js +106 -0
- package/cjs/_internal/hooks/use-collapse-motion.js +108 -0
- package/cjs/_internal/hooks/use-controllable-state.js +31 -0
- package/cjs/_internal/hooks/use-effect-once.js +8 -0
- package/cjs/_internal/hooks/use-focus-on-context.js +8 -0
- package/cjs/_internal/hooks/use-focus-on-ignore.js +23 -0
- package/cjs/_internal/hooks/use-focused-state.js +11 -0
- package/cjs/_internal/hooks/use-popover-tab-flow.js +60 -0
- package/cjs/_internal/hooks/use-resize-observer.js +28 -0
- package/cjs/_internal/hooks/use-return-focus.js +28 -0
- package/cjs/_internal/hooks/use-scroll-edges.js +31 -0
- package/cjs/_internal/hooks/use-synced-animation.js +32 -0
- package/cjs/_internal/layer/index.js +18 -0
- package/cjs/_internal/layer/layer-manager.js +96 -0
- package/cjs/_internal/layer/use-layer.js +33 -0
- package/cjs/_internal/picker/index.js +21 -0
- package/cjs/_internal/picker/picker-field.js +29 -0
- package/cjs/_internal/picker/picker-field.module.css +28 -0
- package/cjs/_internal/picker/picker-sheet-search.js +17 -0
- package/cjs/_internal/picker/picker-sheet.js +20 -0
- package/cjs/_internal/picker/picker-sheet.module.css +11 -0
- package/cjs/_internal/picker/use-date-input.js +77 -0
- package/cjs/_internal/picker/use-picker-presentation.js +35 -0
- package/cjs/_internal/transition/css-transition.js +70 -0
- package/cjs/_internal/transition/index.js +19 -0
- package/cjs/_internal/transition/transition-group-context.js +7 -0
- package/cjs/_internal/transition/transition-group.js +162 -0
- package/cjs/_internal/transition/transition.js +129 -0
- package/cjs/accordion/accordion-item.js +22 -0
- package/cjs/accordion/accordion.js +22 -0
- package/cjs/accordion/constants.js +5 -0
- package/cjs/accordion/context.js +6 -0
- package/cjs/accordion/hooks/use-accordion-item-view-model.js +227 -0
- package/cjs/accordion/hooks/use-accordion-view-model.js +127 -0
- package/cjs/accordion/index.js +7 -0
- package/cjs/accordion/store.js +45 -0
- package/cjs/accordion/styles.module.css +183 -0
- package/cjs/accordion/types.js +2 -0
- package/cjs/accordion/utils.js +123 -0
- package/cjs/accordion/views/accordion-item-view.js +28 -0
- package/cjs/accordion/views/accordion-view.js +24 -0
- package/cjs/adaptive/adaptive.js +53 -0
- package/cjs/adaptive/adaptive.module.css +189 -0
- package/cjs/adaptive/index.js +17 -0
- package/cjs/adaptive/types.js +2 -0
- package/cjs/alert/alert-actions.js +29 -0
- package/cjs/alert/alert-content.js +22 -0
- package/cjs/alert/alert-icon.js +16 -0
- package/cjs/alert/alert.js +47 -0
- package/cjs/alert/index.js +17 -0
- package/cjs/alert/styles/alert-variants.module.css +38 -0
- package/cjs/alert/styles/alert.module.css +51 -0
- package/cjs/alert/types.js +2 -0
- package/cjs/alert/use-alert.js +17 -0
- package/cjs/avatar/avatar-group.js +37 -0
- package/cjs/avatar/avatar-group.module.css +13 -0
- package/cjs/avatar/avatar-inner.js +31 -0
- package/cjs/avatar/avatar.js +107 -0
- package/cjs/avatar/constants.js +8 -0
- package/cjs/avatar/index.js +18 -0
- package/cjs/avatar/styles.module.css +292 -0
- package/cjs/avatar/types.js +2 -0
- package/cjs/avatar/utils.js +16 -0
- package/cjs/badge/badge.js +37 -0
- package/cjs/badge/index.js +18 -0
- package/cjs/badge/styles.module.css +114 -0
- package/cjs/badge/types.js +2 -0
- package/cjs/breadcrumbs/breadcrumbs-context.js +10 -0
- package/cjs/breadcrumbs/breadcrumbs-item.js +24 -0
- package/cjs/breadcrumbs/breadcrumbs-menu.js +18 -0
- package/cjs/breadcrumbs/breadcrumbs.js +100 -0
- package/cjs/breadcrumbs/index.js +7 -0
- package/cjs/breadcrumbs/styles.module.css +190 -0
- package/cjs/breadcrumbs/types.js +2 -0
- package/cjs/breadcrumbs/use-breadcrumbs-fit.js +46 -0
- package/cjs/breadcrumbs/use-breadcrumbs.js +77 -0
- package/cjs/button/button.js +51 -0
- package/cjs/button/close-button.js +24 -0
- package/cjs/button/index.js +23 -0
- package/cjs/button/styles.module.css +288 -0
- package/cjs/button/types.js +2 -0
- package/cjs/button/use-button.js +41 -0
- package/cjs/calendar/availability.js +35 -0
- package/cjs/calendar/calendar-header.js +46 -0
- package/cjs/calendar/calendar.js +41 -0
- package/cjs/calendar/day-grid.js +27 -0
- package/cjs/calendar/index.js +11 -0
- package/cjs/calendar/labels.js +16 -0
- package/cjs/calendar/picker-grid.js +69 -0
- package/cjs/calendar/selection.js +59 -0
- package/cjs/calendar/styles.module.css +283 -0
- package/cjs/calendar/types.js +2 -0
- package/cjs/calendar/use-calendar.js +400 -0
- package/cjs/caption/caption.js +66 -0
- package/cjs/caption/index.js +17 -0
- package/cjs/caption/styles.module.css +33 -0
- package/cjs/caption/types.js +2 -0
- package/cjs/card/card.js +37 -0
- package/cjs/card/index.js +17 -0
- package/cjs/card/styles.module.css +80 -0
- package/cjs/card/types.js +2 -0
- package/cjs/card/use-card.js +39 -0
- package/cjs/checkbox/checkbox.js +60 -0
- package/cjs/checkbox/index.js +17 -0
- package/cjs/checkbox/styles/style.module.css +259 -0
- package/cjs/checkbox/types.js +2 -0
- package/cjs/chip/chip.js +102 -0
- package/cjs/chip/index.js +5 -0
- package/cjs/chip/styles.module.css +65 -0
- package/cjs/chip/types.js +2 -0
- package/cjs/chip-group/chip-group-transition-context.js +14 -0
- package/cjs/chip-group/chip-group-transition-provider.js +18 -0
- package/cjs/chip-group/chip-group.js +74 -0
- package/cjs/chip-group/index.js +5 -0
- package/cjs/chip-group/styles.module.css +4 -0
- package/cjs/chip-group/types.js +2 -0
- package/cjs/container/container.js +46 -0
- package/cjs/container/index.js +17 -0
- package/cjs/container/styles.module.css +85 -0
- package/cjs/container/types.js +2 -0
- package/cjs/css-baseline/css-baseline.js +11 -0
- package/cjs/css-baseline/index.js +17 -0
- package/cjs/css-baseline/styles.css +36 -0
- package/cjs/date-picker/date-picker-panel.js +42 -0
- package/cjs/date-picker/date-picker-sheet-footer.js +16 -0
- package/cjs/date-picker/date-picker.js +76 -0
- package/cjs/date-picker/index.js +8 -0
- package/cjs/date-picker/range-time-panels.js +26 -0
- package/cjs/date-picker/styles.module.css +125 -0
- package/cjs/date-picker/types.js +2 -0
- package/cjs/date-picker/use-date-picker.js +286 -0
- package/cjs/date-picker/use-sheet-time.js +18 -0
- package/cjs/divider/divider.js +58 -0
- package/cjs/divider/index.js +17 -0
- package/cjs/divider/styles.module.css +28 -0
- package/cjs/divider/types.js +2 -0
- package/cjs/drawer/content.js +59 -0
- package/cjs/drawer/context.js +14 -0
- package/cjs/drawer/drawer.js +132 -0
- package/cjs/drawer/footer.js +67 -0
- package/cjs/drawer/header.js +66 -0
- package/cjs/drawer/index.js +21 -0
- package/cjs/drawer/normalize-padding.js +23 -0
- package/cjs/drawer/sheet-drag-config.js +16 -0
- package/cjs/drawer/sheet-drag-utils.js +39 -0
- package/cjs/drawer/styles.module.css +268 -0
- package/cjs/drawer/types.js +2 -0
- package/cjs/drawer/use-scroll-state.js +34 -0
- package/cjs/drawer/use-sheet-drag.js +163 -0
- package/cjs/dropdown-menu/dropdown-menu-button.js +61 -0
- package/cjs/dropdown-menu/dropdown-menu-context.js +14 -0
- package/cjs/dropdown-menu/dropdown-menu-item.js +16 -0
- package/cjs/dropdown-menu/dropdown-menu.js +44 -0
- package/cjs/dropdown-menu/index.js +19 -0
- package/cjs/dropdown-menu/styles.module.css +46 -0
- package/cjs/dropdown-menu/types.js +2 -0
- package/cjs/dropdown-menu/use-dropdown-menu.js +203 -0
- package/cjs/file/components/file-background-progress.js +20 -0
- package/cjs/file/components/file-emblem.js +38 -0
- package/cjs/file/components/file-interactive-shell.js +15 -0
- package/cjs/file/components/file-name.js +20 -0
- package/cjs/file/components/file-status-meta.js +20 -0
- package/cjs/file/constants.js +21 -0
- package/cjs/file/file-extensions.js +116 -0
- package/cjs/file/file.js +26 -0
- package/cjs/file/hooks/use-file-view-model.js +123 -0
- package/cjs/file/icons/file-extension-glyph-icon.js +13 -0
- package/cjs/file/icons/file-extension-glyphs.js +20 -0
- package/cjs/file/icons/file-extension-icons.js +19 -0
- package/cjs/file/image-frame-size-class.js +17 -0
- package/cjs/file/index.js +25 -0
- package/cjs/file/presets/remove-preset.js +37 -0
- package/cjs/file/presets/retry-preset.js +25 -0
- package/cjs/file/styles.module.css +566 -0
- package/cjs/file/types.js +2 -0
- package/cjs/file/utils/file-name-parts.js +25 -0
- package/cjs/file/utils/format-size.js +39 -0
- package/cjs/file/utils/get-file-presentation.js +51 -0
- package/cjs/file/utils/resolve-file-icon.js +21 -0
- package/cjs/file/utils/resolve-file-slot.js +61 -0
- package/cjs/file/utils/split-file-name.js +15 -0
- package/cjs/file/views/file-default-view.js +28 -0
- package/cjs/file/views/file-image-view.js +23 -0
- package/cjs/file-upload/components/drop-overlay.js +36 -0
- package/cjs/file-upload/components/file-upload-button-trigger.js +17 -0
- package/cjs/file-upload/components/file-upload-hint-caption.js +15 -0
- package/cjs/file-upload/components/file-upload-icon-button.js +20 -0
- package/cjs/file-upload/components/image-loader-icons.js +15 -0
- package/cjs/file-upload/components/image-loader-trigger.js +20 -0
- package/cjs/file-upload/constants.js +44 -0
- package/cjs/file-upload/file-upload.js +22 -0
- package/cjs/file-upload/hooks/use-drag-overlay.js +113 -0
- package/cjs/file-upload/hooks/use-file-list.js +191 -0
- package/cjs/file-upload/hooks/use-file-upload-view-model.js +188 -0
- package/cjs/file-upload/hooks/use-object-url.js +31 -0
- package/cjs/file-upload/index.js +40 -0
- package/cjs/file-upload/styles.module.css +345 -0
- package/cjs/file-upload/types-dropzone.js +2 -0
- package/cjs/file-upload/types-file-actions.js +2 -0
- package/cjs/file-upload/types-labels.js +2 -0
- package/cjs/file-upload/types.js +21 -0
- package/cjs/file-upload/utils/accept.js +48 -0
- package/cjs/file-upload/utils/build-file-slots.js +19 -0
- package/cjs/file-upload/utils/compute-drop-border-vertical-dash-style.js +49 -0
- package/cjs/file-upload/utils/get-drop-zone-typography.js +15 -0
- package/cjs/file-upload/utils/get-file-upload-presentation.js +68 -0
- package/cjs/file-upload/utils/max-count.js +26 -0
- package/cjs/file-upload/utils/normalize.js +67 -0
- package/cjs/file-upload/utils/render-drop-zone-hint-content.js +33 -0
- package/cjs/file-upload/utils/resolve-display-error.js +18 -0
- package/cjs/file-upload/utils/resolve-hint-content.js +59 -0
- package/cjs/file-upload/utils/resolve-labels.js +37 -0
- package/cjs/file-upload/utils/resolve-preset.js +49 -0
- package/cjs/file-upload/utils/resolve-upload-file-error.js +12 -0
- package/cjs/file-upload/utils/resolve-upload-text.js +9 -0
- package/cjs/file-upload/utils/run-before-upload.js +29 -0
- package/cjs/file-upload/utils/run-sequentially.js +7 -0
- package/cjs/file-upload/utils/uid.js +7 -0
- package/cjs/file-upload/views/file-upload-dropzone-view.js +54 -0
- package/cjs/file-upload/views/file-upload-errors-view.js +13 -0
- package/cjs/file-upload/views/file-upload-footer-view.js +23 -0
- package/cjs/file-upload/views/file-upload-list-view.js +44 -0
- package/cjs/file-upload/views/file-upload-trigger-view.js +101 -0
- package/cjs/file-upload/views/file-upload-view.js +23 -0
- package/cjs/grid/grid.js +153 -0
- package/cjs/grid/index.js +21 -0
- package/cjs/grid/presets.js +6 -0
- package/cjs/grid/styles.module.css +56 -0
- package/cjs/grid/types.js +2 -0
- package/cjs/grid-item/grid-item.js +19 -0
- package/cjs/grid-item/index.js +17 -0
- package/cjs/grid-item/types.js +2 -0
- package/cjs/hint/buttons/action-button.js +26 -0
- package/cjs/hint/buttons/close-button.js +30 -0
- package/cjs/hint/buttons/extra-button.js +26 -0
- package/cjs/hint/hint-content.js +27 -0
- package/cjs/hint/hint-provider.js +14 -0
- package/cjs/hint/hint.js +90 -0
- package/cjs/hint/index.js +21 -0
- package/cjs/hint/styles/buttons.module.css +16 -0
- package/cjs/hint/styles/hint-content.module.css +33 -0
- package/cjs/hint/styles/hint.module.css +37 -0
- package/cjs/hint/types.js +2 -0
- package/cjs/hooks/index.js +37 -0
- package/cjs/hooks/media-query/create-media-query.js +22 -0
- package/cjs/hooks/media-query/index.js +18 -0
- package/cjs/hooks/media-query/observe-media-query.js +29 -0
- package/cjs/hooks/media-query/types.js +2 -0
- package/cjs/hooks/media-query/use-media-query-listener.js +39 -0
- package/cjs/hooks/media-query/use-media-query.js +28 -0
- package/cjs/hooks/use-actual-ref.js +14 -0
- package/cjs/hooks/use-breakpoint.js +56 -0
- package/cjs/hooks/use-click-outside.js +43 -0
- package/cjs/hooks/use-component-tokens.js +20 -0
- package/cjs/hooks/use-cssvar-from-width.js +35 -0
- package/cjs/hooks/use-effect-once.js +13 -0
- package/cjs/hooks/use-isomorphic-layout-effect.js +9 -0
- package/cjs/hooks/use-keyboard-callbacks.js +124 -0
- package/cjs/hooks/use-keyboard-navigation.js +66 -0
- package/cjs/hooks/use-list-navigation/index.js +15 -0
- package/cjs/hooks/use-list-navigation/input-modality.js +59 -0
- package/cjs/hooks/use-list-navigation/store.js +70 -0
- package/cjs/hooks/use-list-navigation/types.js +2 -0
- package/cjs/hooks/use-list-navigation/use-list-navigation-item.js +39 -0
- package/cjs/hooks/use-list-navigation/use-list-navigation.js +262 -0
- package/cjs/hooks/use-list-navigation/utils.js +52 -0
- package/cjs/hooks/use-load-more.js +74 -0
- package/cjs/hooks/use-mount.js +13 -0
- package/cjs/hooks/use-persistent-callback.js +18 -0
- package/cjs/hooks/use-platform.js +38 -0
- package/cjs/hooks/use-responsive-value.js +39 -0
- package/cjs/hooks/use-uniq-id.js +21 -0
- package/cjs/hooks/use-unmount.js +16 -0
- package/cjs/hooks/use-update-effect.js +27 -0
- package/cjs/hooks/use-viewport-exit.js +33 -0
- package/cjs/hooks/use-virtual-window.js +86 -0
- package/cjs/hooks/use-window-size.js +28 -0
- package/cjs/icon/icon.js +71 -0
- package/cjs/icon/index.js +17 -0
- package/cjs/icon/pack-utils.js +33 -0
- package/cjs/icon/styles.module.css +17 -0
- package/cjs/icons/arrow-icon.js +16 -0
- package/cjs/icons/back-icon.js +10 -0
- package/cjs/icons/calendar-icon.js +10 -0
- package/cjs/icons/check-icon.js +11 -0
- package/cjs/icons/clock-icon.js +11 -0
- package/cjs/icons/close-icon.js +10 -0
- package/cjs/icons/del-icon.js +10 -0
- package/cjs/icons/double-arrow-icon.js +15 -0
- package/cjs/icons/error-icon.js +10 -0
- package/cjs/icons/eye-icon.js +12 -0
- package/cjs/icons/index.js +31 -0
- package/cjs/icons/magnifying-glass-icon.js +10 -0
- package/cjs/icons/minus-icon.js +10 -0
- package/cjs/icons/plus-icon.js +10 -0
- package/cjs/icons/reset-icon.js +10 -0
- package/cjs/icons/shopping-icon.js +10 -0
- package/cjs/icons/stars/star-fill-icon.js +10 -0
- package/cjs/icons/stars/star-half-icon.js +10 -0
- package/cjs/icons/stars/start-outline-icon.js +10 -0
- package/cjs/icons/types.js +2 -0
- package/cjs/image/image-viewer.js +47 -0
- package/cjs/image/image.js +73 -0
- package/cjs/image/index.js +17 -0
- package/cjs/image/style.module.css +65 -0
- package/cjs/image/types.js +2 -0
- package/cjs/image/use-image.js +47 -0
- package/cjs/image/viewer.module.css +80 -0
- package/cjs/index.js +87 -0
- package/cjs/input/fields/password-toggle.js +14 -0
- package/cjs/input/fields/text-field.js +29 -0
- package/cjs/input/fields/use-text-field.js +79 -0
- package/cjs/input/index.js +17 -0
- package/cjs/input/input.js +24 -0
- package/cjs/input/types.js +2 -0
- package/cjs/label/index.js +18 -0
- package/cjs/label/label.js +82 -0
- package/cjs/label/styles.module.css +25 -0
- package/cjs/label/types.js +2 -0
- package/cjs/list/clear-all-button/clear-all-button.js +47 -0
- package/cjs/list/clear-all-button/index.js +17 -0
- package/cjs/list/constants.js +4 -0
- package/cjs/list/index.js +24 -0
- package/cjs/list/list-context.js +14 -0
- package/cjs/list/list-divider/index.js +17 -0
- package/cjs/list/list-divider/list-divider.js +49 -0
- package/cjs/list/list-divider/styles.module.css +7 -0
- package/cjs/list/list-divider/use-list-divider.js +15 -0
- package/cjs/list/list-item/index.js +5 -0
- package/cjs/list/list-item/list-icon.js +61 -0
- package/cjs/list/list-item/list-item-provider.js +21 -0
- package/cjs/list/list-item/list-item.js +32 -0
- package/cjs/list/list-item/styles.module.css +216 -0
- package/cjs/list/list-item/types.js +2 -0
- package/cjs/list/list-item/use-list-item.js +78 -0
- package/cjs/list/list-item/use-nested-list.js +17 -0
- package/cjs/list/list-section/index.js +17 -0
- package/cjs/list/list-section/list-section.js +67 -0
- package/cjs/list/list-section/styles.module.css +27 -0
- package/cjs/list/list.js +39 -0
- package/cjs/list/styles.module.css +24 -0
- package/cjs/list/types.js +2 -0
- package/cjs/list/use-list.js +73 -0
- package/cjs/loader/index.js +17 -0
- package/cjs/loader/loader.js +31 -0
- package/cjs/loader/loader.module.css +80 -0
- package/cjs/locale/create-translator.js +13 -0
- package/cjs/locale/en.js +109 -0
- package/cjs/locale/index.js +13 -0
- package/cjs/locale/locale-provider.js +23 -0
- package/cjs/locale/ru.js +109 -0
- package/cjs/locale/types.js +2 -0
- package/cjs/locale/use-locale.js +11 -0
- package/cjs/masked-input/constants.js +8 -0
- package/cjs/masked-input/hooks.js +179 -0
- package/cjs/masked-input/index.js +5 -0
- package/cjs/masked-input/mask-types.js +2 -0
- package/cjs/masked-input/masked-input.js +27 -0
- package/cjs/masked-input/types.js +2 -0
- package/cjs/masked-input/use-mask.js +168 -0
- package/cjs/masked-input/utils/get-autofill-selector.js +14 -0
- package/cjs/masked-input/utils/helpers.js +61 -0
- package/cjs/masked-input/utils/index.js +20 -0
- package/cjs/masked-input/utils/mask-utils.js +211 -0
- package/cjs/masked-input/utils/parse-mask.js +61 -0
- package/cjs/masked-input/utils/validate-props.js +15 -0
- package/cjs/modal/constants.js +5 -0
- package/cjs/modal/index.js +26 -0
- package/cjs/modal/modal-close-button.js +20 -0
- package/cjs/modal/modal-content.js +43 -0
- package/cjs/modal/modal-context.js +13 -0
- package/cjs/modal/modal-footer.js +57 -0
- package/cjs/modal/modal-header.js +57 -0
- package/cjs/modal/modal.js +63 -0
- package/cjs/modal/styles/_animations.css +124 -0
- package/cjs/modal/styles/_config.css +0 -0
- package/cjs/modal/styles/modal-content.module.css +30 -0
- package/cjs/modal/styles/modal-footer.module.css +31 -0
- package/cjs/modal/styles/modal-header.module.css +56 -0
- package/cjs/modal/styles/modal.module.css +284 -0
- package/cjs/modal/types.js +2 -0
- package/cjs/modal/use-modal-refs.js +16 -0
- package/cjs/modal/use-modal.js +52 -0
- package/cjs/modal/utils.js +17 -0
- package/cjs/navigation/context.js +24 -0
- package/cjs/navigation/index.js +25 -0
- package/cjs/navigation/navigation-compact.js +122 -0
- package/cjs/navigation/navigation-control.js +89 -0
- package/cjs/navigation/navigation-item-content.js +33 -0
- package/cjs/navigation/navigation-list.js +87 -0
- package/cjs/navigation/navigation-rail.js +31 -0
- package/cjs/navigation/navigation-row.js +86 -0
- package/cjs/navigation/navigation-tree.js +100 -0
- package/cjs/navigation/navigation-views.js +114 -0
- package/cjs/navigation/navigation.js +152 -0
- package/cjs/navigation/storage.js +28 -0
- package/cjs/navigation/styles/navigation.module.css +552 -0
- package/cjs/navigation/types.js +2 -0
- package/cjs/navigation/use-item-tooltip.js +22 -0
- package/cjs/navigation/use-navigation-types.js +2 -0
- package/cjs/navigation/use-navigation.js +141 -0
- package/cjs/navigation/use-overflow.js +41 -0
- package/cjs/navigation/utils.js +102 -0
- package/cjs/number-input/format-types.js +8 -0
- package/cjs/number-input/format-utils.js +166 -0
- package/cjs/number-input/hooks/index.js +5 -0
- package/cjs/number-input/hooks/use-numeric-format.js +139 -0
- package/cjs/number-input/index.js +5 -0
- package/cjs/number-input/number-input.js +26 -0
- package/cjs/number-input/types.js +2 -0
- package/cjs/number-input/use-number-input.js +405 -0
- package/cjs/number-input/utils.js +323 -0
- package/cjs/pagination/index.js +9 -0
- package/cjs/pagination/items.js +48 -0
- package/cjs/pagination/labels.js +17 -0
- package/cjs/pagination/pagination.js +65 -0
- package/cjs/pagination/styles.module.css +125 -0
- package/cjs/pagination/types.js +2 -0
- package/cjs/pagination/use-pagination.js +27 -0
- package/cjs/pin-input/index.js +5 -0
- package/cjs/pin-input/pin-input.js +33 -0
- package/cjs/pin-input/styles.module.css +68 -0
- package/cjs/pin-input/types.js +2 -0
- package/cjs/pin-input/use-pin-input.js +137 -0
- package/cjs/pin-input/utils.js +17 -0
- package/cjs/popover/index.js +10 -0
- package/cjs/popover/popover.js +43 -0
- package/cjs/popover/styles.module.css +76 -0
- package/cjs/popover/types.js +2 -0
- package/cjs/popover/use-popover.js +125 -0
- package/cjs/portal/index.js +11 -0
- package/cjs/portal/portal-provider.js +21 -0
- package/cjs/portal/portal.js +48 -0
- package/cjs/portal/resolve-container.js +14 -0
- package/cjs/portal/types.js +2 -0
- package/cjs/portal/use-portal.js +51 -0
- package/cjs/progress-bar/index.js +17 -0
- package/cjs/progress-bar/progress-bar.js +57 -0
- package/cjs/progress-bar/styles.module.css +147 -0
- package/cjs/progress-bar/types.js +2 -0
- package/cjs/quantity-input/index.js +17 -0
- package/cjs/quantity-input/quantity-input.js +123 -0
- package/cjs/quantity-input/styles.module.css +44 -0
- package/cjs/quantity-input/types.js +2 -0
- package/cjs/quantity-input/utils.js +25 -0
- package/cjs/radio/index.js +18 -0
- package/cjs/radio/radio.js +50 -0
- package/cjs/radio/styles.module.css +162 -0
- package/cjs/radio/types.js +2 -0
- package/cjs/radio-group/index.js +20 -0
- package/cjs/radio-group/radio-group-context.js +11 -0
- package/cjs/radio-group/radio-group.js +81 -0
- package/cjs/radio-group/styles.module.css +12 -0
- package/cjs/radio-group/use-radio-group.js +8 -0
- package/cjs/segmented-control/index.js +7 -0
- package/cjs/segmented-control/segmented-control-context.js +11 -0
- package/cjs/segmented-control/segmented-control-item.js +79 -0
- package/cjs/segmented-control/segmented-control.js +75 -0
- package/cjs/segmented-control/styles/_variables.css +0 -0
- package/cjs/segmented-control/styles/segmented-control-item.module.css +194 -0
- package/cjs/segmented-control/styles/segmented-control.module.css +31 -0
- package/cjs/segmented-control/types.js +2 -0
- package/cjs/segmented-control/use-segmented-control.js +33 -0
- package/cjs/select/class-names-context.js +7 -0
- package/cjs/select/components/render-grouped-options.js +48 -0
- package/cjs/select/components/select-field-multiselect-value.js +56 -0
- package/cjs/select/components/select-field-value.js +60 -0
- package/cjs/select/components/select-field.js +219 -0
- package/cjs/select/components/select-load-more-indicator.js +13 -0
- package/cjs/select/components/select-multiselect-panel.js +202 -0
- package/cjs/select/components/select-option-list.js +111 -0
- package/cjs/select/components/select-option-row.js +79 -0
- package/cjs/select/components/select-options-scroll-area.js +14 -0
- package/cjs/select/components/select-panel-status.js +23 -0
- package/cjs/select/components/select-single-panel.js +47 -0
- package/cjs/select/hooks/use-auto-scroll-to-bottom.js +26 -0
- package/cjs/select/hooks/use-chips-row-count.js +65 -0
- package/cjs/select/hooks/use-multiselect-collapsed-display.js +137 -0
- package/cjs/select/hooks/use-select-dismiss.js +82 -0
- package/cjs/select/hooks/use-select-input-bindings.js +46 -0
- package/cjs/select/hooks/use-select-keyboard.js +174 -0
- package/cjs/select/hooks/use-select-multiselect-panel-state.js +31 -0
- package/cjs/select/hooks/use-select-search.js +261 -0
- package/cjs/select/hooks/use-select-view-model.js +167 -0
- package/cjs/select/hooks/use-select-virtual.js +35 -0
- package/cjs/select/hooks/use-select.js +438 -0
- package/cjs/select/index.js +40 -0
- package/cjs/select/presets/autocomplete.js +22 -0
- package/cjs/select/presets/index.js +17 -0
- package/cjs/select/select.js +25 -0
- package/cjs/select/styles/select-field.module.css +128 -0
- package/cjs/select/styles/select.module.css +457 -0
- package/cjs/select/types-search.js +2 -0
- package/cjs/select/types.js +2 -0
- package/cjs/select/utils/custom-search-option.js +42 -0
- package/cjs/select/utils/filter-options.js +28 -0
- package/cjs/select/utils/get-display-value.js +19 -0
- package/cjs/select/utils/get-element-content-width.js +14 -0
- package/cjs/select/utils/get-multiselect-display-labels.js +10 -0
- package/cjs/select/utils/get-status-content.js +13 -0
- package/cjs/select/utils/is-select-panel-compact-content.js +7 -0
- package/cjs/select/utils/measure-multiselect-row-width.js +19 -0
- package/cjs/select/utils/measure-text-width.js +78 -0
- package/cjs/select/utils/multiselect-collapsed-display-shared.js +156 -0
- package/cjs/select/utils/normalize-options.js +10 -0
- package/cjs/select/utils/normalize-value.js +23 -0
- package/cjs/select/utils/resolve-loading-state.js +13 -0
- package/cjs/select/utils/resolve-multiselect-collapsed-display.js +45 -0
- package/cjs/select/utils/resolve-search-content.js +9 -0
- package/cjs/select/utils/retain-combobox-focus.js +21 -0
- package/cjs/select/utils/select-keyboard-navigation.js +17 -0
- package/cjs/select/utils/select-load-more-scroll.js +24 -0
- package/cjs/select/utils/select-option-id.js +7 -0
- package/cjs/select/views/select-listbox.js +21 -0
- package/cjs/select/views/select-search-listbox.js +29 -0
- package/cjs/select/views/select-view.js +70 -0
- package/cjs/select/views/styles.module.css +45 -0
- package/cjs/show-more/hooks/use-show-more-view-model.js +79 -0
- package/cjs/show-more/index.js +5 -0
- package/cjs/show-more/show-more.js +21 -0
- package/cjs/show-more/styles.module.css +20 -0
- package/cjs/show-more/types.js +2 -0
- package/cjs/show-more/views/show-more-view.js +15 -0
- package/cjs/skeleton/index.js +18 -0
- package/cjs/skeleton/skeleton.js +50 -0
- package/cjs/skeleton/styles.module.css +300 -0
- package/cjs/skeleton/types.js +2 -0
- package/cjs/skeleton/use-skeleton.js +23 -0
- package/cjs/snackbar/index.js +21 -0
- package/cjs/snackbar/snack-button.js +57 -0
- package/cjs/snackbar/snack-view.js +105 -0
- package/cjs/snackbar/snack.js +64 -0
- package/cjs/snackbar/snackbar-context.js +13 -0
- package/cjs/snackbar/snackbar-provider.js +88 -0
- package/cjs/snackbar/snackbar.js +81 -0
- package/cjs/snackbar/styles/snack.module.css +195 -0
- package/cjs/snackbar/styles/snackbar.module.css +66 -0
- package/cjs/snackbar/types.js +2 -0
- package/cjs/snackbar/use-snack-timer.js +31 -0
- package/cjs/snackbar/use-snack.js +86 -0
- package/cjs/stack/index.js +17 -0
- package/cjs/stack/stack.js +40 -0
- package/cjs/stack/styles.module.css +46 -0
- package/cjs/stack/types.js +2 -0
- package/cjs/status/index.js +17 -0
- package/cjs/status/status-icon.js +26 -0
- package/cjs/status/styles.module.css +18 -0
- package/cjs/status/types.js +2 -0
- package/cjs/stepper/index.js +20 -0
- package/cjs/stepper/stepper.js +47 -0
- package/cjs/stepper/styles.module.css +172 -0
- package/cjs/stepper/types.js +2 -0
- package/cjs/stepper/use-stepper.js +28 -0
- package/cjs/switch/index.js +18 -0
- package/cjs/switch/styles/base.module.css +134 -0
- package/cjs/switch/switch.js +78 -0
- package/cjs/switch/types.js +2 -0
- package/cjs/tabs/context.js +13 -0
- package/cjs/tabs/index.js +23 -0
- package/cjs/tabs/styles/tab-list.module.css +23 -0
- package/cjs/tabs/styles/tab-panel.module.css +3 -0
- package/cjs/tabs/styles/tab.module.css +210 -0
- package/cjs/tabs/tab-list.js +109 -0
- package/cjs/tabs/tab-panel.js +55 -0
- package/cjs/tabs/tab.js +79 -0
- package/cjs/tabs/tabs.js +33 -0
- package/cjs/tabs/types.js +2 -0
- package/cjs/tabs/use-tabs.js +62 -0
- package/cjs/textarea/get-max-length-message.js +9 -0
- package/cjs/textarea/index.js +5 -0
- package/cjs/textarea/styles.module.css +37 -0
- package/cjs/textarea/textarea.js +26 -0
- package/cjs/textarea/types.js +2 -0
- package/cjs/textarea/use-auto-height.js +109 -0
- package/cjs/textarea/use-resize-handle.js +47 -0
- package/cjs/textarea/use-textarea.js +111 -0
- package/cjs/theme-provider/index.js +46 -0
- package/cjs/theme-provider/styles.module.css +332 -0
- package/cjs/theme-provider/theme-context.js +39 -0
- package/cjs/theme-provider/theme-provider.js +48 -0
- package/cjs/theme-provider/theme-scope.js +85 -0
- package/cjs/theme-provider/types.js +2 -0
- package/cjs/theme-provider/use-system-theme.js +26 -0
- package/cjs/theme-provider/use-theme-provider.js +28 -0
- package/cjs/time-picker/index.js +16 -0
- package/cjs/time-picker/picker-types.js +2 -0
- package/cjs/time-picker/single-time-picker.js +44 -0
- package/cjs/time-picker/styles.module.css +124 -0
- package/cjs/time-picker/time-model.js +149 -0
- package/cjs/time-picker/time-panel.js +87 -0
- package/cjs/time-picker/time-picker.js +80 -0
- package/cjs/time-picker/time-range-picker.js +51 -0
- package/cjs/time-picker/types.js +2 -0
- package/cjs/time-picker/use-time-panel.js +25 -0
- package/cjs/time-picker/use-time-picker.js +120 -0
- package/cjs/time-picker/use-time-range-picker.js +134 -0
- package/cjs/tokens/index.js +18 -0
- package/cjs/tooltip/index.js +17 -0
- package/cjs/tooltip/styles.module.css +46 -0
- package/cjs/tooltip/tooltip.js +70 -0
- package/cjs/tooltip/types.js +2 -0
- package/cjs/tooltip/use-tooltip.js +41 -0
- package/cjs/tree/check.js +106 -0
- package/cjs/tree/class-names-context.js +9 -0
- package/cjs/tree/highlight.js +29 -0
- package/cjs/tree/index.js +20 -0
- package/cjs/tree/model.js +119 -0
- package/cjs/tree/move.js +109 -0
- package/cjs/tree/styles.module.css +290 -0
- package/cjs/tree/tree-branch.js +78 -0
- package/cjs/tree/tree-placeholder.js +16 -0
- package/cjs/tree/tree-row-content.js +32 -0
- package/cjs/tree/tree-row-renderer.js +60 -0
- package/cjs/tree/tree-row.js +98 -0
- package/cjs/tree/tree-select-panel.js +15 -0
- package/cjs/tree/tree-select-selection.js +34 -0
- package/cjs/tree/tree-select-types.js +2 -0
- package/cjs/tree/tree-select.js +207 -0
- package/cjs/tree/tree-select.module.css +35 -0
- package/cjs/tree/tree.js +99 -0
- package/cjs/tree/types-row.js +2 -0
- package/cjs/tree/types.js +2 -0
- package/cjs/tree/use-tree-activate.js +17 -0
- package/cjs/tree/use-tree-checks.js +27 -0
- package/cjs/tree/use-tree-expansion.js +74 -0
- package/cjs/tree/use-tree-keyboard.js +94 -0
- package/cjs/tree/use-tree-virtual.js +76 -0
- package/cjs/tree/use-tree.js +111 -0
- package/cjs/tree/virtual-rows.js +15 -0
- package/cjs/types/size.js +2 -0
- package/cjs/typography/index.js +17 -0
- package/cjs/typography/styles.module.css +304 -0
- package/cjs/typography/types.js +2 -0
- package/cjs/typography/typography.js +30 -0
- package/cjs/utils/call-child-as-function.js +5 -0
- package/cjs/utils/class-names.js +168 -0
- package/cjs/utils/compose-event-handlers.js +18 -0
- package/cjs/utils/container-props-override.js +56 -0
- package/cjs/utils/create-id.js +13 -0
- package/cjs/utils/data-attributes.js +29 -0
- package/cjs/utils/decode-uri.js +50 -0
- package/cjs/utils/empty-function.js +7 -0
- package/cjs/utils/get-react-element-ref.js +16 -0
- package/cjs/utils/imperative-change-input-value.js +19 -0
- package/cjs/utils/index.js +38 -0
- package/cjs/utils/input-caret.js +48 -0
- package/cjs/utils/invariant.js +15 -0
- package/cjs/utils/is-browser.js +5 -0
- package/cjs/utils/is-new-theme.js +10 -0
- package/cjs/utils/merge-refs.js +39 -0
- package/cjs/utils/overridable-component.js +2 -0
- package/cjs/utils/shallow-objects-equal.js +20 -0
- package/cjs/utils/style/index.js +20 -0
- package/cjs/utils/style/props/color.js +9 -0
- package/cjs/utils/style/props/dimension.js +13 -0
- package/cjs/utils/style/props/index.js +19 -0
- package/cjs/utils/style/props/passthrough.js +5 -0
- package/cjs/utils/style/props/types.js +2 -0
- package/cjs/utils/style/types.js +2 -0
- package/cjs/utils/style/use-style-props.js +10 -0
- package/cjs/utils/style/utils/convert-style-props.js +26 -0
- package/cjs/utils/style/utils/index.js +17 -0
- package/cjs/utils/use-class-names.js +99 -0
- package/cjs/utils/utils.js +2 -0
- package/cjs/visually-hidden/index.js +17 -0
- package/cjs/visually-hidden/styles.module.css +9 -0
- package/cjs/visually-hidden/visually-hidden.js +12 -0
- package/container/container.d.ts +2 -0
- package/container/container.js +7 -0
- package/container/index.d.ts +2 -0
- package/container/index.js +1 -0
- package/container/styles.module.css +85 -0
- package/container/types.d.ts +9 -0
- package/container/types.js +1 -0
- package/css-baseline/css-baseline.d.ts +3 -0
- package/css-baseline/css-baseline.js +4 -0
- package/css-baseline/index.d.ts +1 -0
- package/css-baseline/index.js +1 -0
- package/css-baseline/styles.css +36 -0
- package/date-picker/date-picker-panel.d.ts +13 -0
- package/date-picker/date-picker-panel.js +35 -0
- package/date-picker/date-picker-sheet-footer.d.ts +6 -0
- package/date-picker/date-picker-sheet-footer.js +12 -0
- package/date-picker/date-picker.d.ts +12 -0
- package/date-picker/date-picker.js +70 -0
- package/date-picker/index.d.ts +4 -0
- package/date-picker/index.js +2 -0
- package/date-picker/range-time-panels.d.ts +16 -0
- package/date-picker/range-time-panels.js +19 -0
- package/date-picker/styles.module.css +125 -0
- package/date-picker/types.d.ts +173 -0
- package/date-picker/types.js +1 -0
- package/date-picker/use-date-picker.d.ts +56 -0
- package/date-picker/use-date-picker.js +282 -0
- package/date-picker/use-sheet-time.d.ts +8 -0
- package/date-picker/use-sheet-time.js +14 -0
- package/divider/divider.d.ts +10 -0
- package/divider/divider.js +18 -0
- package/divider/index.d.ts +2 -0
- package/divider/index.js +1 -0
- package/divider/styles.module.css +28 -0
- package/divider/types.d.ts +17 -0
- package/divider/types.js +1 -0
- package/drawer/content.d.ts +8 -0
- package/drawer/content.js +20 -0
- package/drawer/context.d.ts +13 -0
- package/drawer/context.js +11 -0
- package/drawer/drawer.d.ts +27 -0
- package/drawer/drawer.js +93 -0
- package/drawer/footer.d.ts +6 -0
- package/drawer/footer.js +28 -0
- package/drawer/header.d.ts +11 -0
- package/drawer/header.js +27 -0
- package/drawer/index.d.ts +5 -0
- package/drawer/index.js +5 -0
- package/drawer/normalize-padding.d.ts +2 -0
- package/drawer/normalize-padding.js +20 -0
- package/drawer/sheet-drag-config.d.ts +12 -0
- package/drawer/sheet-drag-config.js +13 -0
- package/drawer/sheet-drag-utils.d.ts +16 -0
- package/drawer/sheet-drag-utils.js +35 -0
- package/drawer/styles.module.css +268 -0
- package/drawer/types.d.ts +102 -0
- package/drawer/types.js +1 -0
- package/drawer/use-scroll-state.d.ts +11 -0
- package/drawer/use-scroll-state.js +31 -0
- package/drawer/use-sheet-drag.d.ts +25 -0
- package/drawer/use-sheet-drag.js +160 -0
- package/dropdown-menu/dropdown-menu-button.d.ts +8 -0
- package/dropdown-menu/dropdown-menu-button.js +22 -0
- package/dropdown-menu/dropdown-menu-context.d.ts +6 -0
- package/dropdown-menu/dropdown-menu-context.js +10 -0
- package/dropdown-menu/dropdown-menu-item.d.ts +6 -0
- package/dropdown-menu/dropdown-menu-item.js +9 -0
- package/dropdown-menu/dropdown-menu.d.ts +13 -0
- package/dropdown-menu/dropdown-menu.js +37 -0
- package/dropdown-menu/index.d.ts +4 -0
- package/dropdown-menu/index.js +3 -0
- package/dropdown-menu/styles.module.css +46 -0
- package/dropdown-menu/types.d.ts +64 -0
- package/dropdown-menu/types.js +1 -0
- package/dropdown-menu/use-dropdown-menu.d.ts +178 -0
- package/dropdown-menu/use-dropdown-menu.js +166 -0
- package/file/components/file-background-progress.d.ts +8 -0
- package/file/components/file-background-progress.js +14 -0
- package/file/components/file-emblem.d.ts +14 -0
- package/file/components/file-emblem.js +32 -0
- package/file/components/file-interactive-shell.d.ts +15 -0
- package/file/components/file-interactive-shell.js +9 -0
- package/file/components/file-name.d.ts +13 -0
- package/file/components/file-name.js +14 -0
- package/file/components/file-status-meta.d.ts +14 -0
- package/file/components/file-status-meta.js +14 -0
- package/file/constants.d.ts +32 -0
- package/file/constants.js +17 -0
- package/file/file-extensions.d.ts +2 -0
- package/file/file-extensions.js +113 -0
- package/file/file.d.ts +6 -0
- package/file/file.js +19 -0
- package/file/hooks/use-file-view-model.d.ts +31 -0
- package/file/hooks/use-file-view-model.js +117 -0
- package/file/icons/file-extension-glyph-icon.d.ts +6 -0
- package/file/icons/file-extension-glyph-icon.js +7 -0
- package/file/icons/file-extension-glyphs.d.ts +18 -0
- package/file/icons/file-extension-glyphs.js +17 -0
- package/file/icons/file-extension-icons.d.ts +3 -0
- package/file/icons/file-extension-icons.js +12 -0
- package/file/image-frame-size-class.d.ts +3 -0
- package/file/image-frame-size-class.js +11 -0
- package/file/index.d.ts +6 -0
- package/file/index.js +4 -0
- package/file/presets/remove-preset.d.ts +10 -0
- package/file/presets/remove-preset.js +29 -0
- package/file/presets/retry-preset.d.ts +9 -0
- package/file/presets/retry-preset.js +18 -0
- package/file/styles.module.css +566 -0
- package/file/types.d.ts +62 -0
- package/file/types.js +1 -0
- package/file/utils/file-name-parts.d.ts +15 -0
- package/file/utils/file-name-parts.js +21 -0
- package/file/utils/format-size.d.ts +7 -0
- package/file/utils/format-size.js +35 -0
- package/file/utils/get-file-presentation.d.ts +33 -0
- package/file/utils/get-file-presentation.js +48 -0
- package/file/utils/resolve-file-icon.d.ts +5 -0
- package/file/utils/resolve-file-icon.js +17 -0
- package/file/utils/resolve-file-slot.d.ts +10 -0
- package/file/utils/resolve-file-slot.js +52 -0
- package/file/utils/split-file-name.d.ts +6 -0
- package/file/utils/split-file-name.js +12 -0
- package/file/views/file-default-view.d.ts +6 -0
- package/file/views/file-default-view.js +22 -0
- package/file/views/file-image-view.d.ts +6 -0
- package/file/views/file-image-view.js +17 -0
- package/file-upload/components/drop-overlay.d.ts +8 -0
- package/file-upload/components/drop-overlay.js +29 -0
- package/file-upload/components/file-upload-button-trigger.d.ts +9 -0
- package/file-upload/components/file-upload-button-trigger.js +11 -0
- package/file-upload/components/file-upload-hint-caption.d.ts +8 -0
- package/file-upload/components/file-upload-hint-caption.js +9 -0
- package/file-upload/components/file-upload-icon-button.d.ts +10 -0
- package/file-upload/components/file-upload-icon-button.js +14 -0
- package/file-upload/components/image-loader-icons.d.ts +7 -0
- package/file-upload/components/image-loader-icons.js +8 -0
- package/file-upload/components/image-loader-trigger.d.ts +12 -0
- package/file-upload/components/image-loader-trigger.js +14 -0
- package/file-upload/constants.d.ts +33 -0
- package/file-upload/constants.js +39 -0
- package/file-upload/file-upload.d.ts +10 -0
- package/file-upload/file-upload.js +16 -0
- package/file-upload/hooks/use-drag-overlay.d.ts +11 -0
- package/file-upload/hooks/use-drag-overlay.js +110 -0
- package/file-upload/hooks/use-file-list.d.ts +22 -0
- package/file-upload/hooks/use-file-list.js +188 -0
- package/file-upload/hooks/use-file-upload-view-model.d.ts +51 -0
- package/file-upload/hooks/use-file-upload-view-model.js +185 -0
- package/file-upload/hooks/use-object-url.d.ts +3 -0
- package/file-upload/hooks/use-object-url.js +27 -0
- package/file-upload/index.d.ts +16 -0
- package/file-upload/index.js +10 -0
- package/file-upload/styles.module.css +345 -0
- package/file-upload/types-dropzone.d.ts +18 -0
- package/file-upload/types-dropzone.js +1 -0
- package/file-upload/types-file-actions.d.ts +13 -0
- package/file-upload/types-file-actions.js +1 -0
- package/file-upload/types-labels.d.ts +44 -0
- package/file-upload/types-labels.js +1 -0
- package/file-upload/types.d.ts +155 -0
- package/file-upload/types.js +2 -0
- package/file-upload/utils/accept.d.ts +3 -0
- package/file-upload/utils/accept.js +44 -0
- package/file-upload/utils/build-file-slots.d.ts +16 -0
- package/file-upload/utils/build-file-slots.js +16 -0
- package/file-upload/utils/compute-drop-border-vertical-dash-style.d.ts +18 -0
- package/file-upload/utils/compute-drop-border-vertical-dash-style.js +41 -0
- package/file-upload/utils/get-drop-zone-typography.d.ts +12 -0
- package/file-upload/utils/get-drop-zone-typography.js +11 -0
- package/file-upload/utils/get-file-upload-presentation.d.ts +35 -0
- package/file-upload/utils/get-file-upload-presentation.js +65 -0
- package/file-upload/utils/max-count.d.ts +6 -0
- package/file-upload/utils/max-count.js +20 -0
- package/file-upload/utils/normalize.d.ts +3 -0
- package/file-upload/utils/normalize.js +63 -0
- package/file-upload/utils/render-drop-zone-hint-content.d.ts +6 -0
- package/file-upload/utils/render-drop-zone-hint-content.js +27 -0
- package/file-upload/utils/resolve-display-error.d.ts +6 -0
- package/file-upload/utils/resolve-display-error.js +15 -0
- package/file-upload/utils/resolve-hint-content.d.ts +12 -0
- package/file-upload/utils/resolve-hint-content.js +56 -0
- package/file-upload/utils/resolve-labels.d.ts +21 -0
- package/file-upload/utils/resolve-labels.js +34 -0
- package/file-upload/utils/resolve-preset.d.ts +14 -0
- package/file-upload/utils/resolve-preset.js +39 -0
- package/file-upload/utils/resolve-upload-file-error.d.ts +1 -0
- package/file-upload/utils/resolve-upload-file-error.js +9 -0
- package/file-upload/utils/resolve-upload-text.d.ts +2 -0
- package/file-upload/utils/resolve-upload-text.js +6 -0
- package/file-upload/utils/run-before-upload.d.ts +6 -0
- package/file-upload/utils/run-before-upload.js +25 -0
- package/file-upload/utils/run-sequentially.d.ts +2 -0
- package/file-upload/utils/run-sequentially.js +4 -0
- package/file-upload/utils/uid.d.ts +1 -0
- package/file-upload/utils/uid.js +4 -0
- package/file-upload/views/file-upload-dropzone-view.d.ts +6 -0
- package/file-upload/views/file-upload-dropzone-view.js +48 -0
- package/file-upload/views/file-upload-errors-view.d.ts +8 -0
- package/file-upload/views/file-upload-errors-view.js +7 -0
- package/file-upload/views/file-upload-footer-view.d.ts +6 -0
- package/file-upload/views/file-upload-footer-view.js +17 -0
- package/file-upload/views/file-upload-list-view.d.ts +8 -0
- package/file-upload/views/file-upload-list-view.js +38 -0
- package/file-upload/views/file-upload-trigger-view.d.ts +8 -0
- package/file-upload/views/file-upload-trigger-view.js +62 -0
- package/file-upload/views/file-upload-view.d.ts +6 -0
- package/file-upload/views/file-upload-view.js +17 -0
- package/grid/grid.d.ts +23 -0
- package/grid/grid.js +111 -0
- package/grid/index.d.ts +3 -0
- package/grid/index.js +2 -0
- package/grid/presets.d.ts +1 -0
- package/grid/presets.js +1 -0
- package/grid/styles.module.css +56 -0
- package/grid/types.d.ts +52 -0
- package/grid/types.js +1 -0
- package/grid-item/grid-item.d.ts +2 -0
- package/grid-item/grid-item.js +13 -0
- package/grid-item/index.d.ts +2 -0
- package/grid-item/index.js +1 -0
- package/grid-item/types.d.ts +13 -0
- package/grid-item/types.js +1 -0
- package/hint/buttons/action-button.d.ts +9 -0
- package/hint/buttons/action-button.js +19 -0
- package/hint/buttons/close-button.d.ts +10 -0
- package/hint/buttons/close-button.js +23 -0
- package/hint/buttons/extra-button.d.ts +9 -0
- package/hint/buttons/extra-button.js +19 -0
- package/hint/hint-content.d.ts +17 -0
- package/hint/hint-content.js +21 -0
- package/hint/hint-provider.d.ts +6 -0
- package/hint/hint-provider.js +10 -0
- package/hint/hint.d.ts +12 -0
- package/hint/hint.js +50 -0
- package/hint/index.d.ts +6 -0
- package/hint/index.js +5 -0
- package/hint/styles/buttons.module.css +16 -0
- package/hint/styles/hint-content.module.css +33 -0
- package/hint/styles/hint.module.css +37 -0
- package/hint/types.d.ts +103 -0
- package/hint/types.js +1 -0
- package/hooks/index.d.ts +21 -0
- package/hooks/index.js +21 -0
- package/hooks/media-query/create-media-query.d.ts +2 -0
- package/hooks/media-query/create-media-query.js +19 -0
- package/hooks/media-query/index.d.ts +3 -0
- package/hooks/media-query/index.js +2 -0
- package/hooks/media-query/observe-media-query.d.ts +5 -0
- package/hooks/media-query/observe-media-query.js +25 -0
- package/hooks/media-query/types.d.ts +8 -0
- package/hooks/media-query/types.js +1 -0
- package/hooks/media-query/use-media-query-listener.d.ts +8 -0
- package/hooks/media-query/use-media-query-listener.js +32 -0
- package/hooks/media-query/use-media-query.d.ts +10 -0
- package/hooks/media-query/use-media-query.js +24 -0
- package/hooks/use-actual-ref.d.ts +7 -0
- package/hooks/use-actual-ref.js +11 -0
- package/hooks/use-breakpoint.d.ts +13 -0
- package/hooks/use-breakpoint.js +50 -0
- package/hooks/use-click-outside.d.ts +5 -0
- package/hooks/use-click-outside.js +40 -0
- package/hooks/use-component-tokens.d.ts +12 -0
- package/hooks/use-component-tokens.js +17 -0
- package/hooks/use-cssvar-from-width.d.ts +3 -0
- package/hooks/use-cssvar-from-width.js +31 -0
- package/hooks/use-effect-once.d.ts +6 -0
- package/hooks/use-effect-once.js +10 -0
- package/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/hooks/use-isomorphic-layout-effect.js +6 -0
- package/hooks/use-keyboard-callbacks.d.ts +15 -0
- package/hooks/use-keyboard-callbacks.js +121 -0
- package/hooks/use-keyboard-navigation.d.ts +14 -0
- package/hooks/use-keyboard-navigation.js +63 -0
- package/hooks/use-list-navigation/index.d.ts +8 -0
- package/hooks/use-list-navigation/index.js +4 -0
- package/hooks/use-list-navigation/input-modality.d.ts +8 -0
- package/hooks/use-list-navigation/input-modality.js +52 -0
- package/hooks/use-list-navigation/store.d.ts +31 -0
- package/hooks/use-list-navigation/store.js +67 -0
- package/hooks/use-list-navigation/types.d.ts +108 -0
- package/hooks/use-list-navigation/types.js +1 -0
- package/hooks/use-list-navigation/use-list-navigation-item.d.ts +12 -0
- package/hooks/use-list-navigation/use-list-navigation-item.js +36 -0
- package/hooks/use-list-navigation/use-list-navigation.d.ts +29 -0
- package/hooks/use-list-navigation/use-list-navigation.js +257 -0
- package/hooks/use-list-navigation/utils.d.ts +12 -0
- package/hooks/use-list-navigation/utils.js +47 -0
- package/hooks/use-load-more.d.ts +48 -0
- package/hooks/use-load-more.js +69 -0
- package/hooks/use-mount.d.ts +4 -0
- package/hooks/use-mount.js +10 -0
- package/hooks/use-persistent-callback.d.ts +5 -0
- package/hooks/use-persistent-callback.js +15 -0
- package/hooks/use-platform.d.ts +5 -0
- package/hooks/use-platform.js +34 -0
- package/hooks/use-responsive-value.d.ts +20 -0
- package/hooks/use-responsive-value.js +34 -0
- package/hooks/use-uniq-id.d.ts +12 -0
- package/hooks/use-uniq-id.js +16 -0
- package/hooks/use-unmount.d.ts +4 -0
- package/hooks/use-unmount.js +13 -0
- package/hooks/use-update-effect.d.ts +8 -0
- package/hooks/use-update-effect.js +23 -0
- package/hooks/use-viewport-exit.d.ts +6 -0
- package/hooks/use-viewport-exit.js +29 -0
- package/hooks/use-virtual-window.d.ts +44 -0
- package/hooks/use-virtual-window.js +83 -0
- package/hooks/use-window-size.d.ts +7 -0
- package/hooks/use-window-size.js +23 -0
- package/icon/icon.d.ts +118 -0
- package/icon/icon.js +32 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.js +1 -0
- package/icon/pack-utils.d.ts +19 -0
- package/icon/pack-utils.js +24 -0
- package/icon/styles.module.css +17 -0
- package/icons/arrow-icon.d.ts +8 -0
- package/icons/arrow-icon.js +9 -0
- package/icons/back-icon.d.ts +2 -0
- package/icons/back-icon.js +3 -0
- package/icons/calendar-icon.d.ts +2 -0
- package/icons/calendar-icon.js +3 -0
- package/icons/check-icon.d.ts +2 -0
- package/icons/check-icon.js +5 -0
- package/icons/clock-icon.d.ts +2 -0
- package/icons/clock-icon.js +5 -0
- package/icons/close-icon.d.ts +2 -0
- package/icons/close-icon.js +3 -0
- package/icons/del-icon.d.ts +2 -0
- package/icons/del-icon.js +3 -0
- package/icons/double-arrow-icon.d.ts +6 -0
- package/icons/double-arrow-icon.js +8 -0
- package/icons/error-icon.d.ts +2 -0
- package/icons/error-icon.js +3 -0
- package/icons/eye-icon.d.ts +3 -0
- package/icons/eye-icon.js +4 -0
- package/icons/index.d.ts +15 -0
- package/icons/index.js +15 -0
- package/icons/magnifying-glass-icon.d.ts +2 -0
- package/icons/magnifying-glass-icon.js +3 -0
- package/icons/minus-icon.d.ts +2 -0
- package/icons/minus-icon.js +3 -0
- package/icons/plus-icon.d.ts +2 -0
- package/icons/plus-icon.js +3 -0
- package/icons/reset-icon.d.ts +2 -0
- package/icons/reset-icon.js +3 -0
- package/icons/shopping-icon.d.ts +2 -0
- package/icons/shopping-icon.js +3 -0
- package/icons/stars/star-fill-icon.d.ts +2 -0
- package/icons/stars/star-fill-icon.js +3 -0
- package/icons/stars/star-half-icon.d.ts +4 -0
- package/icons/stars/star-half-icon.js +3 -0
- package/icons/stars/start-outline-icon.d.ts +5 -0
- package/icons/stars/start-outline-icon.js +3 -0
- package/icons/types.d.ts +2 -0
- package/icons/types.js +1 -0
- package/image/image-viewer.d.ts +17 -0
- package/image/image-viewer.js +41 -0
- package/image/image.d.ts +27 -0
- package/image/image.js +67 -0
- package/image/index.d.ts +2 -0
- package/image/index.js +1 -0
- package/image/style.module.css +65 -0
- package/image/types.d.ts +88 -0
- package/image/types.js +1 -0
- package/image/use-image.d.ts +18 -0
- package/image/use-image.js +44 -0
- package/image/viewer.module.css +80 -0
- package/index.d.ts +67 -0
- package/index.js +64 -0
- package/input/fields/password-toggle.d.ts +10 -0
- package/input/fields/password-toggle.js +10 -0
- package/input/fields/text-field.d.ts +3 -0
- package/input/fields/text-field.js +23 -0
- package/input/fields/use-text-field.d.ts +676 -0
- package/input/fields/use-text-field.js +76 -0
- package/input/index.d.ts +2 -0
- package/input/index.js +1 -0
- package/input/input.d.ts +13 -0
- package/input/input.js +18 -0
- package/input/types.d.ts +30 -0
- package/input/types.js +1 -0
- package/label/index.d.ts +2 -0
- package/label/index.js +2 -0
- package/label/label.d.ts +19 -0
- package/label/label.js +43 -0
- package/label/styles.module.css +25 -0
- package/label/types.d.ts +45 -0
- package/label/types.js +1 -0
- package/list/clear-all-button/clear-all-button.d.ts +9 -0
- package/list/clear-all-button/clear-all-button.js +11 -0
- package/list/clear-all-button/index.d.ts +1 -0
- package/list/clear-all-button/index.js +1 -0
- package/list/constants.d.ts +1 -0
- package/list/constants.js +1 -0
- package/list/index.d.ts +6 -0
- package/list/index.js +4 -0
- package/list/list-context.d.ts +15 -0
- package/list/list-context.js +10 -0
- package/list/list-divider/index.d.ts +1 -0
- package/list/list-divider/index.js +1 -0
- package/list/list-divider/list-divider.d.ts +2 -0
- package/list/list-divider/list-divider.js +10 -0
- package/list/list-divider/styles.module.css +7 -0
- package/list/list-divider/use-list-divider.d.ts +3 -0
- package/list/list-divider/use-list-divider.js +12 -0
- package/list/list-item/index.d.ts +2 -0
- package/list/list-item/index.js +1 -0
- package/list/list-item/list-icon.d.ts +11 -0
- package/list/list-item/list-icon.js +22 -0
- package/list/list-item/list-item-provider.d.ts +13 -0
- package/list/list-item/list-item-provider.js +14 -0
- package/list/list-item/list-item.d.ts +5 -0
- package/list/list-item/list-item.js +26 -0
- package/list/list-item/styles.module.css +216 -0
- package/list/list-item/types.d.ts +100 -0
- package/list/list-item/types.js +1 -0
- package/list/list-item/use-list-item.d.ts +28 -0
- package/list/list-item/use-list-item.js +75 -0
- package/list/list-item/use-nested-list.d.ts +4 -0
- package/list/list-item/use-nested-list.js +14 -0
- package/list/list-section/index.d.ts +1 -0
- package/list/list-section/index.js +1 -0
- package/list/list-section/list-section.d.ts +32 -0
- package/list/list-section/list-section.js +28 -0
- package/list/list-section/styles.module.css +27 -0
- package/list/list.d.ts +20 -0
- package/list/list.js +33 -0
- package/list/styles.module.css +24 -0
- package/list/types.d.ts +73 -0
- package/list/types.js +1 -0
- package/list/use-list.d.ts +17 -0
- package/list/use-list.js +70 -0
- package/loader/index.d.ts +1 -0
- package/loader/index.js +1 -0
- package/loader/loader.d.ts +46 -0
- package/loader/loader.js +24 -0
- package/loader/loader.module.css +80 -0
- package/locale/create-translator.d.ts +8 -0
- package/locale/create-translator.js +10 -0
- package/locale/en.d.ts +2 -0
- package/locale/en.js +106 -0
- package/locale/index.d.ts +8 -0
- package/locale/index.js +5 -0
- package/locale/locale-provider.d.ts +30 -0
- package/locale/locale-provider.js +17 -0
- package/locale/ru.d.ts +2 -0
- package/locale/ru.js +106 -0
- package/locale/types.d.ts +183 -0
- package/locale/types.js +1 -0
- package/locale/use-locale.d.ts +9 -0
- package/locale/use-locale.js +8 -0
- package/masked-input/constants.d.ts +5 -0
- package/masked-input/constants.js +5 -0
- package/masked-input/hooks.d.ts +14 -0
- package/masked-input/hooks.js +172 -0
- package/masked-input/index.d.ts +3 -0
- package/masked-input/index.js +1 -0
- package/masked-input/mask-types.d.ts +27 -0
- package/masked-input/mask-types.js +1 -0
- package/masked-input/masked-input.d.ts +12 -0
- package/masked-input/masked-input.js +21 -0
- package/masked-input/types.d.ts +27 -0
- package/masked-input/types.js +1 -0
- package/masked-input/use-mask.d.ts +648 -0
- package/masked-input/use-mask.js +164 -0
- package/masked-input/utils/get-autofill-selector.d.ts +1 -0
- package/masked-input/utils/get-autofill-selector.js +11 -0
- package/masked-input/utils/helpers.d.ts +17 -0
- package/masked-input/utils/helpers.js +50 -0
- package/masked-input/utils/index.d.ts +4 -0
- package/masked-input/utils/index.js +4 -0
- package/masked-input/utils/mask-utils.d.ts +20 -0
- package/masked-input/utils/mask-utils.js +207 -0
- package/masked-input/utils/parse-mask.d.ts +2 -0
- package/masked-input/utils/parse-mask.js +57 -0
- package/masked-input/utils/validate-props.d.ts +3 -0
- package/masked-input/utils/validate-props.js +10 -0
- package/modal/constants.d.ts +2 -0
- package/modal/constants.js +2 -0
- package/modal/index.d.ts +5 -0
- package/modal/index.js +5 -0
- package/modal/modal-close-button.d.ts +3 -0
- package/modal/modal-close-button.js +13 -0
- package/modal/modal-content.d.ts +5 -0
- package/modal/modal-content.js +37 -0
- package/modal/modal-context.d.ts +18 -0
- package/modal/modal-context.js +10 -0
- package/modal/modal-footer.d.ts +8 -0
- package/modal/modal-footer.js +18 -0
- package/modal/modal-header.d.ts +8 -0
- package/modal/modal-header.js +18 -0
- package/modal/modal.d.ts +22 -0
- package/modal/modal.js +56 -0
- package/modal/styles/_animations.css +124 -0
- package/modal/styles/_config.css +0 -0
- package/modal/styles/modal-content.module.css +30 -0
- package/modal/styles/modal-footer.module.css +31 -0
- package/modal/styles/modal-header.module.css +56 -0
- package/modal/styles/modal.module.css +284 -0
- package/modal/types.d.ts +74 -0
- package/modal/types.js +1 -0
- package/modal/use-modal-refs.d.ts +5 -0
- package/modal/use-modal-refs.js +12 -0
- package/modal/use-modal.d.ts +22 -0
- package/modal/use-modal.js +49 -0
- package/modal/utils.d.ts +11 -0
- package/modal/utils.js +12 -0
- package/navigation/context.d.ts +72 -0
- package/navigation/context.js +19 -0
- package/navigation/index.d.ts +5 -0
- package/navigation/index.js +3 -0
- package/navigation/navigation-compact.d.ts +12 -0
- package/navigation/navigation-compact.js +83 -0
- package/navigation/navigation-control.d.ts +15 -0
- package/navigation/navigation-control.js +53 -0
- package/navigation/navigation-item-content.d.ts +25 -0
- package/navigation/navigation-item-content.js +26 -0
- package/navigation/navigation-list.d.ts +15 -0
- package/navigation/navigation-list.js +51 -0
- package/navigation/navigation-rail.d.ts +9 -0
- package/navigation/navigation-rail.js +25 -0
- package/navigation/navigation-row.d.ts +8 -0
- package/navigation/navigation-row.js +47 -0
- package/navigation/navigation-tree.d.ts +11 -0
- package/navigation/navigation-tree.js +61 -0
- package/navigation/navigation-views.d.ts +23 -0
- package/navigation/navigation-views.js +72 -0
- package/navigation/navigation.d.ts +44 -0
- package/navigation/navigation.js +113 -0
- package/navigation/storage.d.ts +2 -0
- package/navigation/storage.js +23 -0
- package/navigation/styles/navigation.module.css +552 -0
- package/navigation/types.d.ts +189 -0
- package/navigation/types.js +1 -0
- package/navigation/use-item-tooltip.d.ts +14 -0
- package/navigation/use-item-tooltip.js +17 -0
- package/navigation/use-navigation-types.d.ts +33 -0
- package/navigation/use-navigation-types.js +1 -0
- package/navigation/use-navigation.d.ts +8 -0
- package/navigation/use-navigation.js +138 -0
- package/navigation/use-overflow.d.ts +16 -0
- package/navigation/use-overflow.js +38 -0
- package/navigation/utils.d.ts +30 -0
- package/navigation/utils.js +90 -0
- package/number-input/format-types.d.ts +58 -0
- package/number-input/format-types.js +5 -0
- package/number-input/format-utils.d.ts +11 -0
- package/number-input/format-utils.js +160 -0
- package/number-input/hooks/index.d.ts +2 -0
- package/number-input/hooks/index.js +1 -0
- package/number-input/hooks/use-numeric-format.d.ts +15 -0
- package/number-input/hooks/use-numeric-format.js +133 -0
- package/number-input/index.d.ts +2 -0
- package/number-input/index.js +1 -0
- package/number-input/number-input.d.ts +11 -0
- package/number-input/number-input.js +20 -0
- package/number-input/types.d.ts +47 -0
- package/number-input/types.js +1 -0
- package/number-input/use-number-input.d.ts +664 -0
- package/number-input/use-number-input.js +402 -0
- package/number-input/utils.d.ts +63 -0
- package/number-input/utils.js +300 -0
- package/package.json +357 -4
- package/pagination/index.d.ts +6 -0
- package/pagination/index.js +3 -0
- package/pagination/items.d.ts +21 -0
- package/pagination/items.js +44 -0
- package/pagination/labels.d.ts +4 -0
- package/pagination/labels.js +13 -0
- package/pagination/pagination.d.ts +30 -0
- package/pagination/pagination.js +59 -0
- package/pagination/styles.module.css +125 -0
- package/pagination/types.d.ts +99 -0
- package/pagination/types.js +1 -0
- package/pagination/use-pagination.d.ts +13 -0
- package/pagination/use-pagination.js +24 -0
- package/pin-input/index.d.ts +2 -0
- package/pin-input/index.js +1 -0
- package/pin-input/pin-input.d.ts +26 -0
- package/pin-input/pin-input.js +27 -0
- package/pin-input/styles.module.css +68 -0
- package/pin-input/types.d.ts +83 -0
- package/pin-input/types.js +1 -0
- package/pin-input/use-pin-input.d.ts +23 -0
- package/pin-input/use-pin-input.js +134 -0
- package/pin-input/utils.d.ts +7 -0
- package/pin-input/utils.js +11 -0
- package/popover/index.d.ts +5 -0
- package/popover/index.js +3 -0
- package/popover/popover.d.ts +13 -0
- package/popover/popover.js +37 -0
- package/popover/styles.module.css +76 -0
- package/popover/types.d.ts +115 -0
- package/popover/types.js +1 -0
- package/popover/use-popover.d.ts +24 -0
- package/popover/use-popover.js +121 -0
- package/portal/index.d.ts +4 -0
- package/portal/index.js +3 -0
- package/portal/portal-provider.d.ts +13 -0
- package/portal/portal-provider.js +17 -0
- package/portal/portal.d.ts +34 -0
- package/portal/portal.js +42 -0
- package/portal/resolve-container.d.ts +3 -0
- package/portal/resolve-container.js +11 -0
- package/portal/types.d.ts +25 -0
- package/portal/types.js +1 -0
- package/portal/use-portal.d.ts +14 -0
- package/portal/use-portal.js +45 -0
- package/progress-bar/index.d.ts +2 -0
- package/progress-bar/index.js +1 -0
- package/progress-bar/progress-bar.d.ts +12 -0
- package/progress-bar/progress-bar.js +50 -0
- package/progress-bar/styles.module.css +147 -0
- package/progress-bar/types.d.ts +45 -0
- package/progress-bar/types.js +1 -0
- package/quantity-input/index.d.ts +2 -0
- package/quantity-input/index.js +1 -0
- package/quantity-input/quantity-input.d.ts +22 -0
- package/quantity-input/quantity-input.js +84 -0
- package/quantity-input/styles.module.css +44 -0
- package/quantity-input/types.d.ts +54 -0
- package/quantity-input/types.js +1 -0
- package/quantity-input/utils.d.ts +10 -0
- package/quantity-input/utils.js +16 -0
- package/radio/index.d.ts +2 -0
- package/radio/index.js +2 -0
- package/radio/radio.d.ts +9 -0
- package/radio/radio.js +44 -0
- package/radio/styles.module.css +162 -0
- package/radio/types.d.ts +40 -0
- package/radio/types.js +1 -0
- package/radio-group/index.d.ts +2 -0
- package/radio-group/index.js +2 -0
- package/radio-group/radio-group-context.d.ts +14 -0
- package/radio-group/radio-group-context.js +5 -0
- package/radio-group/radio-group.d.ts +57 -0
- package/radio-group/radio-group.js +41 -0
- package/radio-group/styles.module.css +12 -0
- package/radio-group/use-radio-group.d.ts +8 -0
- package/radio-group/use-radio-group.js +4 -0
- package/scss/_functions.scss +113 -0
- package/scss/_grid.scss +89 -0
- package/scss/_index.scss +11 -0
- package/scss/_interaction.scss +36 -0
- package/scss/_mixins.scss +108 -0
- package/scss/_tokens.scss +396 -0
- package/scss/_typography.scss +317 -0
- package/segmented-control/index.d.ts +3 -0
- package/segmented-control/index.js +2 -0
- package/segmented-control/segmented-control-context.d.ts +13 -0
- package/segmented-control/segmented-control-context.js +8 -0
- package/segmented-control/segmented-control-item.d.ts +3 -0
- package/segmented-control/segmented-control-item.js +39 -0
- package/segmented-control/segmented-control.d.ts +21 -0
- package/segmented-control/segmented-control.js +36 -0
- package/segmented-control/styles/_variables.css +0 -0
- package/segmented-control/styles/segmented-control-item.module.css +194 -0
- package/segmented-control/styles/segmented-control.module.css +31 -0
- package/segmented-control/types.d.ts +95 -0
- package/segmented-control/types.js +1 -0
- package/segmented-control/use-segmented-control.d.ts +9 -0
- package/segmented-control/use-segmented-control.js +30 -0
- package/select/class-names-context.d.ts +18 -0
- package/select/class-names-context.js +3 -0
- package/select/components/render-grouped-options.d.ts +18 -0
- package/select/components/render-grouped-options.js +41 -0
- package/select/components/select-field-multiselect-value.d.ts +22 -0
- package/select/components/select-field-multiselect-value.js +17 -0
- package/select/components/select-field-value.d.ts +38 -0
- package/select/components/select-field-value.js +54 -0
- package/select/components/select-field.d.ts +39 -0
- package/select/components/select-field.js +180 -0
- package/select/components/select-load-more-indicator.d.ts +6 -0
- package/select/components/select-load-more-indicator.js +7 -0
- package/select/components/select-multiselect-panel.d.ts +60 -0
- package/select/components/select-multiselect-panel.js +163 -0
- package/select/components/select-option-list.d.ts +23 -0
- package/select/components/select-option-list.js +72 -0
- package/select/components/select-option-row.d.ts +19 -0
- package/select/components/select-option-row.js +40 -0
- package/select/components/select-options-scroll-area.d.ts +13 -0
- package/select/components/select-options-scroll-area.js +8 -0
- package/select/components/select-panel-status.d.ts +11 -0
- package/select/components/select-panel-status.js +17 -0
- package/select/components/select-single-panel.d.ts +27 -0
- package/select/components/select-single-panel.js +41 -0
- package/select/hooks/use-auto-scroll-to-bottom.d.ts +7 -0
- package/select/hooks/use-auto-scroll-to-bottom.js +23 -0
- package/select/hooks/use-chips-row-count.d.ts +23 -0
- package/select/hooks/use-chips-row-count.js +61 -0
- package/select/hooks/use-multiselect-collapsed-display.d.ts +8 -0
- package/select/hooks/use-multiselect-collapsed-display.js +134 -0
- package/select/hooks/use-select-dismiss.d.ts +17 -0
- package/select/hooks/use-select-dismiss.js +79 -0
- package/select/hooks/use-select-input-bindings.d.ts +37 -0
- package/select/hooks/use-select-input-bindings.js +43 -0
- package/select/hooks/use-select-keyboard.d.ts +24 -0
- package/select/hooks/use-select-keyboard.js +171 -0
- package/select/hooks/use-select-multiselect-panel-state.d.ts +8 -0
- package/select/hooks/use-select-multiselect-panel-state.js +28 -0
- package/select/hooks/use-select-search.d.ts +9 -0
- package/select/hooks/use-select-search.js +258 -0
- package/select/hooks/use-select-view-model.d.ts +56 -0
- package/select/hooks/use-select-view-model.js +164 -0
- package/select/hooks/use-select-virtual.d.ts +28 -0
- package/select/hooks/use-select-virtual.js +31 -0
- package/select/hooks/use-select.d.ts +9 -0
- package/select/hooks/use-select.js +435 -0
- package/select/index.d.ts +20 -0
- package/select/index.js +12 -0
- package/select/presets/autocomplete.d.ts +12 -0
- package/select/presets/autocomplete.js +16 -0
- package/select/presets/index.d.ts +1 -0
- package/select/presets/index.js +1 -0
- package/select/select.d.ts +24 -0
- package/select/select.js +19 -0
- package/select/styles/select-field.module.css +128 -0
- package/select/styles/select.module.css +457 -0
- package/select/types-search.d.ts +151 -0
- package/select/types-search.js +1 -0
- package/select/types.d.ts +372 -0
- package/select/types.js +1 -0
- package/select/utils/custom-search-option.d.ts +15 -0
- package/select/utils/custom-search-option.js +37 -0
- package/select/utils/filter-options.d.ts +5 -0
- package/select/utils/filter-options.js +23 -0
- package/select/utils/get-display-value.d.ts +13 -0
- package/select/utils/get-display-value.js +16 -0
- package/select/utils/get-element-content-width.d.ts +1 -0
- package/select/utils/get-element-content-width.js +11 -0
- package/select/utils/get-multiselect-display-labels.d.ts +3 -0
- package/select/utils/get-multiselect-display-labels.js +7 -0
- package/select/utils/get-status-content.d.ts +11 -0
- package/select/utils/get-status-content.js +10 -0
- package/select/utils/is-select-panel-compact-content.d.ts +3 -0
- package/select/utils/is-select-panel-compact-content.js +4 -0
- package/select/utils/measure-multiselect-row-width.d.ts +10 -0
- package/select/utils/measure-multiselect-row-width.js +15 -0
- package/select/utils/measure-text-width.d.ts +9 -0
- package/select/utils/measure-text-width.js +72 -0
- package/select/utils/multiselect-collapsed-display-shared.d.ts +40 -0
- package/select/utils/multiselect-collapsed-display-shared.js +145 -0
- package/select/utils/normalize-options.d.ts +4 -0
- package/select/utils/normalize-options.js +7 -0
- package/select/utils/normalize-value.d.ts +5 -0
- package/select/utils/normalize-value.js +18 -0
- package/select/utils/resolve-loading-state.d.ts +9 -0
- package/select/utils/resolve-loading-state.js +10 -0
- package/select/utils/resolve-multiselect-collapsed-display.d.ts +6 -0
- package/select/utils/resolve-multiselect-collapsed-display.js +42 -0
- package/select/utils/resolve-search-content.d.ts +3 -0
- package/select/utils/resolve-search-content.js +6 -0
- package/select/utils/retain-combobox-focus.d.ts +4 -0
- package/select/utils/retain-combobox-focus.js +17 -0
- package/select/utils/select-keyboard-navigation.d.ts +3 -0
- package/select/utils/select-keyboard-navigation.js +14 -0
- package/select/utils/select-load-more-scroll.d.ts +16 -0
- package/select/utils/select-load-more-scroll.js +20 -0
- package/select/utils/select-option-id.d.ts +3 -0
- package/select/utils/select-option-id.js +4 -0
- package/select/views/select-listbox.d.ts +10 -0
- package/select/views/select-listbox.js +15 -0
- package/select/views/select-search-listbox.d.ts +3 -0
- package/select/views/select-search-listbox.js +23 -0
- package/select/views/select-view.d.ts +6 -0
- package/select/views/select-view.js +64 -0
- package/select/views/styles.module.css +45 -0
- package/show-more/hooks/use-show-more-view-model.d.ts +24 -0
- package/show-more/hooks/use-show-more-view-model.js +76 -0
- package/show-more/index.d.ts +2 -0
- package/show-more/index.js +1 -0
- package/show-more/show-more.d.ts +21 -0
- package/show-more/show-more.js +15 -0
- package/show-more/styles.module.css +20 -0
- package/show-more/types.d.ts +46 -0
- package/show-more/types.js +1 -0
- package/show-more/views/show-more-view.d.ts +6 -0
- package/show-more/views/show-more-view.js +9 -0
- package/skeleton/index.d.ts +2 -0
- package/skeleton/index.js +2 -0
- package/skeleton/skeleton.d.ts +13 -0
- package/skeleton/skeleton.js +44 -0
- package/skeleton/styles.module.css +300 -0
- package/skeleton/types.d.ts +85 -0
- package/skeleton/types.js +1 -0
- package/skeleton/use-skeleton.d.ts +7 -0
- package/skeleton/use-skeleton.js +20 -0
- package/snackbar/index.d.ts +6 -0
- package/snackbar/index.js +5 -0
- package/snackbar/snack-button.d.ts +10 -0
- package/snackbar/snack-button.js +19 -0
- package/snackbar/snack-view.d.ts +8 -0
- package/snackbar/snack-view.js +66 -0
- package/snackbar/snack.d.ts +14 -0
- package/snackbar/snack.js +25 -0
- package/snackbar/snackbar-context.d.ts +9 -0
- package/snackbar/snackbar-context.js +10 -0
- package/snackbar/snackbar-provider.d.ts +17 -0
- package/snackbar/snackbar-provider.js +49 -0
- package/snackbar/snackbar.d.ts +26 -0
- package/snackbar/snackbar.js +41 -0
- package/snackbar/styles/snack.module.css +195 -0
- package/snackbar/styles/snackbar.module.css +66 -0
- package/snackbar/types.d.ts +152 -0
- package/snackbar/types.js +1 -0
- package/snackbar/use-snack-timer.d.ts +5 -0
- package/snackbar/use-snack-timer.js +28 -0
- package/snackbar/use-snack.d.ts +326 -0
- package/snackbar/use-snack.js +82 -0
- package/stack/index.d.ts +1 -0
- package/stack/index.js +1 -0
- package/stack/stack.d.ts +16 -0
- package/stack/stack.js +34 -0
- package/stack/styles.module.css +46 -0
- package/stack/types.d.ts +34 -0
- package/stack/types.js +1 -0
- package/status/index.d.ts +2 -0
- package/status/index.js +1 -0
- package/status/status-icon.d.ts +18 -0
- package/status/status-icon.js +19 -0
- package/status/styles.module.css +18 -0
- package/status/types.d.ts +12 -0
- package/status/types.js +1 -0
- package/stepper/index.d.ts +3 -0
- package/stepper/index.js +2 -0
- package/stepper/stepper.d.ts +24 -0
- package/stepper/stepper.js +41 -0
- package/stepper/styles.module.css +172 -0
- package/stepper/types.d.ts +69 -0
- package/stepper/types.js +1 -0
- package/stepper/use-stepper.d.ts +11 -0
- package/stepper/use-stepper.js +25 -0
- package/switch/index.d.ts +2 -0
- package/switch/index.js +2 -0
- package/switch/styles/base.module.css +134 -0
- package/switch/switch.d.ts +14 -0
- package/switch/switch.js +39 -0
- package/switch/types.d.ts +60 -0
- package/switch/types.js +1 -0
- package/tabs/context.d.ts +21 -0
- package/tabs/context.js +9 -0
- package/tabs/index.d.ts +6 -0
- package/tabs/index.js +5 -0
- package/tabs/styles/tab-list.module.css +23 -0
- package/tabs/styles/tab-panel.module.css +3 -0
- package/tabs/styles/tab.module.css +210 -0
- package/tabs/tab-list.d.ts +14 -0
- package/tabs/tab-list.js +70 -0
- package/tabs/tab-panel.d.ts +8 -0
- package/tabs/tab-panel.js +16 -0
- package/tabs/tab.d.ts +10 -0
- package/tabs/tab.js +40 -0
- package/tabs/tabs.d.ts +18 -0
- package/tabs/tabs.js +26 -0
- package/tabs/types.d.ts +92 -0
- package/tabs/types.js +1 -0
- package/tabs/use-tabs.d.ts +7 -0
- package/tabs/use-tabs.js +59 -0
- package/textarea/get-max-length-message.d.ts +1 -0
- package/textarea/get-max-length-message.js +5 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.js +1 -0
- package/textarea/styles.module.css +37 -0
- package/textarea/textarea.d.ts +9 -0
- package/textarea/textarea.js +20 -0
- package/textarea/types.d.ts +44 -0
- package/textarea/types.js +1 -0
- package/textarea/use-auto-height.d.ts +16 -0
- package/textarea/use-auto-height.js +106 -0
- package/textarea/use-resize-handle.d.ts +8 -0
- package/textarea/use-resize-handle.js +44 -0
- package/textarea/use-textarea.d.ts +1241 -0
- package/textarea/use-textarea.js +108 -0
- package/theme-provider/index.d.ts +9 -0
- package/theme-provider/index.js +5 -0
- package/theme-provider/styles.module.css +332 -0
- package/theme-provider/theme-context.d.ts +31 -0
- package/theme-provider/theme-context.js +33 -0
- package/theme-provider/theme-provider.d.ts +14 -0
- package/theme-provider/theme-provider.js +45 -0
- package/theme-provider/theme-scope.d.ts +33 -0
- package/theme-provider/theme-scope.js +45 -0
- package/theme-provider/types.d.ts +82 -0
- package/theme-provider/types.js +1 -0
- package/theme-provider/use-system-theme.d.ts +6 -0
- package/theme-provider/use-system-theme.js +23 -0
- package/theme-provider/use-theme-provider.d.ts +8 -0
- package/theme-provider/use-theme-provider.js +22 -0
- package/time-picker/index.d.ts +8 -0
- package/time-picker/index.js +6 -0
- package/time-picker/picker-types.d.ts +77 -0
- package/time-picker/picker-types.js +1 -0
- package/time-picker/single-time-picker.d.ts +3 -0
- package/time-picker/single-time-picker.js +37 -0
- package/time-picker/styles.module.css +124 -0
- package/time-picker/time-model.d.ts +34 -0
- package/time-picker/time-model.js +140 -0
- package/time-picker/time-panel.d.ts +20 -0
- package/time-picker/time-panel.js +81 -0
- package/time-picker/time-picker.d.ts +13 -0
- package/time-picker/time-picker.js +43 -0
- package/time-picker/time-range-picker.d.ts +3 -0
- package/time-picker/time-range-picker.js +44 -0
- package/time-picker/types.d.ts +158 -0
- package/time-picker/types.js +1 -0
- package/time-picker/use-time-panel.d.ts +12 -0
- package/time-picker/use-time-panel.js +22 -0
- package/time-picker/use-time-picker.d.ts +29 -0
- package/time-picker/use-time-picker.js +117 -0
- package/time-picker/use-time-range-picker.d.ts +36 -0
- package/time-picker/use-time-range-picker.js +131 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/index.js +2 -0
- package/tooltip/index.d.ts +2 -0
- package/tooltip/index.js +1 -0
- package/tooltip/styles.module.css +46 -0
- package/tooltip/tooltip.d.ts +12 -0
- package/tooltip/tooltip.js +30 -0
- package/tooltip/types.d.ts +41 -0
- package/tooltip/types.js +1 -0
- package/tooltip/use-tooltip.d.ts +18 -0
- package/tooltip/use-tooltip.js +37 -0
- package/tree/check.d.ts +16 -0
- package/tree/check.js +99 -0
- package/tree/class-names-context.d.ts +3 -0
- package/tree/class-names-context.js +5 -0
- package/tree/highlight.d.ts +3 -0
- package/tree/highlight.js +23 -0
- package/tree/index.d.ts +11 -0
- package/tree/index.js +6 -0
- package/tree/model.d.ts +59 -0
- package/tree/model.js +110 -0
- package/tree/move.d.ts +42 -0
- package/tree/move.js +103 -0
- package/tree/styles.module.css +290 -0
- package/tree/tree-branch.d.ts +23 -0
- package/tree/tree-branch.js +41 -0
- package/tree/tree-placeholder.d.ts +11 -0
- package/tree/tree-placeholder.js +10 -0
- package/tree/tree-row-content.d.ts +27 -0
- package/tree/tree-row-content.js +25 -0
- package/tree/tree-row-renderer.d.ts +12 -0
- package/tree/tree-row-renderer.js +54 -0
- package/tree/tree-row.d.ts +30 -0
- package/tree/tree-row.js +92 -0
- package/tree/tree-select-panel.d.ts +22 -0
- package/tree/tree-select-panel.js +9 -0
- package/tree/tree-select-selection.d.ts +20 -0
- package/tree/tree-select-selection.js +28 -0
- package/tree/tree-select-types.d.ts +102 -0
- package/tree/tree-select-types.js +1 -0
- package/tree/tree-select.d.ts +32 -0
- package/tree/tree-select.js +201 -0
- package/tree/tree-select.module.css +35 -0
- package/tree/tree.d.ts +57 -0
- package/tree/tree.js +93 -0
- package/tree/types-row.d.ts +51 -0
- package/tree/types-row.js +1 -0
- package/tree/types.d.ts +192 -0
- package/tree/types.js +1 -0
- package/tree/use-tree-activate.d.ts +3 -0
- package/tree/use-tree-activate.js +14 -0
- package/tree/use-tree-checks.d.ts +17 -0
- package/tree/use-tree-checks.js +24 -0
- package/tree/use-tree-expansion.d.ts +17 -0
- package/tree/use-tree-expansion.js +71 -0
- package/tree/use-tree-keyboard.d.ts +17 -0
- package/tree/use-tree-keyboard.js +91 -0
- package/tree/use-tree-virtual.d.ts +33 -0
- package/tree/use-tree-virtual.js +72 -0
- package/tree/use-tree.d.ts +26 -0
- package/tree/use-tree.js +108 -0
- package/tree/virtual-rows.d.ts +11 -0
- package/tree/virtual-rows.js +9 -0
- package/types/size.d.ts +6 -0
- package/types/size.js +1 -0
- package/typography/index.d.ts +2 -0
- package/typography/index.js +1 -0
- package/typography/styles.module.css +304 -0
- package/typography/types.d.ts +61 -0
- package/typography/types.js +1 -0
- package/typography/typography.d.ts +21 -0
- package/typography/typography.js +24 -0
- package/utils/call-child-as-function.d.ts +1 -0
- package/utils/call-child-as-function.js +1 -0
- package/utils/class-names.d.ts +68 -0
- package/utils/class-names.js +164 -0
- package/utils/compose-event-handlers.d.ts +2 -0
- package/utils/compose-event-handlers.js +15 -0
- package/utils/container-props-override.d.ts +10 -0
- package/utils/container-props-override.js +19 -0
- package/utils/create-id.d.ts +5 -0
- package/utils/create-id.js +9 -0
- package/utils/data-attributes.d.ts +14 -0
- package/utils/data-attributes.js +23 -0
- package/utils/decode-uri.d.ts +23 -0
- package/utils/decode-uri.js +46 -0
- package/utils/empty-function.d.ts +2 -0
- package/utils/empty-function.js +4 -0
- package/utils/get-react-element-ref.d.ts +2 -0
- package/utils/get-react-element-ref.js +10 -0
- package/utils/imperative-change-input-value.d.ts +4 -0
- package/utils/imperative-change-input-value.js +15 -0
- package/utils/index.d.ts +20 -0
- package/utils/index.js +16 -0
- package/utils/input-caret.d.ts +4 -0
- package/utils/input-caret.js +42 -0
- package/utils/invariant.d.ts +5 -0
- package/utils/invariant.js +12 -0
- package/utils/is-browser.d.ts +1 -0
- package/utils/is-browser.js +1 -0
- package/utils/is-new-theme.d.ts +1 -0
- package/utils/is-new-theme.js +7 -0
- package/utils/merge-refs.d.ts +9 -0
- package/utils/merge-refs.js +36 -0
- package/utils/overridable-component.d.ts +47 -0
- package/utils/overridable-component.js +1 -0
- package/utils/shallow-objects-equal.d.ts +4 -0
- package/utils/shallow-objects-equal.js +16 -0
- package/utils/style/index.d.ts +3 -0
- package/utils/style/index.js +2 -0
- package/utils/style/props/color.d.ts +2 -0
- package/utils/style/props/color.js +6 -0
- package/utils/style/props/dimension.d.ts +2 -0
- package/utils/style/props/dimension.js +10 -0
- package/utils/style/props/index.d.ts +4 -0
- package/utils/style/props/index.js +3 -0
- package/utils/style/props/passthrough.d.ts +1 -0
- package/utils/style/props/passthrough.js +1 -0
- package/utils/style/props/types.d.ts +7 -0
- package/utils/style/props/types.js +1 -0
- package/utils/style/types.d.ts +6 -0
- package/utils/style/types.js +1 -0
- package/utils/style/use-style-props.d.ts +5 -0
- package/utils/style/use-style-props.js +7 -0
- package/utils/style/utils/convert-style-props.d.ts +4 -0
- package/utils/style/utils/convert-style-props.js +23 -0
- package/utils/style/utils/index.d.ts +1 -0
- package/utils/style/utils/index.js +1 -0
- package/utils/use-class-names.d.ts +37 -0
- package/utils/use-class-names.js +87 -0
- package/utils/utils.d.ts +9 -0
- package/utils/utils.js +1 -0
- package/visually-hidden/index.d.ts +1 -0
- package/visually-hidden/index.js +1 -0
- package/visually-hidden/styles.module.css +9 -0
- package/visually-hidden/visually-hidden.d.ts +6 -0
- package/visually-hidden/visually-hidden.js +6 -0
- package/README.md +0 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
5
|
+
import { withRef } from '../_internal/compat';
|
|
6
|
+
import { useUniqID } from '../hooks';
|
|
7
|
+
import { useLocale } from '../locale/use-locale';
|
|
8
|
+
import { getDataAttributes } from '../utils/data-attributes';
|
|
9
|
+
import styles from './styles.module.css';
|
|
10
|
+
import { useTimePanel } from './use-time-panel';
|
|
11
|
+
/** Одна колонка: список вариантов с блуждающим фокусом; стрелки двигают фокус и сразу выбирают значение */
|
|
12
|
+
function TimeColumnList({ column, label, onSelect }) {
|
|
13
|
+
const listRef = useRef(null);
|
|
14
|
+
const selectedIndex = column.options.findIndex(option => option.selected);
|
|
15
|
+
const firstEnabled = column.options.findIndex(option => !option.disabled);
|
|
16
|
+
const rovingIndex = selectedIndex !== -1 ? selectedIndex : Math.max(firstEnabled, 0);
|
|
17
|
+
// Выбранный вариант держим в видимой части колонки, строки целиком: он становится третьим сверху,
|
|
18
|
+
// а колонка прокручивается кратно высоте строки (сверху и снизу нет «обрезанных» вариантов).
|
|
19
|
+
// Первый показ — сразу, без анимации. Дальше, если вариант уже виден целиком, колонка стоит на месте
|
|
20
|
+
// (клик по видимому значению ничего не двигает), иначе плавно подъезжает к нужной строке
|
|
21
|
+
const placed = useRef(false);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const list = listRef.current;
|
|
24
|
+
// Без выбранного значения показываем первый доступный вариант (например, начало рабочих часов)
|
|
25
|
+
const target = list === null || list === void 0 ? void 0 : list.querySelectorAll('[role="option"]')[rovingIndex];
|
|
26
|
+
if (!list || !target)
|
|
27
|
+
return;
|
|
28
|
+
const gap = Number.parseFloat(getComputedStyle(list).rowGap) || 0;
|
|
29
|
+
const top = target.offsetTop - 2 * (target.offsetHeight + gap);
|
|
30
|
+
const first = !placed.current;
|
|
31
|
+
placed.current = true;
|
|
32
|
+
const visible = target.offsetTop >= list.scrollTop &&
|
|
33
|
+
target.offsetTop + target.offsetHeight <= list.scrollTop + list.clientHeight;
|
|
34
|
+
if (!first && visible)
|
|
35
|
+
return;
|
|
36
|
+
const calm = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
37
|
+
if (first || calm || typeof list.scrollTo !== 'function')
|
|
38
|
+
list.scrollTop = top;
|
|
39
|
+
else
|
|
40
|
+
list.scrollTo({ top, behavior: 'smooth' });
|
|
41
|
+
}, [rovingIndex]);
|
|
42
|
+
const onKeyDown = (event) => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const step = { ArrowDown: 1, ArrowUp: -1 }[event.key];
|
|
45
|
+
const edge = { Home: 0, End: column.options.length - 1 }[event.key];
|
|
46
|
+
if (step === undefined && edge === undefined)
|
|
47
|
+
return;
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
let index = step === undefined ? edge : rovingIndex + step;
|
|
50
|
+
const direction = step !== null && step !== void 0 ? step : (edge === 0 ? 1 : -1);
|
|
51
|
+
while (index >= 0 && index < column.options.length && column.options[index].disabled)
|
|
52
|
+
index += direction;
|
|
53
|
+
if (index < 0 || index >= column.options.length)
|
|
54
|
+
return;
|
|
55
|
+
onSelect(column.options[index].value);
|
|
56
|
+
const options = (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[role="option"]');
|
|
57
|
+
(_b = options === null || options === void 0 ? void 0 : options[index]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
58
|
+
};
|
|
59
|
+
return (_jsx("div", { ref: listRef, role: "listbox", "aria-label": label, className: styles.column, onKeyDown: onKeyDown, children: column.options.map((option, index) => (_jsx("button", { type: "button", role: "option", className: clsx(styles.option, option.selected && styles.selected), "aria-selected": option.selected, disabled: option.disabled, tabIndex: index === rovingIndex ? 0 : -1, onClick: () => onSelect(option.value), children: option.label }, option.value))) }));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `<TimePanel />` — выбор времени колонками (часы, минуты, секунды, AM/PM). Дата значения сохраняется.
|
|
63
|
+
*
|
|
64
|
+
* @example ```tsx
|
|
65
|
+
* <TimePanel value={time} onUpdate={setTime} minuteStep={5} />
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export const TimePanel = withRef(function TimePanel(props, ref) {
|
|
69
|
+
const { size = 'm', fill = false, labels: labelsProp, className, 'data-testid': testId = 'time-panel', ...options } = props;
|
|
70
|
+
const vm = useTimePanel(options);
|
|
71
|
+
const { t } = useLocale();
|
|
72
|
+
const labels = {
|
|
73
|
+
hour: t('timePicker.hour'),
|
|
74
|
+
minute: t('timePicker.minute'),
|
|
75
|
+
second: t('timePicker.second'),
|
|
76
|
+
period: t('timePicker.period'),
|
|
77
|
+
...labelsProp,
|
|
78
|
+
};
|
|
79
|
+
const id = useUniqID();
|
|
80
|
+
return (_jsx("div", { ...getDataAttributes(props, 'time-panel'), ref: ref, id: id, role: "group", className: clsx(styles.panel, styles[size], fill && styles.fill, className), children: vm.columns.map(column => (_jsx(TimeColumnList, { column: column, label: labels[column.unit], onSelect: picked => vm.select(column.unit, picked), testId: testId }, column.unit))) }));
|
|
81
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TimePickerProps } from './picker-types';
|
|
3
|
+
/**
|
|
4
|
+
* `<TimePicker />` — поле времени с вводом по маске и списком часов и минут в поповере.
|
|
5
|
+
* Дата значения сохраняется: меняются только часы, минуты и секунды. `mode="range"` — промежуток времени:
|
|
6
|
+
* два поля и две панели (начало и конец).
|
|
7
|
+
*
|
|
8
|
+
* @example ```tsx
|
|
9
|
+
* <TimePicker label="Время доставки" value={time} onUpdate={setTime} minuteStep={15} />
|
|
10
|
+
* <TimePicker mode="range" label="Рабочие часы" value={hours} onUpdate={setHours} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const TimePicker: (props: TimePickerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { useMemo, useState } from 'react';
|
|
4
|
+
import { SingleTimePicker } from './single-time-picker';
|
|
5
|
+
import { formatTimeString, parseTimeString } from './time-model';
|
|
6
|
+
import { TimeRangePicker } from './time-range-picker';
|
|
7
|
+
/**
|
|
8
|
+
* `<TimePicker />` — поле времени с вводом по маске и списком часов и минут в поповере.
|
|
9
|
+
* Дата значения сохраняется: меняются только часы, минуты и секунды. `mode="range"` — промежуток времени:
|
|
10
|
+
* два поля и две панели (начало и конец).
|
|
11
|
+
*
|
|
12
|
+
* @example ```tsx
|
|
13
|
+
* <TimePicker label="Время доставки" value={time} onUpdate={setTime} minuteStep={15} />
|
|
14
|
+
* <TimePicker mode="range" label="Рабочие часы" value={hours} onUpdate={setHours} />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export const TimePicker = (props) => {
|
|
18
|
+
if (props.valueType === 'string') {
|
|
19
|
+
return props.mode === 'range' ? (_jsx(StringRangeTimePicker, { ...props })) : (_jsx(StringSingleTimePicker, { ...props }));
|
|
20
|
+
}
|
|
21
|
+
return props.mode === 'range' ? _jsx(TimeRangePicker, { ...props }) : _jsx(SingleTimePicker, { ...props });
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Значение-строка: `HH:mm` переводится в `Date` на сегодняшний день (дата внутри не важна), наружу уходит строка
|
|
25
|
+
* без даты и часового пояса.
|
|
26
|
+
*/
|
|
27
|
+
const StringSingleTimePicker = ({ value, defaultValue, onUpdate, valueType: _valueType, ...rest }) => {
|
|
28
|
+
const [base] = useState(() => new Date());
|
|
29
|
+
const date = useMemo(() => (value === undefined ? undefined : parseTimeString(value, base)), [value, base]);
|
|
30
|
+
const [initial] = useState(() => parseTimeString(defaultValue, base));
|
|
31
|
+
return (_jsx(SingleTimePicker, { ...rest, value: date, defaultValue: initial, onUpdate: next => onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(formatTimeString(next, rest.precision)) }));
|
|
32
|
+
};
|
|
33
|
+
const StringRangeTimePicker = ({ value, defaultValue, onUpdate, valueType: _valueType, ...rest }) => {
|
|
34
|
+
const [base] = useState(() => new Date());
|
|
35
|
+
const toRange = (range) => range === undefined || range === null
|
|
36
|
+
? range
|
|
37
|
+
: [parseTimeString(range[0], base), parseTimeString(range[1], base)];
|
|
38
|
+
const [first, second] = value !== null && value !== void 0 ? value : [];
|
|
39
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
|
+
const dates = useMemo(() => toRange(value), [first, second, value === undefined, value === null, base]);
|
|
41
|
+
const [initial] = useState(() => toRange(defaultValue));
|
|
42
|
+
return (_jsx(TimeRangePicker, { ...rest, value: dates, defaultValue: initial, onUpdate: ([from, to]) => onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate([formatTimeString(from, rest.precision), formatTimeString(to, rest.precision)]) }));
|
|
43
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TimePickerRangePickerProps } from './picker-types';
|
|
2
|
+
/** Поле промежутка времени: два поля ввода в одной рамке и две панели (начало и конец) в поповере */
|
|
3
|
+
export declare const TimeRangePicker: (props: TimePickerRangePickerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { PICKER_MIN_WIDTH, PickerField, PickerSheet, usePickerPresentation } from '../_internal/picker';
|
|
5
|
+
import { Button } from '../button';
|
|
6
|
+
import { Divider } from '../divider';
|
|
7
|
+
import { ClockIcon } from '../icons';
|
|
8
|
+
import { useLocale } from '../locale/use-locale';
|
|
9
|
+
import { Popover } from '../popover';
|
|
10
|
+
import { useClassNames } from '../utils';
|
|
11
|
+
import { getDataAttributes, getRelatedTestId } from '../utils/data-attributes';
|
|
12
|
+
import styles from './styles.module.css';
|
|
13
|
+
import { TimePanel } from './time-panel';
|
|
14
|
+
import { useTimeRangePicker } from './use-time-range-picker';
|
|
15
|
+
/** Поле промежутка времени: два поля ввода в одной рамке и две панели (начало и конец) в поповере */
|
|
16
|
+
export const TimeRangePicker = (props) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const { label, caption, status, theme, disabled, size = 'l', fullWidth, allowClear = false, precision, minuteStep, secondStep, minTime, maxTime, placement = 'bottom-start', container, mobile, variant: variantProp, id, className, classNames: classNamesProp, 'aria-label': ariaLabel, 'data-testid': testId = 'time-picker', } = props;
|
|
19
|
+
const classNames = useClassNames('TimePicker', classNamesProp);
|
|
20
|
+
const presentation = usePickerPresentation(mobile, PICKER_MIN_WIDTH.list);
|
|
21
|
+
const sheet = presentation !== 'popup';
|
|
22
|
+
const variant = variantProp !== null && variantProp !== void 0 ? variantProp : (sheet ? 'underline' : 'outline');
|
|
23
|
+
const vm = useTimeRangePicker(props);
|
|
24
|
+
const { t } = useLocale();
|
|
25
|
+
const panelSize = size === 'l' ? 'm' : 's';
|
|
26
|
+
const renderInput = (index, controlId, describedBy, invalid) => {
|
|
27
|
+
var _a;
|
|
28
|
+
const input = vm.inputs[index];
|
|
29
|
+
const boundary = index === 0 ? t('timePicker.rangeStart') : t('timePicker.rangeEnd');
|
|
30
|
+
return (_jsx("input", { ...input.inputProps, ref: input.inputRef, id: index === 0 ? controlId : `${controlId}-end`, placeholder: vm.placeholder, "aria-label": `${(_a = label !== null && label !== void 0 ? label : ariaLabel) !== null && _a !== void 0 ? _a : ''} ${boundary.toLowerCase()}`.trim(), "aria-describedby": describedBy, "aria-invalid": invalid || undefined, onKeyDown: vm.onInputKeyDown, onClick: vm.onInputClick }));
|
|
31
|
+
};
|
|
32
|
+
const field = (_jsx(PickerField, { ref: vm.anchorRef, size: size, label: label, caption: caption, status: status, theme: theme, disabled: disabled, fullWidth: fullWidth, variant: variant, open: vm.open, clearable: allowClear && !disabled && vm.hasValue, onClear: vm.clear, icon: _jsx(ClockIcon, {}), iconLabel: t('timePicker.selectRange'), onIconClick: () => (vm.open ? vm.setOpen(false) : vm.openWithFocus('selected')), className: clsx(styles.range, className), classNames: classNames, id: id, ...getDataAttributes(props), "data-testid": testId, children: ({ controlId, describedBy, invalid }) => (_jsxs(_Fragment, { children: [renderInput(0, controlId, describedBy, invalid), _jsx("span", { className: styles.dash, "aria-hidden": true, children: "\u2013" }), renderInput(1, controlId, describedBy, invalid)] })) }));
|
|
33
|
+
const panel = (index) => (_jsxs("div", { className: styles.rangeColumn, children: [_jsx("span", { className: styles.rangeCaption, children: index === 0 ? t('timePicker.rangeStart') : t('timePicker.rangeEnd') }), _jsx(TimePanel, { value: vm.value[index], onUpdate: next => vm.setBoundary(index, next), locale: vm.locale, precision: precision, minuteStep: minuteStep, secondStep: secondStep, hourCycle: vm.hourCycle, minTime: minTime, maxTime: maxTime, size: panelSize })] }));
|
|
34
|
+
const panels = (_jsxs("div", { ref: vm.setPanelEl, className: styles.rangePanels, children: [panel(0), _jsx(Divider, { orientation: "vertical", className: styles.rangeDivider }), panel(1)] }));
|
|
35
|
+
if (sheet) {
|
|
36
|
+
return (_jsxs(_Fragment, { children: [field, _jsx(PickerSheet, { "data-testid": getRelatedTestId(testId, 'popup'), open: vm.open, onClose: () => vm.setOpen(false), title: (_a = label !== null && label !== void 0 ? label : ariaLabel) !== null && _a !== void 0 ? _a : '', presentation: presentation, theme: theme, container: container, footer: _jsx(Button, { size: "l", wide: true, onClick: () => vm.setOpen(false), children: t('picker.done') }), children: _jsx("div", { className: styles.sheetPanel, children: panels }) })] }));
|
|
37
|
+
}
|
|
38
|
+
return (_jsx(Popover, { "data-testid": getRelatedTestId(testId, 'popup'), anchor: field, open: vm.open, onOpenChange: (next, reason) => {
|
|
39
|
+
var _a;
|
|
40
|
+
vm.setOpen(next);
|
|
41
|
+
if (!next && reason === 'escape')
|
|
42
|
+
(_a = vm.inputs[0].inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
43
|
+
}, trigger: "manual", returnFocus: false, arrow: false, offset: 4, placement: placement, container: container, rounding: "l", role: "dialog", className: styles.popover, children: panels }));
|
|
44
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { Placement } from '../_internal/floating';
|
|
2
|
+
import type { OverlayContainerProps } from '../portal';
|
|
3
|
+
import type { ThemeSetting } from '../theme-provider/theme-context';
|
|
4
|
+
import type { ComponentClassNames } from '../utils/class-names';
|
|
5
|
+
import type { DataAttributes } from '../utils/data-attributes';
|
|
6
|
+
import type { PickerMobile } from '../_internal/picker/use-picker-presentation';
|
|
7
|
+
import type { FieldStatus } from '../status';
|
|
8
|
+
export type TimePrecision = 'hour' | 'minute' | 'second';
|
|
9
|
+
export type TimeUnit = 'hour' | 'minute' | 'second' | 'period';
|
|
10
|
+
export type TimeLabels = Record<TimeUnit, string>;
|
|
11
|
+
/** Настройки выбора времени: общие для панели, поля и выбора времени в `DatePicker` */
|
|
12
|
+
export type TimeOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* До какой единицы выбирается время.
|
|
15
|
+
* @default 'minute'
|
|
16
|
+
*/
|
|
17
|
+
precision?: TimePrecision;
|
|
18
|
+
/**
|
|
19
|
+
* Шаг минут в колонке (5 — 00, 05, 10…). Введённое вручную время шагом не ограничивается.
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
minuteStep?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Шаг секунд в колонке.
|
|
25
|
+
* @default 1
|
|
26
|
+
*/
|
|
27
|
+
secondStep?: number;
|
|
28
|
+
/**
|
|
29
|
+
* 12- или 24-часовой формат. По умолчанию — по локали: 12 для английской, 24 для остальных.
|
|
30
|
+
*/
|
|
31
|
+
hourCycle?: 12 | 24;
|
|
32
|
+
/**
|
|
33
|
+
* Самое раннее доступное время суток (дата игнорируется).
|
|
34
|
+
*/
|
|
35
|
+
minTime?: Date;
|
|
36
|
+
/**
|
|
37
|
+
* Самое позднее доступное время суток (дата игнорируется).
|
|
38
|
+
*/
|
|
39
|
+
maxTime?: Date;
|
|
40
|
+
};
|
|
41
|
+
export type TimePanelProps = DataAttributes & (TimeOptions & {
|
|
42
|
+
/**
|
|
43
|
+
* Выбранное время (контролируемый режим). Дата значения сохраняется, меняются только часы, минуты и секунды.
|
|
44
|
+
*/
|
|
45
|
+
value?: Date | null;
|
|
46
|
+
/**
|
|
47
|
+
* Начальное значение (неконтролируемый режим).
|
|
48
|
+
*/
|
|
49
|
+
defaultValue?: Date | null;
|
|
50
|
+
/**
|
|
51
|
+
* Событие срабатывает при выборе в любой колонке. Если значения не было, берётся `baseDate`: нулевые минуты и секунды.
|
|
52
|
+
*/
|
|
53
|
+
onUpdate?: (value: Date) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Дата, на которую ставится время, пока значения нет.
|
|
56
|
+
* @default сегодня
|
|
57
|
+
*/
|
|
58
|
+
baseDate?: Date;
|
|
59
|
+
/**
|
|
60
|
+
* Локаль для подписей и формата часов.
|
|
61
|
+
* @default 'ru'
|
|
62
|
+
*/
|
|
63
|
+
locale?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Размер.
|
|
66
|
+
* @default 'm'
|
|
67
|
+
*/
|
|
68
|
+
size?: 's' | 'm';
|
|
69
|
+
/**
|
|
70
|
+
* Колонки занимают всю высоту родителя (родитель должен быть определённой высоты) и прокручиваются внутри.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
fill?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Подписи колонок для скринридера.
|
|
76
|
+
*/
|
|
77
|
+
labels?: Partial<TimeLabels>;
|
|
78
|
+
className?: string;
|
|
79
|
+
'data-testid'?: string;
|
|
80
|
+
});
|
|
81
|
+
export type TimePickerBaseProps = TimeOptions & OverlayContainerProps & {
|
|
82
|
+
/**
|
|
83
|
+
* Лейбл поля.
|
|
84
|
+
*/
|
|
85
|
+
label?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Заглушка при пустом поле.
|
|
88
|
+
*/
|
|
89
|
+
placeholder?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Подпись под полем.
|
|
92
|
+
*/
|
|
93
|
+
caption?: React.ReactNode;
|
|
94
|
+
/** Состояние поля: `error` (красная рамка), `warning` (оранжевая), `success`, `info`: иконка у подписи */
|
|
95
|
+
status?: FieldStatus;
|
|
96
|
+
/** Схема поля поверх схемы окружения: `dark` на тёмной подложке */
|
|
97
|
+
theme?: ThemeSetting;
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Размер поля.
|
|
101
|
+
* @default 'l'
|
|
102
|
+
*/
|
|
103
|
+
size?: 's' | 'm' | 'l';
|
|
104
|
+
/**
|
|
105
|
+
* Растянуть поле на всю ширину контейнера. Без него у всех полей одна ширина по умолчанию
|
|
106
|
+
* (`--field-default-width`, 240px); у `Input` с `htmlSize` ширина считается по символам.
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
fullWidth?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Кнопка очистки.
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
allowClear?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Открывать список по клику в поле (по умолчанию — Enter, стрелка вниз или кнопка с часами). Вручную время можно вводить и так.
|
|
117
|
+
* Фокус список не открывает.
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
openOnClick?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Запретить ввод с клавиатуры: время выбирается только в списке.
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
readOnlyInput?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Формат показа времени из токенов `HH`, `hh`, `mm`, `ss`, `a`. По умолчанию — по точности и формату часов.
|
|
128
|
+
*/
|
|
129
|
+
format?: string;
|
|
130
|
+
locale?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Открытие списка (контролируемый режим).
|
|
133
|
+
*/
|
|
134
|
+
open?: boolean;
|
|
135
|
+
defaultOpen?: boolean;
|
|
136
|
+
onOpenChange?: (open: boolean) => void;
|
|
137
|
+
placement?: Placement;
|
|
138
|
+
/**
|
|
139
|
+
* Где открывается панель: `auto` — рядом с полем, а на телефоне и узком экране (панель не помещается рядом) —
|
|
140
|
+
* нижней шторкой; `sheet` — шторкой всегда, `full` — шторкой на весь экран, `false` — рядом с полем всегда.
|
|
141
|
+
* В шторке поле остаётся полем ввода, а саму шторку открывает иконка. Вид поля задаёт `variant`.
|
|
142
|
+
* @default 'auto'
|
|
143
|
+
*/
|
|
144
|
+
mobile?: PickerMobile;
|
|
145
|
+
/**
|
|
146
|
+
* Вид поля: рамка или подчёркивание, как у `Input`. Не зависит от `mobile`; без значения в шторке поле
|
|
147
|
+
* подчёркнутое, рядом с панелью — с рамкой.
|
|
148
|
+
*/
|
|
149
|
+
variant?: 'outline' | 'underline';
|
|
150
|
+
id?: string;
|
|
151
|
+
className?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Свои классы частей поля: `root`, `control`, `outline`, `label`, `startAdornment`, `endAdornment`, `clear`, `caption`.
|
|
154
|
+
*/
|
|
155
|
+
classNames?: ComponentClassNames<'TimePicker'>;
|
|
156
|
+
'aria-label'?: string;
|
|
157
|
+
'data-testid'?: string;
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TimePanelProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Логика панели времени: колонки с вариантами и выбор значения. Подходит для своей разметки.
|
|
4
|
+
* Не нужна для готового `<TimePanel />`, `<TimePicker />` и выбора времени в `<DatePicker />`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTimePanel({ value: valueProp, defaultValue, onUpdate, baseDate, locale: localeProp, precision, minuteStep, secondStep, hourCycle: hourCycleProp, minTime, maxTime, }: Pick<TimePanelProps, 'value' | 'defaultValue' | 'onUpdate' | 'baseDate' | 'locale' | 'precision' | 'minuteStep' | 'secondStep' | 'hourCycle' | 'minTime' | 'maxTime'>): {
|
|
7
|
+
value: Date | null;
|
|
8
|
+
columns: import("./time-model").TimeColumn[];
|
|
9
|
+
hourCycle: 12 | 24;
|
|
10
|
+
select: (unit: import("./types").TimeUnit, picked: number) => void;
|
|
11
|
+
};
|
|
12
|
+
export type UseTimePanelReturn = ReturnType<typeof useTimePanel>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useControllableState } from '../_internal/hooks';
|
|
4
|
+
import { applySelection, buildColumns, resolveHourCycle } from './time-model';
|
|
5
|
+
import { useLocale } from '../locale/use-locale';
|
|
6
|
+
/**
|
|
7
|
+
* Логика панели времени: колонки с вариантами и выбор значения. Подходит для своей разметки.
|
|
8
|
+
* Не нужна для готового `<TimePanel />`, `<TimePicker />` и выбора времени в `<DatePicker />`.
|
|
9
|
+
*/
|
|
10
|
+
export function useTimePanel({ value: valueProp, defaultValue = null, onUpdate, baseDate, locale: localeProp, precision = 'minute', minuteStep = 1, secondStep = 1, hourCycle: hourCycleProp, minTime, maxTime, }) {
|
|
11
|
+
const { locale: contextLocale } = useLocale();
|
|
12
|
+
const locale = localeProp !== null && localeProp !== void 0 ? localeProp : contextLocale;
|
|
13
|
+
const [value, setValue] = useControllableState({
|
|
14
|
+
value: valueProp,
|
|
15
|
+
defaultValue,
|
|
16
|
+
onChange: next => next && (onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(next)),
|
|
17
|
+
});
|
|
18
|
+
const hourCycle = resolveHourCycle({ hourCycle: hourCycleProp }, locale);
|
|
19
|
+
const columns = useMemo(() => buildColumns({ precision, minuteStep, secondStep, hourCycle, value, minTime, maxTime }), [precision, minuteStep, secondStep, hourCycle, value, minTime, maxTime]);
|
|
20
|
+
const select = (unit, picked) => setValue(applySelection(unit, picked, value, baseDate !== null && baseDate !== void 0 ? baseDate : new Date(), hourCycle));
|
|
21
|
+
return { value, columns, hourCycle, select };
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
import type { TimePickerSinglePickerProps } from './picker-types';
|
|
3
|
+
/**
|
|
4
|
+
* Логика поля времени: значение, открытие списка, ввод с клавиатуры. Разметку рисует `TimePicker`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTimePicker(props: TimePickerSinglePickerProps): {
|
|
7
|
+
locale: string;
|
|
8
|
+
precision: import("./types").TimePrecision;
|
|
9
|
+
hourCycle: 12 | 24;
|
|
10
|
+
format: string;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
value: Date | null;
|
|
13
|
+
setValue: (next: Date | null) => void;
|
|
14
|
+
open: boolean;
|
|
15
|
+
setOpen: (next: boolean) => false | void;
|
|
16
|
+
input: {
|
|
17
|
+
inputRef: import("react").RefObject<HTMLInputElement | null>;
|
|
18
|
+
text: string;
|
|
19
|
+
setText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
20
|
+
inputProps: import("react").InputHTMLAttributes<HTMLInputElement>;
|
|
21
|
+
};
|
|
22
|
+
setPanelEl: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
|
|
23
|
+
anchorRef: import("react").RefObject<HTMLDivElement | null>;
|
|
24
|
+
openWithFocus: (where: "first" | "last" | "selected") => void;
|
|
25
|
+
onInputKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
26
|
+
onInputClick: () => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
};
|
|
29
|
+
export type UseTimePickerReturn = ReturnType<typeof useTimePicker>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { getFormatPlaceholder, mergeDateAndTime, secondsOfDay } from '../_internal/date';
|
|
4
|
+
import { focusWhenReady, getTabbables, useControllableState, usePopoverTabFlow } from '../_internal/hooks';
|
|
5
|
+
import { useDateInput } from '../_internal/picker';
|
|
6
|
+
import { getTimeFormat, resolveHourCycle } from './time-model';
|
|
7
|
+
import { useLocale } from '../locale/use-locale';
|
|
8
|
+
/**
|
|
9
|
+
* Логика поля времени: значение, открытие списка, ввод с клавиатуры. Разметку рисует `TimePicker`.
|
|
10
|
+
*/
|
|
11
|
+
export function useTimePicker(props) {
|
|
12
|
+
var _a, _b, _c, _d;
|
|
13
|
+
const { locale: localeProp, precision = 'minute', minTime, maxTime, disabled, readOnlyInput, openOnClick, onOpenChange, } = props;
|
|
14
|
+
const { locale: contextLocale, t } = useLocale();
|
|
15
|
+
const locale = localeProp !== null && localeProp !== void 0 ? localeProp : contextLocale;
|
|
16
|
+
const hourCycle = resolveHourCycle(props, locale);
|
|
17
|
+
const format = (_a = props.format) !== null && _a !== void 0 ? _a : getTimeFormat(precision, hourCycle);
|
|
18
|
+
const placeholder = (_b = props.placeholder) !== null && _b !== void 0 ? _b : getFormatPlaceholder(format, locale, t);
|
|
19
|
+
const [value, setValue] = useControllableState({
|
|
20
|
+
value: props.value,
|
|
21
|
+
defaultValue: (_c = props.defaultValue) !== null && _c !== void 0 ? _c : null,
|
|
22
|
+
onChange: next => { var _a; return (_a = props.onUpdate) === null || _a === void 0 ? void 0 : _a.call(props, next); },
|
|
23
|
+
});
|
|
24
|
+
const [open, setOpenState] = useControllableState({
|
|
25
|
+
value: props.open,
|
|
26
|
+
defaultValue: (_d = props.defaultOpen) !== null && _d !== void 0 ? _d : false,
|
|
27
|
+
onChange: next => onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(next),
|
|
28
|
+
});
|
|
29
|
+
const baseDate = useMemo(() => value !== null && value !== void 0 ? value : new Date(), [value]);
|
|
30
|
+
const isAllowed = useCallback((date) => {
|
|
31
|
+
const seconds = secondsOfDay(date);
|
|
32
|
+
if (minTime && seconds < secondsOfDay(minTime))
|
|
33
|
+
return false;
|
|
34
|
+
if (maxTime && seconds > secondsOfDay(maxTime))
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}, [minTime, maxTime]);
|
|
38
|
+
const input = useDateInput({
|
|
39
|
+
value,
|
|
40
|
+
format,
|
|
41
|
+
baseDate,
|
|
42
|
+
isAllowed,
|
|
43
|
+
disabled,
|
|
44
|
+
readOnly: readOnlyInput,
|
|
45
|
+
// Дата значения не меняется: вводим только время суток
|
|
46
|
+
onCommit: next => setValue(next && value ? mergeDateAndTime(value, next) : next),
|
|
47
|
+
});
|
|
48
|
+
const [panelEl, setPanelEl] = useState(null);
|
|
49
|
+
const anchorRef = useRef(null);
|
|
50
|
+
const setOpen = useCallback((next) => !(disabled && next) && setOpenState(next), [disabled, setOpenState]);
|
|
51
|
+
const focusEntry = useRef(null);
|
|
52
|
+
const openWithFocus = useCallback((where) => {
|
|
53
|
+
focusEntry.current = where;
|
|
54
|
+
setOpen(true);
|
|
55
|
+
}, [setOpen]);
|
|
56
|
+
// Открыли с клавиатуры — фокус в списке: выбранное значение, первый или последний элемент
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!open || !panelEl || !focusEntry.current)
|
|
59
|
+
return undefined;
|
|
60
|
+
const entry = focusEntry.current;
|
|
61
|
+
focusEntry.current = null;
|
|
62
|
+
return focusWhenReady(() => {
|
|
63
|
+
const items = getTabbables(panelEl);
|
|
64
|
+
return entry === 'last' ? items[items.length - 1] : items[0];
|
|
65
|
+
});
|
|
66
|
+
}, [open, panelEl]);
|
|
67
|
+
usePopoverTabFlow({
|
|
68
|
+
open,
|
|
69
|
+
anchorRef,
|
|
70
|
+
contentElement: panelEl,
|
|
71
|
+
onClose: () => setOpen(false),
|
|
72
|
+
});
|
|
73
|
+
const onInputKeyDown = (event) => {
|
|
74
|
+
// Список открывают Enter, стрелка вниз или Alt+стрелка вверх; Tab и фокус его не открывают
|
|
75
|
+
if (event.key === 'ArrowDown' || (event.altKey && event.key === 'ArrowUp')) {
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
openWithFocus('selected');
|
|
78
|
+
}
|
|
79
|
+
else if (event.key === 'Enter') {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
if (open)
|
|
82
|
+
setOpen(false);
|
|
83
|
+
else
|
|
84
|
+
openWithFocus('selected');
|
|
85
|
+
}
|
|
86
|
+
else if (event.key === ' ' && readOnlyInput) {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
openWithFocus('selected');
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const onInputClick = () => {
|
|
92
|
+
if (openOnClick && !disabled)
|
|
93
|
+
setOpenState(true);
|
|
94
|
+
};
|
|
95
|
+
return {
|
|
96
|
+
locale,
|
|
97
|
+
precision,
|
|
98
|
+
hourCycle,
|
|
99
|
+
format,
|
|
100
|
+
placeholder,
|
|
101
|
+
value,
|
|
102
|
+
setValue,
|
|
103
|
+
open,
|
|
104
|
+
setOpen,
|
|
105
|
+
input,
|
|
106
|
+
setPanelEl,
|
|
107
|
+
anchorRef,
|
|
108
|
+
openWithFocus,
|
|
109
|
+
onInputKeyDown,
|
|
110
|
+
onInputClick,
|
|
111
|
+
clear: () => {
|
|
112
|
+
var _a;
|
|
113
|
+
setValue(null);
|
|
114
|
+
(_a = input.inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
import type { TimePickerRangePickerProps, TimeRange } from './picker-types';
|
|
3
|
+
/**
|
|
4
|
+
* Логика поля промежутка времени: две границы, открытие списка, ввод с клавиатуры в каждое поле.
|
|
5
|
+
* Разметку рисует `TimePicker` в режиме `range`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useTimeRangePicker(props: TimePickerRangePickerProps): {
|
|
8
|
+
locale: string;
|
|
9
|
+
precision: import("./types").TimePrecision;
|
|
10
|
+
hourCycle: 12 | 24;
|
|
11
|
+
format: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
value: TimeRange;
|
|
14
|
+
setBoundary: (index: 0 | 1, next: Date | null) => void;
|
|
15
|
+
open: boolean;
|
|
16
|
+
setOpen: (next: boolean) => false | void;
|
|
17
|
+
inputs: readonly [{
|
|
18
|
+
inputRef: import("react").RefObject<HTMLInputElement | null>;
|
|
19
|
+
text: string;
|
|
20
|
+
setText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
21
|
+
inputProps: import("react").InputHTMLAttributes<HTMLInputElement>;
|
|
22
|
+
}, {
|
|
23
|
+
inputRef: import("react").RefObject<HTMLInputElement | null>;
|
|
24
|
+
text: string;
|
|
25
|
+
setText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
26
|
+
inputProps: import("react").InputHTMLAttributes<HTMLInputElement>;
|
|
27
|
+
}];
|
|
28
|
+
setPanelEl: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
|
|
29
|
+
anchorRef: import("react").RefObject<HTMLDivElement | null>;
|
|
30
|
+
openWithFocus: (where: "first" | "last" | "selected") => void;
|
|
31
|
+
onInputKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
32
|
+
onInputClick: () => void;
|
|
33
|
+
hasValue: boolean;
|
|
34
|
+
clear: () => void;
|
|
35
|
+
};
|
|
36
|
+
export type UseTimeRangePickerReturn = ReturnType<typeof useTimeRangePicker>;
|