@korzun/design 0.0.0-stage → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +73 -2
- package/dist/component/card/index.d.ts +15 -0
- package/dist/component/card/index.d.ts.map +1 -0
- package/dist/component/card/index.js +34 -0
- package/dist/component/card/index.js.map +1 -0
- package/dist/component/card/style.d.ts +5 -0
- package/dist/component/card/style.d.ts.map +1 -0
- package/dist/component/card/style.js +69 -0
- package/dist/component/card/style.js.map +1 -0
- package/dist/component/card-divider/index.d.ts +10 -0
- package/dist/component/card-divider/index.d.ts.map +1 -0
- package/dist/component/card-divider/index.js +23 -0
- package/dist/component/card-divider/index.js.map +1 -0
- package/dist/component/card-divider/style.d.ts +5 -0
- package/dist/component/card-divider/style.d.ts.map +1 -0
- package/dist/component/card-divider/style.js +48 -0
- package/dist/component/card-divider/style.js.map +1 -0
- package/dist/component/card-row/index.d.ts +6 -0
- package/dist/component/card-row/index.d.ts.map +1 -0
- package/dist/component/card-row/index.js +16 -0
- package/dist/component/card-row/index.js.map +1 -0
- package/dist/component/card-row/style.d.ts +5 -0
- package/dist/component/card-row/style.d.ts.map +1 -0
- package/dist/component/card-row/style.js +13 -0
- package/dist/component/card-row/style.js.map +1 -0
- package/dist/component/collapsible-section/index.d.ts +11 -0
- package/dist/component/collapsible-section/index.d.ts.map +1 -0
- package/dist/component/collapsible-section/index.js +20 -0
- package/dist/component/collapsible-section/index.js.map +1 -0
- package/dist/component/collapsible-section/style.d.ts +5 -0
- package/dist/component/collapsible-section/style.d.ts.map +1 -0
- package/dist/component/collapsible-section/style.js +36 -0
- package/dist/component/collapsible-section/style.js.map +1 -0
- package/dist/component/empty-state/index.d.ts +22 -0
- package/dist/component/empty-state/index.d.ts.map +1 -0
- package/dist/component/empty-state/index.js +19 -0
- package/dist/component/empty-state/index.js.map +1 -0
- package/dist/component/empty-state/style.d.ts +5 -0
- package/dist/component/empty-state/style.d.ts.map +1 -0
- package/dist/component/empty-state/style.js +30 -0
- package/dist/component/empty-state/style.js.map +1 -0
- package/dist/component/index.d.ts +16 -0
- package/dist/component/index.d.ts.map +1 -0
- package/dist/component/index.js +15 -0
- package/dist/component/index.js.map +1 -0
- package/dist/component/meta-line/index.d.ts +21 -0
- package/dist/component/meta-line/index.d.ts.map +1 -0
- package/dist/component/meta-line/index.js +24 -0
- package/dist/component/meta-line/index.js.map +1 -0
- package/dist/component/meta-line/style.d.ts +5 -0
- package/dist/component/meta-line/style.d.ts.map +1 -0
- package/dist/component/meta-line/style.js +35 -0
- package/dist/component/meta-line/style.js.map +1 -0
- package/dist/component/metadata/index.d.ts +6 -0
- package/dist/component/metadata/index.d.ts.map +1 -0
- package/dist/component/metadata/index.js +7 -0
- package/dist/component/metadata/index.js.map +1 -0
- package/dist/component/metadata/style.d.ts +5 -0
- package/dist/component/metadata/style.d.ts.map +1 -0
- package/dist/component/metadata/style.js +20 -0
- package/dist/component/metadata/style.js.map +1 -0
- package/dist/component/metadata-list/index.d.ts +10 -0
- package/dist/component/metadata-list/index.d.ts.map +1 -0
- package/dist/component/metadata-list/index.js +9 -0
- package/dist/component/metadata-list/index.js.map +1 -0
- package/dist/component/metadata-list/style.d.ts +5 -0
- package/dist/component/metadata-list/style.d.ts.map +1 -0
- package/dist/component/metadata-list/style.js +10 -0
- package/dist/component/metadata-list/style.js.map +1 -0
- package/dist/component/nav-desktop/index.d.ts +6 -0
- package/dist/component/nav-desktop/index.d.ts.map +1 -0
- package/dist/component/nav-desktop/index.js +11 -0
- package/dist/component/nav-desktop/index.js.map +1 -0
- package/dist/component/nav-desktop/style.d.ts +5 -0
- package/dist/component/nav-desktop/style.d.ts.map +1 -0
- package/dist/component/nav-desktop/style.js +94 -0
- package/dist/component/nav-desktop/style.js.map +1 -0
- package/dist/component/nav-mobile/index.d.ts +25 -0
- package/dist/component/nav-mobile/index.d.ts.map +1 -0
- package/dist/component/nav-mobile/index.js +153 -0
- package/dist/component/nav-mobile/index.js.map +1 -0
- package/dist/component/nav-mobile/style.d.ts +5 -0
- package/dist/component/nav-mobile/style.d.ts.map +1 -0
- package/dist/component/nav-mobile/style.js +347 -0
- package/dist/component/nav-mobile/style.js.map +1 -0
- package/dist/component/nav-types.d.ts +12 -0
- package/dist/component/nav-types.d.ts.map +1 -0
- package/dist/component/nav-types.js +2 -0
- package/dist/component/nav-types.js.map +1 -0
- package/dist/component/page/index.d.ts +33 -0
- package/dist/component/page/index.d.ts.map +1 -0
- package/dist/component/page/index.js +20 -0
- package/dist/component/page/index.js.map +1 -0
- package/dist/component/page/style.d.ts +10 -0
- package/dist/component/page/style.d.ts.map +1 -0
- package/dist/component/page/style.js +132 -0
- package/dist/component/page/style.js.map +1 -0
- package/dist/component/progress-indicator/index.d.ts +17 -0
- package/dist/component/progress-indicator/index.d.ts.map +1 -0
- package/dist/component/progress-indicator/index.js +19 -0
- package/dist/component/progress-indicator/index.js.map +1 -0
- package/dist/component/progress-indicator/style.d.ts +5 -0
- package/dist/component/progress-indicator/style.d.ts.map +1 -0
- package/dist/component/progress-indicator/style.js +24 -0
- package/dist/component/progress-indicator/style.js.map +1 -0
- package/dist/component/tag/index.d.ts +9 -0
- package/dist/component/tag/index.d.ts.map +1 -0
- package/dist/component/tag/index.js +15 -0
- package/dist/component/tag/index.js.map +1 -0
- package/dist/component/tag/style.d.ts +5 -0
- package/dist/component/tag/style.d.ts.map +1 -0
- package/dist/component/tag/style.js +28 -0
- package/dist/component/tag/style.js.map +1 -0
- package/dist/component/theme-setting/index.d.ts +2 -0
- package/dist/component/theme-setting/index.d.ts.map +1 -0
- package/dist/component/theme-setting/index.js +14 -0
- package/dist/component/theme-setting/index.js.map +1 -0
- package/dist/component/top-fade/index.d.ts +2 -0
- package/dist/component/top-fade/index.d.ts.map +1 -0
- package/dist/component/top-fade/index.js +9 -0
- package/dist/component/top-fade/index.js.map +1 -0
- package/dist/component/top-fade/style.d.ts +5 -0
- package/dist/component/top-fade/style.d.ts.map +1 -0
- package/dist/component/top-fade/style.js +57 -0
- package/dist/component/top-fade/style.js.map +1 -0
- package/dist/control/action-menu-list/index.d.ts +44 -0
- package/dist/control/action-menu-list/index.d.ts.map +1 -0
- package/dist/control/action-menu-list/index.js +9 -0
- package/dist/control/action-menu-list/index.js.map +1 -0
- package/dist/control/action-menu-list/style.d.ts +5 -0
- package/dist/control/action-menu-list/style.d.ts.map +1 -0
- package/dist/control/action-menu-list/style.js +51 -0
- package/dist/control/action-menu-list/style.js.map +1 -0
- package/dist/control/action-menu-list/use-dismiss.d.ts +3 -0
- package/dist/control/action-menu-list/use-dismiss.d.ts.map +1 -0
- package/dist/control/action-menu-list/use-dismiss.js +25 -0
- package/dist/control/action-menu-list/use-dismiss.js.map +1 -0
- package/dist/control/back-button/index.d.ts +6 -0
- package/dist/control/back-button/index.d.ts.map +1 -0
- package/dist/control/back-button/index.js +20 -0
- package/dist/control/back-button/index.js.map +1 -0
- package/dist/control/back-button/style.d.ts +5 -0
- package/dist/control/back-button/style.d.ts.map +1 -0
- package/dist/control/back-button/style.js +26 -0
- package/dist/control/back-button/style.js.map +1 -0
- package/dist/control/button/index.d.ts +36 -0
- package/dist/control/button/index.d.ts.map +1 -0
- package/dist/control/button/index.js +39 -0
- package/dist/control/button/index.js.map +1 -0
- package/dist/control/button/style.d.ts +24 -0
- package/dist/control/button/style.d.ts.map +1 -0
- package/dist/control/button/style.js +370 -0
- package/dist/control/button/style.js.map +1 -0
- package/dist/control/chips-input/index.d.ts +17 -0
- package/dist/control/chips-input/index.d.ts.map +1 -0
- package/dist/control/chips-input/index.js +77 -0
- package/dist/control/chips-input/index.js.map +1 -0
- package/dist/control/chips-input/style.d.ts +10 -0
- package/dist/control/chips-input/style.d.ts.map +1 -0
- package/dist/control/chips-input/style.js +152 -0
- package/dist/control/chips-input/style.js.map +1 -0
- package/dist/control/confirm-modal/index.d.ts +17 -0
- package/dist/control/confirm-modal/index.d.ts.map +1 -0
- package/dist/control/confirm-modal/index.js +22 -0
- package/dist/control/confirm-modal/index.js.map +1 -0
- package/dist/control/confirm-modal/style.d.ts +5 -0
- package/dist/control/confirm-modal/style.d.ts.map +1 -0
- package/dist/control/confirm-modal/style.js +33 -0
- package/dist/control/confirm-modal/style.js.map +1 -0
- package/dist/control/date-time-input/index.d.ts +21 -0
- package/dist/control/date-time-input/index.d.ts.map +1 -0
- package/dist/control/date-time-input/index.js +35 -0
- package/dist/control/date-time-input/index.js.map +1 -0
- package/dist/control/date-time-input/iso-date.d.ts +25 -0
- package/dist/control/date-time-input/iso-date.d.ts.map +1 -0
- package/dist/control/date-time-input/iso-date.js +51 -0
- package/dist/control/date-time-input/iso-date.js.map +1 -0
- package/dist/control/date-time-input/style.d.ts +5 -0
- package/dist/control/date-time-input/style.d.ts.map +1 -0
- package/dist/control/date-time-input/style.js +72 -0
- package/dist/control/date-time-input/style.js.map +1 -0
- package/dist/control/field-list/index.d.ts +26 -0
- package/dist/control/field-list/index.d.ts.map +1 -0
- package/dist/control/field-list/index.js +11 -0
- package/dist/control/field-list/index.js.map +1 -0
- package/dist/control/field-list/style.d.ts +5 -0
- package/dist/control/field-list/style.d.ts.map +1 -0
- package/dist/control/field-list/style.js +43 -0
- package/dist/control/field-list/style.js.map +1 -0
- package/dist/control/index.d.ts +23 -0
- package/dist/control/index.d.ts.map +1 -0
- package/dist/control/index.js +18 -0
- package/dist/control/index.js.map +1 -0
- package/dist/control/number-input/index.d.ts +12 -0
- package/dist/control/number-input/index.d.ts.map +1 -0
- package/dist/control/number-input/index.js +34 -0
- package/dist/control/number-input/index.js.map +1 -0
- package/dist/control/number-input/style.d.ts +5 -0
- package/dist/control/number-input/style.d.ts.map +1 -0
- package/dist/control/number-input/style.js +50 -0
- package/dist/control/number-input/style.js.map +1 -0
- package/dist/control/page-actions-bar/index.d.ts +11 -0
- package/dist/control/page-actions-bar/index.d.ts.map +1 -0
- package/dist/control/page-actions-bar/index.js +26 -0
- package/dist/control/page-actions-bar/index.js.map +1 -0
- package/dist/control/page-actions-bar/style.d.ts +5 -0
- package/dist/control/page-actions-bar/style.d.ts.map +1 -0
- package/dist/control/page-actions-bar/style.js +63 -0
- package/dist/control/page-actions-bar/style.js.map +1 -0
- package/dist/control/page-actions-menu/index.d.ts +7 -0
- package/dist/control/page-actions-menu/index.d.ts.map +1 -0
- package/dist/control/page-actions-menu/index.js +19 -0
- package/dist/control/page-actions-menu/index.js.map +1 -0
- package/dist/control/page-actions-menu/style.d.ts +5 -0
- package/dist/control/page-actions-menu/style.d.ts.map +1 -0
- package/dist/control/page-actions-menu/style.js +33 -0
- package/dist/control/page-actions-menu/style.js.map +1 -0
- package/dist/control/page-footer-actions/index.d.ts +17 -0
- package/dist/control/page-footer-actions/index.d.ts.map +1 -0
- package/dist/control/page-footer-actions/index.js +14 -0
- package/dist/control/page-footer-actions/index.js.map +1 -0
- package/dist/control/page-footer-actions/style.d.ts +5 -0
- package/dist/control/page-footer-actions/style.d.ts.map +1 -0
- package/dist/control/page-footer-actions/style.js +12 -0
- package/dist/control/page-footer-actions/style.js.map +1 -0
- package/dist/control/popover/index.d.ts +27 -0
- package/dist/control/popover/index.d.ts.map +1 -0
- package/dist/control/popover/index.js +58 -0
- package/dist/control/popover/index.js.map +1 -0
- package/dist/control/popover/style.d.ts +5 -0
- package/dist/control/popover/style.d.ts.map +1 -0
- package/dist/control/popover/style.js +8 -0
- package/dist/control/popover/style.js.map +1 -0
- package/dist/control/segmented-control/index.d.ts +55 -0
- package/dist/control/segmented-control/index.d.ts.map +1 -0
- package/dist/control/segmented-control/index.js +107 -0
- package/dist/control/segmented-control/index.js.map +1 -0
- package/dist/control/segmented-control/style.d.ts +5 -0
- package/dist/control/segmented-control/style.d.ts.map +1 -0
- package/dist/control/segmented-control/style.js +149 -0
- package/dist/control/segmented-control/style.js.map +1 -0
- package/dist/control/select/index.d.ts +37 -0
- package/dist/control/select/index.d.ts.map +1 -0
- package/dist/control/select/index.js +138 -0
- package/dist/control/select/index.js.map +1 -0
- package/dist/control/select/style.d.ts +5 -0
- package/dist/control/select/style.d.ts.map +1 -0
- package/dist/control/select/style.js +192 -0
- package/dist/control/select/style.js.map +1 -0
- package/dist/control/switch/index.d.ts +39 -0
- package/dist/control/switch/index.d.ts.map +1 -0
- package/dist/control/switch/index.js +94 -0
- package/dist/control/switch/index.js.map +1 -0
- package/dist/control/switch/style.d.ts +36 -0
- package/dist/control/switch/style.d.ts.map +1 -0
- package/dist/control/switch/style.js +159 -0
- package/dist/control/switch/style.js.map +1 -0
- package/dist/control/text-area/index.d.ts +15 -0
- package/dist/control/text-area/index.d.ts.map +1 -0
- package/dist/control/text-area/index.js +44 -0
- package/dist/control/text-area/index.js.map +1 -0
- package/dist/control/text-area/style.d.ts +5 -0
- package/dist/control/text-area/style.d.ts.map +1 -0
- package/dist/control/text-area/style.js +85 -0
- package/dist/control/text-area/style.js.map +1 -0
- package/dist/control/text-input/index.d.ts +25 -0
- package/dist/control/text-input/index.d.ts.map +1 -0
- package/dist/control/text-input/index.js +43 -0
- package/dist/control/text-input/index.js.map +1 -0
- package/dist/control/text-input/style.d.ts +5 -0
- package/dist/control/text-input/style.d.ts.map +1 -0
- package/dist/control/text-input/style.js +80 -0
- package/dist/control/text-input/style.js.map +1 -0
- package/dist/control/use-modal-dialog/index.d.ts +24 -0
- package/dist/control/use-modal-dialog/index.d.ts.map +1 -0
- package/dist/control/use-modal-dialog/index.js +73 -0
- package/dist/control/use-modal-dialog/index.js.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/is-standalone.d.ts +2 -0
- package/dist/hooks/is-standalone.d.ts.map +1 -0
- package/dist/hooks/is-standalone.js +10 -0
- package/dist/hooks/is-standalone.js.map +1 -0
- package/dist/hooks/use-minimize-on-scroll.d.ts +48 -0
- package/dist/hooks/use-minimize-on-scroll.d.ts.map +1 -0
- package/dist/hooks/use-minimize-on-scroll.js +123 -0
- package/dist/hooks/use-minimize-on-scroll.js.map +1 -0
- package/dist/hooks/use-pull-to-refresh.d.ts +37 -0
- package/dist/hooks/use-pull-to-refresh.d.ts.map +1 -0
- package/dist/hooks/use-pull-to-refresh.js +116 -0
- package/dist/hooks/use-pull-to-refresh.js.map +1 -0
- package/dist/icon/adjustments-horizontal.d.ts +3 -0
- package/dist/icon/adjustments-horizontal.d.ts.map +1 -0
- package/dist/icon/adjustments-horizontal.js +11 -0
- package/dist/icon/adjustments-horizontal.js.map +1 -0
- package/dist/icon/alert-octagon.d.ts +3 -0
- package/dist/icon/alert-octagon.d.ts.map +1 -0
- package/dist/icon/alert-octagon.js +8 -0
- package/dist/icon/alert-octagon.js.map +1 -0
- package/dist/icon/book.d.ts +3 -0
- package/dist/icon/book.d.ts.map +1 -0
- package/dist/icon/book.js +11 -0
- package/dist/icon/book.js.map +1 -0
- package/dist/icon/books.d.ts +3 -0
- package/dist/icon/books.d.ts.map +1 -0
- package/dist/icon/books.js +11 -0
- package/dist/icon/books.js.map +1 -0
- package/dist/icon/check.d.ts +3 -0
- package/dist/icon/check.d.ts.map +1 -0
- package/dist/icon/check.js +8 -0
- package/dist/icon/check.js.map +1 -0
- package/dist/icon/chevron-circle.d.ts +3 -0
- package/dist/icon/chevron-circle.d.ts.map +1 -0
- package/dist/icon/chevron-circle.js +11 -0
- package/dist/icon/chevron-circle.js.map +1 -0
- package/dist/icon/chevron.d.ts +3 -0
- package/dist/icon/chevron.d.ts.map +1 -0
- package/dist/icon/chevron.js +11 -0
- package/dist/icon/chevron.js.map +1 -0
- package/dist/icon/circle-x.d.ts +3 -0
- package/dist/icon/circle-x.d.ts.map +1 -0
- package/dist/icon/circle-x.js +8 -0
- package/dist/icon/circle-x.js.map +1 -0
- package/dist/icon/clock.d.ts +3 -0
- package/dist/icon/clock.d.ts.map +1 -0
- package/dist/icon/clock.js +11 -0
- package/dist/icon/clock.js.map +1 -0
- package/dist/icon/device.d.ts +3 -0
- package/dist/icon/device.d.ts.map +1 -0
- package/dist/icon/device.js +11 -0
- package/dist/icon/device.js.map +1 -0
- package/dist/icon/emoji.d.ts +20 -0
- package/dist/icon/emoji.d.ts.map +1 -0
- package/dist/icon/emoji.js +21 -0
- package/dist/icon/emoji.js.map +1 -0
- package/dist/icon/hand-love-you.d.ts +3 -0
- package/dist/icon/hand-love-you.d.ts.map +1 -0
- package/dist/icon/hand-love-you.js +5 -0
- package/dist/icon/hand-love-you.js.map +1 -0
- package/dist/icon/hand-ok.d.ts +3 -0
- package/dist/icon/hand-ok.d.ts.map +1 -0
- package/dist/icon/hand-ok.js +5 -0
- package/dist/icon/hand-ok.js.map +1 -0
- package/dist/icon/hand-peace.d.ts +3 -0
- package/dist/icon/hand-peace.d.ts.map +1 -0
- package/dist/icon/hand-peace.js +5 -0
- package/dist/icon/hand-peace.js.map +1 -0
- package/dist/icon/hands-clap.d.ts +3 -0
- package/dist/icon/hands-clap.d.ts.map +1 -0
- package/dist/icon/hands-clap.js +5 -0
- package/dist/icon/hands-clap.js.map +1 -0
- package/dist/icon/home.d.ts +3 -0
- package/dist/icon/home.d.ts.map +1 -0
- package/dist/icon/home.js +11 -0
- package/dist/icon/home.js.map +1 -0
- package/dist/icon/index.d.ts +31 -0
- package/dist/icon/index.d.ts.map +1 -0
- package/dist/icon/index.js +30 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/icon/info-circle.d.ts +3 -0
- package/dist/icon/info-circle.d.ts.map +1 -0
- package/dist/icon/info-circle.js +8 -0
- package/dist/icon/info-circle.js.map +1 -0
- package/dist/icon/key.d.ts +3 -0
- package/dist/icon/key.d.ts.map +1 -0
- package/dist/icon/key.js +8 -0
- package/dist/icon/key.js.map +1 -0
- package/dist/icon/list-check.d.ts +3 -0
- package/dist/icon/list-check.d.ts.map +1 -0
- package/dist/icon/list-check.js +11 -0
- package/dist/icon/list-check.js.map +1 -0
- package/dist/icon/more.d.ts +3 -0
- package/dist/icon/more.d.ts.map +1 -0
- package/dist/icon/more.js +11 -0
- package/dist/icon/more.js.map +1 -0
- package/dist/icon/props.d.ts +26 -0
- package/dist/icon/props.d.ts.map +1 -0
- package/dist/icon/props.js +16 -0
- package/dist/icon/props.js.map +1 -0
- package/dist/icon/row-remove.d.ts +3 -0
- package/dist/icon/row-remove.d.ts.map +1 -0
- package/dist/icon/row-remove.js +11 -0
- package/dist/icon/row-remove.js.map +1 -0
- package/dist/icon/search.d.ts +3 -0
- package/dist/icon/search.d.ts.map +1 -0
- package/dist/icon/search.js +11 -0
- package/dist/icon/search.js.map +1 -0
- package/dist/icon/settings.d.ts +3 -0
- package/dist/icon/settings.d.ts.map +1 -0
- package/dist/icon/settings.js +11 -0
- package/dist/icon/settings.js.map +1 -0
- package/dist/icon/spinner.d.ts +3 -0
- package/dist/icon/spinner.d.ts.map +1 -0
- package/dist/icon/spinner.js +10 -0
- package/dist/icon/spinner.js.map +1 -0
- package/dist/icon/thumb-down.d.ts +3 -0
- package/dist/icon/thumb-down.d.ts.map +1 -0
- package/dist/icon/thumb-down.js +5 -0
- package/dist/icon/thumb-down.js.map +1 -0
- package/dist/icon/upload.d.ts +3 -0
- package/dist/icon/upload.d.ts.map +1 -0
- package/dist/icon/upload.js +11 -0
- package/dist/icon/upload.js.map +1 -0
- package/dist/icon/user.d.ts +3 -0
- package/dist/icon/user.d.ts.map +1 -0
- package/dist/icon/user.js +11 -0
- package/dist/icon/user.js.map +1 -0
- package/dist/icon/users.d.ts +3 -0
- package/dist/icon/users.d.ts.map +1 -0
- package/dist/icon/users.js +11 -0
- package/dist/icon/users.js.map +1 -0
- package/dist/icon/x.d.ts +3 -0
- package/dist/icon/x.d.ts.map +1 -0
- package/dist/icon/x.js +11 -0
- package/dist/icon/x.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/theme/context.d.ts +11 -0
- package/dist/theme/context.d.ts.map +1 -0
- package/dist/theme/context.js +7 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/global-styles.d.ts +3 -0
- package/dist/theme/global-styles.d.ts.map +1 -0
- package/dist/theme/global-styles.js +67 -0
- package/dist/theme/global-styles.js.map +1 -0
- package/dist/theme/index.d.ts +11 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +7 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/provider.d.ts +7 -0
- package/dist/theme/provider.d.ts.map +1 -0
- package/dist/theme/provider.js +49 -0
- package/dist/theme/provider.js.map +1 -0
- package/dist/theme/theme.d.ts +262 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +481 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/theme/use-theme-setting.d.ts +4 -0
- package/dist/theme/use-theme-setting.d.ts.map +1 -0
- package/dist/theme/use-theme-setting.js +7 -0
- package/dist/theme/use-theme-setting.js.map +1 -0
- package/dist/theme/use-theme.d.ts +3 -0
- package/dist/theme/use-theme.d.ts.map +1 -0
- package/dist/theme/use-theme.js +5 -0
- package/dist/theme/use-theme.js.map +1 -0
- package/dist/toast/context.d.ts +5 -0
- package/dist/toast/context.d.ts.map +1 -0
- package/dist/toast/context.js +5 -0
- package/dist/toast/context.js.map +1 -0
- package/dist/toast/hook/index.d.ts +2 -0
- package/dist/toast/hook/index.d.ts.map +1 -0
- package/dist/toast/hook/index.js +2 -0
- package/dist/toast/hook/index.js.map +1 -0
- package/dist/toast/hook/use-toast.d.ts +2 -0
- package/dist/toast/hook/use-toast.d.ts.map +1 -0
- package/dist/toast/hook/use-toast.js +7 -0
- package/dist/toast/hook/use-toast.js.map +1 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.js +3 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/toast/provider.d.ts +8 -0
- package/dist/toast/provider.d.ts.map +1 -0
- package/dist/toast/provider.js +57 -0
- package/dist/toast/provider.js.map +1 -0
- package/dist/toast/reducer.d.ts +21 -0
- package/dist/toast/reducer.d.ts.map +1 -0
- package/dist/toast/reducer.js +24 -0
- package/dist/toast/reducer.js.map +1 -0
- package/dist/toast/style.d.ts +5 -0
- package/dist/toast/style.d.ts.map +1 -0
- package/dist/toast/style.js +63 -0
- package/dist/toast/style.js.map +1 -0
- package/dist/toast/toast.d.ts +12 -0
- package/dist/toast/toast.d.ts.map +1 -0
- package/dist/toast/toast.js +17 -0
- package/dist/toast/toast.js.map +1 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +38 -0
- package/dist/utils.js.map +1 -0
- package/package.json +93 -4
- package/src/component/card/index.tsx +123 -0
- package/src/component/card/style.ts +69 -0
- package/src/component/card-divider/index.tsx +74 -0
- package/src/component/card-divider/style.ts +48 -0
- package/src/component/card-row/index.tsx +32 -0
- package/src/component/card-row/style.ts +13 -0
- package/src/component/collapsible-section/index.tsx +58 -0
- package/src/component/collapsible-section/style.ts +36 -0
- package/src/component/empty-state/index.tsx +35 -0
- package/src/component/empty-state/style.ts +30 -0
- package/src/component/index.ts +15 -0
- package/src/component/meta-line/index.tsx +42 -0
- package/src/component/meta-line/style.ts +36 -0
- package/src/component/metadata/index.tsx +15 -0
- package/src/component/metadata/style.ts +20 -0
- package/src/component/metadata-list/index.tsx +15 -0
- package/src/component/metadata-list/style.ts +10 -0
- package/src/component/nav-desktop/index.tsx +43 -0
- package/src/component/nav-desktop/style.ts +94 -0
- package/src/component/nav-mobile/index.tsx +358 -0
- package/src/component/nav-mobile/style.ts +354 -0
- package/src/component/nav-types.ts +13 -0
- package/src/component/page/index.tsx +87 -0
- package/src/component/page/style.ts +133 -0
- package/src/component/progress-indicator/index.tsx +58 -0
- package/src/component/progress-indicator/style.ts +24 -0
- package/src/component/tag/index.tsx +38 -0
- package/src/component/tag/style.ts +28 -0
- package/src/component/theme-setting/index.tsx +24 -0
- package/src/component/top-fade/index.tsx +8 -0
- package/src/component/top-fade/style.ts +58 -0
- package/src/control/action-menu-list/index.tsx +75 -0
- package/src/control/action-menu-list/style.ts +51 -0
- package/src/control/action-menu-list/use-dismiss.ts +29 -0
- package/src/control/back-button/index.tsx +44 -0
- package/src/control/back-button/style.ts +26 -0
- package/src/control/button/index.tsx +148 -0
- package/src/control/button/style.ts +389 -0
- package/src/control/chips-input/index.tsx +168 -0
- package/src/control/chips-input/style.ts +158 -0
- package/src/control/confirm-modal/index.tsx +79 -0
- package/src/control/confirm-modal/style.ts +33 -0
- package/src/control/date-time-input/index.tsx +95 -0
- package/src/control/date-time-input/iso-date.ts +61 -0
- package/src/control/date-time-input/style.ts +72 -0
- package/src/control/field-list/index.tsx +78 -0
- package/src/control/field-list/style.ts +43 -0
- package/src/control/index.ts +23 -0
- package/src/control/number-input/index.tsx +75 -0
- package/src/control/number-input/style.ts +50 -0
- package/src/control/page-actions-bar/index.tsx +68 -0
- package/src/control/page-actions-bar/style.ts +63 -0
- package/src/control/page-actions-menu/index.tsx +49 -0
- package/src/control/page-actions-menu/style.ts +33 -0
- package/src/control/page-footer-actions/index.tsx +50 -0
- package/src/control/page-footer-actions/style.ts +12 -0
- package/src/control/popover/index.tsx +102 -0
- package/src/control/popover/style.ts +8 -0
- package/src/control/segmented-control/index.tsx +193 -0
- package/src/control/segmented-control/style.ts +150 -0
- package/src/control/select/index.tsx +326 -0
- package/src/control/select/style.ts +192 -0
- package/src/control/switch/index.tsx +189 -0
- package/src/control/switch/style.ts +172 -0
- package/src/control/text-area/index.tsx +106 -0
- package/src/control/text-area/style.ts +85 -0
- package/src/control/text-input/index.tsx +124 -0
- package/src/control/text-input/style.ts +80 -0
- package/src/control/use-modal-dialog/index.ts +75 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/is-standalone.ts +11 -0
- package/src/hooks/use-minimize-on-scroll.ts +137 -0
- package/src/hooks/use-pull-to-refresh.ts +133 -0
- package/src/icon/adjustments-horizontal.tsx +48 -0
- package/src/icon/alert-octagon.tsx +31 -0
- package/src/icon/book.tsx +42 -0
- package/src/icon/books.tsx +46 -0
- package/src/icon/check.tsx +31 -0
- package/src/icon/chevron-circle.tsx +40 -0
- package/src/icon/chevron.tsx +39 -0
- package/src/icon/circle-x.tsx +30 -0
- package/src/icon/clock.tsx +41 -0
- package/src/icon/device.tsx +41 -0
- package/src/icon/emoji.tsx +70 -0
- package/src/icon/hand-love-you.tsx +5 -0
- package/src/icon/hand-ok.tsx +5 -0
- package/src/icon/hand-peace.tsx +7 -0
- package/src/icon/hands-clap.tsx +5 -0
- package/src/icon/home.tsx +42 -0
- package/src/icon/index.ts +31 -0
- package/src/icon/info-circle.tsx +30 -0
- package/src/icon/key.tsx +38 -0
- package/src/icon/list-check.tsx +44 -0
- package/src/icon/more.tsx +41 -0
- package/src/icon/props.ts +29 -0
- package/src/icon/row-remove.tsx +41 -0
- package/src/icon/search.tsx +41 -0
- package/src/icon/settings.tsx +41 -0
- package/src/icon/spinner.tsx +36 -0
- package/src/icon/thumb-down.tsx +5 -0
- package/src/icon/upload.tsx +42 -0
- package/src/icon/user.tsx +41 -0
- package/src/icon/users.tsx +43 -0
- package/src/icon/x.tsx +41 -0
- package/src/index.ts +12 -0
- package/src/theme/context.ts +19 -0
- package/src/theme/global-styles.ts +71 -0
- package/src/theme/index.ts +11 -0
- package/src/theme/provider.tsx +74 -0
- package/src/theme/theme.ts +672 -0
- package/src/theme/use-theme-setting.ts +10 -0
- package/src/theme/use-theme.tsx +7 -0
- package/src/toast/context.ts +9 -0
- package/src/toast/hook/index.ts +1 -0
- package/src/toast/hook/use-toast.ts +8 -0
- package/src/toast/index.ts +2 -0
- package/src/toast/provider.tsx +90 -0
- package/src/toast/reducer.ts +41 -0
- package/src/toast/style.ts +63 -0
- package/src/toast/toast.tsx +51 -0
- package/src/utils.ts +47 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Drives a native `<dialog>` from an `isOpen` flag and wires up ESC-to-dismiss.
|
|
4
|
+
*
|
|
5
|
+
* The dialog stays fully controlled: pressing Escape fires the `cancel` event,
|
|
6
|
+
* which we intercept — calling `preventDefault()` so the browser never closes
|
|
7
|
+
* the dialog behind React's back — and route through `onDismiss` so the
|
|
8
|
+
* `isOpen` prop remains the single source of truth.
|
|
9
|
+
*
|
|
10
|
+
* When `canDismiss` is false the Escape press is swallowed, so a modal whose
|
|
11
|
+
* only exit is gated (a countdown, an in-flight request) can't be escaped —
|
|
12
|
+
* matching a disabled confirm/done button.
|
|
13
|
+
*
|
|
14
|
+
* Backdrop clicks are handled here too — a modal `<dialog>` shown via
|
|
15
|
+
* `showModal()` never light-dismisses on its own. A click only counts as a
|
|
16
|
+
* backdrop click when the press AND the release both landed on the `<dialog>`
|
|
17
|
+
* element itself (the backdrop is the dialog's own box; its content sits in a
|
|
18
|
+
* child). The browser fires `click` on the common ancestor of the mousedown
|
|
19
|
+
* and mouseup targets, so a text selection dragged out of an input and
|
|
20
|
+
* released over the backdrop also clicks the `<dialog>` — and must not close
|
|
21
|
+
* it. Modals keep their own `onClick` only to stop the click bubbling to a
|
|
22
|
+
* clickable ancestor; they no longer decide dismissal.
|
|
23
|
+
*/
|
|
24
|
+
export function useModalDialog(isOpen, onDismiss, canDismiss = true) {
|
|
25
|
+
const ref = useRef(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
const element = ref.current;
|
|
28
|
+
if (!element) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (isOpen) {
|
|
32
|
+
element.showModal();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
element.close();
|
|
36
|
+
}
|
|
37
|
+
}, [isOpen]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const element = ref.current;
|
|
40
|
+
if (!element) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const handleCancel = (event) => {
|
|
44
|
+
// Keep React in control of open/closed; never let the UA close it for us.
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
if (canDismiss) {
|
|
47
|
+
onDismiss();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
let pressedOnBackdrop = false;
|
|
51
|
+
const handleMouseDown = (event) => {
|
|
52
|
+
pressedOnBackdrop = event.target === element;
|
|
53
|
+
};
|
|
54
|
+
const handleClick = (event) => {
|
|
55
|
+
const releasedOnBackdrop = event.target === element;
|
|
56
|
+
const isBackdropClick = pressedOnBackdrop && releasedOnBackdrop;
|
|
57
|
+
pressedOnBackdrop = false;
|
|
58
|
+
if (isBackdropClick && canDismiss) {
|
|
59
|
+
onDismiss();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
element.addEventListener('cancel', handleCancel);
|
|
63
|
+
element.addEventListener('mousedown', handleMouseDown);
|
|
64
|
+
element.addEventListener('click', handleClick);
|
|
65
|
+
return () => {
|
|
66
|
+
element.removeEventListener('cancel', handleCancel);
|
|
67
|
+
element.removeEventListener('mousedown', handleMouseDown);
|
|
68
|
+
element.removeEventListener('click', handleClick);
|
|
69
|
+
};
|
|
70
|
+
}, [onDismiss, canDismiss]);
|
|
71
|
+
return ref;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/control/use-modal-dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,SAAqB,EAAE,UAAU,GAAG,IAAI;IACtF,MAAM,GAAG,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QACD,IAAI,MAAM,EAAE,CAA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AAC,WAAW,EAAE,eAAe,CAAC,CAAC;YAC1D,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACpD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAE5B,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * Drives a native `<dialog>` from an `isOpen` flag and wires up ESC-to-dismiss.\n *\n * The dialog stays fully controlled: pressing Escape fires the `cancel` event,\n * which we intercept — calling `preventDefault()` so the browser never closes\n * the dialog behind React's back — and route through `onDismiss` so the\n * `isOpen` prop remains the single source of truth.\n *\n * When `canDismiss` is false the Escape press is swallowed, so a modal whose\n * only exit is gated (a countdown, an in-flight request) can't be escaped —\n * matching a disabled confirm/done button.\n *\n * Backdrop clicks are handled here too — a modal `<dialog>` shown via\n * `showModal()` never light-dismisses on its own. A click only counts as a\n * backdrop click when the press AND the release both landed on the `<dialog>`\n * element itself (the backdrop is the dialog's own box; its content sits in a\n * child). The browser fires `click` on the common ancestor of the mousedown\n * and mouseup targets, so a text selection dragged out of an input and\n * released over the backdrop also clicks the `<dialog>` — and must not close\n * it. Modals keep their own `onClick` only to stop the click bubbling to a\n * clickable ancestor; they no longer decide dismissal.\n */\nexport function useModalDialog(isOpen: boolean, onDismiss: () => void, canDismiss = true) {\n const ref = useRef<HTMLDialogElement>(null);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) {\n return;\n }\n if (isOpen) {\n element.showModal();\n } else {\n element.close();\n }\n }, [isOpen]);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) {\n return;\n }\n const handleCancel = (event: Event) => {\n // Keep React in control of open/closed; never let the UA close it for us.\n event.preventDefault();\n if (canDismiss) {\n onDismiss();\n }\n };\n let pressedOnBackdrop = false;\n const handleMouseDown = (event: MouseEvent) => {\n pressedOnBackdrop = event.target === element;\n };\n const handleClick = (event: MouseEvent) => {\n const releasedOnBackdrop = event.target === element;\n const isBackdropClick = pressedOnBackdrop && releasedOnBackdrop;\n pressedOnBackdrop = false;\n if (isBackdropClick && canDismiss) {\n onDismiss();\n }\n };\n element.addEventListener('cancel', handleCancel);\n element.addEventListener('mousedown', handleMouseDown);\n element.addEventListener('click', handleClick);\n return () => {\n element.removeEventListener('cancel', handleCancel);\n element.removeEventListener('mousedown', handleMouseDown);\n element.removeEventListener('click', handleClick);\n };\n }, [onDismiss, canDismiss]);\n\n return ref;\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { isStandalone } from './is-standalone.js';
|
|
2
|
+
export { EXPAND_AFTER, MINIMIZE_SPEED, useMinimizeOnScroll } from './use-minimize-on-scroll.js';
|
|
3
|
+
export type { MinimizeOnScroll } from './use-minimize-on-scroll.js';
|
|
4
|
+
export { PULL_THRESHOLD, usePullToRefresh } from './use-pull-to-refresh.js';
|
|
5
|
+
export type { PullPhase, PullState } from './use-pull-to-refresh.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAChG,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEhG,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export { isStandalone } from './is-standalone.js';\nexport { EXPAND_AFTER, MINIMIZE_SPEED, useMinimizeOnScroll } from './use-minimize-on-scroll.js';\nexport type { MinimizeOnScroll } from './use-minimize-on-scroll.js';\nexport { PULL_THRESHOLD, usePullToRefresh } from './use-pull-to-refresh.js';\nexport type { PullPhase, PullState } from './use-pull-to-refresh.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-standalone.d.ts","sourceRoot":"","sources":["../../src/hooks/is-standalone.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,IAAI,OAAO,CAKtC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Whether the app is running as an installed standalone PWA (added to the home screen)
|
|
2
|
+
// rather than in a browser tab. `navigator.standalone` is the reliable iOS Safari
|
|
3
|
+
// signal — the display-mode standalone check is unreliable on iOS — while the
|
|
4
|
+
// display-mode media query covers Android/desktop installs. Standalone status can't
|
|
5
|
+
// change during a session, so this is safe to read once at render time.
|
|
6
|
+
export function isStandalone() {
|
|
7
|
+
return (window.matchMedia('(display-mode: standalone)').matches ||
|
|
8
|
+
navigator.standalone === true);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=is-standalone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-standalone.js","sourceRoot":"","sources":["../../src/hooks/is-standalone.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,kFAAkF;AAClF,8EAA8E;AAC9E,oFAAoF;AACpF,wEAAwE;AACxE,MAAM,UAAU,YAAY;IAC1B,OAAO,CACL,MAAM,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC,OAAO;QACtD,SAAkD,CAAC,UAAU,KAAK,IAAI,CACxE,CAAC;AACJ,CAAC","sourcesContent":["// Whether the app is running as an installed standalone PWA (added to the home screen)\n// rather than in a browser tab. `navigator.standalone` is the reliable iOS Safari\n// signal — the display-mode standalone check is unreliable on iOS — while the\n// display-mode media query covers Android/desktop installs. Standalone status can't\n// change during a session, so this is safe to read once at render time.\nexport function isStandalone(): boolean {\n return (\n window.matchMedia('(display-mode: standalone)').matches ||\n (navigator as Navigator & { standalone?: boolean }).standalone === true\n );\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How FAST the page has to move down, in px per ms, before the bar minimizes.
|
|
3
|
+
* Speed rather than distance: a reader creeping down a long page line by line
|
|
4
|
+
* never loses the bar however far they go, and a flick to get on with it
|
|
5
|
+
* loses it at once. Measured between consecutive scroll events, so it is the
|
|
6
|
+
* speed of the frame that crosses the line, not an average over the gesture.
|
|
7
|
+
* Reading pace is a few tenths of a px per ms; a flick is several.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MINIMIZE_SPEED = 0.8;
|
|
10
|
+
/**
|
|
11
|
+
* How far the page has to travel UP, from the highest point reached since the
|
|
12
|
+
* bar minimized, before it expands again. Distance, not speed, and a short
|
|
13
|
+
* one: getting the navigation back should take less than losing it did.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EXPAND_AFTER = 12;
|
|
16
|
+
export interface MinimizeOnScroll {
|
|
17
|
+
/** Whether the bar is currently minimized. */
|
|
18
|
+
minimized: boolean;
|
|
19
|
+
/** Expand the bar now (a tap on the minimized bar), as if the page had scrolled up. */
|
|
20
|
+
expand: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Minimize-on-scroll for bottom chrome, the way the iOS tab bar behaves:
|
|
24
|
+
* scrolling down minimizes it, scrolling up — or reaching the top — brings it
|
|
25
|
+
* back.
|
|
26
|
+
*
|
|
27
|
+
* The state is a single boolean toggled from the scroll listener, never a
|
|
28
|
+
* per-frame position. On iOS the scroller runs on the compositor and a
|
|
29
|
+
* main-thread write that chases it lands a frame late (which is why the page's
|
|
30
|
+
* floating controls moved to `position: sticky`); a discrete toggle that CSS
|
|
31
|
+
* then animates has nothing to chase.
|
|
32
|
+
*
|
|
33
|
+
* Only scrolls the USER drives count. `router/scroll-restoration` jumps the
|
|
34
|
+
* page to a remembered offset on the way back into a page, and re-applies it
|
|
35
|
+
* for several frames while the page grows — every one a jump down. The
|
|
36
|
+
* listener therefore only infers direction once a touch or a wheel has been
|
|
37
|
+
* seen since `resetKey` last changed; until then it tracks the position and
|
|
38
|
+
* says nothing. A change of `resetKey` (the route) also expands the bar: a new
|
|
39
|
+
* page starts with its navigation showing.
|
|
40
|
+
*
|
|
41
|
+
* The way back up has hysteresis — distance from the highest point reached
|
|
42
|
+
* since minimizing, not frame to frame — so the bar does not flap while a
|
|
43
|
+
* finger hovers or a fling settles.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useMinimizeOnScroll({ resetKey }: {
|
|
46
|
+
resetKey: string;
|
|
47
|
+
}): MinimizeOnScroll;
|
|
48
|
+
//# sourceMappingURL=use-minimize-on-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-minimize-on-scroll.d.ts","sourceRoot":"","sources":["../../src/hooks/use-minimize-on-scroll.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;GAIG;AACH,eAAO,MAAM,YAAY,KAAK,CAAC;AAW/B,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,SAAS,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CA8ExF"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* How FAST the page has to move down, in px per ms, before the bar minimizes.
|
|
4
|
+
* Speed rather than distance: a reader creeping down a long page line by line
|
|
5
|
+
* never loses the bar however far they go, and a flick to get on with it
|
|
6
|
+
* loses it at once. Measured between consecutive scroll events, so it is the
|
|
7
|
+
* speed of the frame that crosses the line, not an average over the gesture.
|
|
8
|
+
* Reading pace is a few tenths of a px per ms; a flick is several.
|
|
9
|
+
*/
|
|
10
|
+
export const MINIMIZE_SPEED = 0.8;
|
|
11
|
+
/**
|
|
12
|
+
* How far the page has to travel UP, from the highest point reached since the
|
|
13
|
+
* bar minimized, before it expands again. Distance, not speed, and a short
|
|
14
|
+
* one: getting the navigation back should take less than losing it did.
|
|
15
|
+
*/
|
|
16
|
+
export const EXPAND_AFTER = 12;
|
|
17
|
+
// The page's position with the rubber-band taken out. iOS reports a pull past
|
|
18
|
+
// the top as a negative `scrollY` and a bounce past the bottom as one beyond
|
|
19
|
+
// the maximum; left in, the snap-back from a bottom bounce would read as a
|
|
20
|
+
// scroll UP and expand the bar at the end of every fling.
|
|
21
|
+
const position = () => {
|
|
22
|
+
const max = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
|
|
23
|
+
return Math.min(Math.max(0, window.scrollY), max);
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Minimize-on-scroll for bottom chrome, the way the iOS tab bar behaves:
|
|
27
|
+
* scrolling down minimizes it, scrolling up — or reaching the top — brings it
|
|
28
|
+
* back.
|
|
29
|
+
*
|
|
30
|
+
* The state is a single boolean toggled from the scroll listener, never a
|
|
31
|
+
* per-frame position. On iOS the scroller runs on the compositor and a
|
|
32
|
+
* main-thread write that chases it lands a frame late (which is why the page's
|
|
33
|
+
* floating controls moved to `position: sticky`); a discrete toggle that CSS
|
|
34
|
+
* then animates has nothing to chase.
|
|
35
|
+
*
|
|
36
|
+
* Only scrolls the USER drives count. `router/scroll-restoration` jumps the
|
|
37
|
+
* page to a remembered offset on the way back into a page, and re-applies it
|
|
38
|
+
* for several frames while the page grows — every one a jump down. The
|
|
39
|
+
* listener therefore only infers direction once a touch or a wheel has been
|
|
40
|
+
* seen since `resetKey` last changed; until then it tracks the position and
|
|
41
|
+
* says nothing. A change of `resetKey` (the route) also expands the bar: a new
|
|
42
|
+
* page starts with its navigation showing.
|
|
43
|
+
*
|
|
44
|
+
* The way back up has hysteresis — distance from the highest point reached
|
|
45
|
+
* since minimizing, not frame to frame — so the bar does not flap while a
|
|
46
|
+
* finger hovers or a fling settles.
|
|
47
|
+
*/
|
|
48
|
+
export function useMinimizeOnScroll({ resetKey }) {
|
|
49
|
+
const [minimized, setMinimized] = useState(false);
|
|
50
|
+
// Mirrors the state for the listener, which must not re-bind on every toggle.
|
|
51
|
+
const minimizedRef = useRef(false);
|
|
52
|
+
// While minimized: the highest position reached, which `EXPAND_AFTER` is
|
|
53
|
+
// measured back from.
|
|
54
|
+
const peakRef = useRef(0);
|
|
55
|
+
// The previous scroll sample, for the speed; `null` until one is taken AFTER
|
|
56
|
+
// the user took over, so the first user-driven frame is never measured
|
|
57
|
+
// against a programmatic jump that happened to land just before it.
|
|
58
|
+
const lastRef = useRef(null);
|
|
59
|
+
const armedRef = useRef(false);
|
|
60
|
+
const set = useCallback((next) => {
|
|
61
|
+
if (minimizedRef.current === next)
|
|
62
|
+
return;
|
|
63
|
+
minimizedRef.current = next;
|
|
64
|
+
setMinimized(next);
|
|
65
|
+
}, []);
|
|
66
|
+
const expand = useCallback(() => set(false), [set]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
set(false);
|
|
69
|
+
armedRef.current = false;
|
|
70
|
+
lastRef.current = null;
|
|
71
|
+
}, [resetKey, set]);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
// A new touch is a new gesture: the speed between where the last one left
|
|
74
|
+
// the page and this one's first frame means nothing, so the sample goes.
|
|
75
|
+
// A wheel tick does NOT clear it — ticks arrive several per scroll, and
|
|
76
|
+
// clearing on each would leave a mouse user with no two samples to speed.
|
|
77
|
+
const armTouch = () => {
|
|
78
|
+
armedRef.current = true;
|
|
79
|
+
lastRef.current = null;
|
|
80
|
+
};
|
|
81
|
+
const armWheel = () => {
|
|
82
|
+
armedRef.current = true;
|
|
83
|
+
};
|
|
84
|
+
const onScroll = () => {
|
|
85
|
+
if (!armedRef.current)
|
|
86
|
+
return;
|
|
87
|
+
const y = position();
|
|
88
|
+
const at = performance.now();
|
|
89
|
+
const last = lastRef.current;
|
|
90
|
+
lastRef.current = { y, at };
|
|
91
|
+
if (y <= 0) {
|
|
92
|
+
set(false);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (minimizedRef.current) {
|
|
96
|
+
if (y > peakRef.current) {
|
|
97
|
+
peakRef.current = y;
|
|
98
|
+
}
|
|
99
|
+
else if (peakRef.current - y >= EXPAND_AFTER) {
|
|
100
|
+
set(false);
|
|
101
|
+
}
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
// Two samples in the same instant have no speed between them.
|
|
105
|
+
if (last === null || at <= last.at)
|
|
106
|
+
return;
|
|
107
|
+
if ((y - last.y) / (at - last.at) >= MINIMIZE_SPEED) {
|
|
108
|
+
set(true);
|
|
109
|
+
peakRef.current = y;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
document.addEventListener('touchstart', armTouch, { passive: true });
|
|
113
|
+
window.addEventListener('wheel', armWheel, { passive: true });
|
|
114
|
+
window.addEventListener('scroll', onScroll, { passive: true });
|
|
115
|
+
return () => {
|
|
116
|
+
document.removeEventListener('touchstart', armTouch);
|
|
117
|
+
window.removeEventListener('wheel', armWheel);
|
|
118
|
+
window.removeEventListener('scroll', onScroll);
|
|
119
|
+
};
|
|
120
|
+
}, [set]);
|
|
121
|
+
return { minimized, expand };
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=use-minimize-on-scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-minimize-on-scroll.js","sour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Callback, useEffect, useRef, useState } from 'react';\n\n/**\n * How FAST the page has to move down, in px per ms, before the bar minimizes.\n * Speed rather than distance: a reader creeping down a long page line by line\n * never loses the bar however far they go, and a flick to get on with it\n * loses it at once. Measured between consecutive scroll events, so it is the\n * speed of the frame that crosses the line, not an average over the gesture.\n * Reading pace is a few tenths of a px per ms; a flick is several.\n */\nexport const MINIMIZE_SPEED = 0.8;\n\n/**\n * How far the page has to travel UP, from the highest point reached since the\n * bar minimized, before it expands again. Distance, not speed, and a short\n * one: getting the navigation back should take less than losing it did.\n */\nexport const EXPAND_AFTER = 12;\n\n// The page's position with the rubber-band taken out. iOS reports a pull past\n// the top as a negative `scrollY` and a bounce past the bottom as one beyond\n// the maximum; left in, the snap-back from a bottom bounce would read as a\n// scroll UP and expand the bar at the end of every fling.\nconst position = () => {\n const max = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);\n return Math.min(Math.max(0, window.scrollY), max);\n};\n\nexport interface MinimizeOnScroll {\n /** Whether the bar is currently minimized. */\n minimized: boolean;\n /** Expand the bar now (a tap on the minimized bar), as if the page had scrolled up. */\n expand: () => void;\n}\n\n/**\n * Minimize-on-scroll for bottom chrome, the way the iOS tab bar behaves:\n * scrolling down minimizes it, scrolling up — or reaching the top — brings it\n * back.\n *\n * The state is a single boolean toggled from the scroll listener, never a\n * per-frame position. On iOS the scroller runs on the compositor and a\n * main-thread write that chases it lands a frame late (which is why the page's\n * floating controls moved to `position: sticky`); a discrete toggle that CSS\n * then animates has nothing to chase.\n *\n * Only scrolls the USER drives count. `router/scroll-restoration` jumps the\n * page to a remembered offset on the way back into a page, and re-applies it\n * for several frames while the page grows — every one a jump down. The\n * listener therefore only infers direction once a touch or a wheel has been\n * seen since `resetKey` last changed; until then it tracks the position and\n * says nothing. A change of `resetKey` (the route) also expands the bar: a new\n * page starts with its navigation showing.\n *\n * The way back up has hysteresis — distance from the highest point reached\n * since minimizing, not frame to frame — so the bar does not flap while a\n * finger hovers or a fling settles.\n */\nexport function useMinimizeOnScroll({ resetKey }: { resetKey: string }): MinimizeOnScroll {\n const [minimized, setMinimized] = useState(false);\n // Mirrors the state for the listener, which must not re-bind on every toggle.\n const minimizedRef = useRef(false);\n // While minimized: the highest position reached, which `EXPAND_AFTER` is\n // measured back from.\n const peakRef = useRef(0);\n // The previous scroll sample, for the speed; `null` until one is taken AFTER\n // the user took over, so the first user-driven frame is never measured\n // against a programmatic jump that happened to land just before it.\n const lastRef = useRef<{ y: number; at: number } | null>(null);\n const armedRef = useRef(false);\n\n const set = useCallback((next: boolean) => {\n if (minimizedRef.current === next) return;\n minimizedRef.current = next;\n setMinimized(next);\n }, []);\n\n const expand = useCallback(() => set(false), [set]);\n\n useEffect(() => {\n set(false);\n armedRef.current = false;\n lastRef.current = null;\n }, [resetKey, set]);\n\n useEffect(() => {\n // A new touch is a new gesture: the speed between where the last one left\n // the page and this one's first frame means nothing, so the sample goes.\n // A wheel tick does NOT clear it — ticks arrive several per scroll, and\n // clearing on each would leave a mouse user with no two samples to speed.\n const armTouch = () => {\n armedRef.current = true;\n lastRef.current = null;\n };\n const armWheel = () => {\n armedRef.current = true;\n };\n\n const onScroll = () => {\n if (!armedRef.current) return;\n const y = position();\n const at = performance.now();\n const last = lastRef.current;\n lastRef.current = { y, at };\n\n if (y <= 0) {\n set(false);\n return;\n }\n if (minimizedRef.current) {\n if (y > peakRef.current) {\n peakRef.current = y;\n } else if (peakRef.current - y >= EXPAND_AFTER) {\n set(false);\n }\n return;\n }\n // Two samples in the same instant have no speed between them.\n if (last === null || at <= last.at) return;\n if ((y - last.y) / (at - last.at) >= MINIMIZE_SPEED) {\n set(true);\n peakRef.current = y;\n }\n };\n\n document.addEventListener('touchstart', armTouch, { passive: true });\n window.addEventListener('wheel', armWheel, { passive: true });\n window.addEventListener('scroll', onScroll, { passive: true });\n return () => {\n document.removeEventListener('touchstart', armTouch);\n window.removeEventListener('wheel', armWheel);\n window.removeEventListener('scroll', onScroll);\n };\n }, [set]);\n\n return { minimized, expand };\n}\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type PullPhase = 'idle' | 'pulling' | 'armed' | 'refreshing';
|
|
2
|
+
export type PullState = {
|
|
3
|
+
phase: PullPhase;
|
|
4
|
+
offset: number;
|
|
5
|
+
};
|
|
6
|
+
/** How far past the top (in px of overscroll) the page has to be pulled before a release refreshes. */
|
|
7
|
+
export declare const PULL_THRESHOLD = 70;
|
|
8
|
+
/**
|
|
9
|
+
* A pull-down-to-refresh gesture for the installed (standalone) app, where the
|
|
10
|
+
* browser's own pull-to-refresh is not available.
|
|
11
|
+
*
|
|
12
|
+
* Rides the scroller's own overscroll rather than running a gesture of its own:
|
|
13
|
+
* while a finger is down, the page's rubber-band past the top IS the pull, and
|
|
14
|
+
* the hook reports how far it has gone so a caller can draw an indicator. Past
|
|
15
|
+
* `PULL_THRESHOLD` the pull is armed; lifting the finger then calls `onRefresh`
|
|
16
|
+
* and holds `refreshing` (with the offset pinned at the threshold) until the
|
|
17
|
+
* returned promise settles, success or not.
|
|
18
|
+
*
|
|
19
|
+
* Nothing here cancels a touch, so there is no gesture to claim and no way to
|
|
20
|
+
* lose one. An earlier version tracked touches itself and default-prevented
|
|
21
|
+
* the moves to keep the page from rubber-banding under its indicator — but the
|
|
22
|
+
* scroller decides on a touch's FIRST move whether it owns the gesture, and
|
|
23
|
+
* after that nothing can take it back. A pull that began as a scroll and
|
|
24
|
+
* carried on past the top, or that landed while the previous scroll was still
|
|
25
|
+
* settling, was the scroller's, and the same motion did two different things
|
|
26
|
+
* depending on what the finger had done a moment earlier. Letting the page
|
|
27
|
+
* bounce and measuring the bounce makes every pull past the top the same pull.
|
|
28
|
+
*
|
|
29
|
+
* Deliberately left alone: touches that start inside an open `<dialog>` (modals
|
|
30
|
+
* scroll on their own), overscroll with no finger on the screen (a fling that
|
|
31
|
+
* bounces off the top is not a request), and anything while a refresh is
|
|
32
|
+
* already in flight.
|
|
33
|
+
*/
|
|
34
|
+
export declare function usePullToRefresh(onRefresh: () => Promise<unknown>, { enabled }?: {
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
}): PullState;
|
|
37
|
+
//# sourceMappingURL=use-pull-to-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pull-to-refresh.d.ts","sourceRoot":"","sources":["../../src/hooks/use-pull-to-refresh.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,uGAAuG;AACvG,eAAO,MAAM,cAAc,KAAK,CAAC;AAajC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EACjC,EAAE,OAAc,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7C,SAAS,CAmFX"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
/** How far past the top (in px of overscroll) the page has to be pulled before a release refreshes. */
|
|
3
|
+
export const PULL_THRESHOLD = 70;
|
|
4
|
+
// The indicator stops following the overscroll here, so a long pull does not
|
|
5
|
+
// drag it down over the page's controls. (Fixed chrome does not ride the
|
|
6
|
+
// rubber-band on iOS, so the indicator is moved by this number, not the page.)
|
|
7
|
+
const MAX_OFFSET = PULL_THRESHOLD * 1.5;
|
|
8
|
+
const IDLE = { phase: 'idle', offset: 0 };
|
|
9
|
+
// iOS reports the rubber-band as a negative scroll position while the page is
|
|
10
|
+
// pulled past its top; anywhere else, and on platforms that clamp, this is 0.
|
|
11
|
+
const overscroll = () => Math.max(0, -window.scrollY);
|
|
12
|
+
/**
|
|
13
|
+
* A pull-down-to-refresh gesture for the installed (standalone) app, where the
|
|
14
|
+
* browser's own pull-to-refresh is not available.
|
|
15
|
+
*
|
|
16
|
+
* Rides the scroller's own overscroll rather than running a gesture of its own:
|
|
17
|
+
* while a finger is down, the page's rubber-band past the top IS the pull, and
|
|
18
|
+
* the hook reports how far it has gone so a caller can draw an indicator. Past
|
|
19
|
+
* `PULL_THRESHOLD` the pull is armed; lifting the finger then calls `onRefresh`
|
|
20
|
+
* and holds `refreshing` (with the offset pinned at the threshold) until the
|
|
21
|
+
* returned promise settles, success or not.
|
|
22
|
+
*
|
|
23
|
+
* Nothing here cancels a touch, so there is no gesture to claim and no way to
|
|
24
|
+
* lose one. An earlier version tracked touches itself and default-prevented
|
|
25
|
+
* the moves to keep the page from rubber-banding under its indicator — but the
|
|
26
|
+
* scroller decides on a touch's FIRST move whether it owns the gesture, and
|
|
27
|
+
* after that nothing can take it back. A pull that began as a scroll and
|
|
28
|
+
* carried on past the top, or that landed while the previous scroll was still
|
|
29
|
+
* settling, was the scroller's, and the same motion did two different things
|
|
30
|
+
* depending on what the finger had done a moment earlier. Letting the page
|
|
31
|
+
* bounce and measuring the bounce makes every pull past the top the same pull.
|
|
32
|
+
*
|
|
33
|
+
* Deliberately left alone: touches that start inside an open `<dialog>` (modals
|
|
34
|
+
* scroll on their own), overscroll with no finger on the screen (a fling that
|
|
35
|
+
* bounces off the top is not a request), and anything while a refresh is
|
|
36
|
+
* already in flight.
|
|
37
|
+
*/
|
|
38
|
+
export function usePullToRefresh(onRefresh, { enabled = true } = {}) {
|
|
39
|
+
const [state, setState] = useState(IDLE);
|
|
40
|
+
// The refresh callback is read through a ref so a caller passing an inline
|
|
41
|
+
// closure does not re-bind the listeners on every render.
|
|
42
|
+
const onRefreshRef = useRef(onRefresh);
|
|
43
|
+
onRefreshRef.current = onRefresh;
|
|
44
|
+
const refreshingRef = useRef(false);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!enabled)
|
|
47
|
+
return;
|
|
48
|
+
let armed = false;
|
|
49
|
+
let published = IDLE;
|
|
50
|
+
const publish = (next) => {
|
|
51
|
+
if (next.phase === published.phase && next.offset === published.offset)
|
|
52
|
+
return;
|
|
53
|
+
published = next;
|
|
54
|
+
setState(next);
|
|
55
|
+
};
|
|
56
|
+
// Read on every move AND every scroll event while the finger is down: the
|
|
57
|
+
// finger keeps moving when the scroller is quiet, and the scroller keeps
|
|
58
|
+
// reporting when the finger pauses.
|
|
59
|
+
const track = () => {
|
|
60
|
+
const offset = Math.min(overscroll(), MAX_OFFSET);
|
|
61
|
+
armed = offset >= PULL_THRESHOLD;
|
|
62
|
+
publish(offset > 0 ? { phase: armed ? 'armed' : 'pulling', offset } : IDLE);
|
|
63
|
+
};
|
|
64
|
+
const onEnd = () => {
|
|
65
|
+
stopTracking();
|
|
66
|
+
if (!armed) {
|
|
67
|
+
publish(IDLE);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
armed = false;
|
|
71
|
+
refreshingRef.current = true;
|
|
72
|
+
publish({ phase: 'refreshing', offset: PULL_THRESHOLD });
|
|
73
|
+
const settle = () => {
|
|
74
|
+
refreshingRef.current = false;
|
|
75
|
+
publish(IDLE);
|
|
76
|
+
};
|
|
77
|
+
let result;
|
|
78
|
+
try {
|
|
79
|
+
result = onRefreshRef.current();
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
settle();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
result.then(settle, settle);
|
|
86
|
+
};
|
|
87
|
+
const onCancel = () => {
|
|
88
|
+
stopTracking();
|
|
89
|
+
publish(IDLE);
|
|
90
|
+
};
|
|
91
|
+
const stopTracking = () => {
|
|
92
|
+
document.removeEventListener('touchmove', track);
|
|
93
|
+
window.removeEventListener('scroll', track);
|
|
94
|
+
document.removeEventListener('touchend', onEnd);
|
|
95
|
+
document.removeEventListener('touchcancel', onCancel);
|
|
96
|
+
};
|
|
97
|
+
const onStart = (event) => {
|
|
98
|
+
if (refreshingRef.current)
|
|
99
|
+
return;
|
|
100
|
+
if (event.target instanceof Element && event.target.closest('dialog[open]'))
|
|
101
|
+
return;
|
|
102
|
+
armed = false;
|
|
103
|
+
document.addEventListener('touchmove', track, { passive: true });
|
|
104
|
+
window.addEventListener('scroll', track, { passive: true });
|
|
105
|
+
document.addEventListener('touchend', onEnd);
|
|
106
|
+
document.addEventListener('touchcancel', onCancel);
|
|
107
|
+
};
|
|
108
|
+
document.addEventListener('touchstart', onStart, { passive: true });
|
|
109
|
+
return () => {
|
|
110
|
+
document.removeEventListener('touchstart', onStart);
|
|
111
|
+
stopTracking();
|
|
112
|
+
};
|
|
113
|
+
}, [enabled]);
|
|
114
|
+
return state;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=use-pull-to-refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pull-to-refresh.js","sourceRoot":"","sources":["../../src/hooks/use-pull-to-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMpD,uGAAuG;AACvG,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,6EAA6E;AAC7E,yEAAyE;AACzE,+EAA+E;AAC/E,MAAM,UAAU,GAAG,cAAc,GAAG,GAAG,CAAC;AAExC,MAAM,IAAI,GAAc,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAErD,8EAA8E;AAC9E,8EAA8E;AAC9E,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAiC,EACjC,EAAE,OAAO,GAAG,IAAI,EAAE,GAA0B,EAAE;IAE9C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAA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jE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5D,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YAC7C,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QACrD,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACpD,YAAY,EAAE,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport type PullPhase = 'idle' | 'pulling' | 'armed' | 'refreshing';\n\nexport type PullState = { phase: PullPhase; offset: number };\n\n/** How far past the top (in px of overscroll) the page has to be pulled before a release refreshes. */\nexport const PULL_THRESHOLD = 70;\n\n// The indicator stops following the overscroll here, so a long pull does not\n// drag it down over the page's controls. (Fixed chrome does not ride the\n// rubber-band on iOS, so the indicator is moved by this number, not the page.)\nconst MAX_OFFSET = PULL_THRESHOLD * 1.5;\n\nconst IDLE: PullState = { phase: 'idle', offset: 0 };\n\n// iOS reports the rubber-band as a negative scroll position while the page is\n// pulled past its top; anywhere else, and on platforms that clamp, this is 0.\nconst overscroll = () => Math.max(0, -window.scrollY);\n\n/**\n * A pull-down-to-refresh gesture for the installed (standalone) app, where the\n * browser's own pull-to-refresh is not available.\n *\n * Rides the scroller's own overscroll rather than running a gesture of its own:\n * while a finger is down, the page's rubber-band past the top IS the pull, and\n * the hook reports how far it has gone so a caller can draw an indicator. Past\n * `PULL_THRESHOLD` the pull is armed; lifting the finger then calls `onRefresh`\n * and holds `refreshing` (with the offset pinned at the threshold) until the\n * returned promise settles, success or not.\n *\n * Nothing here cancels a touch, so there is no gesture to claim and no way to\n * lose one. An earlier version tracked touches itself and default-prevented\n * the moves to keep the page from rubber-banding under its indicator — but the\n * scroller decides on a touch's FIRST move whether it owns the gesture, and\n * after that nothing can take it back. A pull that began as a scroll and\n * carried on past the top, or that landed while the previous scroll was still\n * settling, was the scroller's, and the same motion did two different things\n * depending on what the finger had done a moment earlier. Letting the page\n * bounce and measuring the bounce makes every pull past the top the same pull.\n *\n * Deliberately left alone: touches that start inside an open `<dialog>` (modals\n * scroll on their own), overscroll with no finger on the screen (a fling that\n * bounces off the top is not a request), and anything while a refresh is\n * already in flight.\n */\nexport function usePullToRefresh(\n onRefresh: () => Promise<unknown>,\n { enabled = true }: { enabled?: boolean } = {}\n): PullState {\n const [state, setState] = useState<PullState>(IDLE);\n // The refresh callback is read through a ref so a caller passing an inline\n // closure does not re-bind the listeners on every render.\n const onRefreshRef = useRef(onRefresh);\n onRefreshRef.current = onRefresh;\n const refreshingRef = useRef(false);\n\n useEffect(() => {\n if (!enabled) return;\n\n let armed = false;\n let published: PullState = IDLE;\n\n const publish = (next: PullState) => {\n if (next.phase === published.phase && next.offset === published.offset) return;\n published = next;\n setState(next);\n };\n\n // Read on every move AND every scroll event while the finger is down: the\n // finger keeps moving when the scroller is quiet, and the scroller keeps\n // reporting when the finger pauses.\n const track = () => {\n const offset = Math.min(overscroll(), MAX_OFFSET);\n armed = offset >= PULL_THRESHOLD;\n publish(offset > 0 ? { phase: armed ? 'armed' : 'pulling', offset } : IDLE);\n };\n\n const onEnd = () => {\n stopTracking();\n if (!armed) {\n publish(IDLE);\n return;\n }\n armed = false;\n refreshingRef.current = true;\n publish({ phase: 'refreshing', offset: PULL_THRESHOLD });\n const settle = () => {\n refreshingRef.current = false;\n publish(IDLE);\n };\n let result: Promise<unknown>;\n try {\n result = onRefreshRef.current();\n } catch {\n settle();\n return;\n }\n result.then(settle, settle);\n };\n\n const onCancel = () => {\n stopTracking();\n publish(IDLE);\n };\n\n const stopTracking = () => {\n document.removeEventListener('touchmove', track);\n window.removeEventListener('scroll', track);\n document.removeEventListener('touchend', onEnd);\n document.removeEventListener('touchcancel', onCancel);\n };\n\n const onStart = (event: TouchEvent) => {\n if (refreshingRef.current) return;\n if (event.target instanceof Element && event.target.closest('dialog[open]')) return;\n\n armed = false;\n document.addEventListener('touchmove', track, { passive: true });\n window.addEventListener('scroll', track, { passive: true });\n document.addEventListener('touchend', onEnd);\n document.addEventListener('touchcancel', onCancel);\n };\n\n document.addEventListener('touchstart', onStart, { passive: true });\n return () => {\n document.removeEventListener('touchstart', onStart);\n stopTracking();\n };\n }, [enabled]);\n\n return state;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustments-horizontal.d.ts","sourceRoot":"","sources":["../../src/icon/adjustments-horizontal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,yBAAyB,UAAW,SAAS,gCA4CzD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defaultStrokeIconProps } from './props.js';
|
|
3
|
+
// https://tabler.io/icons?icon=adjustments-horizontal
|
|
4
|
+
export const AdjustmentsHorizontalIcon = (props) => {
|
|
5
|
+
const { 'aria-hidden': ariaHidden, 'aria-label': ariaLabel, className, fill, height, role, stroke, strokeWidth, width, } = {
|
|
6
|
+
...defaultStrokeIconProps,
|
|
7
|
+
...props,
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("svg", { "aria-hidden": ariaHidden, "aria-label": ariaLabel, className: className, fill: fill, height: height, role: role, stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, viewBox: "0 0 24 24", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }), _jsx("path", { d: "M4 6l8 0" }), _jsx("path", { d: "M16 6l4 0" }), _jsx("path", { d: "M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }), _jsx("path", { d: "M4 12l2 0" }), _jsx("path", { d: "M10 12l10 0" }), _jsx("path", { d: "M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }), _jsx("path", { d: "M4 18l11 0" }), _jsx("path", { d: "M19 18l1 0" })] }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=adjustments-horizontal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustments-horizontal.js","sourceRoot":"","sources":["../../src/icon/adjustments-horizontal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE/D,sDAAsD;AACtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAgB,EAAE,EAAE;IAC5D,MAAM,EACJ,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,KAAK,GACN,GAAG;QACF,GAAG,sBAAsB;QACzB,GAAG,KAAK;KACT,CAAC;IAEF,OAAO,CACL,8BACe,UAAU,gBACX,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAC,4BAA4B,aAElC,eAAM,MAAM,EAAC,MAAM,EAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACpD,eAAM,CAAC,EAAC,oCAAoC,GAAG,EAC/C,eAAM,CAAC,EAAC,UAAU,GAAG,EACrB,eAAM,CAAC,EAAC,WAAW,GAAG,EACtB,eAAM,CAAC,EAAC,oCAAoC,GAAG,EAC/C,eAAM,CAAC,EAAC,WAAW,GAAG,EACtB,eAAM,CAAC,EAAC,aAAa,GAAG,EACxB,eAAM,CAAC,EAAC,qCAAqC,GAAG,EAChD,eAAM,CAAC,EAAC,YAAY,GAAG,EACvB,eAAM,CAAC,EAAC,YAAY,GAAG,IACnB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IconProps, defaultStrokeIconProps } from './props.js';\n\n// https://tabler.io/icons?icon=adjustments-horizontal\nexport const AdjustmentsHorizontalIcon = (props: IconProps) => {\n const {\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n className,\n fill,\n height,\n role,\n stroke,\n strokeWidth,\n width,\n } = {\n ...defaultStrokeIconProps,\n ...props,\n };\n\n return (\n <svg\n aria-hidden={ariaHidden}\n aria-label={ariaLabel}\n className={className}\n fill={fill}\n height={height}\n role={role}\n stroke={stroke}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={strokeWidth}\n viewBox=\"0 0 24 24\"\n width={width}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" />\n <path d=\"M4 6l8 0\" />\n <path d=\"M16 6l4 0\" />\n <path d=\"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" />\n <path d=\"M4 12l2 0\" />\n <path d=\"M10 12l10 0\" />\n <path d=\"M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" />\n <path d=\"M4 18l11 0\" />\n <path d=\"M19 18l1 0\" />\n </svg>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-octagon.d.ts","sourceRoot":"","sources":["../../src/icon/alert-octagon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,gBAAgB,UAAW,SAAS,gCA2BhD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defaultFilledIconProps } from './props.js';
|
|
3
|
+
// https://tabler.io/icons?icon=alert-octagon
|
|
4
|
+
export const AlertOctagonIcon = (props) => {
|
|
5
|
+
const { 'aria-hidden': ariaHidden, 'aria-label': ariaLabel, className, fill, height, role, width, } = { ...defaultFilledIconProps, ...props };
|
|
6
|
+
return (_jsxs("svg", { "aria-hidden": ariaHidden, "aria-label": ariaLabel, className: className, fill: fill, height: height, role: role, viewBox: "0 0 24 24", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M14.897 1a4 4 0 0 1 2.664 1.016l.165 .156l4.1 4.1a4 4 0 0 1 1.168 2.605l.006 .227v5.794a4 4 0 0 1 -1.016 2.664l-.156 .165l-4.1 4.1a4 4 0 0 1 -2.603 1.168l-.227 .006h-5.795a3.999 3.999 0 0 1 -2.664 -1.017l-.165 -.156l-4.1 -4.1a4 4 0 0 1 -1.168 -2.604l-.006 -.227v-5.794a4 4 0 0 1 1.016 -2.664l.156 -.165l4.1 -4.1a4 4 0 0 1 2.605 -1.168l.227 -.006h5.793zm-2.887 14l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z" })] }));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=alert-octagon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-octagon.js","sourceRoot":"","sources":["../../src/icon/alert-octagon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE/D,6CAA6C;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAgB,EAAE,EAAE;IACnD,MAAM,EACJ,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACN,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,KAAK,EAAE,CAAC;IAE5C,OAAO,CACL,8BACe,UAAU,gBACX,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAC,4BAA4B,aAElC,eAAM,MAAM,EAAC,MAAM,EAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACpD,eAAM,CAAC,EAAC,qjBAAqjB,GAAG,IAC5jB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IconProps, defaultFilledIconProps } from './props.js';\n\n// https://tabler.io/icons?icon=alert-octagon\nexport const AlertOctagonIcon = (props: IconProps) => {\n const {\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n className,\n fill,\n height,\n role,\n width,\n } = { ...defaultFilledIconProps, ...props };\n\n return (\n <svg\n aria-hidden={ariaHidden}\n aria-label={ariaLabel}\n className={className}\n fill={fill}\n height={height}\n role={role}\n viewBox=\"0 0 24 24\"\n width={width}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M14.897 1a4 4 0 0 1 2.664 1.016l.165 .156l4.1 4.1a4 4 0 0 1 1.168 2.605l.006 .227v5.794a4 4 0 0 1 -1.016 2.664l-.156 .165l-4.1 4.1a4 4 0 0 1 -2.603 1.168l-.227 .006h-5.795a3.999 3.999 0 0 1 -2.664 -1.017l-.165 -.156l-4.1 -4.1a4 4 0 0 1 -1.168 -2.604l-.006 -.227v-5.794a4 4 0 0 1 1.016 -2.664l.156 -.165l4.1 -4.1a4 4 0 0 1 2.605 -1.168l.227 -.006h5.793zm-2.887 14l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\" />\n </svg>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../src/icon/book.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,QAAQ,UAAW,SAAS,gCAsCxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defaultStrokeIconProps } from './props.js';
|
|
3
|
+
// https://tabler.io/icons?icon=book-2
|
|
4
|
+
export const BookIcon = (props) => {
|
|
5
|
+
const { 'aria-hidden': ariaHidden, 'aria-label': ariaLabel, className, fill, height, role, stroke, strokeWidth, width, } = {
|
|
6
|
+
...defaultStrokeIconProps,
|
|
7
|
+
...props,
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("svg", { "aria-hidden": ariaHidden, "aria-label": ariaLabel, className: className, fill: fill, height: height, role: role, stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, viewBox: "0 0 24 24", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12" }), _jsx("path", { d: "M19 16h-12a2 2 0 0 0 -2 2" }), _jsx("path", { d: "M9 8h6" })] }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=book.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"book.js","sourceRoot":"","sources":["../../src/icon/book.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE/D,sCAAsC;AACtC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAgB,EAAE,EAAE;IAC3C,MAAM,EACJ,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,KAAK,GACN,GAAG;QACF,GAAG,sBAAsB;QACzB,GAAG,KAAK;KACT,CAAC;IAEF,OAAO,CACL,8BACe,UAAU,gBACX,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAC,4BAA4B,aAElC,eAAM,MAAM,EAAC,MAAM,EAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACpD,eAAM,CAAC,EAAC,oDAAoD,GAAG,EAC/D,eAAM,CAAC,EAAC,2BAA2B,GAAG,EACtC,eAAM,CAAC,EAAC,QAAQ,GAAG,IACf,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IconProps, defaultStrokeIconProps } from './props.js';\n\n// https://tabler.io/icons?icon=book-2\nexport const BookIcon = (props: IconProps) => {\n const {\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n className,\n fill,\n height,\n role,\n stroke,\n strokeWidth,\n width,\n } = {\n ...defaultStrokeIconProps,\n ...props,\n };\n\n return (\n <svg\n aria-hidden={ariaHidden}\n aria-label={ariaLabel}\n className={className}\n fill={fill}\n height={height}\n role={role}\n stroke={stroke}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={strokeWidth}\n viewBox=\"0 0 24 24\"\n width={width}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12\" />\n <path d=\"M19 16h-12a2 2 0 0 0 -2 2\" />\n <path d=\"M9 8h6\" />\n </svg>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"books.d.ts","sourceRoot":"","sources":["../../src/icon/books.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,SAAS,UAAW,SAAS,gCA0CzC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defaultStrokeIconProps } from './props.js';
|
|
3
|
+
// https://tabler.io/icons?icon=books
|
|
4
|
+
export const BooksIcon = (props) => {
|
|
5
|
+
const { 'aria-hidden': ariaHidden, 'aria-label': ariaLabel, className, fill, height, role, stroke, strokeWidth, width, } = {
|
|
6
|
+
...defaultStrokeIconProps,
|
|
7
|
+
...props,
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("svg", { "aria-hidden": ariaHidden, "aria-label": ariaLabel, className: className, fill: fill, height: height, role: role, stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, viewBox: "0 0 24 24", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M5 5a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -14" }), _jsx("path", { d: "M9 5a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -14" }), _jsx("path", { d: "M5 8h4" }), _jsx("path", { d: "M9 16h4" }), _jsx("path", { d: "M13.803 4.56l2.184 -.53c.562 -.135 1.133 .19 1.282 .732l3.695 13.418a1.02 1.02 0 0 1 -.634 1.219l-.133 .041l-2.184 .53c-.562 .135 -1.133 -.19 -1.282 -.732l-3.695 -13.418a1.02 1.02 0 0 1 .634 -1.219l.133 -.041" }), _jsx("path", { d: "M14 9l4 -1" }), _jsx("path", { d: "M16 16l3.923 -.98" })] }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=books.js.map
|