@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 @@
|
|
|
1
|
+
{"version":3,"file":"nav-types.js","sourceRoot":"","sources":["../../src/component/nav-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactElement } from 'react';\n\nimport type { IconProps } from '../icon/index.js';\n\n/** A single navigation destination, shared by the desktop and mobile layouts. */\nexport interface NavItem {\n to: string;\n label: string;\n Icon: (props: IconProps) => ReactElement;\n active: boolean;\n /** A count of pending fixes, or `'dot'` for \"active, nothing to decide yet\". */\n badge?: number | 'dot';\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { type PageActionItem } from '../../control/page-actions-menu/index.js';
|
|
3
|
+
import { type FooterAction } from '../../control/page-footer-actions/index.js';
|
|
4
|
+
import { PageTypeValue } from './style.js';
|
|
5
|
+
type PageProps = PropsWithChildren<{
|
|
6
|
+
type?: PageTypeValue;
|
|
7
|
+
back?: string;
|
|
8
|
+
headerActions?: PageActionItem[];
|
|
9
|
+
/** Overrides the overflow trigger's label (default "More…") on the desktop
|
|
10
|
+
* action bar — e.g. "Actions" when every action lives in the menu. */
|
|
11
|
+
actionsLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The page's own chrome for the header row — the row the desktop actions bar
|
|
14
|
+
* occupies, which every default page holds open whether or not it has
|
|
15
|
+
* actions (see `style.ts`).
|
|
16
|
+
*
|
|
17
|
+
* `page/library` passes its `<SearchBar />` here rather than rendering it as
|
|
18
|
+
* the first child: as a child it would sit BELOW the reserved row, starting
|
|
19
|
+
* the one page anyone lands on first lower than every other page. In the
|
|
20
|
+
* slot it lines up with every other page's actions instead.
|
|
21
|
+
*/
|
|
22
|
+
header?: React.ReactNode;
|
|
23
|
+
footerActions?: FooterAction[];
|
|
24
|
+
/** Sets `document.title` when given; the title is not restored on unmount. Leave it
|
|
25
|
+
* out when the app manages the title itself. */
|
|
26
|
+
documentTitle?: string;
|
|
27
|
+
/** Reserve space under the content for a floating bottom navigation bar
|
|
28
|
+
* (`NavMobile`) on mobile. Default `false`. */
|
|
29
|
+
bottomNav?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const Page: ({ children, type, back, headerActions, actionsLabel, header, footerActions, documentTitle, bottomNav, }: PageProps) => import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/page/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAsB,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/D,KAAK,SAAS,GAAG,iBAAiB,CAAC;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,cAAc,EAAE,CAAC;IACjC;0EACsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B;oDACgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;mDAC+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI,4GAUd,SAAS,gCAuCX,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { BackButton } from '../../control/back-button/index.js';
|
|
6
|
+
import { PageActionsBar } from '../../control/page-actions-bar/index.js';
|
|
7
|
+
import { PageActionsMenu } from '../../control/page-actions-menu/index.js';
|
|
8
|
+
import { PageFooterActions } from '../../control/page-footer-actions/index.js';
|
|
9
|
+
import { useStyle, PageType } from './style.js';
|
|
10
|
+
export const Page = ({ children, type = PageType.default, back, headerActions, actionsLabel, header, footerActions, documentTitle, bottomNav = false, }) => {
|
|
11
|
+
const styles = useStyle();
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (documentTitle !== undefined)
|
|
14
|
+
document.title = documentTitle;
|
|
15
|
+
}, [documentTitle]);
|
|
16
|
+
const hasHeaderActions = headerActions !== undefined && headerActions.length > 0;
|
|
17
|
+
const hasControls = back !== undefined || hasHeaderActions;
|
|
18
|
+
return (_jsx(Fragment, { children: _jsxs("main", { className: cx(styles[type], { [styles.bottomNav]: bottomNav }), children: [hasControls && (_jsxs("div", { className: styles.controlsRow, children: [back !== undefined && _jsx(BackButton, { to: back }), hasHeaderActions && _jsx(PageActionsMenu, { items: headerActions })] })), type === PageType.default && (_jsxs("header", { className: styles.headerRow, children: [header, hasHeaderActions && (_jsx(PageActionsBar, { items: headerActions, actionsLabel: actionsLabel }))] })), children, footerActions !== undefined && footerActions.length > 0 && (_jsx(PageFooterActions, { items: footerActions }))] }) }));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/page/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAuB,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAqB,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AA6B/D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,QAAQ,EACR,IAAI,GAAG,QAAQ,CAAC,OAAwB,EACxC,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,MAAM,EACN,aAAa,EACb,aAAa,EACb,SAAS,GAAG,KAAK,GACP,EAAE,EAAE;IACd,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC;IAE1B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,KAAK,SAAS;YAAE,QAAQ,CAAC,KAAK,GAAG,aAAa,CAAC;IAClE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,gBAAgB,GAAG,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACjF,MAAM,WAAW,GAAG,IAAI,KAAK,SAAS,IAAI,gBAAgB,CAAC;IAE3D,OAAO,CACL,KAAC,QAAQ,cACP,gBAAM,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,aACjE,WAAW,IAAI,CACd,eAAK,SAAS,EAAE,MAAM,CAAC,WAAW,aAC/B,IAAI,KAAK,SAAS,IAAI,KAAC,UAAU,IAAC,EAAE,EAAE,IAAI,GAAI,EAC9C,gBAAgB,IAAI,KAAC,eAAe,IAAC,KAAK,EAAE,aAAa,GAAI,IAC1D,CACP,EAMA,IAAI,KAAK,QAAQ,CAAC,OAAO,IAAI,CAC5B,kBAAQ,SAAS,EAAE,MAAM,CAAC,SAAS,aAChC,MAAM,EACN,gBAAgB,IAAI,CACnB,KAAC,cAAc,IAAC,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,GAAI,CACrE,IACM,CACV,EACA,QAAQ,EACR,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CAC1D,KAAC,iBAAiB,IAAC,KAAK,EAAE,aAAa,GAAI,CAC5C,IACI,GACE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import cx from 'classnames';\nimport { PropsWithChildren, useEffect } from 'react';\nimport { Fragment } from 'react/jsx-runtime';\n\nimport { BackButton } from '../../control/back-button/index.js';\nimport { PageActionsBar } from '../../control/page-actions-bar/index.js';\nimport { PageActionsMenu, type PageActionItem } from '../../control/page-actions-menu/index.js';\nimport { PageFooterActions, type FooterAction } from '../../control/page-footer-actions/index.js';\nimport { useStyle, PageType, PageTypeValue } from './style.js';\n\ntype PageProps = PropsWithChildren<{\n type?: PageTypeValue;\n back?: string;\n headerActions?: PageActionItem[];\n /** Overrides the overflow trigger's label (default \"More…\") on the desktop\n * action bar — e.g. \"Actions\" when every action lives in the menu. */\n actionsLabel?: string;\n /**\n * The page's own chrome for the header row — the row the desktop actions bar\n * occupies, which every default page holds open whether or not it has\n * actions (see `style.ts`).\n *\n * `page/library` passes its `<SearchBar />` here rather than rendering it as\n * the first child: as a child it would sit BELOW the reserved row, starting\n * the one page anyone lands on first lower than every other page. In the\n * slot it lines up with every other page's actions instead.\n */\n header?: React.ReactNode;\n footerActions?: FooterAction[];\n /** Sets `document.title` when given; the title is not restored on unmount. Leave it\n * out when the app manages the title itself. */\n documentTitle?: string;\n /** Reserve space under the content for a floating bottom navigation bar\n * (`NavMobile`) on mobile. Default `false`. */\n bottomNav?: boolean;\n}>;\n\nexport const Page = ({\n children,\n type = PageType.default as PageTypeValue,\n back,\n headerActions,\n actionsLabel,\n header,\n footerActions,\n documentTitle,\n bottomNav = false,\n}: PageProps) => {\n const styles = useStyle();\n\n useEffect(() => {\n if (documentTitle !== undefined) document.title = documentTitle;\n }, [documentTitle]);\n\n const hasHeaderActions = headerActions !== undefined && headerActions.length > 0;\n const hasControls = back !== undefined || hasHeaderActions;\n\n return (\n <Fragment>\n <main className={cx(styles[type], { [styles.bottomNav]: bottomNav })}>\n {hasControls && (\n <div className={styles.controlsRow}>\n {back !== undefined && <BackButton to={back} />}\n {hasHeaderActions && <PageActionsMenu items={headerActions} />}\n </div>\n )}\n {/* Rendered for every default page, EMPTY INCLUDED — holding the row\n open is what keeps pages with and without actions starting their\n content at the same height. A minimal page (login, loading, the\n forced password change) has no nav, no actions and nothing to line\n up with, so it gets no row. */}\n {type === PageType.default && (\n <header className={styles.headerRow}>\n {header}\n {hasHeaderActions && (\n <PageActionsBar items={headerActions} actionsLabel={actionsLabel} />\n )}\n </header>\n )}\n {children}\n {footerActions !== undefined && footerActions.length > 0 && (\n <PageFooterActions items={footerActions} />\n )}\n </main>\n </Fragment>\n );\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Theme } from '../../theme/index.js';
|
|
2
|
+
export type PageTypeValue = 'default' | 'minimal';
|
|
3
|
+
export declare enum PageType {
|
|
4
|
+
default = "default",
|
|
5
|
+
minimal = "minimal"
|
|
6
|
+
}
|
|
7
|
+
export declare const useStyle: (data?: {
|
|
8
|
+
theme?: Theme | undefined;
|
|
9
|
+
} | undefined) => import("jss").Classes<"bottomNav" | "controlsRow" | "headerRow" | PageType>;
|
|
10
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/page/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAClD,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,QAAQ;;6FA4HlB,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { createUseStyles } from '../../theme/index.js';
|
|
2
|
+
export var PageType;
|
|
3
|
+
(function (PageType) {
|
|
4
|
+
PageType["default"] = "default";
|
|
5
|
+
PageType["minimal"] = "minimal";
|
|
6
|
+
})(PageType || (PageType = {}));
|
|
7
|
+
export const useStyle = createUseStyles((theme) => ({
|
|
8
|
+
[PageType.default]: {
|
|
9
|
+
maxWidth: 800,
|
|
10
|
+
margin: `${theme.space.xxxxxl} auto`,
|
|
11
|
+
padding: `0 ${theme.space.xxl}`,
|
|
12
|
+
display: 'flex',
|
|
13
|
+
gap: theme.fontSize.md, // historical: 0.875rem flexbox gap
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
[theme.breakpoint.mobile]: {
|
|
16
|
+
margin: 0,
|
|
17
|
+
// Top spacing the old static header used to provide (now that the desktop bar
|
|
18
|
+
// is display:none on mobile); plus the notch inset, like the modal recipe.
|
|
19
|
+
//
|
|
20
|
+
// The inset belongs to whatever is topmost. When that is this `<main>` the
|
|
21
|
+
// fallback applies; when the admin's library-switcher band sits above it
|
|
22
|
+
// (`router/nav-layout-style`), the band has already spent the inset and sets
|
|
23
|
+
// `--page-top-inset` to zero on everything after it. Counting it here as
|
|
24
|
+
// well left a status-bar-sized hole between the band's rule and the first
|
|
25
|
+
// row of content in the installed app — and nowhere else, because in a
|
|
26
|
+
// Safari tab the inset is zero, which is how it went unnoticed.
|
|
27
|
+
paddingTop: `calc(${theme.space.xxxxxl} + var(--page-top-inset, env(safe-area-inset-top)))`,
|
|
28
|
+
// Room below the last row so it can be scrolled above Safari's expanded URL bar; the home-indicator inset too.
|
|
29
|
+
paddingBottom: `calc(${theme.space.xxxxxl} + env(safe-area-inset-bottom))`,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
[PageType.minimal]: {},
|
|
33
|
+
// Set by `bottomNav`: a floating mobile nav (`NavMobile`) sits over the page's
|
|
34
|
+
// bottom edge, so the last row needs to clear it as well. Declared after the
|
|
35
|
+
// page types so it wins the cascade on `<main>`.
|
|
36
|
+
bottomNav: {
|
|
37
|
+
[theme.breakpoint.mobile]: {
|
|
38
|
+
// Clears the floating mobile nav plus slack so the last row can always be
|
|
39
|
+
// scrolled above both the nav and Safari's expanded URL bar. Nav height is the
|
|
40
|
+
// shared theme.layout token (tune there); the extra space is this page's slack.
|
|
41
|
+
paddingBottom: `calc(${theme.layout.navHeightMobile} + ${theme.space.xxxxxl} + ${theme.space.xxl} + env(safe-area-inset-bottom))`,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
// The page's header row — the desktop actions bar's home, and the space
|
|
45
|
+
// every other page holds open so that moving between them does not shift
|
|
46
|
+
// the content under the cursor. `/add`'s two views are the case that makes
|
|
47
|
+
// it obvious: only Upload publishes actions, so the toggle jumped every
|
|
48
|
+
// time you switched.
|
|
49
|
+
//
|
|
50
|
+
// MEASURED, not derived, and the one number to tune here: a `Button` takes
|
|
51
|
+
// its height from its own line box, which is the body font's `normal`
|
|
52
|
+
// line-height and therefore not something the tokens can predict. This
|
|
53
|
+
// floor only has to CLEAR that height — a floor above it makes every header
|
|
54
|
+
// row exactly this tall, actions or not, which is the whole point. Drop
|
|
55
|
+
// below it and the pages with actions grow past the ones without, quietly
|
|
56
|
+
// giving back the consistency this buys.
|
|
57
|
+
headerRow: {
|
|
58
|
+
minHeight: '2.25rem',
|
|
59
|
+
// ONE ROW: the page's own header content leads, the actions bar trails.
|
|
60
|
+
// `/add` is the case that needs both — its Upload/Request toggle on the
|
|
61
|
+
// left, its "Actions" trigger on the right — and the bar's own internal
|
|
62
|
+
// spacer keeps that trigger hard right however much room it is given.
|
|
63
|
+
display: 'flex',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
gap: theme.space.md,
|
|
66
|
+
// Both slots share the leftover width rather than either one owning it:
|
|
67
|
+
// alone, the search bar or the actions bar takes the full row exactly as
|
|
68
|
+
// it did as a child of `<main>`; together, the toggle takes the space the
|
|
69
|
+
// actions do not need. `minWidth: 0` lets a wide child shrink instead of
|
|
70
|
+
// pushing the row past the content column.
|
|
71
|
+
'& > *': {
|
|
72
|
+
flexGrow: 1,
|
|
73
|
+
minWidth: 0,
|
|
74
|
+
},
|
|
75
|
+
// Mobile reserves nothing: the actions live in the floating menu
|
|
76
|
+
// (`PageActionsMenu`) rather than in this row, and screen height is too
|
|
77
|
+
// dear to hold open a row for chrome that is not there. `contents` makes
|
|
78
|
+
// the row itself vanish from the layout, so whatever it holds — a search
|
|
79
|
+
// bar — lands as a direct child of `<main>`, exactly where it sat before
|
|
80
|
+
// this row existed.
|
|
81
|
+
[theme.breakpoint.mobile]: {
|
|
82
|
+
display: 'contents',
|
|
83
|
+
// `contents` hands these children straight to `<main>`, whose flex
|
|
84
|
+
// direction is COLUMN — leaving `flexGrow` on would stretch a search bar
|
|
85
|
+
// down the whole page rather than across it.
|
|
86
|
+
'& > *': {
|
|
87
|
+
flexGrow: 0,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
// Mobile-only row holding the back button and the page actions menu. STICKY,
|
|
92
|
+
// not fixed: it starts in the page's flow — under the admin's library-switcher
|
|
93
|
+
// band when there is one — scrolls up with the page like everything else, and
|
|
94
|
+
// pins at `floatingControlTopBase` once it gets there. Both halves of that
|
|
95
|
+
// (riding up with the band, then holding) used to be done by hand: the
|
|
96
|
+
// controls were `position: fixed` and a scroll listener published the scroll
|
|
97
|
+
// offset for the stylesheet to subtract from their `top`. Fixed chrome whose
|
|
98
|
+
// `top` is rewritten from scroll events lags the compositor on iOS and jitters
|
|
99
|
+
// for the whole ride; sticky positioning is the same motion, done by the
|
|
100
|
+
// scroller itself.
|
|
101
|
+
//
|
|
102
|
+
// Where the row rests before it pins: `floatingControlsGap` below the top of
|
|
103
|
+
// whatever is above it — the status-bar inset on a page with nothing above,
|
|
104
|
+
// or the band's rule, which sets the gap smaller (`router/nav-layout-style`).
|
|
105
|
+
// `<main>`'s top padding is larger than either gap, so the margin pulls the
|
|
106
|
+
// row up into that padding by the difference; the content that follows keeps
|
|
107
|
+
// its own `gap` from the row.
|
|
108
|
+
controlsRow: {
|
|
109
|
+
position: 'sticky',
|
|
110
|
+
top: theme.layout.floatingControlTopBase,
|
|
111
|
+
zIndex: theme.zIndex.sticky,
|
|
112
|
+
display: 'flex',
|
|
113
|
+
justifyContent: 'space-between',
|
|
114
|
+
alignItems: 'flex-start',
|
|
115
|
+
marginTop: `calc(var(--floating-controls-gap, ${theme.space.xxxxl}) - ${theme.space.xxxxxl})`,
|
|
116
|
+
// The buttons sit `space.lg` from the screen edge, inside a gutter of
|
|
117
|
+
// `space.xxl`, so the row reaches out past the gutter by the difference.
|
|
118
|
+
marginLeft: `calc(${theme.space.lg} - ${theme.space.xxl})`,
|
|
119
|
+
marginRight: `calc(${theme.space.lg} - ${theme.space.xxl})`,
|
|
120
|
+
// The row spans the width between the buttons; taps there must reach the
|
|
121
|
+
// content scrolling under it.
|
|
122
|
+
pointerEvents: 'none',
|
|
123
|
+
'& > *': {
|
|
124
|
+
pointerEvents: 'auto',
|
|
125
|
+
},
|
|
126
|
+
// Desktop has the actions bar in the header row and no back button.
|
|
127
|
+
[theme.breakpoint.normal]: {
|
|
128
|
+
display: 'none',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
}));
|
|
132
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/page/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAGnE,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAClB,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,OAAO;QACpC,OAAO,EAAE,KAAK,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE;QAC/B,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,mCAAmC;QAC3D,aAAa,EAAE,QAAQ;QACvB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACzB,MAAM,EAAE,CAAC;YACT,8EAA8E;YAC9E,2EAA2E;YAC3E,EAAE;YACF,2EAA2E;YAC3E,yEAAyE;YACzE,6EAA6E;YAC7E,yEAAyE;YACzE,0EAA0E;YAC1E,uEAAuE;YACvE,gEAAgE;YAChE,UAAU,EAAE,QAAQ,KAAK,CAAC,KAAK,CAAC,MAAM,qDAAqD;YAC3F,+GAA+G;YAC/G,aAAa,EAAE,QAAQ,KAAK,CAAC,KAAK,CAAC,MAAM,iCAAiC;SAC3E;KACF;IACD,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE;IACtB,+EAA+E;IAC/E,6EAA6E;IAC7E,iDAAiD;IACjD,SAAS,EAAE;QACT,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACzB,0EAA0E;YAC1E,+EAA+E;YAC/E,gFAAgF;YAChF,aAAa,EAAE,QAAQ,KAAK,CAAC,MAAM,CAAC,eAAe,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,iCAAiC;SAClI;KACF;IACD,wEAAwE;IACxE,yEAAyE;IACzE,2EAA2E;IAC3E,wEAAwE;IACxE,qBAAqB;IACrB,EAAE;IACF,2EAA2E;IAC3E,sEAAsE;IACtE,uEAAuE;IACvE,4EAA4E;IAC5E,wEAAwE;IACxE,0EAA0E;IAC1E,yCAAyC;IACzC,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;QACpB,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,sEAAsE;QACtE,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE;QACnB,wEAAwE;QACxE,yEAAyE;QACzE,0EAA0E;QAC1E,yEAAyE;QACzE,2CAA2C;QAC3C,OAAO,EAAE;YACP,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;SACZ;QACD,iEAAiE;QACjE,wEAAwE;QACxE,yEAAyE;QACzE,yEAAyE;QACzE,yEAAyE;QACzE,oBAAoB;QACpB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACzB,OAAO,EAAE,UAAU;YACnB,mEAAmE;YACnE,yEAAyE;YACzE,6CAA6C;YAC7C,OAAO,EAAE;gBACP,QAAQ,EAAE,CAAC;aACZ;SACF;KACF;IACD,6EAA6E;IAC7E,+EAA+E;IAC/E,8EAA8E;IAC9E,2EAA2E;IAC3E,uEAAuE;IACvE,6EAA6E;IAC7E,6EAA6E;IAC7E,+EAA+E;IAC/E,yEAAyE;IACzE,mBAAmB;IACnB,EAAE;IACF,6EAA6E;IAC7E,4EAA4E;IAC5E,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,8BAA8B;IAC9B,WAAW,EAAE;QACX,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,sBAAsB;QACxC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;QAC3B,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,YAAY;QACxB,SAAS,EAAE,qCAAqC,KAAK,CAAC,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG;QAC7F,sEAAsE;QACtE,yEAAyE;QACzE,UAAU,EAAE,QAAQ,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG;QAC1D,WAAW,EAAE,QAAQ,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG;QAC3D,yEAAyE;QACzE,8BAA8B;QAC9B,aAAa,EAAE,MAAM;QACrB,OAAO,EAAE;YACP,aAAa,EAAE,MAAM;SACtB;QACD,oEAAoE;QACpE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACzB,OAAO,EAAE,MAAM;SAChB;KACF;CACF,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\n\nexport type PageTypeValue = 'default' | 'minimal';\nexport enum PageType {\n default = 'default',\n minimal = 'minimal',\n}\n\nexport const useStyle = createUseStyles((theme: Theme) => ({\n [PageType.default]: {\n maxWidth: 800,\n margin: `${theme.space.xxxxxl} auto`,\n padding: `0 ${theme.space.xxl}`,\n display: 'flex',\n gap: theme.fontSize.md, // historical: 0.875rem flexbox gap\n flexDirection: 'column',\n [theme.breakpoint.mobile]: {\n margin: 0,\n // Top spacing the old static header used to provide (now that the desktop bar\n // is display:none on mobile); plus the notch inset, like the modal recipe.\n //\n // The inset belongs to whatever is topmost. When that is this `<main>` the\n // fallback applies; when the admin's library-switcher band sits above it\n // (`router/nav-layout-style`), the band has already spent the inset and sets\n // `--page-top-inset` to zero on everything after it. Counting it here as\n // well left a status-bar-sized hole between the band's rule and the first\n // row of content in the installed app — and nowhere else, because in a\n // Safari tab the inset is zero, which is how it went unnoticed.\n paddingTop: `calc(${theme.space.xxxxxl} + var(--page-top-inset, env(safe-area-inset-top)))`,\n // Room below the last row so it can be scrolled above Safari's expanded URL bar; the home-indicator inset too.\n paddingBottom: `calc(${theme.space.xxxxxl} + env(safe-area-inset-bottom))`,\n },\n },\n [PageType.minimal]: {},\n // Set by `bottomNav`: a floating mobile nav (`NavMobile`) sits over the page's\n // bottom edge, so the last row needs to clear it as well. Declared after the\n // page types so it wins the cascade on `<main>`.\n bottomNav: {\n [theme.breakpoint.mobile]: {\n // Clears the floating mobile nav plus slack so the last row can always be\n // scrolled above both the nav and Safari's expanded URL bar. Nav height is the\n // shared theme.layout token (tune there); the extra space is this page's slack.\n paddingBottom: `calc(${theme.layout.navHeightMobile} + ${theme.space.xxxxxl} + ${theme.space.xxl} + env(safe-area-inset-bottom))`,\n },\n },\n // The page's header row — the desktop actions bar's home, and the space\n // every other page holds open so that moving between them does not shift\n // the content under the cursor. `/add`'s two views are the case that makes\n // it obvious: only Upload publishes actions, so the toggle jumped every\n // time you switched.\n //\n // MEASURED, not derived, and the one number to tune here: a `Button` takes\n // its height from its own line box, which is the body font's `normal`\n // line-height and therefore not something the tokens can predict. This\n // floor only has to CLEAR that height — a floor above it makes every header\n // row exactly this tall, actions or not, which is the whole point. Drop\n // below it and the pages with actions grow past the ones without, quietly\n // giving back the consistency this buys.\n headerRow: {\n minHeight: '2.25rem',\n // ONE ROW: the page's own header content leads, the actions bar trails.\n // `/add` is the case that needs both — its Upload/Request toggle on the\n // left, its \"Actions\" trigger on the right — and the bar's own internal\n // spacer keeps that trigger hard right however much room it is given.\n display: 'flex',\n alignItems: 'center',\n gap: theme.space.md,\n // Both slots share the leftover width rather than either one owning it:\n // alone, the search bar or the actions bar takes the full row exactly as\n // it did as a child of `<main>`; together, the toggle takes the space the\n // actions do not need. `minWidth: 0` lets a wide child shrink instead of\n // pushing the row past the content column.\n '& > *': {\n flexGrow: 1,\n minWidth: 0,\n },\n // Mobile reserves nothing: the actions live in the floating menu\n // (`PageActionsMenu`) rather than in this row, and screen height is too\n // dear to hold open a row for chrome that is not there. `contents` makes\n // the row itself vanish from the layout, so whatever it holds — a search\n // bar — lands as a direct child of `<main>`, exactly where it sat before\n // this row existed.\n [theme.breakpoint.mobile]: {\n display: 'contents',\n // `contents` hands these children straight to `<main>`, whose flex\n // direction is COLUMN — leaving `flexGrow` on would stretch a search bar\n // down the whole page rather than across it.\n '& > *': {\n flexGrow: 0,\n },\n },\n },\n // Mobile-only row holding the back button and the page actions menu. STICKY,\n // not fixed: it starts in the page's flow — under the admin's library-switcher\n // band when there is one — scrolls up with the page like everything else, and\n // pins at `floatingControlTopBase` once it gets there. Both halves of that\n // (riding up with the band, then holding) used to be done by hand: the\n // controls were `position: fixed` and a scroll listener published the scroll\n // offset for the stylesheet to subtract from their `top`. Fixed chrome whose\n // `top` is rewritten from scroll events lags the compositor on iOS and jitters\n // for the whole ride; sticky positioning is the same motion, done by the\n // scroller itself.\n //\n // Where the row rests before it pins: `floatingControlsGap` below the top of\n // whatever is above it — the status-bar inset on a page with nothing above,\n // or the band's rule, which sets the gap smaller (`router/nav-layout-style`).\n // `<main>`'s top padding is larger than either gap, so the margin pulls the\n // row up into that padding by the difference; the content that follows keeps\n // its own `gap` from the row.\n controlsRow: {\n position: 'sticky',\n top: theme.layout.floatingControlTopBase,\n zIndex: theme.zIndex.sticky,\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n marginTop: `calc(var(--floating-controls-gap, ${theme.space.xxxxl}) - ${theme.space.xxxxxl})`,\n // The buttons sit `space.lg` from the screen edge, inside a gutter of\n // `space.xxl`, so the row reaches out past the gutter by the difference.\n marginLeft: `calc(${theme.space.lg} - ${theme.space.xxl})`,\n marginRight: `calc(${theme.space.lg} - ${theme.space.xxl})`,\n // The row spans the width between the buttons; taps there must reach the\n // content scrolling under it.\n pointerEvents: 'none',\n '& > *': {\n pointerEvents: 'auto',\n },\n // Desktop has the actions bar in the header row and no back button.\n [theme.breakpoint.normal]: {\n display: 'none',\n },\n },\n}));\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type ProgressIndicatorProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
/**
|
|
4
|
+
* Required, not defaulted (2026-08-13 final review, M-1): `role=
|
|
5
|
+
* "progressbar"` below has no accessible name of its own — a bare number
|
|
6
|
+
* ("N%") means nothing out of context to a screen-reader user, and this
|
|
7
|
+
* component has four semantic call sites (book, series, my-progress-row,
|
|
8
|
+
* user-progress-row) that each mean something different. Every caller
|
|
9
|
+
* must say what progress this actually is, e.g. `Reading progress for
|
|
10
|
+
* ${title}`.
|
|
11
|
+
*/
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
size?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const ProgressIndicator: ({ value, ariaLabel, size }: ProgressIndicatorProps) => import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/progress-indicator/index.tsx"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAeF,eAAO,MAAM,iBAAiB,+BAAqC,sBAAsB,gCA2BxF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useStyle } from './style.js';
|
|
3
|
+
const CX = 50;
|
|
4
|
+
const CY = 50;
|
|
5
|
+
const R_INNER = 36; // track and sector
|
|
6
|
+
const R_RING = 44; // outer ring (gap between inner edge and R_INNER is ~5 units)
|
|
7
|
+
const sectorPath = (pct) => {
|
|
8
|
+
const angle = (pct / 100) * 2 * Math.PI - Math.PI / 2;
|
|
9
|
+
const x = CX + R_INNER * Math.cos(angle);
|
|
10
|
+
const y = CY + R_INNER * Math.sin(angle);
|
|
11
|
+
const largeArc = pct > 50 ? 1 : 0;
|
|
12
|
+
return `M ${CX} ${CY} L ${CX} ${CY - R_INNER} A ${R_INNER} ${R_INNER} 0 ${largeArc} 1 ${x} ${y} Z`;
|
|
13
|
+
};
|
|
14
|
+
export const ProgressIndicator = ({ value, ariaLabel, size = 40 }) => {
|
|
15
|
+
const style = useStyle();
|
|
16
|
+
const clamped = Math.min(100, Math.max(0, value * 100));
|
|
17
|
+
return (_jsxs("div", { className: style.root, children: [clamped > 0 && clamped < 100 && (_jsxs("svg", { viewBox: "0 0 100 100", width: size, height: size, role: "progressbar", "aria-label": ariaLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(clamped), children: [_jsx("circle", { cx: CX, cy: CY, r: R_INNER, className: style.track }), _jsx("path", { d: sectorPath(clamped), className: style.sector }), _jsx("circle", { cx: CX, cy: CY, r: R_RING, className: style.ring })] })), _jsx("span", { className: style.label, children: clamped === 0 ? 'Not started' : clamped === 100 ? 'Completed' : `${Math.round(clamped)}%` })] }));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/progress-indicator/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiBtC,MAAM,EAAE,GAAG,EAAE,CAAC;AACd,MAAM,EAAE,GAAG,EAAE,CAAC;AACd,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,mBAAmB;AACvC,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,8DAA8D;AAEjF,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE;IACzC,MAAM,KAAK,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IACtD,MAAM,CAAC,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,CAAC,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,MAAM,OAAO,IAAI,OAAO,MAAM,QAAQ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AACrG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,GAAG,EAAE,EAA0B,EAAE,EAAE;IAC3F,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;IAExD,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,IAAI,aACvB,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,GAAG,IAAI,CAC/B,eACE,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,IAAI,EAAC,aAAa,gBACN,SAAS,mBACN,CAAC,mBACD,GAAG,mBACH,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAElC,iBAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,GAAI,EAC9D,eAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,GAAI,EACzD,iBAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,GAAI,IACxD,CACP,EACD,eAAM,SAAS,EAAE,KAAK,CAAC,KAAK,YACzB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,GACrF,IACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useStyle } from './style.js';\n\ntype ProgressIndicatorProps = {\n value: number;\n /**\n * Required, not defaulted (2026-08-13 final review, M-1): `role=\n * \"progressbar\"` below has no accessible name of its own — a bare number\n * (\"N%\") means nothing out of context to a screen-reader user, and this\n * component has four semantic call sites (book, series, my-progress-row,\n * user-progress-row) that each mean something different. Every caller\n * must say what progress this actually is, e.g. `Reading progress for\n * ${title}`.\n */\n ariaLabel: string;\n size?: number;\n};\n\nconst CX = 50;\nconst CY = 50;\nconst R_INNER = 36; // track and sector\nconst R_RING = 44; // outer ring (gap between inner edge and R_INNER is ~5 units)\n\nconst sectorPath = (pct: number): string => {\n const angle = (pct / 100) * 2 * Math.PI - Math.PI / 2;\n const x = CX + R_INNER * Math.cos(angle);\n const y = CY + R_INNER * Math.sin(angle);\n const largeArc = pct > 50 ? 1 : 0;\n return `M ${CX} ${CY} L ${CX} ${CY - R_INNER} A ${R_INNER} ${R_INNER} 0 ${largeArc} 1 ${x} ${y} Z`;\n};\n\nexport const ProgressIndicator = ({ value, ariaLabel, size = 40 }: ProgressIndicatorProps) => {\n const style = useStyle();\n const clamped = Math.min(100, Math.max(0, value * 100));\n\n return (\n <div className={style.root}>\n {clamped > 0 && clamped < 100 && (\n <svg\n viewBox=\"0 0 100 100\"\n width={size}\n height={size}\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clamped)}\n >\n <circle cx={CX} cy={CY} r={R_INNER} className={style.track} />\n <path d={sectorPath(clamped)} className={style.sector} />\n <circle cx={CX} cy={CY} r={R_RING} className={style.ring} />\n </svg>\n )}\n <span className={style.label}>\n {clamped === 0 ? 'Not started' : clamped === 100 ? 'Completed' : `${Math.round(clamped)}%`}\n </span>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/progress-indicator/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEnE,eAAO,MAAM,QAAQ;;uFAqBlB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createUseStyles } from '../../theme/index.js';
|
|
2
|
+
export const useStyle = createUseStyles((theme) => ({
|
|
3
|
+
root: {
|
|
4
|
+
display: 'inline-flex',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
gap: theme.space.xs,
|
|
7
|
+
},
|
|
8
|
+
track: {
|
|
9
|
+
fill: 'transparent',
|
|
10
|
+
},
|
|
11
|
+
sector: {
|
|
12
|
+
fill: theme.color.brand.default,
|
|
13
|
+
},
|
|
14
|
+
ring: {
|
|
15
|
+
fill: 'none',
|
|
16
|
+
stroke: theme.color.text.primary,
|
|
17
|
+
strokeWidth: 6,
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
fontSize: theme.fontSize.sm,
|
|
21
|
+
color: theme.color.text.primary,
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
24
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/progress-indicator/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE;QACJ,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE;KACpB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,aAAa;KACpB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO;KAChC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;QAChC,WAAW,EAAE,CAAC;KACf;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC3B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;KAChC;CACF,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\n\nexport const useStyle = createUseStyles((theme: Theme) => ({\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: theme.space.xs,\n },\n track: {\n fill: 'transparent',\n },\n sector: {\n fill: theme.color.brand.default,\n },\n ring: {\n fill: 'none',\n stroke: theme.color.text.primary,\n strokeWidth: 6,\n },\n label: {\n fontSize: theme.fontSize.sm,\n color: theme.color.text.primary,\n },\n}));\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface TagProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
/** `sm` renders a compact chip that fits within a normal text line height. */
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
}
|
|
7
|
+
export declare const Tag: ({ children, onClick, size }: TagProps) => import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/tag/index.tsx"],"names":[],"mappings":"AAIA,UAAU,QAAQ;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,GAAG,gCAAwC,QAAQ,gCA0B/D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { useStyle } from './style.js';
|
|
4
|
+
export const Tag = ({ children, onClick, size = 'md' }) => {
|
|
5
|
+
const style = useStyle();
|
|
6
|
+
return (_jsx("span", { className: cx(style.root, size === 'sm' && style.sm, onClick !== undefined && style.clickable), onClick: onClick, role: onClick !== undefined ? 'button' : undefined, tabIndex: onClick !== undefined ? 0 : undefined, onKeyDown: onClick !== undefined
|
|
7
|
+
? (e) => {
|
|
8
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
onClick();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
: undefined, children: children }));
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/tag/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,EAAY,EAAE,EAAE;IAClE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,KAAK,CAAC,IAAI,EACV,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,EAAE,EACzB,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,SAAS,CACzC,EACD,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAClD,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAC/C,SAAS,EACP,OAAO,KAAK,SAAS;YACnB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gBACJ,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;oBACvC,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC;YACH,CAAC,CAAC,SAAS,YAGd,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import cx from 'classnames';\n\nimport { useStyle } from './style.js';\n\ninterface TagProps {\n children: React.ReactNode;\n onClick?: () => void;\n /** `sm` renders a compact chip that fits within a normal text line height. */\n size?: 'sm' | 'md';\n}\n\nexport const Tag = ({ children, onClick, size = 'md' }: TagProps) => {\n const style = useStyle();\n return (\n <span\n className={cx(\n style.root,\n size === 'sm' && style.sm,\n onClick !== undefined && style.clickable\n )}\n onClick={onClick}\n role={onClick !== undefined ? 'button' : undefined}\n tabIndex={onClick !== undefined ? 0 : undefined}\n onKeyDown={\n onClick !== undefined\n ? (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick();\n }\n }\n : undefined\n }\n >\n {children}\n </span>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/tag/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEnE,eAAO,MAAM,QAAQ;;oEAyBlB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createUseStyles } from '../../theme/index.js';
|
|
2
|
+
export const useStyle = createUseStyles((theme) => ({
|
|
3
|
+
root: {
|
|
4
|
+
padding: `${theme.space.xs} ${theme.space.md}`,
|
|
5
|
+
background: theme.color.chip.subject.bg,
|
|
6
|
+
color: theme.color.chip.subject.text,
|
|
7
|
+
borderRadius: theme.radius.md,
|
|
8
|
+
fontSize: theme.fontSize.sm,
|
|
9
|
+
fontWeight: theme.fontWeight.medium,
|
|
10
|
+
border: `1px solid ${theme.color.chip.subject.border}`,
|
|
11
|
+
},
|
|
12
|
+
// Compact variant: minimal vertical padding + tight line height so the chip
|
|
13
|
+
// fits inside a normal text line, keeping fix rows the same height whether or
|
|
14
|
+
// not they contain chips (no row min-height needed).
|
|
15
|
+
sm: {
|
|
16
|
+
padding: `${theme.space.xxxs} ${theme.space.sm}`,
|
|
17
|
+
fontSize: theme.fontSize.xs,
|
|
18
|
+
lineHeight: theme.lineHeight.tight,
|
|
19
|
+
},
|
|
20
|
+
clickable: {
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
'&:hover': {
|
|
23
|
+
background: 'rgba(138,94,0,0.15)',
|
|
24
|
+
borderColor: 'rgba(138,94,0,0.40)',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/tag/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE;QACJ,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE;QAC9C,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QACvC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI;QACpC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;QAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC3B,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM;QACnC,MAAM,EAAE,aAAa,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;KACvD;IACD,4EAA4E;IAC5E,8EAA8E;IAC9E,qDAAqD;IACrD,EAAE,EAAE;QACF,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE;QAChD,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC3B,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK;KACnC;IACD,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE;YACT,UAAU,EAAE,qBAAqB;YACjC,WAAW,EAAE,qBAAqB;SACnC;KACF;CACF,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\n\nexport const useStyle = createUseStyles((theme: Theme) => ({\n root: {\n padding: `${theme.space.xs} ${theme.space.md}`,\n background: theme.color.chip.subject.bg,\n color: theme.color.chip.subject.text,\n borderRadius: theme.radius.md,\n fontSize: theme.fontSize.sm,\n fontWeight: theme.fontWeight.medium,\n border: `1px solid ${theme.color.chip.subject.border}`,\n },\n // Compact variant: minimal vertical padding + tight line height so the chip\n // fits inside a normal text line, keeping fix rows the same height whether or\n // not they contain chips (no row min-height needed).\n sm: {\n padding: `${theme.space.xxxs} ${theme.space.sm}`,\n fontSize: theme.fontSize.xs,\n lineHeight: theme.lineHeight.tight,\n },\n clickable: {\n cursor: 'pointer',\n '&:hover': {\n background: 'rgba(138,94,0,0.15)',\n borderColor: 'rgba(138,94,0,0.40)',\n },\n },\n}));\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/theme-setting/index.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,mCAaxB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SegmentedControl } from '../../control/segmented-control/index.js';
|
|
3
|
+
import { useThemeSetting } from '../../theme/index.js';
|
|
4
|
+
import { Card } from '../card/index.js';
|
|
5
|
+
const OPTIONS = [
|
|
6
|
+
{ value: 'light', label: 'Light' },
|
|
7
|
+
{ value: 'dark', label: 'Dark' },
|
|
8
|
+
{ value: 'auto', label: 'Auto' },
|
|
9
|
+
];
|
|
10
|
+
export const ThemeSetting = () => {
|
|
11
|
+
const [setting, setSetting] = useThemeSetting();
|
|
12
|
+
return (_jsx(Card, { title: "Appearance", children: _jsx(SegmentedControl, { label: "Appearance", value: setting, options: OPTIONS, onChange: setSetting }) }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/theme-setting/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CACxB,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,eAAe,EAAE,CAAC;IAEhD,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAC,YAAY,YACtB,KAAC,gBAAgB,IACf,KAAK,EAAC,YAAY,EAClB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,GACpB,GACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { SegmentedControl } from '../../control/segmented-control/index.js';\nimport { useThemeSetting } from '../../theme/index.js';\nimport { Card } from '../card/index.js';\n\nconst OPTIONS = [\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n { value: 'auto', label: 'Auto' },\n] as const;\n\nexport const ThemeSetting = () => {\n const [setting, setSetting] = useThemeSetting();\n\n return (\n <Card title=\"Appearance\">\n <SegmentedControl\n label=\"Appearance\"\n value={setting}\n options={OPTIONS}\n onChange={setSetting}\n />\n </Card>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/top-fade/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,mCAGnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useStyle } from './style.js';
|
|
3
|
+
// Mobile-only scrim: a fixed frosted-glass layer at the top of the viewport that blurs
|
|
4
|
+
// scrolling content beneath the device status bar and fades out below it (Safari-style).
|
|
5
|
+
export const TopFade = () => {
|
|
6
|
+
const styles = useStyle();
|
|
7
|
+
return _jsx("div", { className: styles.root, "aria-hidden": "true" });
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/top-fade/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,uFAAuF;AACvF,yFAAyF;AACzF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC;IAC1B,OAAO,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,iBAAc,MAAM,GAAG,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["import { useStyle } from './style.js';\n\n// Mobile-only scrim: a fixed frosted-glass layer at the top of the viewport that blurs\n// scrolling content beneath the device status bar and fades out below it (Safari-style).\nexport const TopFade = () => {\n const styles = useStyle();\n return <div className={styles.root} aria-hidden=\"true\" />;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/top-fade/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEnE,eAAO,MAAM,QAAQ;;+CAuDnB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createUseStyles } from '../../theme/index.js';
|
|
2
|
+
export const useStyle = createUseStyles((theme) => {
|
|
3
|
+
// Fade the whole frosted layer (translucent tint + blur) via a mask. Deliberately
|
|
4
|
+
// subtle: a low peak alpha so the scrim stays mostly see-through, held across the
|
|
5
|
+
// status-bar inset, then faded to nothing over a short `tail`. Only rendered in
|
|
6
|
+
// standalone (see NavLayout).
|
|
7
|
+
//
|
|
8
|
+
// The tail is SHORT on purpose. It used to run `space.xxxxxl * 4` (128px) below
|
|
9
|
+
// the inset so the gradient was gradual, but anything the page puts in that band
|
|
10
|
+
// is drawn through a partial blur and tint even at scroll top. The admin's
|
|
11
|
+
// library-switcher band (`router/nav-layout-style`) put its picker `space.xxl`
|
|
12
|
+
// (16px) below the inset, where the old tail still had ~⅓ of its strength: on an
|
|
13
|
+
// iPhone the picker's text rendered greyer and softer — no pixel at full text
|
|
14
|
+
// colour, and measurably lower edge contrast — than with the fade gone. With the
|
|
15
|
+
// tail at `space.md` the same device screenshots measure pixel-identical to the
|
|
16
|
+
// fade being absent (device screenshots, 2026-10-26), so the blur has ended before
|
|
17
|
+
// the picker begins while content scrolling up still blurs across the inset and
|
|
18
|
+
// dissolves over the tail instead of hitting a hard edge.
|
|
19
|
+
//
|
|
20
|
+
// The chrome that rests nearest this edge in the installed app — the picker, and
|
|
21
|
+
// the fixed back / page-actions controls — keeps `space.xxxxl` between the inset
|
|
22
|
+
// and itself (`theme.layout.floatingControlTopBase`, `router/nav-layout-style`),
|
|
23
|
+
// so there is clear page between where the blur ends and where they start.
|
|
24
|
+
const peak = 'rgba(0, 0, 0, 0.4)';
|
|
25
|
+
const holdTo = 'env(safe-area-inset-top)';
|
|
26
|
+
const tail = theme.space.md;
|
|
27
|
+
const mask = `linear-gradient(to bottom, ${peak}, ${peak} ${holdTo}, transparent)`;
|
|
28
|
+
return {
|
|
29
|
+
root: {
|
|
30
|
+
position: 'fixed',
|
|
31
|
+
top: 0,
|
|
32
|
+
left: 0,
|
|
33
|
+
width: '100%',
|
|
34
|
+
// The mask's gradient ends at 100%, so the element's height IS the fade's extent.
|
|
35
|
+
height: `calc(env(safe-area-inset-top) + ${tail})`,
|
|
36
|
+
// Semi-transparent frosted glass: the theme's translucent tint over a light backdrop
|
|
37
|
+
// blur, so content behind shows through softly rather than being covered. Both the
|
|
38
|
+
// tint and blur are theme-aware / adapt to light and dark mode.
|
|
39
|
+
backgroundColor: theme.color.bg.glass,
|
|
40
|
+
backdropFilter: 'blur(8px)',
|
|
41
|
+
'-webkit-backdrop-filter': 'blur(8px)',
|
|
42
|
+
maskImage: mask,
|
|
43
|
+
'-webkit-mask-image': mask,
|
|
44
|
+
// Where backdrop-filter is unsupported, lean on the more opaque glass fallback.
|
|
45
|
+
'@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {
|
|
46
|
+
backgroundColor: theme.color.bg.glassFallback,
|
|
47
|
+
},
|
|
48
|
+
// Above page content, below the floating controls / nav (theme.zIndex.sticky).
|
|
49
|
+
zIndex: theme.zIndex.header,
|
|
50
|
+
pointerEvents: 'none',
|
|
51
|
+
[theme.breakpoint.normal]: {
|
|
52
|
+
display: 'none',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/top-fade/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAY,EAAE,EAAE;IACvD,kFAAkF;IAClF,kFAAkF;IAClF,gFAAgF;IAChF,8BAA8B;IAC9B,EAAE;IACF,gFAAgF;IAChF,iFAAiF;IACjF,2EAA2E;IAC3E,+EAA+E;IAC/E,iFAAiF;IACjF,8EAA8E;IAC9E,iFAAiF;IACjF,gFAAgF;IAChF,mFAAmF;IACnF,gFAAgF;IAChF,0DAA0D;IAC1D,EAAE;IACF,iFAAiF;IACjF,iFAAiF;IACjF,iFAAiF;IACjF,2EAA2E;IAC3E,MAAM,IAAI,GAAG,oBAAoB,CAAC;IAClC,MAAM,MAAM,GAAG,0BAA0B,CAAC;IAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,8BAA8B,IAAI,KAAK,IAAI,IAAI,MAAM,gBAAgB,CAAC;IAEnF,OAAO;QACL,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO;YACjB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,MAAM;YACb,kFAAkF;YAClF,MAAM,EAAE,mCAAmC,IAAI,GAAG;YAClD,qFAAqF;YACrF,mFAAmF;YACnF,gEAAgE;YAChE,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK;YACrC,cAAc,EAAE,WAAW;YAC3B,yBAAyB,EAAE,WAAW;YACtC,SAAS,EAAE,IAAI;YACf,oBAAoB,EAAE,IAAI;YAC1B,gFAAgF;YAChF,sFAAsF,EAAE;gBACtF,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,aAAa;aAC9C;YACD,+EAA+E;YAC/E,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;YAC3B,aAAa,EAAE,MAAM;YACrB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;gBACzB,OAAO,EAAE,MAAM;aAChB;SACF;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\n\nexport const useStyle = createUseStyles((theme: Theme) => {\n // Fade the whole frosted layer (translucent tint + blur) via a mask. Deliberately\n // subtle: a low peak alpha so the scrim stays mostly see-through, held across the\n // status-bar inset, then faded to nothing over a short `tail`. Only rendered in\n // standalone (see NavLayout).\n //\n // The tail is SHORT on purpose. It used to run `space.xxxxxl * 4` (128px) below\n // the inset so the gradient was gradual, but anything the page puts in that band\n // is drawn through a partial blur and tint even at scroll top. The admin's\n // library-switcher band (`router/nav-layout-style`) put its picker `space.xxl`\n // (16px) below the inset, where the old tail still had ~⅓ of its strength: on an\n // iPhone the picker's text rendered greyer and softer — no pixel at full text\n // colour, and measurably lower edge contrast — than with the fade gone. With the\n // tail at `space.md` the same device screenshots measure pixel-identical to the\n // fade being absent (device screenshots, 2026-10-26), so the blur has ended before\n // the picker begins while content scrolling up still blurs across the inset and\n // dissolves over the tail instead of hitting a hard edge.\n //\n // The chrome that rests nearest this edge in the installed app — the picker, and\n // the fixed back / page-actions controls — keeps `space.xxxxl` between the inset\n // and itself (`theme.layout.floatingControlTopBase`, `router/nav-layout-style`),\n // so there is clear page between where the blur ends and where they start.\n const peak = 'rgba(0, 0, 0, 0.4)';\n const holdTo = 'env(safe-area-inset-top)';\n const tail = theme.space.md;\n const mask = `linear-gradient(to bottom, ${peak}, ${peak} ${holdTo}, transparent)`;\n\n return {\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n width: '100%',\n // The mask's gradient ends at 100%, so the element's height IS the fade's extent.\n height: `calc(env(safe-area-inset-top) + ${tail})`,\n // Semi-transparent frosted glass: the theme's translucent tint over a light backdrop\n // blur, so content behind shows through softly rather than being covered. Both the\n // tint and blur are theme-aware / adapt to light and dark mode.\n backgroundColor: theme.color.bg.glass,\n backdropFilter: 'blur(8px)',\n '-webkit-backdrop-filter': 'blur(8px)',\n maskImage: mask,\n '-webkit-mask-image': mask,\n // Where backdrop-filter is unsupported, lean on the more opaque glass fallback.\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: theme.color.bg.glassFallback,\n },\n // Above page content, below the floating controls / nav (theme.zIndex.sticky).\n zIndex: theme.zIndex.header,\n pointerEvents: 'none',\n [theme.breakpoint.normal]: {\n display: 'none',\n },\n },\n };\n});\n"]}
|