@ezpg/app-ui 0.21.0 → 0.23.0
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/CHANGELOG.md +29 -0
- package/lib/module/adjust/adjust-template.js +1 -0
- package/lib/module/adjust/adjust-template.js.map +1 -1
- package/lib/module/adjust/axis-adjust.js +181 -0
- package/lib/module/adjust/axis-adjust.js.map +1 -0
- package/lib/module/adjust/axis-dial.js +2 -2
- package/lib/module/adjust/axis-dial.js.map +1 -1
- package/lib/module/adjust/axis-tabs.js +81 -0
- package/lib/module/adjust/axis-tabs.js.map +1 -0
- package/lib/module/adjust/axis-wheel.js +286 -0
- package/lib/module/adjust/axis-wheel.js.map +1 -0
- package/lib/module/adjust/dial-strip.js +6 -4
- package/lib/module/adjust/dial-strip.js.map +1 -1
- package/lib/module/adjust/index.js +4 -0
- package/lib/module/adjust/index.js.map +1 -1
- package/lib/module/adjust/store-sample.js +436 -0
- package/lib/module/adjust/store-sample.js.map +1 -0
- package/lib/module/blocks/chat-message/chat-message.js +1 -0
- package/lib/module/blocks/chat-message/chat-message.js.map +1 -1
- package/lib/module/blocks/choice-art/choice-art.js +2 -0
- package/lib/module/blocks/choice-art/choice-art.js.map +1 -1
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
- package/lib/module/blocks/color-tune/store-sample.js +13 -6
- package/lib/module/blocks/color-tune/store-sample.js.map +1 -1
- package/lib/module/blocks/color-tune/swatch-card.js +1 -1
- package/lib/module/blocks/color-tune/swatch-card.js.map +1 -1
- package/lib/module/blocks/detail-editor/compare-slider.js +6 -2
- package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-canvas.js +195 -61
- package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-types.js +57 -0
- package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
- package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
- package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
- package/lib/module/blocks/detail-editor/focus-context.js +1 -0
- package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
- package/lib/module/blocks/detail-editor/index.js +2 -2
- package/lib/module/blocks/detail-editor/index.js.map +1 -1
- package/lib/module/blocks/detail-editor/keep-words.js +34 -0
- package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
- package/lib/module/blocks/detail-editor/layout-picker.js +195 -8
- package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
- package/lib/module/blocks/detail-request/detail-request.js +213 -0
- package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
- package/lib/module/blocks/detail-request/index.js +4 -0
- package/lib/module/blocks/detail-request/index.js.map +1 -0
- package/lib/module/blocks/detail-studio/action-chips.js +73 -0
- package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
- package/lib/module/blocks/detail-studio/adjust-tiles.js +4 -3
- package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
- package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
- package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
- package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
- package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
- package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
- package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
- package/lib/module/blocks/detail-studio/image-prompt.js +9 -10
- package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
- package/lib/module/blocks/detail-studio/index.js +7 -5
- package/lib/module/blocks/detail-studio/index.js.map +1 -1
- package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
- package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-cover.js +41 -0
- package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
- package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
- package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-kind-grid.js +4 -3
- package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-settings.js +127 -61
- package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
- package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
- package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
- package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
- package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
- package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
- package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
- package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
- package/lib/module/blocks/detail-studio/text-format-panel.js +20 -8
- package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
- package/lib/module/blocks/draft-box/draft-box.js +3 -0
- package/lib/module/blocks/draft-box/draft-box.js.map +1 -1
- package/lib/module/blocks/index.js +1 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +1 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
- package/lib/module/blocks/order-block/order-block.js +19 -5
- package/lib/module/blocks/order-block/order-block.js.map +1 -1
- package/lib/module/blocks/product-tile/product-tile.js +4 -1
- package/lib/module/blocks/product-tile/product-tile.js.map +1 -1
- package/lib/module/blocks/question-accordion/question-accordion.js +1 -2
- package/lib/module/blocks/question-accordion/question-accordion.js.map +1 -1
- package/lib/module/blocks/question-pager/question-pager.js +2 -1
- package/lib/module/blocks/question-pager/question-pager.js.map +1 -1
- package/lib/module/blocks/review-card/review-card.js +4 -0
- package/lib/module/blocks/review-card/review-card.js.map +1 -1
- package/lib/module/blocks/send-bar/send-bar.js +1 -0
- package/lib/module/blocks/send-bar/send-bar.js.map +1 -1
- package/lib/module/blocks/stage-bar/stage-bar.js +3 -2
- package/lib/module/blocks/stage-bar/stage-bar.js.map +1 -1
- package/lib/module/blocks/stat-card/stat-card.js +4 -1
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
- package/lib/module/blocks/step-screen/step-screen.js +5 -2
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
- package/lib/module/blocks/store-top/store-top.js +8 -3
- package/lib/module/blocks/store-top/store-top.js.map +1 -1
- package/lib/module/blocks/summary-cards/summary-cards.js +10 -3
- package/lib/module/blocks/summary-cards/summary-cards.js.map +1 -1
- package/lib/module/blocks/task-tiles/task-tiles.js +3 -2
- package/lib/module/blocks/task-tiles/task-tiles.js.map +1 -1
- package/lib/module/components/amount-summary/amount-summary.js +7 -1
- package/lib/module/components/amount-summary/amount-summary.js.map +1 -1
- package/lib/module/components/button/button.js +19 -5
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/calendar/calendar.js +7 -4
- package/lib/module/components/calendar/calendar.js.map +1 -1
- package/lib/module/components/chip/chip.js +7 -3
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/chip-group/chip-group.js +1 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -1
- package/lib/module/components/circle-grid/circle-grid.js +1 -0
- package/lib/module/components/circle-grid/circle-grid.js.map +1 -1
- package/lib/module/components/credit/credit.js +8 -4
- package/lib/module/components/credit/credit.js.map +1 -1
- package/lib/module/components/dialog/dialog.js +2 -0
- package/lib/module/components/dialog/dialog.js.map +1 -1
- package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
- package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/lib/module/components/empty-state/empty-state.js +1 -0
- package/lib/module/components/empty-state/empty-state.js.map +1 -1
- package/lib/module/components/fact-list/fact-list.js +1 -0
- package/lib/module/components/fact-list/fact-list.js.map +1 -1
- package/lib/module/components/field/field.js +4 -0
- package/lib/module/components/field/field.js.map +1 -1
- package/lib/module/components/filter-tabs/filter-tabs.js +2 -1
- package/lib/module/components/filter-tabs/filter-tabs.js.map +1 -1
- package/lib/module/components/list-row/list-row.js +23 -6
- package/lib/module/components/list-row/list-row.js.map +1 -1
- package/lib/module/components/page-header/page-header.js +1 -0
- package/lib/module/components/page-header/page-header.js.map +1 -1
- package/lib/module/components/pill/pill.js +1 -0
- package/lib/module/components/pill/pill.js.map +1 -1
- package/lib/module/components/segmented-control/segmented-control.js +5 -1
- package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
- package/lib/module/components/segmented-tabs/segmented-tabs.js +3 -2
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
- package/lib/module/components/skeleton/skeleton.js +4 -2
- package/lib/module/components/skeleton/skeleton.js.map +1 -1
- package/lib/module/components/slider/slider.js +53 -16
- package/lib/module/components/slider/slider.js.map +1 -1
- package/lib/module/components/status-steps/status-steps.js +2 -0
- package/lib/module/components/status-steps/status-steps.js.map +1 -1
- package/lib/module/components/text/figures.js +82 -0
- package/lib/module/components/text/figures.js.map +1 -0
- package/lib/module/components/text/index.js +1 -0
- package/lib/module/components/text/index.js.map +1 -1
- package/lib/module/components/text/metrics.js +5 -0
- package/lib/module/components/text/metrics.js.map +1 -0
- package/lib/module/components/text/text.js +31 -2
- package/lib/module/components/text/text.js.map +1 -1
- package/lib/module/components/tile-grid/tile-grid.js +3 -2
- package/lib/module/components/tile-grid/tile-grid.js.map +1 -1
- package/lib/module/components/toast/toast.js +4 -1
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/components/value-rows/value-rows.js +8 -1
- package/lib/module/components/value-rows/value-rows.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/field-label.js +2 -0
- package/lib/module/internal/field-label.js.map +1 -1
- package/lib/module/internal/glyphs.js +2 -1
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/line-icons.js +1 -0
- package/lib/module/internal/line-icons.js.map +1 -1
- package/lib/module/internal/retry-glyph.js +5 -2
- package/lib/module/internal/retry-glyph.js.map +1 -1
- package/lib/module/internal/roll-text.js +10 -2
- package/lib/module/internal/roll-text.js.map +1 -1
- package/lib/module/internal/sample-tiles.js +2 -0
- package/lib/module/internal/sample-tiles.js.map +1 -1
- package/lib/module/internal/undo-glyph.js +11 -8
- package/lib/module/internal/undo-glyph.js.map +1 -1
- package/lib/module/sortable/section-board.js +75 -89
- package/lib/module/sortable/section-board.js.map +1 -1
- package/lib/module/templates/design-pick-template.js +9 -1
- package/lib/module/templates/design-pick-template.js.map +1 -1
- package/lib/module/templates/intro-template.js +3 -3
- package/lib/module/templates/intro-template.js.map +1 -1
- package/lib/module/templates/preview-edit-template.js +3 -0
- package/lib/module/templates/preview-edit-template.js.map +1 -1
- package/lib/module/templates/result-template.js +2 -1
- package/lib/module/templates/result-template.js.map +1 -1
- package/lib/module/templates/scroll-templates.js +12 -2
- package/lib/module/templates/scroll-templates.js.map +1 -1
- package/lib/module/templates/sheet-form-template.js +4 -0
- package/lib/module/templates/sheet-form-template.js.map +1 -1
- package/lib/module/theme/base.js +16 -9
- package/lib/module/theme/base.js.map +1 -1
- package/lib/module/theme/create-theme.js +6 -2
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/tokens.js +23 -2
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
- package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
- package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
- package/lib/typescript/src/adjust/dial-strip.d.ts.map +1 -1
- package/lib/typescript/src/adjust/index.d.ts +4 -0
- package/lib/typescript/src/adjust/index.d.ts.map +1 -1
- package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
- package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
- package/lib/typescript/src/blocks/chat-message/chat-message.d.ts.map +1 -1
- package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -1
- package/lib/typescript/src/blocks/color-tune/store-sample.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
- package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/adjust-tiles.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
- package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
- package/lib/typescript/src/blocks/draft-box/draft-box.d.ts.map +1 -1
- package/lib/typescript/src/blocks/index.d.ts +1 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
- package/lib/typescript/src/blocks/order-block/order-block.d.ts.map +1 -1
- package/lib/typescript/src/blocks/product-tile/product-tile.d.ts.map +1 -1
- package/lib/typescript/src/blocks/question-accordion/question-accordion.d.ts.map +1 -1
- package/lib/typescript/src/blocks/question-pager/question-pager.d.ts.map +1 -1
- package/lib/typescript/src/blocks/review-card/review-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/send-bar/send-bar.d.ts.map +1 -1
- package/lib/typescript/src/blocks/stage-bar/stage-bar.d.ts.map +1 -1
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
- package/lib/typescript/src/blocks/store-top/store-top.d.ts.map +1 -1
- package/lib/typescript/src/blocks/summary-cards/summary-cards.d.ts.map +1 -1
- package/lib/typescript/src/blocks/task-tiles/task-tiles.d.ts.map +1 -1
- package/lib/typescript/src/components/amount-summary/amount-summary.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +3 -1
- package/lib/typescript/src/components/button/button.d.ts.map +1 -1
- package/lib/typescript/src/components/calendar/calendar.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/chip.d.ts +2 -1
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/circle-grid/circle-grid.d.ts.map +1 -1
- package/lib/typescript/src/components/credit/credit.d.ts +1 -0
- package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
- package/lib/typescript/src/components/fact-list/fact-list.d.ts.map +1 -1
- package/lib/typescript/src/components/field/field.d.ts.map +1 -1
- package/lib/typescript/src/components/filter-tabs/filter-tabs.d.ts.map +1 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts +3 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
- package/lib/typescript/src/components/pill/pill.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/slider.d.ts +2 -1
- package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
- package/lib/typescript/src/components/status-steps/status-steps.d.ts.map +1 -1
- package/lib/typescript/src/components/text/figures.d.ts +12 -0
- package/lib/typescript/src/components/text/figures.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +1 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -1
- package/lib/typescript/src/components/text/metrics.d.ts +6 -0
- package/lib/typescript/src/components/text/metrics.d.ts.map +1 -0
- package/lib/typescript/src/components/text/text.d.ts +2 -2
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/tile-grid/tile-grid.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/components/value-rows/value-rows.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/field-label.d.ts.map +1 -1
- package/lib/typescript/src/internal/glyphs.d.ts +1 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/line-icons.d.ts +1 -0
- package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
- package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
- package/lib/typescript/src/internal/roll-text.d.ts +3 -2
- package/lib/typescript/src/internal/roll-text.d.ts.map +1 -1
- package/lib/typescript/src/internal/sample-tiles.d.ts +2 -0
- package/lib/typescript/src/internal/sample-tiles.d.ts.map +1 -1
- package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
- package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
- package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/result-template.d.ts +2 -1
- package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/scroll-templates.d.ts.map +1 -1
- package/lib/typescript/src/templates/sheet-form-template.d.ts.map +1 -1
- package/lib/typescript/src/theme/base.d.ts +9 -2
- package/lib/typescript/src/theme/base.d.ts.map +1 -1
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens.d.ts +3 -1
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +12 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adjust/adjust-template.tsx +1 -0
- package/src/adjust/axis-adjust.tsx +206 -0
- package/src/adjust/axis-dial.tsx +2 -2
- package/src/adjust/axis-tabs.tsx +81 -0
- package/src/adjust/axis-wheel.tsx +309 -0
- package/src/adjust/dial-strip.tsx +5 -3
- package/src/adjust/index.ts +15 -0
- package/src/adjust/store-sample.tsx +519 -0
- package/src/blocks/chat-message/chat-message.tsx +1 -0
- package/src/blocks/choice-art/choice-art.tsx +2 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
- package/src/blocks/color-tune/store-sample.tsx +11 -6
- package/src/blocks/color-tune/swatch-card.tsx +1 -1
- package/src/blocks/detail-editor/compare-slider.tsx +4 -1
- package/src/blocks/detail-editor/detail-canvas.tsx +267 -69
- package/src/blocks/detail-editor/detail-types.ts +37 -0
- package/src/blocks/detail-editor/draft-preview.tsx +46 -2
- package/src/blocks/detail-editor/focus-context.ts +13 -0
- package/src/blocks/detail-editor/index.ts +11 -1
- package/src/blocks/detail-editor/keep-words.ts +36 -0
- package/src/blocks/detail-editor/layout-picker.tsx +191 -6
- package/src/blocks/detail-request/detail-request.tsx +198 -0
- package/src/blocks/detail-request/index.ts +11 -0
- package/src/blocks/detail-studio/action-chips.tsx +78 -0
- package/src/blocks/detail-studio/adjust-tiles.tsx +4 -3
- package/src/blocks/detail-studio/asset-grid.tsx +30 -16
- package/src/blocks/detail-studio/confirm-row.tsx +3 -0
- package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
- package/src/blocks/detail-studio/edge-fade.tsx +76 -0
- package/src/blocks/detail-studio/image-prompt.tsx +7 -9
- package/src/blocks/detail-studio/index.ts +19 -16
- package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
- package/src/blocks/detail-studio/section-cover.tsx +44 -0
- package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
- package/src/blocks/detail-studio/section-kind-grid.tsx +4 -2
- package/src/blocks/detail-studio/section-settings.tsx +124 -69
- package/src/blocks/detail-studio/studio-bar.tsx +61 -41
- package/src/blocks/detail-studio/studio-dock.tsx +19 -37
- package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
- package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
- package/src/blocks/detail-studio/studio-steps.tsx +58 -0
- package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
- package/src/blocks/detail-studio/studio-tools.tsx +126 -0
- package/src/blocks/detail-studio/text-format-panel.tsx +30 -14
- package/src/blocks/draft-box/draft-box.tsx +3 -0
- package/src/blocks/index.tsx +1 -0
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +1 -0
- package/src/blocks/order-block/order-block.tsx +20 -4
- package/src/blocks/product-tile/product-tile.tsx +4 -1
- package/src/blocks/question-accordion/question-accordion.tsx +0 -1
- package/src/blocks/question-pager/question-pager.tsx +2 -1
- package/src/blocks/review-card/review-card.tsx +4 -0
- package/src/blocks/send-bar/send-bar.tsx +1 -0
- package/src/blocks/stage-bar/stage-bar.tsx +3 -2
- package/src/blocks/stat-card/stat-card.tsx +2 -1
- package/src/blocks/step-screen/step-screen.tsx +5 -2
- package/src/blocks/store-top/store-top.tsx +7 -2
- package/src/blocks/summary-cards/summary-cards.tsx +4 -3
- package/src/blocks/task-tiles/task-tiles.tsx +2 -1
- package/src/components/amount-summary/amount-summary.tsx +9 -3
- package/src/components/button/button.tsx +18 -5
- package/src/components/calendar/calendar.tsx +5 -2
- package/src/components/chip/chip.tsx +11 -2
- package/src/components/chip-group/chip-group.tsx +2 -0
- package/src/components/circle-grid/circle-grid.tsx +5 -1
- package/src/components/credit/credit.tsx +11 -4
- package/src/components/dialog/dialog.tsx +2 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
- package/src/components/empty-state/empty-state.tsx +1 -0
- package/src/components/fact-list/fact-list.tsx +1 -0
- package/src/components/field/field.tsx +4 -0
- package/src/components/filter-tabs/filter-tabs.tsx +2 -1
- package/src/components/list-row/list-row.tsx +40 -5
- package/src/components/page-header/page-header.tsx +1 -0
- package/src/components/pill/pill.tsx +1 -0
- package/src/components/segmented-control/segmented-control.tsx +12 -2
- package/src/components/segmented-tabs/segmented-tabs.tsx +2 -1
- package/src/components/skeleton/skeleton.tsx +5 -2
- package/src/components/slider/slider.tsx +66 -14
- package/src/components/status-steps/status-steps.tsx +2 -0
- package/src/components/text/figures.tsx +92 -0
- package/src/components/text/index.ts +7 -0
- package/src/components/text/metrics.ts +5 -0
- package/src/components/text/text.tsx +60 -16
- package/src/components/tile-grid/tile-grid.tsx +3 -2
- package/src/components/toast/toast.tsx +7 -1
- package/src/components/value-rows/value-rows.tsx +9 -1
- package/src/index.tsx +1 -0
- package/src/internal/field-label.tsx +2 -0
- package/src/internal/glyphs.tsx +2 -0
- package/src/internal/line-icons.ts +2 -0
- package/src/internal/retry-glyph.tsx +7 -2
- package/src/internal/roll-text.tsx +12 -2
- package/src/internal/sample-tiles.tsx +2 -0
- package/src/internal/undo-glyph.tsx +12 -11
- package/src/sortable/section-board.tsx +73 -76
- package/src/templates/design-pick-template.tsx +10 -1
- package/src/templates/intro-template.tsx +14 -12
- package/src/templates/preview-edit-template.tsx +3 -0
- package/src/templates/result-template.tsx +3 -0
- package/src/templates/scroll-templates.tsx +11 -2
- package/src/templates/sheet-form-template.tsx +4 -0
- package/src/theme/base.ts +9 -2
- package/src/theme/create-theme.ts +9 -2
- package/src/theme/tokens.ts +37 -3
- package/src/types/index.ts +13 -0
- package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
- package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
- package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
- package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
- package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
- package/src/blocks/detail-studio/section-thumb.tsx +0 -41
package/src/adjust/axis-dial.tsx
CHANGED
|
@@ -43,7 +43,7 @@ const END_W = 104;
|
|
|
43
43
|
const DEAD = 24;
|
|
44
44
|
const NUMBER_SIZE = 46;
|
|
45
45
|
const NUMBER_LINE = 50;
|
|
46
|
-
const NUMBER_TRACK = -1.
|
|
46
|
+
const NUMBER_TRACK = -1.38;
|
|
47
47
|
|
|
48
48
|
const point = (r: number, deg: number) => {
|
|
49
49
|
const a = (deg * Math.PI) / 180;
|
|
@@ -82,7 +82,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
82
82
|
justifyContent: 'center',
|
|
83
83
|
gap: t.space[1],
|
|
84
84
|
},
|
|
85
|
-
number: { fontWeight: '
|
|
85
|
+
number: { fontWeight: '500', fontVariant: ['tabular-nums'] },
|
|
86
86
|
end: { position: 'absolute', alignItems: 'center' },
|
|
87
87
|
}));
|
|
88
88
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Text } from '../components/text/text';
|
|
3
|
+
import { PressableBase } from '../internal/pressable-base';
|
|
4
|
+
import { useTheme } from '../theme/theme-provider';
|
|
5
|
+
import { makeStyles } from '../utils/styles';
|
|
6
|
+
|
|
7
|
+
export type AxisTab = { key: string; label: string; changed?: boolean };
|
|
8
|
+
|
|
9
|
+
export type AxisTabsProps = {
|
|
10
|
+
items: readonly AxisTab[];
|
|
11
|
+
selected: string | null;
|
|
12
|
+
onSelect: (key: string) => void;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const AXIS_TAB_SIZE = 62;
|
|
17
|
+
|
|
18
|
+
const DOT = 4;
|
|
19
|
+
|
|
20
|
+
const useStyles = makeStyles((t) => ({
|
|
21
|
+
root: {
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
paddingHorizontal: t.space[4],
|
|
25
|
+
},
|
|
26
|
+
tab: {
|
|
27
|
+
width: AXIS_TAB_SIZE,
|
|
28
|
+
height: AXIS_TAB_SIZE,
|
|
29
|
+
borderRadius: AXIS_TAB_SIZE / 2,
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
backgroundColor: t.colors.recess,
|
|
33
|
+
},
|
|
34
|
+
on: { backgroundColor: t.colors.raised, boxShadow: t.shadow.lift },
|
|
35
|
+
label: { letterSpacing: t.typography.body.letterSpacing },
|
|
36
|
+
dot: {
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
bottom: t.space[2],
|
|
39
|
+
width: DOT,
|
|
40
|
+
height: DOT,
|
|
41
|
+
borderRadius: DOT / 2,
|
|
42
|
+
backgroundColor: t.colors.arc,
|
|
43
|
+
},
|
|
44
|
+
dotOn: { backgroundColor: t.colors.primary },
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
export function AxisTabs({ items, selected, onSelect, style }: AxisTabsProps) {
|
|
48
|
+
const t = useTheme();
|
|
49
|
+
const s = useStyles();
|
|
50
|
+
return (
|
|
51
|
+
<View accessibilityRole="tablist" style={[s.root, style]}>
|
|
52
|
+
{items.map((item) => {
|
|
53
|
+
const on = item.key === selected;
|
|
54
|
+
return (
|
|
55
|
+
<PressableBase
|
|
56
|
+
key={item.key}
|
|
57
|
+
onPress={() => onSelect(item.key)}
|
|
58
|
+
accessibilityRole="tab"
|
|
59
|
+
accessibilityLabel={item.label}
|
|
60
|
+
accessibilityState={{ selected: on }}
|
|
61
|
+
style={[s.tab, on && s.on]}
|
|
62
|
+
>
|
|
63
|
+
<Text
|
|
64
|
+
variant="body"
|
|
65
|
+
weight={on ? 'semibold' : 'medium'}
|
|
66
|
+
numberOfLines={1}
|
|
67
|
+
maxFontSizeMultiplier={1}
|
|
68
|
+
style={[
|
|
69
|
+
s.label,
|
|
70
|
+
{ color: on ? t.colors.title : t.colors.mutedForeground },
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
{item.label}
|
|
74
|
+
</Text>
|
|
75
|
+
{item.changed ? <View style={[s.dot, on && s.dotOn]} /> : null}
|
|
76
|
+
</PressableBase>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</View>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
PanResponder,
|
|
4
|
+
Platform,
|
|
5
|
+
View,
|
|
6
|
+
type LayoutChangeEvent,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type ViewStyle,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import Svg, { Line } from 'react-native-svg';
|
|
11
|
+
import { Text } from '../components/text/text';
|
|
12
|
+
import { PressableBase } from '../internal/pressable-base';
|
|
13
|
+
import { useReducedMotion } from '../internal/use-reduced-motion';
|
|
14
|
+
import { useTheme } from '../theme/theme-provider';
|
|
15
|
+
import { makeStyles } from '../utils/styles';
|
|
16
|
+
import { clamp } from './hsl';
|
|
17
|
+
|
|
18
|
+
export type AxisLevel = -1 | 0 | 1;
|
|
19
|
+
|
|
20
|
+
export type AxisWheelProps = {
|
|
21
|
+
level: AxisLevel;
|
|
22
|
+
onChange: (level: AxisLevel) => void;
|
|
23
|
+
startLabel: string;
|
|
24
|
+
endLabel: string;
|
|
25
|
+
centerLabel?: string;
|
|
26
|
+
nudge?: boolean;
|
|
27
|
+
accessibilityLabel: string;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const AXIS_WHEEL_HEIGHT = 112;
|
|
32
|
+
|
|
33
|
+
const HEIGHT = 96;
|
|
34
|
+
const TOP = AXIS_WHEEL_HEIGHT - HEIGHT;
|
|
35
|
+
const STOP = 40;
|
|
36
|
+
const UNIT = 4;
|
|
37
|
+
const GAP = 13;
|
|
38
|
+
const BEND = 0.72;
|
|
39
|
+
const SIDE = 52;
|
|
40
|
+
const TICK = 2.2;
|
|
41
|
+
const STOP_TICK = 3;
|
|
42
|
+
const NEEDLE = 3;
|
|
43
|
+
const EDGE = 0.34;
|
|
44
|
+
const REST = 0.94;
|
|
45
|
+
const SHORT = 0.84;
|
|
46
|
+
const DIM = 0.72;
|
|
47
|
+
const OUT = 0.36;
|
|
48
|
+
const TAP = 5;
|
|
49
|
+
const TWICE = 320;
|
|
50
|
+
const EASE = 280;
|
|
51
|
+
const FLING = 90;
|
|
52
|
+
const NUDGE_AT = 600;
|
|
53
|
+
const NUDGE_FOR = 1300;
|
|
54
|
+
const NUDGE_BY = 6;
|
|
55
|
+
|
|
56
|
+
const rad = (deg: number) => (deg * Math.PI) / 180;
|
|
57
|
+
|
|
58
|
+
const levelAt = (position: number): AxisLevel => {
|
|
59
|
+
const step = clamp(Math.round(position / STOP), -1, 1);
|
|
60
|
+
return step < 0 ? -1 : step > 0 ? 1 : 0;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const useStyles = makeStyles((t) => ({
|
|
64
|
+
root: { height: AXIS_WHEEL_HEIGHT },
|
|
65
|
+
stage: {
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
left: 0,
|
|
68
|
+
right: 0,
|
|
69
|
+
top: TOP,
|
|
70
|
+
height: HEIGHT,
|
|
71
|
+
overflow: 'hidden',
|
|
72
|
+
},
|
|
73
|
+
ends: {
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
left: t.layout.screenX - t.space[2],
|
|
76
|
+
right: t.layout.screenX - t.space[2],
|
|
77
|
+
top: -t.space[3],
|
|
78
|
+
flexDirection: 'row',
|
|
79
|
+
justifyContent: 'space-between',
|
|
80
|
+
},
|
|
81
|
+
end: {
|
|
82
|
+
height: t.controlSize.sm,
|
|
83
|
+
paddingHorizontal: t.space[2],
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
},
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
const noScroll = (
|
|
89
|
+
Platform.OS === 'web' ? { touchAction: 'none', cursor: 'grab' } : null
|
|
90
|
+
) as ViewStyle | null;
|
|
91
|
+
|
|
92
|
+
export function AxisWheel({
|
|
93
|
+
level,
|
|
94
|
+
onChange,
|
|
95
|
+
startLabel,
|
|
96
|
+
endLabel,
|
|
97
|
+
centerLabel = '중간',
|
|
98
|
+
nudge = false,
|
|
99
|
+
accessibilityLabel,
|
|
100
|
+
style,
|
|
101
|
+
}: AxisWheelProps) {
|
|
102
|
+
const t = useTheme();
|
|
103
|
+
const s = useStyles();
|
|
104
|
+
const reduced = useReducedMotion();
|
|
105
|
+
const [width, setWidth] = useState(0);
|
|
106
|
+
const [held, setHeld] = useState(false);
|
|
107
|
+
const [position, setPosition] = useState(level * STOP);
|
|
108
|
+
const at = useRef(position);
|
|
109
|
+
const frame = useRef(0);
|
|
110
|
+
const touched = useRef(false);
|
|
111
|
+
const tapped = useRef(0);
|
|
112
|
+
const latest = useRef({ level, onChange, width });
|
|
113
|
+
latest.current = { level, onChange, width };
|
|
114
|
+
|
|
115
|
+
const move = (next: number) => {
|
|
116
|
+
at.current = next;
|
|
117
|
+
setPosition(next);
|
|
118
|
+
};
|
|
119
|
+
const ease = (to: number) => {
|
|
120
|
+
cancelAnimationFrame(frame.current);
|
|
121
|
+
const from = at.current;
|
|
122
|
+
const started = Date.now();
|
|
123
|
+
const run = () => {
|
|
124
|
+
const k = Math.min(1, (Date.now() - started) / EASE);
|
|
125
|
+
move(from + (to - from) * (1 - Math.pow(1 - k, 3)));
|
|
126
|
+
if (k < 1) frame.current = requestAnimationFrame(run);
|
|
127
|
+
};
|
|
128
|
+
run();
|
|
129
|
+
};
|
|
130
|
+
const tell = (next: AxisLevel) => {
|
|
131
|
+
if (next !== latest.current.level) latest.current.onChange(next);
|
|
132
|
+
};
|
|
133
|
+
const go = (next: AxisLevel) => {
|
|
134
|
+
touched.current = true;
|
|
135
|
+
tell(next);
|
|
136
|
+
ease(next * STOP);
|
|
137
|
+
};
|
|
138
|
+
const actions = useRef({ move, ease, tell, go });
|
|
139
|
+
actions.current = { move, ease, tell, go };
|
|
140
|
+
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (levelAt(at.current) === level) return;
|
|
143
|
+
if (reduced) {
|
|
144
|
+
actions.current.move(level * STOP);
|
|
145
|
+
} else {
|
|
146
|
+
actions.current.ease(level * STOP);
|
|
147
|
+
}
|
|
148
|
+
}, [level, reduced]);
|
|
149
|
+
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
if (!nudge || reduced) return undefined;
|
|
152
|
+
let started = 0;
|
|
153
|
+
const run = () => {
|
|
154
|
+
if (touched.current) return;
|
|
155
|
+
const k = Math.min(1, (Date.now() - started) / NUDGE_FOR);
|
|
156
|
+
const base = latest.current.level * STOP;
|
|
157
|
+
actions.current.move(
|
|
158
|
+
base + Math.sin(k * Math.PI * 2) * NUDGE_BY * (1 - k)
|
|
159
|
+
);
|
|
160
|
+
if (k < 1) frame.current = requestAnimationFrame(run);
|
|
161
|
+
};
|
|
162
|
+
const timer = setTimeout(() => {
|
|
163
|
+
started = Date.now();
|
|
164
|
+
run();
|
|
165
|
+
}, NUDGE_AT);
|
|
166
|
+
return () => clearTimeout(timer);
|
|
167
|
+
}, [nudge, reduced]);
|
|
168
|
+
|
|
169
|
+
useEffect(() => () => cancelAnimationFrame(frame.current), []);
|
|
170
|
+
|
|
171
|
+
const pan = useMemo(() => {
|
|
172
|
+
let from = 0;
|
|
173
|
+
let left = 0;
|
|
174
|
+
const perUnit = GAP / UNIT;
|
|
175
|
+
return PanResponder.create({
|
|
176
|
+
onStartShouldSetPanResponder: () => true,
|
|
177
|
+
onMoveShouldSetPanResponder: (_, g) => Math.abs(g.dx) > Math.abs(g.dy),
|
|
178
|
+
onPanResponderTerminationRequest: () => false,
|
|
179
|
+
onPanResponderGrant: (e) => {
|
|
180
|
+
cancelAnimationFrame(frame.current);
|
|
181
|
+
touched.current = true;
|
|
182
|
+
from = at.current;
|
|
183
|
+
left = e.nativeEvent.locationX;
|
|
184
|
+
setHeld(true);
|
|
185
|
+
},
|
|
186
|
+
onPanResponderMove: (_, g) => {
|
|
187
|
+
const raw = from - g.dx / perUnit;
|
|
188
|
+
const soft =
|
|
189
|
+
raw > STOP
|
|
190
|
+
? STOP + (raw - STOP) * 0.3
|
|
191
|
+
: raw < -STOP
|
|
192
|
+
? -STOP + (raw + STOP) * 0.3
|
|
193
|
+
: raw;
|
|
194
|
+
actions.current.move(soft);
|
|
195
|
+
actions.current.tell(levelAt(soft));
|
|
196
|
+
},
|
|
197
|
+
onPanResponderRelease: (_, g) => {
|
|
198
|
+
setHeld(false);
|
|
199
|
+
if (Math.abs(g.dx) < TAP && Math.abs(g.dy) < TAP) {
|
|
200
|
+
const now = Date.now();
|
|
201
|
+
const twice = now - tapped.current < TWICE;
|
|
202
|
+
tapped.current = twice ? 0 : now;
|
|
203
|
+
const side = left / Math.max(1, latest.current.width) - 0.5;
|
|
204
|
+
const step = Math.abs(side) > 0.14 ? Math.sign(side) : 0;
|
|
205
|
+
const base = twice && !step ? 0 : levelAt(at.current) + step;
|
|
206
|
+
actions.current.go(levelAt(base * STOP));
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
actions.current.go(levelAt(at.current - (g.vx * FLING) / perUnit));
|
|
210
|
+
},
|
|
211
|
+
onPanResponderTerminate: () => {
|
|
212
|
+
setHeld(false);
|
|
213
|
+
actions.current.go(levelAt(at.current));
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
}, []);
|
|
217
|
+
|
|
218
|
+
const lines = [];
|
|
219
|
+
if (width > 0) {
|
|
220
|
+
const mid = width / 2;
|
|
221
|
+
const r = width * BEND;
|
|
222
|
+
const turn = (GAP * 180) / (Math.PI * r * UNIT);
|
|
223
|
+
const tall = (HEIGHT / 2 - 3) * (held ? 1 : REST);
|
|
224
|
+
const span = Math.ceil(SIDE / turn / UNIT) * UNIT;
|
|
225
|
+
const first = UNIT * Math.round(position / UNIT);
|
|
226
|
+
for (let n = first - span; n <= first + span; n += UNIT) {
|
|
227
|
+
const x = mid + r * Math.sin(rad((n - position) * turn));
|
|
228
|
+
if (x < -6 || x > width + 6 || Math.abs(x - mid) < GAP * 0.42) continue;
|
|
229
|
+
const u = Math.min(1, Math.abs(x - mid) / mid);
|
|
230
|
+
const stop = n === 0 || Math.abs(n) === STOP;
|
|
231
|
+
const env = tall * (1 - (1 - EDGE) * u * u) * (stop ? 1 : SHORT);
|
|
232
|
+
const inside = Math.abs(n) <= STOP ? 1 : OUT;
|
|
233
|
+
lines.push(
|
|
234
|
+
<Line
|
|
235
|
+
key={n}
|
|
236
|
+
x1={x}
|
|
237
|
+
x2={x}
|
|
238
|
+
y1={HEIGHT / 2 - env}
|
|
239
|
+
y2={HEIGHT / 2 + env}
|
|
240
|
+
stroke={t.colors.title}
|
|
241
|
+
strokeOpacity={(1 - DIM * Math.pow(u, 1.5)) * inside * 0.9}
|
|
242
|
+
strokeWidth={stop ? STOP_TICK : TICK}
|
|
243
|
+
strokeLinecap="round"
|
|
244
|
+
/>
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const word = level < 0 ? startLabel : level > 0 ? endLabel : centerLabel;
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<View
|
|
252
|
+
style={[s.root, style]}
|
|
253
|
+
onLayout={(e: LayoutChangeEvent) => setWidth(e.nativeEvent.layout.width)}
|
|
254
|
+
>
|
|
255
|
+
<View
|
|
256
|
+
{...pan.panHandlers}
|
|
257
|
+
accessible
|
|
258
|
+
accessibilityRole="adjustable"
|
|
259
|
+
accessibilityLabel={accessibilityLabel}
|
|
260
|
+
accessibilityValue={{ min: -1, max: 1, now: level, text: word }}
|
|
261
|
+
accessibilityActions={[{ name: 'increment' }, { name: 'decrement' }]}
|
|
262
|
+
onAccessibilityAction={(e) =>
|
|
263
|
+
go(
|
|
264
|
+
levelAt(
|
|
265
|
+
(level + (e.nativeEvent.actionName === 'increment' ? 1 : -1)) *
|
|
266
|
+
STOP
|
|
267
|
+
)
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
style={[s.stage, noScroll]}
|
|
271
|
+
>
|
|
272
|
+
{width > 0 ? (
|
|
273
|
+
<Svg width={width} height={HEIGHT} pointerEvents="none">
|
|
274
|
+
{lines}
|
|
275
|
+
<Line
|
|
276
|
+
x1={width / 2}
|
|
277
|
+
x2={width / 2}
|
|
278
|
+
y1={NEEDLE / 2}
|
|
279
|
+
y2={HEIGHT - NEEDLE / 2}
|
|
280
|
+
stroke={t.colors.primary}
|
|
281
|
+
strokeWidth={held ? NEEDLE + 0.8 : NEEDLE}
|
|
282
|
+
strokeLinecap="round"
|
|
283
|
+
/>
|
|
284
|
+
</Svg>
|
|
285
|
+
) : null}
|
|
286
|
+
</View>
|
|
287
|
+
<View style={s.ends} pointerEvents="box-none">
|
|
288
|
+
{([-1, 1] as const).map((side) => (
|
|
289
|
+
<PressableBase
|
|
290
|
+
key={side}
|
|
291
|
+
onPress={() => go(side)}
|
|
292
|
+
accessibilityState={{ selected: level === side }}
|
|
293
|
+
style={s.end}
|
|
294
|
+
>
|
|
295
|
+
<Text
|
|
296
|
+
variant="bodyLg"
|
|
297
|
+
weight={level === side ? 'semibold' : 'medium'}
|
|
298
|
+
style={{
|
|
299
|
+
color: level === side ? t.colors.title : t.colors.faint,
|
|
300
|
+
}}
|
|
301
|
+
>
|
|
302
|
+
{side < 0 ? startLabel : endLabel}
|
|
303
|
+
</Text>
|
|
304
|
+
</PressableBase>
|
|
305
|
+
))}
|
|
306
|
+
</View>
|
|
307
|
+
</View>
|
|
308
|
+
);
|
|
309
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScrollView, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
2
|
import Svg, { Circle } from 'react-native-svg';
|
|
3
|
+
import { isFigureText } from '../components/text/figures';
|
|
3
4
|
import { Text } from '../components/text/text';
|
|
4
5
|
import { PressableBase } from '../internal/pressable-base';
|
|
5
6
|
import { useTheme } from '../theme/theme-provider';
|
|
@@ -43,7 +44,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
43
44
|
},
|
|
44
45
|
lifted: { boxShadow: t.shadow.liftSm },
|
|
45
46
|
value: { position: 'absolute' },
|
|
46
|
-
|
|
47
|
+
figure: { fontWeight: '500' },
|
|
47
48
|
}));
|
|
48
49
|
|
|
49
50
|
const ORIGIN = 50;
|
|
@@ -84,6 +85,7 @@ function Ring({
|
|
|
84
85
|
}
|
|
85
86
|
const v = percent ? (item.value ?? ORIGIN) - ORIGIN : (item.value ?? 0);
|
|
86
87
|
const frac = Math.min(1, Math.abs(v) / (item.max ?? (percent ? ORIGIN : 2)));
|
|
88
|
+
const shown = item.text ?? shownOf(item, percent);
|
|
87
89
|
return (
|
|
88
90
|
<View style={[s.ring, on && s.lifted]}>
|
|
89
91
|
<Svg width={SIZE} height={SIZE}>
|
|
@@ -113,9 +115,9 @@ function Ring({
|
|
|
113
115
|
variant="caption"
|
|
114
116
|
weight={on ? 'semibold' : 'medium'}
|
|
115
117
|
tone={on ? 'default' : 'muted'}
|
|
116
|
-
style={[s.value, on &&
|
|
118
|
+
style={[s.value, on && isFigureText(shown) && s.figure]}
|
|
117
119
|
>
|
|
118
|
-
{
|
|
120
|
+
{shown}
|
|
119
121
|
</Text>
|
|
120
122
|
</View>
|
|
121
123
|
);
|
package/src/adjust/index.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export { AdjustTemplate, type AdjustTemplateProps } from './adjust-template';
|
|
2
|
+
export {
|
|
3
|
+
AxisAdjust,
|
|
4
|
+
type AxisAdjustItem,
|
|
5
|
+
type AxisAdjustProps,
|
|
6
|
+
type AxisLevels,
|
|
7
|
+
} from './axis-adjust';
|
|
2
8
|
export { AxisDial, type AxisDialProps } from './axis-dial';
|
|
3
9
|
export {
|
|
4
10
|
AxisDialGroup,
|
|
5
11
|
type AxisDialGroupItem,
|
|
6
12
|
type AxisDialGroupProps,
|
|
7
13
|
} from './axis-dial-group';
|
|
14
|
+
export { AxisTabs, type AxisTab, type AxisTabsProps } from './axis-tabs';
|
|
15
|
+
export { AxisWheel, type AxisLevel, type AxisWheelProps } from './axis-wheel';
|
|
8
16
|
export {
|
|
9
17
|
ColorAdjustNote,
|
|
10
18
|
type ColorAdjustNoteProps,
|
|
@@ -29,4 +37,11 @@ export {
|
|
|
29
37
|
type FontLevel,
|
|
30
38
|
} from './font-controls';
|
|
31
39
|
export { ScrubRuler, type ScrubRulerProps } from './scrub-ruler';
|
|
40
|
+
export {
|
|
41
|
+
StoreSample,
|
|
42
|
+
type StoreSampleCopy,
|
|
43
|
+
type StoreSampleLook,
|
|
44
|
+
type StoreSampleProps,
|
|
45
|
+
type StoreSampleScene,
|
|
46
|
+
} from './store-sample';
|
|
32
47
|
export { hexToHsl, hslToHex } from './hsl';
|