prime-ui-kit 0.9.2 → 0.10.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/README.md +18 -9
- package/THIRD_PARTY_NOTICES +76 -0
- package/dist/chunks/{chunk-ZEFCDEEQ.js → chunk-4TRNUP45.js} +1085 -526
- package/dist/chunks/chunk-EJ2ZVQYL.js +5805 -0
- package/dist/chunks/chunk-GFKDZFQR.js +1208 -0
- package/dist/chunks/{chunk-LXGRKN34.js → chunk-K4FACFQ2.js} +776 -484
- package/dist/chunks/{chunk-IQELQNMR.js → chunk-T7CLQXGB.js} +20 -5
- package/dist/color-picker.js +3 -2
- package/dist/components/button/Button.d.ts +24 -4
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/data-table/Row.d.ts +3 -1
- package/dist/components/data-table/rows.d.ts +4 -0
- package/dist/components/digit-input/DigitInput.d.ts +6 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/input/Input.d.ts +16 -1
- package/dist/components/input/passwordStrength.d.ts +9 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +16 -1
- package/dist/components/sparkline/Sparkline.d.ts +26 -0
- package/dist/hooks/useEdgeOverflow.d.ts +4 -0
- package/dist/icon-set.d.ts +501 -0
- package/dist/icons/Icon.d.ts +10 -18
- package/dist/icons/glyph.d.ts +40 -0
- package/dist/icons/glyphs/a-arrow-down.d.ts +2 -0
- package/dist/icons/glyphs/a-arrow-up.d.ts +2 -0
- package/dist/icons/glyphs/accessibility.d.ts +2 -0
- package/dist/icons/glyphs/activity.d.ts +2 -0
- package/dist/icons/glyphs/air-vent.d.ts +2 -0
- package/dist/icons/glyphs/airplay.d.ts +2 -0
- package/dist/icons/glyphs/alarm-clock-check.d.ts +2 -0
- package/dist/icons/glyphs/alarm-clock-minus.d.ts +2 -0
- package/dist/icons/glyphs/alarm-clock-plus.d.ts +2 -0
- package/dist/icons/glyphs/alarm-clock.d.ts +2 -0
- package/dist/icons/glyphs/alarm-smoke.d.ts +2 -0
- package/dist/icons/glyphs/align-horizontal-space-around.d.ts +2 -0
- package/dist/icons/glyphs/align-vertical-space-around.d.ts +2 -0
- package/dist/icons/glyphs/ambulance.d.ts +2 -0
- package/dist/icons/glyphs/angry.d.ts +2 -0
- package/dist/icons/glyphs/annoyed.d.ts +2 -0
- package/dist/icons/glyphs/archive.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-down-dash.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-down.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-left-dash.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-left.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-right-dash.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-right.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-up-dash.d.ts +2 -0
- package/dist/icons/glyphs/arrow-big-up.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-0-1.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-1-0.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-a-z.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-left.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-right.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down-z-a.d.ts +2 -0
- package/dist/icons/glyphs/arrow-down.d.ts +2 -0
- package/dist/icons/glyphs/arrow-left.d.ts +2 -0
- package/dist/icons/glyphs/arrow-right.d.ts +2 -0
- package/dist/icons/glyphs/arrow-up-down.d.ts +2 -0
- package/dist/icons/glyphs/arrow-up-left.d.ts +2 -0
- package/dist/icons/glyphs/arrow-up-right.d.ts +2 -0
- package/dist/icons/glyphs/arrow-up.d.ts +2 -0
- package/dist/icons/glyphs/at-sign.d.ts +2 -0
- package/dist/icons/glyphs/atom.d.ts +2 -0
- package/dist/icons/glyphs/audio-lines.d.ts +2 -0
- package/dist/icons/glyphs/axe.d.ts +2 -0
- package/dist/icons/glyphs/badge-alert.d.ts +2 -0
- package/dist/icons/glyphs/badge-percent.d.ts +2 -0
- package/dist/icons/glyphs/ban.d.ts +2 -0
- package/dist/icons/glyphs/banana.d.ts +2 -0
- package/dist/icons/glyphs/battery-charging.d.ts +2 -0
- package/dist/icons/glyphs/battery-full.d.ts +2 -0
- package/dist/icons/glyphs/battery-low.d.ts +2 -0
- package/dist/icons/glyphs/battery-medium.d.ts +2 -0
- package/dist/icons/glyphs/battery-plus.d.ts +2 -0
- package/dist/icons/glyphs/battery-warning.d.ts +2 -0
- package/dist/icons/glyphs/battery.d.ts +2 -0
- package/dist/icons/glyphs/bell-electric.d.ts +2 -0
- package/dist/icons/glyphs/bell.d.ts +2 -0
- package/dist/icons/glyphs/biceps-flexed.d.ts +2 -0
- package/dist/icons/glyphs/binary.d.ts +2 -0
- package/dist/icons/glyphs/blocks.d.ts +2 -0
- package/dist/icons/glyphs/bluetooth-connected.d.ts +2 -0
- package/dist/icons/glyphs/bluetooth-off.d.ts +2 -0
- package/dist/icons/glyphs/bluetooth-searching.d.ts +2 -0
- package/dist/icons/glyphs/bluetooth.d.ts +2 -0
- package/dist/icons/glyphs/bold.d.ts +2 -0
- package/dist/icons/glyphs/bone.d.ts +2 -0
- package/dist/icons/glyphs/book-open.d.ts +2 -0
- package/dist/icons/glyphs/book-text.d.ts +2 -0
- package/dist/icons/glyphs/bookmark-check.d.ts +2 -0
- package/dist/icons/glyphs/bookmark-minus.d.ts +2 -0
- package/dist/icons/glyphs/bookmark-plus.d.ts +2 -0
- package/dist/icons/glyphs/bookmark-x.d.ts +2 -0
- package/dist/icons/glyphs/bookmark.d.ts +2 -0
- package/dist/icons/glyphs/bot-message-square.d.ts +2 -0
- package/dist/icons/glyphs/bot.d.ts +2 -0
- package/dist/icons/glyphs/box.d.ts +2 -0
- package/dist/icons/glyphs/boxes.d.ts +2 -0
- package/dist/icons/glyphs/brain.d.ts +2 -0
- package/dist/icons/glyphs/briefcase-business.d.ts +2 -0
- package/dist/icons/glyphs/calendar-check-2.d.ts +2 -0
- package/dist/icons/glyphs/calendar-check.d.ts +2 -0
- package/dist/icons/glyphs/calendar-cog.d.ts +2 -0
- package/dist/icons/glyphs/calendar-days.d.ts +2 -0
- package/dist/icons/glyphs/calendar.d.ts +2 -0
- package/dist/icons/glyphs/car.d.ts +2 -0
- package/dist/icons/glyphs/cast.d.ts +2 -0
- package/dist/icons/glyphs/cctv.d.ts +2 -0
- package/dist/icons/glyphs/chart-bar-decreasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-bar-increasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-column-decreasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-column-increasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-column.d.ts +2 -0
- package/dist/icons/glyphs/chart-line.d.ts +2 -0
- package/dist/icons/glyphs/chart-no-axes-column-decreasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-no-axes-column-increasing.d.ts +2 -0
- package/dist/icons/glyphs/chart-pie.d.ts +2 -0
- package/dist/icons/glyphs/chart-scatter.d.ts +2 -0
- package/dist/icons/glyphs/chart-spline.d.ts +2 -0
- package/dist/icons/glyphs/check-check.d.ts +2 -0
- package/dist/icons/glyphs/check.d.ts +2 -0
- package/dist/icons/glyphs/chess-bishop.d.ts +2 -0
- package/dist/icons/glyphs/chess-king.d.ts +2 -0
- package/dist/icons/glyphs/chess-knight.d.ts +2 -0
- package/dist/icons/glyphs/chess-pawn.d.ts +2 -0
- package/dist/icons/glyphs/chevron-down.d.ts +2 -0
- package/dist/icons/glyphs/chevron-first.d.ts +2 -0
- package/dist/icons/glyphs/chevron-left.d.ts +2 -0
- package/dist/icons/glyphs/chevron-right.d.ts +2 -0
- package/dist/icons/glyphs/chevron-up.d.ts +2 -0
- package/dist/icons/glyphs/chevrons-down-up.d.ts +2 -0
- package/dist/icons/glyphs/chevrons-left-right.d.ts +2 -0
- package/dist/icons/glyphs/chevrons-left.d.ts +2 -0
- package/dist/icons/glyphs/chevrons-right-left.d.ts +2 -0
- package/dist/icons/glyphs/chevrons-up-down.d.ts +2 -0
- package/dist/icons/glyphs/chromium.d.ts +2 -0
- package/dist/icons/glyphs/cigarette-off.d.ts +2 -0
- package/dist/icons/glyphs/cigarette.d.ts +2 -0
- package/dist/icons/glyphs/circle-check.d.ts +2 -0
- package/dist/icons/glyphs/circle-chevron-down.d.ts +2 -0
- package/dist/icons/glyphs/circle-chevron-left.d.ts +2 -0
- package/dist/icons/glyphs/circle-chevron-right.d.ts +2 -0
- package/dist/icons/glyphs/circle-chevron-up.d.ts +2 -0
- package/dist/icons/glyphs/circle-dashed.d.ts +2 -0
- package/dist/icons/glyphs/circle-dollar-sign.d.ts +2 -0
- package/dist/icons/glyphs/circle-gauge.d.ts +2 -0
- package/dist/icons/glyphs/circle-question-mark.d.ts +2 -0
- package/dist/icons/glyphs/circle-x.d.ts +2 -0
- package/dist/icons/glyphs/circle.d.ts +2 -0
- package/dist/icons/glyphs/clapperboard.d.ts +2 -0
- package/dist/icons/glyphs/clipboard-check.d.ts +2 -0
- package/dist/icons/glyphs/clock.d.ts +2 -0
- package/dist/icons/glyphs/cloud-backup.d.ts +2 -0
- package/dist/icons/glyphs/cloud-cog.d.ts +2 -0
- package/dist/icons/glyphs/cloud-download.d.ts +2 -0
- package/dist/icons/glyphs/cloud-lightning.d.ts +2 -0
- package/dist/icons/glyphs/cloud-off.d.ts +2 -0
- package/dist/icons/glyphs/cloud-rain-wind.d.ts +2 -0
- package/dist/icons/glyphs/cloud-rain.d.ts +2 -0
- package/dist/icons/glyphs/cloud-snow.d.ts +2 -0
- package/dist/icons/glyphs/cloud-sun.d.ts +2 -0
- package/dist/icons/glyphs/cloud-sync.d.ts +2 -0
- package/dist/icons/glyphs/cloud-upload.d.ts +2 -0
- package/dist/icons/glyphs/code-xml.d.ts +2 -0
- package/dist/icons/glyphs/coffee.d.ts +2 -0
- package/dist/icons/glyphs/cog.d.ts +2 -0
- package/dist/icons/glyphs/compass.d.ts +2 -0
- package/dist/icons/glyphs/concierge-bell.d.ts +2 -0
- package/dist/icons/glyphs/construction.d.ts +2 -0
- package/dist/icons/glyphs/contrast.d.ts +2 -0
- package/dist/icons/glyphs/cooking-pot.d.ts +2 -0
- package/dist/icons/glyphs/copy.d.ts +2 -0
- package/dist/icons/glyphs/corner-down-left.d.ts +2 -0
- package/dist/icons/glyphs/corner-down-right.d.ts +2 -0
- package/dist/icons/glyphs/corner-left-down.d.ts +2 -0
- package/dist/icons/glyphs/corner-left-up.d.ts +2 -0
- package/dist/icons/glyphs/corner-right-down.d.ts +2 -0
- package/dist/icons/glyphs/corner-right-up.d.ts +2 -0
- package/dist/icons/glyphs/corner-up-left.d.ts +2 -0
- package/dist/icons/glyphs/corner-up-right.d.ts +2 -0
- package/dist/icons/glyphs/cpu.d.ts +2 -0
- package/dist/icons/glyphs/credit-card.d.ts +2 -0
- package/dist/icons/glyphs/cup-soda.d.ts +2 -0
- package/dist/icons/glyphs/database-backup.d.ts +2 -0
- package/dist/icons/glyphs/delete.d.ts +2 -0
- package/dist/icons/glyphs/disc-3.d.ts +2 -0
- package/dist/icons/glyphs/dollar-sign.d.ts +2 -0
- package/dist/icons/glyphs/download.d.ts +2 -0
- package/dist/icons/glyphs/dribbble.d.ts +2 -0
- package/dist/icons/glyphs/droplet.d.ts +2 -0
- package/dist/icons/glyphs/drum.d.ts +2 -0
- package/dist/icons/glyphs/earth.d.ts +2 -0
- package/dist/icons/glyphs/ellipsis.d.ts +2 -0
- package/dist/icons/glyphs/euro.d.ts +2 -0
- package/dist/icons/glyphs/ev-charger.d.ts +2 -0
- package/dist/icons/glyphs/expand.d.ts +2 -0
- package/dist/icons/glyphs/external-link.d.ts +2 -0
- package/dist/icons/glyphs/eye-off.d.ts +2 -0
- package/dist/icons/glyphs/eye.d.ts +2 -0
- package/dist/icons/glyphs/facebook.d.ts +2 -0
- package/dist/icons/glyphs/fan.d.ts +2 -0
- package/dist/icons/glyphs/feather.d.ts +2 -0
- package/dist/icons/glyphs/figma.d.ts +2 -0
- package/dist/icons/glyphs/file-chart-line.d.ts +2 -0
- package/dist/icons/glyphs/file-check-corner.d.ts +2 -0
- package/dist/icons/glyphs/file-check.d.ts +2 -0
- package/dist/icons/glyphs/file-cog.d.ts +2 -0
- package/dist/icons/glyphs/file-pen-line.d.ts +2 -0
- package/dist/icons/glyphs/file-stack.d.ts +2 -0
- package/dist/icons/glyphs/file-text.d.ts +2 -0
- package/dist/icons/glyphs/fingerprint-pattern.d.ts +2 -0
- package/dist/icons/glyphs/fish-symbol.d.ts +2 -0
- package/dist/icons/glyphs/flame.d.ts +2 -0
- package/dist/icons/glyphs/flask-conical.d.ts +2 -0
- package/dist/icons/glyphs/folder-archive.d.ts +2 -0
- package/dist/icons/glyphs/folder-check.d.ts +2 -0
- package/dist/icons/glyphs/folder-clock.d.ts +2 -0
- package/dist/icons/glyphs/folder-code.d.ts +2 -0
- package/dist/icons/glyphs/folder-cog.d.ts +2 -0
- package/dist/icons/glyphs/folder-dot.d.ts +2 -0
- package/dist/icons/glyphs/folder-down.d.ts +2 -0
- package/dist/icons/glyphs/folder-git-2.d.ts +2 -0
- package/dist/icons/glyphs/folder-git.d.ts +2 -0
- package/dist/icons/glyphs/folder-heart.d.ts +2 -0
- package/dist/icons/glyphs/folder-input.d.ts +2 -0
- package/dist/icons/glyphs/folder-kanban.d.ts +2 -0
- package/dist/icons/glyphs/folder-key.d.ts +2 -0
- package/dist/icons/glyphs/folder-lock.d.ts +2 -0
- package/dist/icons/glyphs/folder-minus.d.ts +2 -0
- package/dist/icons/glyphs/folder-open.d.ts +2 -0
- package/dist/icons/glyphs/folder-output.d.ts +2 -0
- package/dist/icons/glyphs/folder-plus.d.ts +2 -0
- package/dist/icons/glyphs/folder-root.d.ts +2 -0
- package/dist/icons/glyphs/folder-sync.d.ts +2 -0
- package/dist/icons/glyphs/folder-tree.d.ts +2 -0
- package/dist/icons/glyphs/folder-up.d.ts +2 -0
- package/dist/icons/glyphs/folder-x.d.ts +2 -0
- package/dist/icons/glyphs/folders.d.ts +2 -0
- package/dist/icons/glyphs/frame.d.ts +2 -0
- package/dist/icons/glyphs/frown.d.ts +2 -0
- package/dist/icons/glyphs/gallery-horizontal-end.d.ts +2 -0
- package/dist/icons/glyphs/gallery-thumbnails.d.ts +2 -0
- package/dist/icons/glyphs/gallery-vertical-end.d.ts +2 -0
- package/dist/icons/glyphs/gauge.d.ts +2 -0
- package/dist/icons/glyphs/gavel.d.ts +2 -0
- package/dist/icons/glyphs/georgian-lari.d.ts +2 -0
- package/dist/icons/glyphs/git-branch.d.ts +2 -0
- package/dist/icons/glyphs/git-commit-horizontal.d.ts +2 -0
- package/dist/icons/glyphs/git-commit-vertical.d.ts +2 -0
- package/dist/icons/glyphs/git-compare-arrows.d.ts +2 -0
- package/dist/icons/glyphs/git-compare.d.ts +2 -0
- package/dist/icons/glyphs/git-fork.d.ts +2 -0
- package/dist/icons/glyphs/git-graph.d.ts +2 -0
- package/dist/icons/glyphs/git-merge.d.ts +2 -0
- package/dist/icons/glyphs/git-pull-request-closed.d.ts +2 -0
- package/dist/icons/glyphs/git-pull-request-create.d.ts +2 -0
- package/dist/icons/glyphs/git-pull-request.d.ts +2 -0
- package/dist/icons/glyphs/github.d.ts +2 -0
- package/dist/icons/glyphs/gitlab.d.ts +2 -0
- package/dist/icons/glyphs/graduation-cap.d.ts +2 -0
- package/dist/icons/glyphs/grip-horizontal.d.ts +2 -0
- package/dist/icons/glyphs/grip-vertical.d.ts +2 -0
- package/dist/icons/glyphs/grip.d.ts +2 -0
- package/dist/icons/glyphs/hammer.d.ts +2 -0
- package/dist/icons/glyphs/hand-coins.d.ts +2 -0
- package/dist/icons/glyphs/hand-fist.d.ts +2 -0
- package/dist/icons/glyphs/hand-grab.d.ts +2 -0
- package/dist/icons/glyphs/hand-heart.d.ts +2 -0
- package/dist/icons/glyphs/hand-helping.d.ts +2 -0
- package/dist/icons/glyphs/hand-metal.d.ts +2 -0
- package/dist/icons/glyphs/hand.d.ts +2 -0
- package/dist/icons/glyphs/hard-drive-download.d.ts +2 -0
- package/dist/icons/glyphs/hard-drive-upload.d.ts +2 -0
- package/dist/icons/glyphs/hard-drive.d.ts +2 -0
- package/dist/icons/glyphs/hat-glasses.d.ts +2 -0
- package/dist/icons/glyphs/heart-handshake.d.ts +2 -0
- package/dist/icons/glyphs/heart-pulse.d.ts +2 -0
- package/dist/icons/glyphs/heart.d.ts +2 -0
- package/dist/icons/glyphs/history.d.ts +2 -0
- package/dist/icons/glyphs/hourglass.d.ts +2 -0
- package/dist/icons/glyphs/house.d.ts +2 -0
- package/dist/icons/glyphs/id-card.d.ts +2 -0
- package/dist/icons/glyphs/image.d.ts +2 -0
- package/dist/icons/glyphs/inbox.d.ts +2 -0
- package/dist/icons/glyphs/indian-rupee.d.ts +2 -0
- package/dist/icons/glyphs/info.d.ts +2 -0
- package/dist/icons/glyphs/instagram.d.ts +2 -0
- package/dist/icons/glyphs/italic.d.ts +2 -0
- package/dist/icons/glyphs/japanese-yen.d.ts +2 -0
- package/dist/icons/glyphs/key-round.d.ts +2 -0
- package/dist/icons/glyphs/key-square.d.ts +2 -0
- package/dist/icons/glyphs/key.d.ts +2 -0
- package/dist/icons/glyphs/keyboard.d.ts +2 -0
- package/dist/icons/glyphs/languages.d.ts +2 -0
- package/dist/icons/glyphs/laptop-minimal-check.d.ts +2 -0
- package/dist/icons/glyphs/laugh.d.ts +2 -0
- package/dist/icons/glyphs/layers.d.ts +2 -0
- package/dist/icons/glyphs/layout-dashboard.d.ts +2 -0
- package/dist/icons/glyphs/layout-grid.d.ts +2 -0
- package/dist/icons/glyphs/layout-panel-top.d.ts +2 -0
- package/dist/icons/glyphs/leaf.d.ts +2 -0
- package/dist/icons/glyphs/leafy-green.d.ts +2 -0
- package/dist/icons/glyphs/link-2.d.ts +2 -0
- package/dist/icons/glyphs/link.d.ts +2 -0
- package/dist/icons/glyphs/linkedin.d.ts +2 -0
- package/dist/icons/glyphs/list-filter.d.ts +2 -0
- package/dist/icons/glyphs/list-todo.d.ts +2 -0
- package/dist/icons/glyphs/list.d.ts +2 -0
- package/dist/icons/glyphs/loader-circle.d.ts +2 -0
- package/dist/icons/glyphs/loader-pinwheel.d.ts +2 -0
- package/dist/icons/glyphs/loader.d.ts +2 -0
- package/dist/icons/glyphs/lock-keyhole-open.d.ts +2 -0
- package/dist/icons/glyphs/lock-keyhole.d.ts +2 -0
- package/dist/icons/glyphs/lock-open.d.ts +2 -0
- package/dist/icons/glyphs/lock.d.ts +2 -0
- package/dist/icons/glyphs/log-in.d.ts +2 -0
- package/dist/icons/glyphs/log-out.d.ts +2 -0
- package/dist/icons/glyphs/mail-check.d.ts +2 -0
- package/dist/icons/glyphs/mail.d.ts +2 -0
- package/dist/icons/glyphs/mailbox.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-check-inside.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-check.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-house.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-minus-inside.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-minus.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-off.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-plus-inside.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-plus.d.ts +2 -0
- package/dist/icons/glyphs/map-pin-x-inside.d.ts +2 -0
- package/dist/icons/glyphs/map-pin.d.ts +2 -0
- package/dist/icons/glyphs/maximize-2.d.ts +2 -0
- package/dist/icons/glyphs/maximize.d.ts +2 -0
- package/dist/icons/glyphs/meh.d.ts +2 -0
- package/dist/icons/glyphs/menu.d.ts +2 -0
- package/dist/icons/glyphs/message-circle-check.d.ts +2 -0
- package/dist/icons/glyphs/message-circle-dashed.d.ts +2 -0
- package/dist/icons/glyphs/message-circle-more.d.ts +2 -0
- package/dist/icons/glyphs/message-circle-plus.d.ts +2 -0
- package/dist/icons/glyphs/message-circle-x.d.ts +2 -0
- package/dist/icons/glyphs/message-circle.d.ts +2 -0
- package/dist/icons/glyphs/message-square-check.d.ts +2 -0
- package/dist/icons/glyphs/message-square-dashed.d.ts +2 -0
- package/dist/icons/glyphs/message-square-more.d.ts +2 -0
- package/dist/icons/glyphs/message-square-plus.d.ts +2 -0
- package/dist/icons/glyphs/message-square-x.d.ts +2 -0
- package/dist/icons/glyphs/message-square.d.ts +2 -0
- package/dist/icons/glyphs/mic-off.d.ts +2 -0
- package/dist/icons/glyphs/mic.d.ts +2 -0
- package/dist/icons/glyphs/minimize.d.ts +2 -0
- package/dist/icons/glyphs/minus.d.ts +2 -0
- package/dist/icons/glyphs/monitor-check.d.ts +2 -0
- package/dist/icons/glyphs/monitor-cog.d.ts +2 -0
- package/dist/icons/glyphs/monitor.d.ts +2 -0
- package/dist/icons/glyphs/moon.d.ts +2 -0
- package/dist/icons/glyphs/mouse-pointer-click.d.ts +2 -0
- package/dist/icons/glyphs/nfc.d.ts +2 -0
- package/dist/icons/glyphs/package.d.ts +2 -0
- package/dist/icons/glyphs/palette.d.ts +2 -0
- package/dist/icons/glyphs/panel-left-close.d.ts +2 -0
- package/dist/icons/glyphs/panel-left-open.d.ts +2 -0
- package/dist/icons/glyphs/panel-right-open.d.ts +2 -0
- package/dist/icons/glyphs/paperclip.d.ts +2 -0
- package/dist/icons/glyphs/party-popper.d.ts +2 -0
- package/dist/icons/glyphs/pause.d.ts +2 -0
- package/dist/icons/glyphs/pen-tool.d.ts +2 -0
- package/dist/icons/glyphs/philippine-peso.d.ts +2 -0
- package/dist/icons/glyphs/phone-call.d.ts +2 -0
- package/dist/icons/glyphs/phone-forwarded.d.ts +2 -0
- package/dist/icons/glyphs/phone-incoming.d.ts +2 -0
- package/dist/icons/glyphs/phone-missed.d.ts +2 -0
- package/dist/icons/glyphs/phone-off.d.ts +2 -0
- package/dist/icons/glyphs/phone.d.ts +2 -0
- package/dist/icons/glyphs/pickaxe.d.ts +2 -0
- package/dist/icons/glyphs/pipette.d.ts +2 -0
- package/dist/icons/glyphs/plane-landing.d.ts +2 -0
- package/dist/icons/glyphs/plane-takeoff.d.ts +2 -0
- package/dist/icons/glyphs/plane.d.ts +2 -0
- package/dist/icons/glyphs/play.d.ts +2 -0
- package/dist/icons/glyphs/plug-zap.d.ts +2 -0
- package/dist/icons/glyphs/plus.d.ts +2 -0
- package/dist/icons/glyphs/pound-sterling.d.ts +2 -0
- package/dist/icons/glyphs/projector.d.ts +2 -0
- package/dist/icons/glyphs/rabbit.d.ts +2 -0
- package/dist/icons/glyphs/radio-tower.d.ts +2 -0
- package/dist/icons/glyphs/radio.d.ts +2 -0
- package/dist/icons/glyphs/receipt-cent.d.ts +2 -0
- package/dist/icons/glyphs/receipt-euro.d.ts +2 -0
- package/dist/icons/glyphs/receipt-indian-rupee.d.ts +2 -0
- package/dist/icons/glyphs/receipt-japanese-yen.d.ts +2 -0
- package/dist/icons/glyphs/receipt-pound-sterling.d.ts +2 -0
- package/dist/icons/glyphs/receipt-russian-ruble.d.ts +2 -0
- package/dist/icons/glyphs/receipt-swiss-franc.d.ts +2 -0
- package/dist/icons/glyphs/receipt-text.d.ts +2 -0
- package/dist/icons/glyphs/receipt-turkish-lira.d.ts +2 -0
- package/dist/icons/glyphs/receipt.d.ts +2 -0
- package/dist/icons/glyphs/redo-dot.d.ts +2 -0
- package/dist/icons/glyphs/redo.d.ts +2 -0
- package/dist/icons/glyphs/refresh-ccw-dot.d.ts +2 -0
- package/dist/icons/glyphs/refresh-ccw.d.ts +2 -0
- package/dist/icons/glyphs/refresh-cw-off.d.ts +2 -0
- package/dist/icons/glyphs/refresh-cw.d.ts +2 -0
- package/dist/icons/glyphs/rocket.d.ts +2 -0
- package/dist/icons/glyphs/rocking-chair.d.ts +2 -0
- package/dist/icons/glyphs/roller-coaster.d.ts +2 -0
- package/dist/icons/glyphs/rotate-ccw.d.ts +2 -0
- package/dist/icons/glyphs/rotate-cw.d.ts +2 -0
- package/dist/icons/glyphs/route.d.ts +2 -0
- package/dist/icons/glyphs/router.d.ts +2 -0
- package/dist/icons/glyphs/russian-ruble.d.ts +2 -0
- package/dist/icons/glyphs/satellite-dish.d.ts +2 -0
- package/dist/icons/glyphs/saudi-riyal.d.ts +2 -0
- package/dist/icons/glyphs/scan-face.d.ts +2 -0
- package/dist/icons/glyphs/scan-text.d.ts +2 -0
- package/dist/icons/glyphs/search.d.ts +2 -0
- package/dist/icons/glyphs/send.d.ts +2 -0
- package/dist/icons/glyphs/server-cog.d.ts +2 -0
- package/dist/icons/glyphs/server-crash.d.ts +2 -0
- package/dist/icons/glyphs/server.d.ts +2 -0
- package/dist/icons/glyphs/settings.d.ts +2 -0
- package/dist/icons/glyphs/shield-check.d.ts +2 -0
- package/dist/icons/glyphs/ship-wheel.d.ts +2 -0
- package/dist/icons/glyphs/ship.d.ts +2 -0
- package/dist/icons/glyphs/shopping-cart.d.ts +2 -0
- package/dist/icons/glyphs/shower-head.d.ts +2 -0
- package/dist/icons/glyphs/shredder.d.ts +2 -0
- package/dist/icons/glyphs/shrink.d.ts +2 -0
- package/dist/icons/glyphs/sliders-horizontal.d.ts +2 -0
- package/dist/icons/glyphs/smartphone-charging.d.ts +2 -0
- package/dist/icons/glyphs/smartphone-nfc.d.ts +2 -0
- package/dist/icons/glyphs/smartphone.d.ts +2 -0
- package/dist/icons/glyphs/smile-plus.d.ts +2 -0
- package/dist/icons/glyphs/smile.d.ts +2 -0
- package/dist/icons/glyphs/snowflake.d.ts +2 -0
- package/dist/icons/glyphs/soup.d.ts +2 -0
- package/dist/icons/glyphs/sparkles.d.ts +2 -0
- package/dist/icons/glyphs/spray-can.d.ts +2 -0
- package/dist/icons/glyphs/square-activity.d.ts +2 -0
- package/dist/icons/glyphs/square-arrow-down.d.ts +2 -0
- package/dist/icons/glyphs/square-arrow-left.d.ts +2 -0
- package/dist/icons/glyphs/square-arrow-right.d.ts +2 -0
- package/dist/icons/glyphs/square-arrow-up.d.ts +2 -0
- package/dist/icons/glyphs/square-chevron-down.d.ts +2 -0
- package/dist/icons/glyphs/square-chevron-left.d.ts +2 -0
- package/dist/icons/glyphs/square-chevron-right.d.ts +2 -0
- package/dist/icons/glyphs/square-chevron-up.d.ts +2 -0
- package/dist/icons/glyphs/square-pen.d.ts +2 -0
- package/dist/icons/glyphs/square-stack.d.ts +2 -0
- package/dist/icons/glyphs/stamp.d.ts +2 -0
- package/dist/icons/glyphs/stethoscope.d.ts +2 -0
- package/dist/icons/glyphs/sun-dim.d.ts +2 -0
- package/dist/icons/glyphs/sun-medium.d.ts +2 -0
- package/dist/icons/glyphs/sun-moon.d.ts +2 -0
- package/dist/icons/glyphs/sun.d.ts +2 -0
- package/dist/icons/glyphs/sunset.d.ts +2 -0
- package/dist/icons/glyphs/swiss-franc.d.ts +2 -0
- package/dist/icons/glyphs/switch-camera.d.ts +2 -0
- package/dist/icons/glyphs/syringe.d.ts +2 -0
- package/dist/icons/glyphs/tablet.d.ts +2 -0
- package/dist/icons/glyphs/telescope.d.ts +2 -0
- package/dist/icons/glyphs/terminal.d.ts +2 -0
- package/dist/icons/glyphs/text-align-center.d.ts +2 -0
- package/dist/icons/glyphs/text-align-end.d.ts +2 -0
- package/dist/icons/glyphs/text-align-start.d.ts +2 -0
- package/dist/icons/glyphs/thermometer.d.ts +2 -0
- package/dist/icons/glyphs/thumbs-down.d.ts +2 -0
- package/dist/icons/glyphs/thumbs-up.d.ts +2 -0
- package/dist/icons/glyphs/ticket.d.ts +2 -0
- package/dist/icons/glyphs/timer.d.ts +2 -0
- package/dist/icons/glyphs/tornado.d.ts +2 -0
- package/dist/icons/glyphs/train-track.d.ts +2 -0
- package/dist/icons/glyphs/trash-2.d.ts +2 -0
- package/dist/icons/glyphs/tree-deciduous.d.ts +2 -0
- package/dist/icons/glyphs/tree-pine.d.ts +2 -0
- package/dist/icons/glyphs/trending-down.d.ts +2 -0
- package/dist/icons/glyphs/trending-up-down.d.ts +2 -0
- package/dist/icons/glyphs/trending-up.d.ts +2 -0
- package/dist/icons/glyphs/triangle-alert.d.ts +2 -0
- package/dist/icons/glyphs/truck.d.ts +2 -0
- package/dist/icons/glyphs/turkish-lira.d.ts +2 -0
- package/dist/icons/glyphs/twitch.d.ts +2 -0
- package/dist/icons/glyphs/twitter.d.ts +2 -0
- package/dist/icons/glyphs/underline.d.ts +2 -0
- package/dist/icons/glyphs/undo-dot.d.ts +2 -0
- package/dist/icons/glyphs/undo.d.ts +2 -0
- package/dist/icons/glyphs/unplug.d.ts +2 -0
- package/dist/icons/glyphs/upload.d.ts +2 -0
- package/dist/icons/glyphs/user-check.d.ts +2 -0
- package/dist/icons/glyphs/user-plus.d.ts +2 -0
- package/dist/icons/glyphs/user-round-check.d.ts +2 -0
- package/dist/icons/glyphs/user-round-cog.d.ts +2 -0
- package/dist/icons/glyphs/user-round-plus.d.ts +2 -0
- package/dist/icons/glyphs/user-round.d.ts +2 -0
- package/dist/icons/glyphs/user.d.ts +2 -0
- package/dist/icons/glyphs/users-round.d.ts +2 -0
- package/dist/icons/glyphs/users.d.ts +2 -0
- package/dist/icons/glyphs/vibrate.d.ts +2 -0
- package/dist/icons/glyphs/volume.d.ts +2 -0
- package/dist/icons/glyphs/wallet.d.ts +2 -0
- package/dist/icons/glyphs/washing-machine.d.ts +2 -0
- package/dist/icons/glyphs/waves-arrow-down.d.ts +2 -0
- package/dist/icons/glyphs/waves-arrow-up.d.ts +2 -0
- package/dist/icons/glyphs/waves-ladder.d.ts +2 -0
- package/dist/icons/glyphs/waves.d.ts +2 -0
- package/dist/icons/glyphs/waypoints.d.ts +2 -0
- package/dist/icons/glyphs/webhook.d.ts +2 -0
- package/dist/icons/glyphs/wifi-cog.d.ts +2 -0
- package/dist/icons/glyphs/wifi-low.d.ts +2 -0
- package/dist/icons/glyphs/wifi-pen.d.ts +2 -0
- package/dist/icons/glyphs/wifi-sync.d.ts +2 -0
- package/dist/icons/glyphs/wifi.d.ts +2 -0
- package/dist/icons/glyphs/wind-arrow-down.d.ts +2 -0
- package/dist/icons/glyphs/wind.d.ts +2 -0
- package/dist/icons/glyphs/workflow.d.ts +2 -0
- package/dist/icons/glyphs/wrench.d.ts +2 -0
- package/dist/icons/glyphs/x.d.ts +2 -0
- package/dist/icons/glyphs/youtube.d.ts +2 -0
- package/dist/icons/glyphs/zap-off.d.ts +2 -0
- package/dist/icons/glyphs/zap.d.ts +2 -0
- package/dist/icons/iconPlay.d.ts +2 -0
- package/dist/icons/registry.d.ts +81 -78
- package/dist/icons.js +996 -0
- package/dist/index.css +1257 -399
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -5
- package/dist/internal/CheckMark.d.ts +12 -0
- package/dist/internal/ChoiceField.d.ts +1 -1
- package/dist/internal/FieldFrame.d.ts +17 -0
- package/dist/internal/MorphText.d.ts +12 -0
- package/dist/internal/RollingNumber.d.ts +14 -0
- package/dist/internal/surfaceDepth.d.ts +25 -0
- package/dist/internal/swatch.d.ts +4 -1
- package/dist/layout/app-shell/AppShell.d.ts +2 -2
- package/dist/motion/celebrate.d.ts +18 -0
- package/dist/tokens/layers.d.ts +37 -0
- package/dist/tokens/naming.d.ts +1 -1
- package/dist/tokens/primitives.d.ts +1 -0
- package/dist/tokens/semantic.d.ts +67 -56
- package/dist/tokens/themes/dark.d.ts +7 -14
- package/package.json +11 -4
- package/src/components/accordion/COMPONENT.md +4 -4
- package/src/components/avatar/COMPONENT.md +1 -1
- package/src/components/button/COMPONENT.md +30 -7
- package/src/components/button/examples/download.tsx +45 -0
- package/src/components/button/examples/hold-to-confirm.tsx +23 -0
- package/src/components/button/examples/in-form.tsx +15 -3
- package/src/components/button/examples/label-morph.tsx +38 -0
- package/src/components/button/examples/variants.tsx +1 -0
- package/src/components/card/COMPONENT.md +4 -2
- package/src/components/card/examples/narrow.tsx +2 -2
- package/src/components/card/examples/panel-chart.tsx +1 -1
- package/src/components/card/examples/variants.tsx +1 -1
- package/src/components/checkbox/COMPONENT.md +1 -1
- package/src/components/checkbox/examples/examples.module.css +1 -1
- package/src/components/code-block/COMPONENT.md +6 -6
- package/src/components/code-block/examples/overview.tsx +1 -1
- package/src/components/code-block/examples/variants.tsx +1 -1
- package/src/components/color-picker/COMPONENT.md +3 -3
- package/src/components/color-picker/examples/in-form.tsx +13 -5
- package/src/components/color-picker/examples/validation.tsx +10 -4
- package/src/components/color-swatches/COMPONENT.md +6 -6
- package/src/components/color-swatches/examples/in-form.tsx +11 -5
- package/src/components/command-menu/COMPONENT.md +1 -1
- package/src/components/crossfade/examples/overview.tsx +3 -3
- package/src/components/data-table/COMPONENT.md +5 -4
- package/src/components/datepicker/COMPONENT.md +3 -3
- package/src/components/datepicker/examples/in-form.tsx +30 -9
- package/src/components/datepicker/examples/validation.tsx +20 -10
- package/src/components/digit-input/COMPONENT.md +8 -6
- package/src/components/digit-input/examples/in-form.tsx +22 -4
- package/src/components/digit-input/examples/on-complete.tsx +7 -6
- package/src/components/digit-input/examples/validation.tsx +12 -5
- package/src/components/dnd/COMPONENT.md +1 -1
- package/src/components/dnd/examples/examples.module.css +4 -4
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/in-form.tsx +7 -2
- package/src/components/dropdown/COMPONENT.md +1 -1
- package/src/components/dropdown/examples/examples.module.css +1 -1
- package/src/components/empty-page/examples/examples.module.css +1 -1
- package/src/components/example-frame/COMPONENT.md +1 -1
- package/src/components/file-upload/COMPONENT.md +3 -3
- package/src/components/file-upload/examples/in-form.tsx +28 -4
- package/src/components/file-upload/examples/validation.tsx +37 -6
- package/src/components/input/COMPONENT.md +13 -4
- package/src/components/input/examples/in-form.tsx +42 -7
- package/src/components/input/examples/password-strength.tsx +12 -0
- package/src/components/input/examples/validation.tsx +38 -13
- package/src/components/kanban/COMPONENT.md +4 -4
- package/src/components/login-form/COMPONENT.md +4 -4
- package/src/components/login-form/examples/register.tsx +2 -2
- package/src/components/login-form/examples/reset-password.tsx +2 -2
- package/src/components/modal/COMPONENT.md +3 -3
- package/src/components/modal/examples/examples.module.css +2 -2
- package/src/components/modal/examples/in-form.tsx +7 -2
- package/src/components/native-select/COMPONENT.md +3 -3
- package/src/components/native-select/examples/examples.module.css +2 -0
- package/src/components/native-select/examples/in-form.tsx +18 -3
- package/src/components/native-select/examples/validation.tsx +8 -3
- package/src/components/page-content/examples/examples.module.css +1 -1
- package/src/components/popover/COMPONENT.md +2 -2
- package/src/components/popover/examples/in-form.tsx +27 -5
- package/src/components/progress-bar/COMPONENT.md +5 -1
- package/src/components/progress-bar/examples/examples.module.css +7 -0
- package/src/components/progress-bar/examples/milestone.tsx +43 -0
- package/src/components/progress-bar/examples/steps.tsx +35 -0
- package/src/components/radio/COMPONENT.md +1 -1
- package/src/components/select/COMPONENT.md +3 -3
- package/src/components/select/examples/examples.module.css +1 -0
- package/src/components/select/examples/in-form.tsx +25 -3
- package/src/components/select/examples/validation.tsx +8 -3
- package/src/components/skeleton/examples/with-crossfade.tsx +3 -3
- package/src/components/slider/COMPONENT.md +1 -1
- package/src/components/sparkline/COMPONENT.md +98 -0
- package/src/components/sparkline/examples/examples.module.css +13 -0
- package/src/components/sparkline/examples/overview.tsx +27 -0
- package/src/components/sparkline/examples/period.tsx +46 -0
- package/src/components/switch/COMPONENT.md +1 -1
- package/src/components/tabs/COMPONENT.md +15 -16
- package/src/components/tabs/examples/examples.module.css +14 -0
- package/src/components/tabs/examples/orientation.tsx +87 -33
- package/src/components/tag-select/COMPONENT.md +3 -3
- package/src/components/tag-select/examples/examples.module.css +1 -0
- package/src/components/tag-select/examples/in-form.tsx +19 -2
- package/src/components/tag-select/examples/validation.tsx +7 -2
- package/src/components/textarea/COMPONENT.md +3 -3
- package/src/components/textarea/examples/in-form.tsx +20 -8
- package/src/components/textarea/examples/validation.tsx +24 -8
- package/src/components/tooltip/COMPONENT.md +8 -6
- package/src/components/tooltip/examples/examples.module.css +2 -2
- package/src/layout/app-header/COMPONENT.md +1 -1
- package/src/layout/app-header/examples/examples.module.css +4 -4
- package/src/layout/app-shell/COMPONENT.md +8 -8
- package/src/layout/app-shell/examples/examples.module.css +3 -3
- package/src/layout/bottom-nav/COMPONENT.md +1 -1
- package/src/layout/bottom-nav/examples/examples.module.css +1 -1
- package/src/layout/sidebar/COMPONENT.md +4 -4
- package/src/layout/sidebar/examples/examples.module.css +5 -5
- package/src/styles/globals.css +125 -2
- package/src/styles/theme-dark.css +37 -13
- package/src/styles/theme-light.css +61 -16
- package/src/styles/tokens.css +1 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Checkbox,
|
|
7
7
|
ChoiceField,
|
|
8
8
|
ChoiceLabel,
|
|
9
|
-
|
|
9
|
+
DEFAULT_PROGRESS_SEGMENTS_LABELS,
|
|
10
10
|
Divider,
|
|
11
11
|
EmptyPage,
|
|
12
12
|
FieldCounter,
|
|
@@ -20,8 +20,11 @@ import {
|
|
|
20
20
|
LayerProvider,
|
|
21
21
|
MenuGroup,
|
|
22
22
|
Portal,
|
|
23
|
+
ProgressBar,
|
|
24
|
+
RollingNumber,
|
|
23
25
|
ScrollContainer,
|
|
24
26
|
Slot,
|
|
27
|
+
SurfaceDepthProvider,
|
|
25
28
|
SwatchChip,
|
|
26
29
|
SwatchContent,
|
|
27
30
|
SwatchFill,
|
|
@@ -31,7 +34,6 @@ import {
|
|
|
31
34
|
choiceVisualClass,
|
|
32
35
|
createComponentContext,
|
|
33
36
|
createImageSlot,
|
|
34
|
-
cx,
|
|
35
37
|
enabledOptions,
|
|
36
38
|
enterMotion_default,
|
|
37
39
|
exitTimeoutMs,
|
|
@@ -54,16 +56,16 @@ import {
|
|
|
54
56
|
palette_default,
|
|
55
57
|
prefersReducedMotion,
|
|
56
58
|
readCssLengthPx,
|
|
59
|
+
resolveSegments,
|
|
60
|
+
resolveValue,
|
|
57
61
|
rovingIndex,
|
|
58
62
|
sameColor,
|
|
59
63
|
sheet_default,
|
|
60
64
|
stepDown,
|
|
61
65
|
swatchClass,
|
|
62
66
|
swatchTierClass,
|
|
63
|
-
textTone_default,
|
|
64
67
|
toDataAttributes,
|
|
65
68
|
touchTargetBlockClass,
|
|
66
|
-
useControlSize,
|
|
67
69
|
useControllableState,
|
|
68
70
|
useCreateStore,
|
|
69
71
|
useEdgeOverflow,
|
|
@@ -72,14 +74,22 @@ import {
|
|
|
72
74
|
useLayer,
|
|
73
75
|
useMediaQuery,
|
|
74
76
|
useMergedRefs,
|
|
75
|
-
|
|
77
|
+
useNestedSurfaceDepth,
|
|
76
78
|
usePresence,
|
|
77
79
|
useScrollLock,
|
|
80
|
+
useStageDepth,
|
|
78
81
|
useStoreSlice,
|
|
79
82
|
useSwatchOptions,
|
|
80
83
|
useSwipeDismiss,
|
|
81
84
|
visuallyHiddenClass
|
|
82
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-4TRNUP45.js";
|
|
86
|
+
import {
|
|
87
|
+
ControlSizeProvider,
|
|
88
|
+
cx,
|
|
89
|
+
textTone_default,
|
|
90
|
+
useControlSize,
|
|
91
|
+
useOptionalControlSize
|
|
92
|
+
} from "./chunk-GFKDZFQR.js";
|
|
83
93
|
|
|
84
94
|
// src/layout/app-header/AppHeader.tsx
|
|
85
95
|
import * as React from "react";
|
|
@@ -418,7 +428,10 @@ function BadgeRoot({
|
|
|
418
428
|
endTaken: trailing
|
|
419
429
|
});
|
|
420
430
|
const textOnly = !trailing && !onPress && edges.children.every(isText);
|
|
421
|
-
const body = /* @__PURE__ */ jsx4(ControlSizeProvider, { value: tier, children:
|
|
431
|
+
const body = /* @__PURE__ */ jsx4(ControlSizeProvider, { value: tier, children: typeof children === "number" ? (
|
|
432
|
+
// A count rolls its digits to the new value (foundation §7 rule 8).
|
|
433
|
+
/* @__PURE__ */ jsx4(RollingNumber, { children })
|
|
434
|
+
) : textOnly ? edges.children : wrapText(edges.children) });
|
|
422
435
|
return /* @__PURE__ */ jsxs3(
|
|
423
436
|
"span",
|
|
424
437
|
{
|
|
@@ -1410,6 +1423,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
|
|
|
1410
1423
|
setMode((prev) => prev === "expanded" ? "compact" : "expanded");
|
|
1411
1424
|
}, [offCanvas, setMode, setOpen]);
|
|
1412
1425
|
const navId = React11.useId();
|
|
1426
|
+
const depth = useNestedSurfaceDepth();
|
|
1413
1427
|
const context = React11.useMemo(
|
|
1414
1428
|
() => ({ persist, mode, setMode, open, setOpen, toggle, offCanvas, size, navId, labels }),
|
|
1415
1429
|
[persist, mode, setMode, open, setOpen, toggle, offCanvas, size, navId, labels]
|
|
@@ -1420,6 +1434,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
|
|
|
1420
1434
|
...rest,
|
|
1421
1435
|
ref: mergedRootRef,
|
|
1422
1436
|
className: cx(Sidebar_default.root, className),
|
|
1437
|
+
"data-depth": depth,
|
|
1423
1438
|
...toDataAttributes({
|
|
1424
1439
|
size,
|
|
1425
1440
|
mode,
|
|
@@ -1448,7 +1463,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
|
|
|
1448
1463
|
className: Sidebar_default.panel,
|
|
1449
1464
|
"aria-label": labels.navigation,
|
|
1450
1465
|
inert: offCanvas && !open || !offCanvas && mode === "hidden" || void 0,
|
|
1451
|
-
children: /* @__PURE__ */ jsx9(LayerProvider, { value: offCanvas ? layer : null, children: /* @__PURE__ */ jsx9(AnchorRectProvider, { value: offCanvas ? null : anchorRect, children: /* @__PURE__ */ jsx9(ControlSizeProvider, { value: size, children }) }) })
|
|
1466
|
+
children: /* @__PURE__ */ jsx9(LayerProvider, { value: offCanvas ? layer : null, children: /* @__PURE__ */ jsx9(AnchorRectProvider, { value: offCanvas ? null : anchorRect, children: /* @__PURE__ */ jsx9(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx9(ControlSizeProvider, { value: size, children }) }) }) })
|
|
1452
1467
|
}
|
|
1453
1468
|
)
|
|
1454
1469
|
]
|
|
@@ -2355,7 +2370,17 @@ function AccordionRoot(props) {
|
|
|
2355
2370
|
children,
|
|
2356
2371
|
...rest
|
|
2357
2372
|
} = props;
|
|
2358
|
-
|
|
2373
|
+
const depth = useNestedSurfaceDepth();
|
|
2374
|
+
return /* @__PURE__ */ jsx10(AccordionProvider, { value: contextValue, children: /* @__PURE__ */ jsx10(
|
|
2375
|
+
"div",
|
|
2376
|
+
{
|
|
2377
|
+
...rest,
|
|
2378
|
+
className: cx(Accordion_default.root, className),
|
|
2379
|
+
"data-depth": depth,
|
|
2380
|
+
...toDataAttributes({ size, layout }),
|
|
2381
|
+
children: /* @__PURE__ */ jsx10(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx10(ControlSizeProvider, { value: size, children }) })
|
|
2382
|
+
}
|
|
2383
|
+
) });
|
|
2359
2384
|
}
|
|
2360
2385
|
AccordionRoot.displayName = "Accordion.Root";
|
|
2361
2386
|
function AccordionItem({
|
|
@@ -2493,13 +2518,16 @@ function BannerRoot({
|
|
|
2493
2518
|
() => ({ onDismiss, size, dismissLabel }),
|
|
2494
2519
|
[onDismiss, size, dismissLabel]
|
|
2495
2520
|
);
|
|
2521
|
+
const nested = useNestedSurfaceDepth();
|
|
2522
|
+
const depth = variant === "outline" ? nested : "tinted";
|
|
2496
2523
|
return /* @__PURE__ */ jsx11(
|
|
2497
2524
|
"div",
|
|
2498
2525
|
{
|
|
2499
2526
|
...rest,
|
|
2500
2527
|
className: cx(Banner_default.root, className),
|
|
2528
|
+
"data-depth": depth,
|
|
2501
2529
|
...toDataAttributes({ variant, tone, size, placement }),
|
|
2502
|
-
children: /* @__PURE__ */ jsx11(BannerContext.Provider, { value: context, children: /* @__PURE__ */ jsxs8(ControlSizeProvider, { value: size, children: [
|
|
2530
|
+
children: /* @__PURE__ */ jsx11(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx11(BannerContext.Provider, { value: context, children: /* @__PURE__ */ jsxs8(ControlSizeProvider, { value: size, children: [
|
|
2503
2531
|
children,
|
|
2504
2532
|
onDismiss ? /* @__PURE__ */ jsx11("span", { className: Banner_default.close, children: /* @__PURE__ */ jsx11(
|
|
2505
2533
|
Button.Root,
|
|
@@ -2512,7 +2540,7 @@ function BannerRoot({
|
|
|
2512
2540
|
children: /* @__PURE__ */ jsx11(Button.Icon, { children: /* @__PURE__ */ jsx11(Icon, { name: "action.close" }) })
|
|
2513
2541
|
}
|
|
2514
2542
|
) }) : null
|
|
2515
|
-
] }) })
|
|
2543
|
+
] }) }) })
|
|
2516
2544
|
}
|
|
2517
2545
|
);
|
|
2518
2546
|
}
|
|
@@ -2829,13 +2857,22 @@ var Card_default = {
|
|
|
2829
2857
|
|
|
2830
2858
|
// src/components/card/Card.tsx
|
|
2831
2859
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2832
|
-
function CardRoot({
|
|
2860
|
+
function CardRoot({
|
|
2861
|
+
variant = "panel",
|
|
2862
|
+
flat = false,
|
|
2863
|
+
className,
|
|
2864
|
+
children,
|
|
2865
|
+
...rest
|
|
2866
|
+
}) {
|
|
2867
|
+
const depth = useNestedSurfaceDepth();
|
|
2833
2868
|
return /* @__PURE__ */ jsx15(
|
|
2834
2869
|
"div",
|
|
2835
2870
|
{
|
|
2836
2871
|
...rest,
|
|
2837
2872
|
className: cx(Card_default.root, className),
|
|
2838
|
-
|
|
2873
|
+
"data-depth": depth,
|
|
2874
|
+
...toDataAttributes({ variant, flat: flat || void 0 }),
|
|
2875
|
+
children: /* @__PURE__ */ jsx15(SurfaceDepthProvider, { value: depth, children })
|
|
2839
2876
|
}
|
|
2840
2877
|
);
|
|
2841
2878
|
}
|
|
@@ -3619,6 +3656,7 @@ function ModalDialog({
|
|
|
3619
3656
|
),
|
|
3620
3657
|
"data-size": size,
|
|
3621
3658
|
"data-state": state,
|
|
3659
|
+
"data-depth": "floating",
|
|
3622
3660
|
...shell.aria,
|
|
3623
3661
|
...rest,
|
|
3624
3662
|
onPointerDown: (event) => {
|
|
@@ -3627,7 +3665,7 @@ function ModalDialog({
|
|
|
3627
3665
|
},
|
|
3628
3666
|
children: [
|
|
3629
3667
|
compact ? /* @__PURE__ */ jsx19("div", { className: sheet_default.handle, "data-swipe-handle": "", "aria-hidden": "true" }) : null,
|
|
3630
|
-
/* @__PURE__ */ jsx19(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx19(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx19(ControlSizeProvider, { value: "m", children }) }) })
|
|
3668
|
+
/* @__PURE__ */ jsx19(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx19(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx19(SurfaceDepthProvider, { value: "floating", children: /* @__PURE__ */ jsx19(ControlSizeProvider, { value: "m", children }) }) }) })
|
|
3631
3669
|
]
|
|
3632
3670
|
}
|
|
3633
3671
|
)
|
|
@@ -4129,12 +4167,17 @@ var DataTable_default = {
|
|
|
4129
4167
|
selectCell: "DataTable_selectCell",
|
|
4130
4168
|
toggleCell: "DataTable_toggleCell",
|
|
4131
4169
|
chevron: "DataTable_chevron",
|
|
4170
|
+
fold: "DataTable_fold",
|
|
4171
|
+
foldItem: "DataTable_foldItem",
|
|
4172
|
+
foldPad: "DataTable_foldPad",
|
|
4173
|
+
"dt-fold-open": "DataTable_dt-fold-open",
|
|
4132
4174
|
measureBody: "DataTable_measureBody",
|
|
4133
4175
|
truncate: "DataTable_truncate",
|
|
4134
4176
|
detailCell: "DataTable_detailCell",
|
|
4135
4177
|
detailMotion: "DataTable_detailMotion",
|
|
4136
4178
|
detailRow: "DataTable_detailRow",
|
|
4137
4179
|
"dt-detail-enter": "DataTable_dt-detail-enter",
|
|
4180
|
+
detailClip: "DataTable_detailClip",
|
|
4138
4181
|
detailContent: "DataTable_detailContent",
|
|
4139
4182
|
firstColumnSticky: "DataTable_firstColumnSticky",
|
|
4140
4183
|
stickyLead: "DataTable_stickyLead",
|
|
@@ -4338,19 +4381,29 @@ function flatten(data, options) {
|
|
|
4338
4381
|
collect(childrenOf(row), key);
|
|
4339
4382
|
});
|
|
4340
4383
|
};
|
|
4341
|
-
const visit = (row, key, depth, parentAnimate) => {
|
|
4384
|
+
const visit = (row, key, depth, parentAnimate, parentFolding) => {
|
|
4342
4385
|
const children = getRowChildren ? childrenOf(row) : [];
|
|
4343
4386
|
const childKeys = children.map((child, index) => keyOf(child, index, key));
|
|
4344
4387
|
const expandable = options.expandEnabled && (options.isRowExpandable?.(row) ?? (children.length > 0 || options.withDetail));
|
|
4345
4388
|
const isExpanded = expandable && expanded.has(key);
|
|
4389
|
+
const isClosing = expandable && !isExpanded && Boolean(options.closing?.has(key));
|
|
4346
4390
|
const animate = parentAnimate || depth === 0 && arrived.has(key);
|
|
4347
|
-
result.rows.push({
|
|
4391
|
+
result.rows.push({
|
|
4392
|
+
row,
|
|
4393
|
+
key,
|
|
4394
|
+
depth,
|
|
4395
|
+
childKeys,
|
|
4396
|
+
expandable,
|
|
4397
|
+
expanded: isExpanded,
|
|
4398
|
+
animate,
|
|
4399
|
+
folding: parentFolding
|
|
4400
|
+
});
|
|
4348
4401
|
if (options.collectKeys) result.keys.push(key);
|
|
4349
4402
|
const childAnimate = parentAnimate || options.lastExpandedKey === key;
|
|
4350
4403
|
children.forEach((child, index) => {
|
|
4351
4404
|
const childKey = childKeys[index];
|
|
4352
|
-
if (isExpanded) {
|
|
4353
|
-
visit(child, childKey, depth + 1, childAnimate);
|
|
4405
|
+
if (isExpanded || isClosing) {
|
|
4406
|
+
visit(child, childKey, depth + 1, childAnimate, parentFolding || isClosing);
|
|
4354
4407
|
return;
|
|
4355
4408
|
}
|
|
4356
4409
|
result.measure.push({ row: child, key: childKey, depth: depth + 1 });
|
|
@@ -4363,7 +4416,7 @@ function flatten(data, options) {
|
|
|
4363
4416
|
data.forEach((row, index) => {
|
|
4364
4417
|
const key = keyOf(row, index, null);
|
|
4365
4418
|
if (index >= options.start && index < options.end) {
|
|
4366
|
-
visit(row, key, 0, false);
|
|
4419
|
+
visit(row, key, 0, false, false);
|
|
4367
4420
|
} else if (options.collectKeys) {
|
|
4368
4421
|
result.keys.push(key);
|
|
4369
4422
|
collect(childrenOf(row), key);
|
|
@@ -4412,31 +4465,40 @@ function DataTableRowImpl({
|
|
|
4412
4465
|
expandable,
|
|
4413
4466
|
expanded,
|
|
4414
4467
|
animate,
|
|
4468
|
+
folding = false,
|
|
4415
4469
|
detailAnimate,
|
|
4416
4470
|
selected,
|
|
4417
4471
|
childControls
|
|
4418
4472
|
}) {
|
|
4419
4473
|
const { columns, size, labels, selection, renderExpanded } = shared;
|
|
4420
4474
|
const rowLabel = shared.getRowLabel?.(row);
|
|
4421
|
-
const detail = usePresence(expanded && Boolean(renderExpanded), { exitDuration: "
|
|
4475
|
+
const detail = usePresence(expanded && Boolean(renderExpanded), { exitDuration: "base" });
|
|
4422
4476
|
const detailContent = detail.mounted ? renderExpanded?.(row) : null;
|
|
4423
4477
|
const hasDetail = detailContent != null && detailContent !== false;
|
|
4424
4478
|
const controls = [
|
|
4425
4479
|
hasDetail && expanded ? shared.detailDomId(rowKey) : "",
|
|
4426
4480
|
expanded ? childControls : ""
|
|
4427
4481
|
].filter(Boolean).join(" ");
|
|
4428
|
-
const
|
|
4482
|
+
const sub = depth > 0;
|
|
4483
|
+
const [unfolding, setUnfolding] = React23.useState(sub && animate);
|
|
4484
|
+
const fold = !sub ? void 0 : folding ? "closed" : unfolding ? "opening" : "open";
|
|
4485
|
+
const enter = animate && !sub && enterMotion_default.enterBase;
|
|
4429
4486
|
const lead = cx(DataTable_default.cell, enter, shared.stickyFirstColumn && DataTable_default.stickyLead);
|
|
4487
|
+
const folded = (node) => sub ? /* @__PURE__ */ jsx24("div", { className: DataTable_default.fold, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.foldItem, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.foldPad, children: node }) }) }) : node;
|
|
4430
4488
|
return /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
4431
4489
|
/* @__PURE__ */ jsxs16(
|
|
4432
4490
|
"tr",
|
|
4433
4491
|
{
|
|
4434
4492
|
id: shared.rowDomId(rowKey),
|
|
4435
4493
|
className: DataTable_default.row,
|
|
4436
|
-
style:
|
|
4494
|
+
style: sub ? { "--dt-depth": depth } : void 0,
|
|
4437
4495
|
"data-stripe": shared.striped && index % 2 === 1 ? "alt" : void 0,
|
|
4438
4496
|
"data-clickable": shared.onRowClick ? "true" : void 0,
|
|
4439
|
-
"data-
|
|
4497
|
+
"data-level": sub ? depth : void 0,
|
|
4498
|
+
"data-fold": fold,
|
|
4499
|
+
onAnimationEnd: unfolding ? (event) => {
|
|
4500
|
+
if (event.animationName.includes("dt-fold-open")) setUnfolding(false);
|
|
4501
|
+
} : void 0,
|
|
4440
4502
|
"data-expanded": expanded ? "true" : void 0,
|
|
4441
4503
|
"data-animate": animate ? "true" : void 0,
|
|
4442
4504
|
"aria-selected": shared.selectable ? selected : void 0,
|
|
@@ -4451,35 +4513,39 @@ function DataTableRowImpl({
|
|
|
4451
4513
|
"data-select-index": index,
|
|
4452
4514
|
onPointerDown: (event) => selection.onPointerDown(index, event),
|
|
4453
4515
|
onClick: (event) => selection.onClick(index, event),
|
|
4454
|
-
children:
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4516
|
+
children: folded(
|
|
4517
|
+
/* @__PURE__ */ jsx24(
|
|
4518
|
+
Checkbox.Root,
|
|
4519
|
+
{
|
|
4520
|
+
size,
|
|
4521
|
+
checked: selected,
|
|
4522
|
+
"aria-label": formatLabel(labels.selectRow, { label: rowLabel })
|
|
4523
|
+
}
|
|
4524
|
+
)
|
|
4461
4525
|
)
|
|
4462
4526
|
}
|
|
4463
4527
|
)
|
|
4464
4528
|
) : null,
|
|
4465
|
-
shared.expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(lead, DataTable_default.toggleCell), children:
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
label:
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
event
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4529
|
+
shared.expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(lead, DataTable_default.toggleCell), children: folded(
|
|
4530
|
+
expandable ? /* @__PURE__ */ jsx24(
|
|
4531
|
+
Button.Root,
|
|
4532
|
+
{
|
|
4533
|
+
variant: "ghost",
|
|
4534
|
+
tone: "neutral",
|
|
4535
|
+
size: TOGGLE_SIZE[size],
|
|
4536
|
+
"aria-expanded": expanded,
|
|
4537
|
+
"aria-controls": controls || void 0,
|
|
4538
|
+
"aria-label": formatLabel(expanded ? labels.collapse : labels.expand, {
|
|
4539
|
+
label: rowLabel
|
|
4540
|
+
}),
|
|
4541
|
+
onClick: (event) => {
|
|
4542
|
+
event.stopPropagation();
|
|
4543
|
+
shared.toggleExpanded(rowKey);
|
|
4544
|
+
},
|
|
4545
|
+
children: /* @__PURE__ */ jsx24(Button.Icon, { children: /* @__PURE__ */ jsx24(Icon, { name: "nav.chevronRight", className: DataTable_default.chevron }) })
|
|
4546
|
+
}
|
|
4547
|
+
) : null
|
|
4548
|
+
) }) : null,
|
|
4483
4549
|
columns.map((column, columnIndex) => {
|
|
4484
4550
|
const isFirstColumn = columnIndex === 0;
|
|
4485
4551
|
return /* @__PURE__ */ jsx24(
|
|
@@ -4495,7 +4561,7 @@ function DataTableRowImpl({
|
|
|
4495
4561
|
"data-numeric": column.numeric ? "true" : void 0,
|
|
4496
4562
|
"data-first-column": isFirstColumn ? "true" : void 0,
|
|
4497
4563
|
"data-column-id": column.id,
|
|
4498
|
-
children: renderCell(row, column, true)
|
|
4564
|
+
children: folded(renderCell(row, column, true))
|
|
4499
4565
|
},
|
|
4500
4566
|
column.id
|
|
4501
4567
|
);
|
|
@@ -4511,7 +4577,7 @@ function DataTableRowImpl({
|
|
|
4511
4577
|
"data-state": detail.state,
|
|
4512
4578
|
"data-animate": detailAnimate || animate ? "true" : void 0,
|
|
4513
4579
|
inert: !expanded,
|
|
4514
|
-
children: /* @__PURE__ */ jsx24("td", { colSpan: shared.totalColumns, className: DataTable_default.detailCell, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailMotion, onTransitionEnd: detail.onExitEnd, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailContent, children: detailContent }) }) })
|
|
4580
|
+
children: /* @__PURE__ */ jsx24("td", { colSpan: shared.totalColumns, className: DataTable_default.detailCell, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailMotion, onTransitionEnd: detail.onExitEnd, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailClip, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailContent, children: detailContent }) }) }) })
|
|
4515
4581
|
}
|
|
4516
4582
|
) : null
|
|
4517
4583
|
] });
|
|
@@ -4528,7 +4594,7 @@ function MeasureBody({
|
|
|
4528
4594
|
{
|
|
4529
4595
|
className: DataTable_default.row,
|
|
4530
4596
|
style: { "--dt-depth": depth },
|
|
4531
|
-
"data-
|
|
4597
|
+
"data-level": depth,
|
|
4532
4598
|
children: [
|
|
4533
4599
|
selectable ? /* @__PURE__ */ jsx24("td", { className: cx(DataTable_default.cell, DataTable_default.selectCell) }) : null,
|
|
4534
4600
|
expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(DataTable_default.cell, DataTable_default.toggleCell) }) : null,
|
|
@@ -4981,6 +5047,7 @@ var DEFAULT_LABELS3 = {
|
|
|
4981
5047
|
};
|
|
4982
5048
|
var EMPTY_KEYS = [];
|
|
4983
5049
|
var SKELETON_ROWS = 5;
|
|
5050
|
+
var NO_KEYS = /* @__PURE__ */ new Set();
|
|
4984
5051
|
var INFINITE_SCROLL_HEIGHT = 360;
|
|
4985
5052
|
var domIdPart = (key) => String(key).replace(/[^A-Za-z0-9_-]/g, "_");
|
|
4986
5053
|
function DataTable({
|
|
@@ -5041,6 +5108,7 @@ function DataTable({
|
|
|
5041
5108
|
const tableRef = React28.useRef(null);
|
|
5042
5109
|
const rootRef = React28.useRef(null);
|
|
5043
5110
|
const mergedRootRef = useMergedRefs(rootRef, ref);
|
|
5111
|
+
const depth = useNestedSurfaceDepth();
|
|
5044
5112
|
const columns = React28.useMemo(() => {
|
|
5045
5113
|
if (!hiddenColumns?.length) return allColumns;
|
|
5046
5114
|
const hidden = new Set(hiddenColumns);
|
|
@@ -5109,11 +5177,29 @@ function DataTable({
|
|
|
5109
5177
|
const [lastExpandedKey, setLastExpandedKey] = React28.useState(null);
|
|
5110
5178
|
const expansion = React28.useRef({ expandedKeys, setExpandedKeys });
|
|
5111
5179
|
expansion.current = { expandedKeys, setExpandedKeys };
|
|
5180
|
+
const [closingKeys, setClosingKeys] = React28.useState(NO_KEYS);
|
|
5112
5181
|
const toggleExpanded = React28.useCallback((key) => {
|
|
5113
5182
|
const { expandedKeys: keys, setExpandedKeys: setKeys } = expansion.current;
|
|
5114
5183
|
const isOpen = keys.includes(key);
|
|
5115
5184
|
setLastExpandedKey(isOpen ? null : key);
|
|
5116
5185
|
setKeys(isOpen ? keys.filter((k) => k !== key) : [...keys, key]);
|
|
5186
|
+
setClosingKeys((prev) => {
|
|
5187
|
+
const next = new Set(prev);
|
|
5188
|
+
if (isOpen) next.add(key);
|
|
5189
|
+
else next.delete(key);
|
|
5190
|
+
return next;
|
|
5191
|
+
});
|
|
5192
|
+
if (isOpen) {
|
|
5193
|
+
window.setTimeout(
|
|
5194
|
+
() => setClosingKeys((prev) => {
|
|
5195
|
+
if (!prev.has(key)) return prev;
|
|
5196
|
+
const next = new Set(prev);
|
|
5197
|
+
next.delete(key);
|
|
5198
|
+
return next;
|
|
5199
|
+
}),
|
|
5200
|
+
exitTimeoutMs("base")
|
|
5201
|
+
);
|
|
5202
|
+
}
|
|
5117
5203
|
}, []);
|
|
5118
5204
|
const flat = React28.useMemo(
|
|
5119
5205
|
() => flatten(sortedRows, {
|
|
@@ -5127,6 +5213,7 @@ function DataTable({
|
|
|
5127
5213
|
withDetail: Boolean(renderExpanded),
|
|
5128
5214
|
isRowExpandable,
|
|
5129
5215
|
expanded: expandedSet,
|
|
5216
|
+
closing: closingKeys,
|
|
5130
5217
|
arrived: rowArrival.added,
|
|
5131
5218
|
lastExpandedKey,
|
|
5132
5219
|
collectKeys: selectable
|
|
@@ -5143,6 +5230,7 @@ function DataTable({
|
|
|
5143
5230
|
renderExpanded,
|
|
5144
5231
|
isRowExpandable,
|
|
5145
5232
|
expandedSet,
|
|
5233
|
+
closingKeys,
|
|
5146
5234
|
rowArrival.added,
|
|
5147
5235
|
lastExpandedKey,
|
|
5148
5236
|
selectable
|
|
@@ -5220,12 +5308,13 @@ function DataTable({
|
|
|
5220
5308
|
);
|
|
5221
5309
|
const showRange = bodyState === "rows" && (infinite || paged && totalPages > 1);
|
|
5222
5310
|
const showInfiniteStatus = !hasError && infinite && (infiniteRows.hasInternalMore || loadingMore || infiniteRows.canRequestMore);
|
|
5223
|
-
return /* @__PURE__ */ jsx28(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs19(
|
|
5311
|
+
return /* @__PURE__ */ jsx28(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx28(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs19(
|
|
5224
5312
|
"div",
|
|
5225
5313
|
{
|
|
5226
5314
|
...rest,
|
|
5227
5315
|
ref: mergedRootRef,
|
|
5228
5316
|
className: cx(DataTable_default.root, className),
|
|
5317
|
+
"data-depth": depth,
|
|
5229
5318
|
...toDataAttributes({
|
|
5230
5319
|
size,
|
|
5231
5320
|
"row-dividers": rowDividers ? void 0 : "false",
|
|
@@ -5301,6 +5390,7 @@ function DataTable({
|
|
|
5301
5390
|
expandable: item.expandable,
|
|
5302
5391
|
expanded: item.expanded,
|
|
5303
5392
|
animate: item.animate,
|
|
5393
|
+
folding: item.folding,
|
|
5304
5394
|
detailAnimate: lastExpandedKey === item.key,
|
|
5305
5395
|
selected: selectable && selection.selectedSet.has(item.key),
|
|
5306
5396
|
childControls: item.childKeys.map(rowDomId).join(" ")
|
|
@@ -5318,7 +5408,10 @@ function DataTable({
|
|
|
5318
5408
|
error,
|
|
5319
5409
|
empty,
|
|
5320
5410
|
emptyLabel: labels.empty,
|
|
5321
|
-
skeletonRows: Math.max(
|
|
5411
|
+
skeletonRows: Math.max(
|
|
5412
|
+
1,
|
|
5413
|
+
loadingRows ?? Math.min(safePageSize, SKELETON_ROWS)
|
|
5414
|
+
)
|
|
5322
5415
|
}
|
|
5323
5416
|
)
|
|
5324
5417
|
},
|
|
@@ -5336,7 +5429,14 @@ function DataTable({
|
|
|
5336
5429
|
]
|
|
5337
5430
|
}
|
|
5338
5431
|
),
|
|
5339
|
-
infinite ? /* @__PURE__ */ jsx28(
|
|
5432
|
+
infinite ? /* @__PURE__ */ jsx28(
|
|
5433
|
+
"div",
|
|
5434
|
+
{
|
|
5435
|
+
ref: infiniteRows.sentinelRef,
|
|
5436
|
+
className: DataTable_default.sentinel,
|
|
5437
|
+
"aria-hidden": "true"
|
|
5438
|
+
}
|
|
5439
|
+
) : null
|
|
5340
5440
|
]
|
|
5341
5441
|
}
|
|
5342
5442
|
) }),
|
|
@@ -5357,7 +5457,7 @@ function DataTable({
|
|
|
5357
5457
|
)
|
|
5358
5458
|
]
|
|
5359
5459
|
}
|
|
5360
|
-
) });
|
|
5460
|
+
) }) });
|
|
5361
5461
|
}
|
|
5362
5462
|
|
|
5363
5463
|
// src/components/datepicker/Datepicker.tsx
|
|
@@ -5795,6 +5895,7 @@ function PanelView(props) {
|
|
|
5795
5895
|
const [panelNode, setPanelNode] = React30.useState(null);
|
|
5796
5896
|
const panelRef = useMergedRefs(setPanelNode, domRef);
|
|
5797
5897
|
const parentWidth = useAvailableWidth(embedded ? panelNode : null);
|
|
5898
|
+
const nestedDepth = useNestedSurfaceDepth();
|
|
5798
5899
|
const viewportWidth = useViewportWidth(!embedded);
|
|
5799
5900
|
useContainScroll(embedded ? null : panelNode);
|
|
5800
5901
|
const hasPresets = Boolean(presets) && isRange;
|
|
@@ -5957,6 +6058,7 @@ function PanelView(props) {
|
|
|
5957
6058
|
className: cx(Datepicker_default.panel, className),
|
|
5958
6059
|
"data-size": size,
|
|
5959
6060
|
"data-embedded": embedded ? "true" : void 0,
|
|
6061
|
+
"data-depth": embedded ? nestedDepth : void 0,
|
|
5960
6062
|
"data-compact": compact ? "true" : void 0,
|
|
5961
6063
|
"data-layout": layout,
|
|
5962
6064
|
children: [
|
|
@@ -6356,7 +6458,9 @@ import * as React31 from "react";
|
|
|
6356
6458
|
var DigitInput_default = {
|
|
6357
6459
|
frame: "DigitInput_frame",
|
|
6358
6460
|
root: "DigitInput_root",
|
|
6359
|
-
cell: "DigitInput_cell"
|
|
6461
|
+
cell: "DigitInput_cell",
|
|
6462
|
+
ring: "DigitInput_ring",
|
|
6463
|
+
primeDigitIn: "DigitInput_primeDigitIn"
|
|
6360
6464
|
};
|
|
6361
6465
|
|
|
6362
6466
|
// src/components/digit-input/DigitInput.tsx
|
|
@@ -6381,6 +6485,7 @@ function DigitInput({
|
|
|
6381
6485
|
onComplete,
|
|
6382
6486
|
disabled,
|
|
6383
6487
|
invalid,
|
|
6488
|
+
success = false,
|
|
6384
6489
|
focusRing = true,
|
|
6385
6490
|
label,
|
|
6386
6491
|
required,
|
|
@@ -6416,6 +6521,32 @@ function DigitInput({
|
|
|
6416
6521
|
pendingFocusRef.current = null;
|
|
6417
6522
|
inputRefs.current[index]?.focus();
|
|
6418
6523
|
});
|
|
6524
|
+
const [focusIndex, setFocusIndex] = React31.useState(null);
|
|
6525
|
+
const ringRef = React31.useRef(null);
|
|
6526
|
+
const ringShown = React31.useRef(false);
|
|
6527
|
+
React31.useLayoutEffect(() => {
|
|
6528
|
+
const ring = ringRef.current;
|
|
6529
|
+
const cell = focusIndex === null ? null : inputRefs.current[focusIndex];
|
|
6530
|
+
if (!ring) return;
|
|
6531
|
+
if (!cell) {
|
|
6532
|
+
ringShown.current = false;
|
|
6533
|
+
return;
|
|
6534
|
+
}
|
|
6535
|
+
const place = () => {
|
|
6536
|
+
ring.style.width = `${cell.offsetWidth}px`;
|
|
6537
|
+
ring.style.height = `${cell.offsetHeight}px`;
|
|
6538
|
+
ring.style.transform = `translate(${cell.offsetLeft}px, ${cell.offsetTop}px)`;
|
|
6539
|
+
};
|
|
6540
|
+
if (!ringShown.current) {
|
|
6541
|
+
ring.style.transition = "none";
|
|
6542
|
+
place();
|
|
6543
|
+
ring.getBoundingClientRect();
|
|
6544
|
+
ring.style.transition = "";
|
|
6545
|
+
ringShown.current = true;
|
|
6546
|
+
} else {
|
|
6547
|
+
place();
|
|
6548
|
+
}
|
|
6549
|
+
});
|
|
6419
6550
|
const entryIndex = Math.min(value.length, length - 1);
|
|
6420
6551
|
const handleChangeAt = (index, nextChar) => {
|
|
6421
6552
|
const at = Math.min(index, entryIndex);
|
|
@@ -6462,10 +6593,27 @@ function DigitInput({
|
|
|
6462
6593
|
size,
|
|
6463
6594
|
"full-width": fullWidth || void 0,
|
|
6464
6595
|
invalid: ids.invalid || void 0,
|
|
6596
|
+
success: success && !ids.invalid || void 0,
|
|
6465
6597
|
disabled: disabled || void 0,
|
|
6466
6598
|
"focus-ring": focusRing ? void 0 : false
|
|
6467
6599
|
}),
|
|
6600
|
+
onFocus: (event) => {
|
|
6601
|
+
const index = inputRefs.current.indexOf(event.target);
|
|
6602
|
+
if (index >= 0) setFocusIndex(index);
|
|
6603
|
+
},
|
|
6604
|
+
onBlur: (event) => {
|
|
6605
|
+
if (!event.currentTarget.contains(event.relatedTarget)) setFocusIndex(null);
|
|
6606
|
+
},
|
|
6468
6607
|
children: [
|
|
6608
|
+
/* @__PURE__ */ jsx31(
|
|
6609
|
+
"span",
|
|
6610
|
+
{
|
|
6611
|
+
ref: ringRef,
|
|
6612
|
+
className: DigitInput_default.ring,
|
|
6613
|
+
"aria-hidden": "true",
|
|
6614
|
+
"data-visible": focusIndex !== null || void 0
|
|
6615
|
+
}
|
|
6616
|
+
),
|
|
6469
6617
|
name ? /* @__PURE__ */ jsx31("input", { type: "hidden", name, value }) : null,
|
|
6470
6618
|
cells.map((cell, index) => /* @__PURE__ */ jsx31(
|
|
6471
6619
|
"input",
|
|
@@ -6483,6 +6631,8 @@ function DigitInput({
|
|
|
6483
6631
|
disabled,
|
|
6484
6632
|
required,
|
|
6485
6633
|
className: cx(fieldSurfaceClass, DigitInput_default.cell),
|
|
6634
|
+
"data-focus-ring": "false",
|
|
6635
|
+
style: { "--digit-i": index },
|
|
6486
6636
|
"data-size": size,
|
|
6487
6637
|
"data-filled": cell ? "true" : void 0,
|
|
6488
6638
|
"data-group-start": groupSize && index > 0 && index % groupSize === 0 ? "true" : void 0,
|
|
@@ -6700,7 +6850,7 @@ var POINTER_ACTIVATION = {
|
|
|
6700
6850
|
};
|
|
6701
6851
|
var TOUCH_ACTIVATION = {
|
|
6702
6852
|
distance: Number.POSITIVE_INFINITY,
|
|
6703
|
-
delay:
|
|
6853
|
+
delay: 280,
|
|
6704
6854
|
tolerance: 10
|
|
6705
6855
|
};
|
|
6706
6856
|
function pointerKindOf(pointerType) {
|
|
@@ -7146,11 +7296,27 @@ function cloneFor(preview) {
|
|
|
7146
7296
|
clone.classList.add(Dnd_default.lift);
|
|
7147
7297
|
return clone;
|
|
7148
7298
|
}
|
|
7299
|
+
function holdHoverUntilLeave(node) {
|
|
7300
|
+
node.setAttribute("data-dnd-hover", "");
|
|
7301
|
+
const release = () => {
|
|
7302
|
+
node.removeAttribute("data-dnd-hover");
|
|
7303
|
+
window.removeEventListener("pointermove", onMove);
|
|
7304
|
+
window.removeEventListener("pointerdown", release, true);
|
|
7305
|
+
};
|
|
7306
|
+
const onMove = (event) => {
|
|
7307
|
+
const r = node.getBoundingClientRect();
|
|
7308
|
+
const inside = event.clientX >= r.left && event.clientX <= r.right && event.clientY >= r.top && event.clientY <= r.bottom;
|
|
7309
|
+
if (!inside) release();
|
|
7310
|
+
};
|
|
7311
|
+
window.addEventListener("pointermove", onMove);
|
|
7312
|
+
window.addEventListener("pointerdown", release, true);
|
|
7313
|
+
}
|
|
7149
7314
|
function DragOverlay({ controller }) {
|
|
7150
7315
|
const hostRef = React35.useRef(null);
|
|
7151
7316
|
const grabRef = React35.useRef({ x: 0, y: 0 });
|
|
7152
7317
|
const pointRef = React35.useRef({ x: 0, y: 0 });
|
|
7153
7318
|
const frameRef = React35.useRef(null);
|
|
7319
|
+
const pointerKindRef = React35.useRef("mouse");
|
|
7154
7320
|
const [mounted, setMounted] = React35.useState(false);
|
|
7155
7321
|
const stopLandingRef = React35.useRef(null);
|
|
7156
7322
|
const endTokenRef = React35.useRef(0);
|
|
@@ -7210,12 +7376,20 @@ function DragOverlay({ controller }) {
|
|
|
7210
7376
|
const rect = layoutRect(destination);
|
|
7211
7377
|
const to = translate({ x: rect.left, y: rect.top }, { x: 0, y: 0 });
|
|
7212
7378
|
destination.setAttribute("data-dnd-landing", "");
|
|
7379
|
+
const box = destination.getBoundingClientRect();
|
|
7380
|
+
const point = pointRef.current;
|
|
7381
|
+
const pointerOver = pointerKindRef.current === "mouse" && point.x >= box.left && point.x <= box.right && point.y >= box.top && point.y <= box.bottom;
|
|
7382
|
+
const transition = destination.style.transition;
|
|
7383
|
+
destination.style.transition = "none";
|
|
7384
|
+
if (pointerOver) holdHoverUntilLeave(destination);
|
|
7385
|
+
const landed = getComputedStyle(destination).boxShadow;
|
|
7386
|
+
destination.style.transition = transition;
|
|
7213
7387
|
const flight = host.animate([{ transform: from }, { transform: to }], timing);
|
|
7214
7388
|
const drawn = getComputedStyle(lifted);
|
|
7215
7389
|
const setDown = lifted.animate(
|
|
7216
7390
|
[
|
|
7217
7391
|
{ transform: drawn.transform, boxShadow: drawn.boxShadow },
|
|
7218
|
-
{ transform: "none", boxShadow:
|
|
7392
|
+
{ transform: "none", boxShadow: landed }
|
|
7219
7393
|
],
|
|
7220
7394
|
timing
|
|
7221
7395
|
);
|
|
@@ -7243,6 +7417,7 @@ function DragOverlay({ controller }) {
|
|
|
7243
7417
|
if (event.type === "start") {
|
|
7244
7418
|
grabRef.current = event.preview.grab;
|
|
7245
7419
|
pointRef.current = event.preview.point;
|
|
7420
|
+
pointerKindRef.current = event.preview.pointerKind;
|
|
7246
7421
|
settle(host);
|
|
7247
7422
|
host.replaceChildren(cloneFor(event.preview));
|
|
7248
7423
|
host.style.transform = translate(event.preview.point, event.preview.grab);
|
|
@@ -8002,6 +8177,7 @@ function DrawerDialog({
|
|
|
8002
8177
|
"data-side": side,
|
|
8003
8178
|
"data-size": size,
|
|
8004
8179
|
"data-state": state,
|
|
8180
|
+
"data-depth": "floating",
|
|
8005
8181
|
onAnimationEnd: onExitEnd,
|
|
8006
8182
|
...shell.aria,
|
|
8007
8183
|
...rest,
|
|
@@ -8011,7 +8187,7 @@ function DrawerDialog({
|
|
|
8011
8187
|
},
|
|
8012
8188
|
children: [
|
|
8013
8189
|
bottom ? /* @__PURE__ */ jsx34("div", { className: sheet_default.handle, "data-swipe-handle": "", "aria-hidden": "true" }) : null,
|
|
8014
|
-
/* @__PURE__ */ jsx34(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx34(LayerProvider, { value: layer, children }) })
|
|
8190
|
+
/* @__PURE__ */ jsx34(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx34(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx34(SurfaceDepthProvider, { value: "floating", children }) }) })
|
|
8015
8191
|
]
|
|
8016
8192
|
}
|
|
8017
8193
|
)
|
|
@@ -8700,13 +8876,15 @@ function ExampleFrame({
|
|
|
8700
8876
|
});
|
|
8701
8877
|
const rootRef = React43.useRef(null);
|
|
8702
8878
|
const mergedRef = useMergedRefs(rootRef, ref);
|
|
8879
|
+
const depth = useNestedSurfaceDepth();
|
|
8880
|
+
const stageDepth = useStageDepth();
|
|
8703
8881
|
const previousScheme = React43.useRef(colorScheme);
|
|
8704
8882
|
React43.useLayoutEffect(() => {
|
|
8705
8883
|
if (previousScheme.current === colorScheme) return;
|
|
8706
8884
|
previousScheme.current = colorScheme;
|
|
8707
8885
|
if (rootRef.current) suspendTransitions(rootRef.current);
|
|
8708
8886
|
}, [colorScheme]);
|
|
8709
|
-
return /* @__PURE__ */ jsxs27("div", { ...rest, ref: mergedRef, className: cx(ExampleFrame_default.root, className), children: [
|
|
8887
|
+
return /* @__PURE__ */ jsxs27("div", { ...rest, ref: mergedRef, className: cx(ExampleFrame_default.root, className), "data-depth": depth, children: [
|
|
8710
8888
|
/* @__PURE__ */ jsx37(
|
|
8711
8889
|
ExampleFrameToolbar,
|
|
8712
8890
|
{
|
|
@@ -8727,7 +8905,8 @@ function ExampleFrame({
|
|
|
8727
8905
|
className: ExampleFrame_default.previewInner,
|
|
8728
8906
|
"data-preview-layout": previewLayout,
|
|
8729
8907
|
"data-theme": colorScheme,
|
|
8730
|
-
|
|
8908
|
+
"data-depth": stageDepth,
|
|
8909
|
+
children: /* @__PURE__ */ jsx37(SurfaceDepthProvider, { value: stageDepth, children })
|
|
8731
8910
|
}
|
|
8732
8911
|
) }) }) : (
|
|
8733
8912
|
// Plain CodeBlock is not focusable itself; the scrolling pane takes keyboard focus instead.
|
|
@@ -8845,164 +9024,8 @@ function ExampleFrameToolbar({
|
|
|
8845
9024
|
ExampleFrameToolbar.displayName = "ExampleFrame.Toolbar";
|
|
8846
9025
|
|
|
8847
9026
|
// src/components/file-upload/FileUpload.tsx
|
|
8848
|
-
import * as React45 from "react";
|
|
8849
|
-
|
|
8850
|
-
// src/components/progress-bar/ProgressBar.tsx
|
|
8851
9027
|
import * as React44 from "react";
|
|
8852
9028
|
|
|
8853
|
-
// src/internal/progressSegments.ts
|
|
8854
|
-
function resolveValue(value, max) {
|
|
8855
|
-
const top = max !== void 0 && max > 0 ? max : 100;
|
|
8856
|
-
const clamped = Math.min(top, Math.max(Number.isFinite(value) ? value : 0, 0));
|
|
8857
|
-
return {
|
|
8858
|
-
value: clamped,
|
|
8859
|
-
max: top,
|
|
8860
|
-
ratio: clamped / top,
|
|
8861
|
-
percent: Math.round(clamped / top * 100)
|
|
8862
|
-
};
|
|
8863
|
-
}
|
|
8864
|
-
var DEFAULT_PROGRESS_SEGMENTS_LABELS = {
|
|
8865
|
-
empty: "\u041D\u0435\u0442 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u043E\u0432",
|
|
8866
|
-
allEmpty: "\u0412\u0441\u0435 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u044B \u043F\u0443\u0441\u0442\u044B"
|
|
8867
|
-
};
|
|
8868
|
-
function nonNegative(n) {
|
|
8869
|
-
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
8870
|
-
}
|
|
8871
|
-
function resolveSegments(input, max, labels) {
|
|
8872
|
-
const segments = input.map((s) => ({ ...s, value: nonNegative(s.value) }));
|
|
8873
|
-
const total = segments.reduce((acc, s) => acc + s.value, 0);
|
|
8874
|
-
const scale = max !== void 0 && max > 0 ? Math.max(max, total) : total;
|
|
8875
|
-
let text;
|
|
8876
|
-
if (segments.length === 0) text = labels.empty;
|
|
8877
|
-
else if (scale <= 0) text = labels.allEmpty;
|
|
8878
|
-
else
|
|
8879
|
-
text = segments.map((s) => {
|
|
8880
|
-
const pct = Math.round(s.value / scale * 100);
|
|
8881
|
-
return s.label ? `${s.label}: ${pct}%` : `${pct}%`;
|
|
8882
|
-
}).join(", ");
|
|
8883
|
-
return {
|
|
8884
|
-
segments,
|
|
8885
|
-
total,
|
|
8886
|
-
scale,
|
|
8887
|
-
rest: scale - total,
|
|
8888
|
-
percent: scale > 0 ? Math.round(total / scale * 100) : 0,
|
|
8889
|
-
text
|
|
8890
|
-
};
|
|
8891
|
-
}
|
|
8892
|
-
|
|
8893
|
-
// src/components/progress-bar/ProgressBar.module.css
|
|
8894
|
-
var ProgressBar_default = {
|
|
8895
|
-
root: "ProgressBar_root",
|
|
8896
|
-
segment: "ProgressBar_segment",
|
|
8897
|
-
header: "ProgressBar_header",
|
|
8898
|
-
label: "ProgressBar_label",
|
|
8899
|
-
value: "ProgressBar_value",
|
|
8900
|
-
native: "ProgressBar_native",
|
|
8901
|
-
bar: "ProgressBar_bar",
|
|
8902
|
-
fill: "ProgressBar_fill",
|
|
8903
|
-
segments: "ProgressBar_segments",
|
|
8904
|
-
rest: "ProgressBar_rest"
|
|
8905
|
-
};
|
|
8906
|
-
|
|
8907
|
-
// src/components/progress-bar/ProgressBar.tsx
|
|
8908
|
-
import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8909
|
-
function ProgressBar(props) {
|
|
8910
|
-
const {
|
|
8911
|
-
label,
|
|
8912
|
-
size = "m",
|
|
8913
|
-
showValue = false,
|
|
8914
|
-
className,
|
|
8915
|
-
value: valueProp,
|
|
8916
|
-
max: maxProp,
|
|
8917
|
-
tone: toneProp,
|
|
8918
|
-
segments: segmentsProp,
|
|
8919
|
-
segmentGap = "none",
|
|
8920
|
-
labels,
|
|
8921
|
-
"aria-label": ariaLabel,
|
|
8922
|
-
...rest
|
|
8923
|
-
} = props;
|
|
8924
|
-
const labelId = React44.useId();
|
|
8925
|
-
const descriptionId = React44.useId();
|
|
8926
|
-
let percent;
|
|
8927
|
-
let tone;
|
|
8928
|
-
let bar;
|
|
8929
|
-
if (segmentsProp) {
|
|
8930
|
-
const resolved = resolveSegments(segmentsProp, maxProp, {
|
|
8931
|
-
...DEFAULT_PROGRESS_SEGMENTS_LABELS,
|
|
8932
|
-
...labels
|
|
8933
|
-
});
|
|
8934
|
-
const { segments, total, rest: free, text } = resolved;
|
|
8935
|
-
percent = resolved.percent;
|
|
8936
|
-
const named = Boolean(label || ariaLabel);
|
|
8937
|
-
const a11y = named ? {
|
|
8938
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
8939
|
-
"aria-label": label ? void 0 : ariaLabel,
|
|
8940
|
-
"aria-describedby": descriptionId
|
|
8941
|
-
} : { "aria-label": text };
|
|
8942
|
-
bar = /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
8943
|
-
named ? /* @__PURE__ */ jsx38(VisuallyHidden, { id: descriptionId, children: text }) : null,
|
|
8944
|
-
/* @__PURE__ */ jsxs28(
|
|
8945
|
-
"div",
|
|
8946
|
-
{
|
|
8947
|
-
className: ProgressBar_default.bar,
|
|
8948
|
-
role: "group",
|
|
8949
|
-
...a11y,
|
|
8950
|
-
...toDataAttributes({ "segment-gap": segmentGap }),
|
|
8951
|
-
children: [
|
|
8952
|
-
total > 0 ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.segments, style: { flexGrow: total }, children: segments.map((seg, i) => /* @__PURE__ */ jsx38(
|
|
8953
|
-
"span",
|
|
8954
|
-
{
|
|
8955
|
-
className: ProgressBar_default.segment,
|
|
8956
|
-
style: { flexGrow: seg.value },
|
|
8957
|
-
title: seg.label,
|
|
8958
|
-
...toDataAttributes({ tone: seg.tone ?? "accent" })
|
|
8959
|
-
},
|
|
8960
|
-
i
|
|
8961
|
-
)) }) : null,
|
|
8962
|
-
free > 0 || total === 0 ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.rest, style: { flexGrow: free > 0 ? free : 1 } }) : null
|
|
8963
|
-
]
|
|
8964
|
-
}
|
|
8965
|
-
)
|
|
8966
|
-
] });
|
|
8967
|
-
} else {
|
|
8968
|
-
const resolved = resolveValue(valueProp ?? 0, maxProp);
|
|
8969
|
-
const { value, max } = resolved;
|
|
8970
|
-
percent = resolved.percent;
|
|
8971
|
-
tone = toneProp ?? "accent";
|
|
8972
|
-
bar = /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
8973
|
-
/* @__PURE__ */ jsx38(
|
|
8974
|
-
"progress",
|
|
8975
|
-
{
|
|
8976
|
-
value,
|
|
8977
|
-
max,
|
|
8978
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
8979
|
-
"aria-label": label ? void 0 : ariaLabel,
|
|
8980
|
-
className: ProgressBar_default.native
|
|
8981
|
-
}
|
|
8982
|
-
),
|
|
8983
|
-
/* @__PURE__ */ jsx38(
|
|
8984
|
-
"span",
|
|
8985
|
-
{
|
|
8986
|
-
className: ProgressBar_default.bar,
|
|
8987
|
-
"aria-hidden": "true",
|
|
8988
|
-
style: { "--pb-ratio": resolved.ratio },
|
|
8989
|
-
children: /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.fill })
|
|
8990
|
-
}
|
|
8991
|
-
)
|
|
8992
|
-
] });
|
|
8993
|
-
}
|
|
8994
|
-
return /* @__PURE__ */ jsxs28("div", { className: cx(ProgressBar_default.root, className), ...rest, ...toDataAttributes({ size, tone }), children: [
|
|
8995
|
-
label || showValue ? /* @__PURE__ */ jsxs28("div", { className: ProgressBar_default.header, children: [
|
|
8996
|
-
label ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.label, id: labelId, children: label }) : null,
|
|
8997
|
-
showValue ? /* @__PURE__ */ jsxs28("span", { className: ProgressBar_default.value, "aria-hidden": "true", children: [
|
|
8998
|
-
percent,
|
|
8999
|
-
"%"
|
|
9000
|
-
] }) : null
|
|
9001
|
-
] }) : null,
|
|
9002
|
-
bar
|
|
9003
|
-
] });
|
|
9004
|
-
}
|
|
9005
|
-
|
|
9006
9029
|
// src/components/file-upload/FileUpload.module.css
|
|
9007
9030
|
var FileUpload_default = {
|
|
9008
9031
|
root: "FileUpload_root",
|
|
@@ -9020,7 +9043,7 @@ var FileUpload_default = {
|
|
|
9020
9043
|
};
|
|
9021
9044
|
|
|
9022
9045
|
// src/components/file-upload/FileUpload.tsx
|
|
9023
|
-
import { jsx as
|
|
9046
|
+
import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9024
9047
|
var FILE_UPLOAD_LABELS = {
|
|
9025
9048
|
title: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0435\u0433\u043E \u0441\u044E\u0434\u0430",
|
|
9026
9049
|
description: "JPEG, PNG, PDF, MP4 \u0434\u043E 50 \u041C\u0411",
|
|
@@ -9028,15 +9051,15 @@ var FILE_UPLOAD_LABELS = {
|
|
|
9028
9051
|
optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E"
|
|
9029
9052
|
};
|
|
9030
9053
|
function FileUploadBody({ className, ...rest }) {
|
|
9031
|
-
return /* @__PURE__ */
|
|
9054
|
+
return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.body, className), ...rest });
|
|
9032
9055
|
}
|
|
9033
9056
|
FileUploadBody.displayName = "FileUpload.Body";
|
|
9034
9057
|
function FileUploadIcon({ className, ...rest }) {
|
|
9035
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsx38("span", { className: cx(FileUpload_default.icon, className), "aria-hidden": true, ...rest });
|
|
9036
9059
|
}
|
|
9037
9060
|
FileUploadIcon.displayName = "FileUpload.Icon";
|
|
9038
9061
|
function FileUploadTitle({ className, tone = "default", ...rest }) {
|
|
9039
|
-
return /* @__PURE__ */
|
|
9062
|
+
return /* @__PURE__ */ jsx38(
|
|
9040
9063
|
"p",
|
|
9041
9064
|
{
|
|
9042
9065
|
className: cx(FileUpload_default.title, className),
|
|
@@ -9047,7 +9070,7 @@ function FileUploadTitle({ className, tone = "default", ...rest }) {
|
|
|
9047
9070
|
}
|
|
9048
9071
|
FileUploadTitle.displayName = "FileUpload.Title";
|
|
9049
9072
|
function FileUploadDescription(props) {
|
|
9050
|
-
return /* @__PURE__ */
|
|
9073
|
+
return /* @__PURE__ */ jsx38(Hint.Root, { size: useControlSize(void 0), ...props });
|
|
9051
9074
|
}
|
|
9052
9075
|
FileUploadDescription.displayName = "FileUpload.Description";
|
|
9053
9076
|
function FileUploadItem({
|
|
@@ -9057,7 +9080,7 @@ function FileUploadItem({
|
|
|
9057
9080
|
...rest
|
|
9058
9081
|
}) {
|
|
9059
9082
|
const size = useControlSize(sizeProp);
|
|
9060
|
-
return /* @__PURE__ */
|
|
9083
|
+
return /* @__PURE__ */ jsx38(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx38(
|
|
9061
9084
|
"div",
|
|
9062
9085
|
{
|
|
9063
9086
|
className: cx(FileUpload_default.item, className),
|
|
@@ -9073,19 +9096,19 @@ function FileUploadFormatBadge({
|
|
|
9073
9096
|
className,
|
|
9074
9097
|
...rest
|
|
9075
9098
|
}) {
|
|
9076
|
-
return /* @__PURE__ */
|
|
9099
|
+
return /* @__PURE__ */ jsx38(Badge.Root, { ...rest, color, className: cx(FileUpload_default.formatBadge, className), "aria-hidden": true, children: format4.trim().slice(0, 8).toUpperCase() });
|
|
9077
9100
|
}
|
|
9078
9101
|
FileUploadFormatBadge.displayName = "FileUpload.FormatBadge";
|
|
9079
9102
|
function FileUploadItemName({ className, ...rest }) {
|
|
9080
|
-
return /* @__PURE__ */
|
|
9103
|
+
return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemName, className), ...rest });
|
|
9081
9104
|
}
|
|
9082
9105
|
FileUploadItemName.displayName = "FileUpload.ItemName";
|
|
9083
9106
|
function FileUploadItemDescription({ className, ...rest }) {
|
|
9084
|
-
return /* @__PURE__ */
|
|
9107
|
+
return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemDescription, className), ...rest });
|
|
9085
9108
|
}
|
|
9086
9109
|
FileUploadItemDescription.displayName = "FileUpload.ItemDescription";
|
|
9087
9110
|
function FileUploadItemActions({ className, ...rest }) {
|
|
9088
|
-
return /* @__PURE__ */
|
|
9111
|
+
return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemActions, className), ...rest });
|
|
9089
9112
|
}
|
|
9090
9113
|
FileUploadItemActions.displayName = "FileUpload.ItemActions";
|
|
9091
9114
|
function FileUploadItemProgress({
|
|
@@ -9095,7 +9118,7 @@ function FileUploadItemProgress({
|
|
|
9095
9118
|
"aria-label": ariaLabel = "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0444\u0430\u0439\u043B\u0430",
|
|
9096
9119
|
...rest
|
|
9097
9120
|
}) {
|
|
9098
|
-
return /* @__PURE__ */
|
|
9121
|
+
return /* @__PURE__ */ jsx38("div", { ...rest, className: cx(FileUpload_default.itemProgress, className), children: /* @__PURE__ */ jsx38(ProgressBar, { value, max, "aria-label": ariaLabel }) });
|
|
9099
9122
|
}
|
|
9100
9123
|
FileUploadItemProgress.displayName = "FileUpload.ItemProgress";
|
|
9101
9124
|
function FileUploadRoot({
|
|
@@ -9122,8 +9145,8 @@ function FileUploadRoot({
|
|
|
9122
9145
|
const size = useControlSize(sizeProp);
|
|
9123
9146
|
const labels = { ...FILE_UPLOAD_LABELS, ...labelsProp };
|
|
9124
9147
|
const ids = useFieldFrame(id, { label, hint, error, invalid });
|
|
9125
|
-
const [dragOver, setDragOver] =
|
|
9126
|
-
const dragDepth =
|
|
9148
|
+
const [dragOver, setDragOver] = React44.useState(false);
|
|
9149
|
+
const dragDepth = React44.useRef(0);
|
|
9127
9150
|
const onDragEnter = (event) => {
|
|
9128
9151
|
event.preventDefault();
|
|
9129
9152
|
dragDepth.current += 1;
|
|
@@ -9139,7 +9162,7 @@ function FileUploadRoot({
|
|
|
9139
9162
|
setDragOver(false);
|
|
9140
9163
|
if (!disabled) onFilesChange?.(Array.from(event.dataTransfer.files));
|
|
9141
9164
|
};
|
|
9142
|
-
return /* @__PURE__ */
|
|
9165
|
+
return /* @__PURE__ */ jsx38(
|
|
9143
9166
|
FieldFrame,
|
|
9144
9167
|
{
|
|
9145
9168
|
...rest,
|
|
@@ -9152,7 +9175,7 @@ function FileUploadRoot({
|
|
|
9152
9175
|
error,
|
|
9153
9176
|
disabled,
|
|
9154
9177
|
optionalLabel: labels.optional,
|
|
9155
|
-
children: /* @__PURE__ */
|
|
9178
|
+
children: /* @__PURE__ */ jsxs28(
|
|
9156
9179
|
"label",
|
|
9157
9180
|
{
|
|
9158
9181
|
className: FileUpload_default.root,
|
|
@@ -9168,7 +9191,7 @@ function FileUploadRoot({
|
|
|
9168
9191
|
onDragLeave,
|
|
9169
9192
|
onDrop,
|
|
9170
9193
|
children: [
|
|
9171
|
-
/* @__PURE__ */
|
|
9194
|
+
/* @__PURE__ */ jsx38(
|
|
9172
9195
|
"input",
|
|
9173
9196
|
{
|
|
9174
9197
|
ref: inputRef,
|
|
@@ -9190,13 +9213,13 @@ function FileUploadRoot({
|
|
|
9190
9213
|
}
|
|
9191
9214
|
}
|
|
9192
9215
|
),
|
|
9193
|
-
/* @__PURE__ */
|
|
9194
|
-
/* @__PURE__ */
|
|
9195
|
-
/* @__PURE__ */
|
|
9196
|
-
/* @__PURE__ */
|
|
9197
|
-
labels.description ? /* @__PURE__ */
|
|
9216
|
+
/* @__PURE__ */ jsx38(ControlSizeProvider, { value: size, children: children ?? /* @__PURE__ */ jsxs28(FileUploadBody, { children: [
|
|
9217
|
+
/* @__PURE__ */ jsx38(FileUploadIcon, { children: /* @__PURE__ */ jsx38(Icon, { name: "action.upload", size, tone: "secondary" }) }),
|
|
9218
|
+
/* @__PURE__ */ jsxs28("div", { className: FileUpload_default.copy, children: [
|
|
9219
|
+
/* @__PURE__ */ jsx38(FileUploadTitle, { children: labels.title }),
|
|
9220
|
+
labels.description ? /* @__PURE__ */ jsx38(FileUploadDescription, { children: labels.description }) : null
|
|
9198
9221
|
] }),
|
|
9199
|
-
/* @__PURE__ */
|
|
9222
|
+
/* @__PURE__ */ jsx38(Button.Root, { asChild: true, variant: "soft", tone: "neutral", size, disabled, children: /* @__PURE__ */ jsx38("span", { children: labels.browse }) })
|
|
9200
9223
|
] }) })
|
|
9201
9224
|
]
|
|
9202
9225
|
}
|
|
@@ -9220,7 +9243,7 @@ var FileUpload = {
|
|
|
9220
9243
|
};
|
|
9221
9244
|
|
|
9222
9245
|
// src/components/kanban/Kanban.tsx
|
|
9223
|
-
import * as
|
|
9246
|
+
import * as React45 from "react";
|
|
9224
9247
|
|
|
9225
9248
|
// src/components/kanban/Kanban.module.css
|
|
9226
9249
|
var Kanban_default = {
|
|
@@ -9246,7 +9269,7 @@ var Kanban_default = {
|
|
|
9246
9269
|
};
|
|
9247
9270
|
|
|
9248
9271
|
// src/components/kanban/Kanban.tsx
|
|
9249
|
-
import { Fragment as
|
|
9272
|
+
import { Fragment as Fragment7, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9250
9273
|
var defaultKanbanLabels = {
|
|
9251
9274
|
count: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count}",
|
|
9252
9275
|
countLimit: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count} \u0438\u0437 {limit}",
|
|
@@ -9256,12 +9279,12 @@ var defaultKanbanLabels = {
|
|
|
9256
9279
|
};
|
|
9257
9280
|
var SKELETON_CARDS = [3, 2, 1];
|
|
9258
9281
|
var ITEM_SHORTCUTS = "Alt+ArrowUp Alt+ArrowDown Alt+ArrowLeft Alt+ArrowRight";
|
|
9259
|
-
var BoardContext =
|
|
9260
|
-
var ItemIdContext =
|
|
9282
|
+
var BoardContext = React45.createContext(null);
|
|
9283
|
+
var ItemIdContext = React45.createContext(null);
|
|
9261
9284
|
function KanbanRoot(props) {
|
|
9262
|
-
const outer =
|
|
9263
|
-
const board = /* @__PURE__ */
|
|
9264
|
-
return outer ? board : /* @__PURE__ */
|
|
9285
|
+
const outer = React45.useContext(DragControllerContext);
|
|
9286
|
+
const board = /* @__PURE__ */ jsx39(KanbanBoard, { ...props });
|
|
9287
|
+
return outer ? board : /* @__PURE__ */ jsx39(Dnd.Root, { children: board });
|
|
9265
9288
|
}
|
|
9266
9289
|
KanbanRoot.displayName = "Kanban.Root";
|
|
9267
9290
|
var EMPTY_VALUE = {};
|
|
@@ -9285,15 +9308,15 @@ function KanbanBoard({
|
|
|
9285
9308
|
}) {
|
|
9286
9309
|
const labels = { ...defaultKanbanLabels, ...labelsProp };
|
|
9287
9310
|
const controller = useDragController();
|
|
9288
|
-
const kind = `kanban-${
|
|
9289
|
-
const rootRef =
|
|
9311
|
+
const kind = `kanban-${React45.useId()}`;
|
|
9312
|
+
const rootRef = React45.useRef(null);
|
|
9290
9313
|
const setRootRef = useMergedRefs(rootRef, ref);
|
|
9291
|
-
const pendingFocus =
|
|
9314
|
+
const pendingFocus = React45.useRef(null);
|
|
9292
9315
|
const [value, setValue] = useControllableState({
|
|
9293
9316
|
value: valueProp,
|
|
9294
9317
|
defaultValue: defaultValue ?? EMPTY_VALUE
|
|
9295
9318
|
});
|
|
9296
|
-
const byId =
|
|
9319
|
+
const byId = React45.useMemo(
|
|
9297
9320
|
() => new Map(items.map((item) => [getId(item), item])),
|
|
9298
9321
|
[items, getId]
|
|
9299
9322
|
);
|
|
@@ -9351,7 +9374,7 @@ function KanbanBoard({
|
|
|
9351
9374
|
})
|
|
9352
9375
|
);
|
|
9353
9376
|
};
|
|
9354
|
-
|
|
9377
|
+
React45.useLayoutEffect(() => {
|
|
9355
9378
|
const id = pendingFocus.current;
|
|
9356
9379
|
if (id === null) return;
|
|
9357
9380
|
pendingFocus.current = null;
|
|
@@ -9361,7 +9384,7 @@ function KanbanBoard({
|
|
|
9361
9384
|
card?.focus({ focusVisible: true });
|
|
9362
9385
|
});
|
|
9363
9386
|
const context = { moveAcross, disabled: disabled || loading };
|
|
9364
|
-
return /* @__PURE__ */
|
|
9387
|
+
return /* @__PURE__ */ jsx39(BoardContext, { value: context, children: /* @__PURE__ */ jsx39(
|
|
9365
9388
|
"div",
|
|
9366
9389
|
{
|
|
9367
9390
|
ref: setRootRef,
|
|
@@ -9370,7 +9393,7 @@ function KanbanBoard({
|
|
|
9370
9393
|
className: cx(Kanban_default.root, className),
|
|
9371
9394
|
"data-loading": loading || void 0,
|
|
9372
9395
|
"data-disabled": disabled || void 0,
|
|
9373
|
-
children: /* @__PURE__ */
|
|
9396
|
+
children: /* @__PURE__ */ jsx39(ScrollContainer, { axis: "horizontal", className: Kanban_default.scroller, "data-full-width": "true", children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx39(
|
|
9374
9397
|
KanbanColumnView,
|
|
9375
9398
|
{
|
|
9376
9399
|
column,
|
|
@@ -9412,30 +9435,30 @@ function KanbanColumnView({
|
|
|
9412
9435
|
disabled,
|
|
9413
9436
|
labels
|
|
9414
9437
|
}) {
|
|
9415
|
-
const headingId =
|
|
9438
|
+
const headingId = React45.useId();
|
|
9416
9439
|
const count = cards.length;
|
|
9417
9440
|
const full = column.limit !== void 0 && count >= column.limit;
|
|
9418
9441
|
const countText = column.limit === void 0 ? formatLabel(labels.count, { count }) : formatLabel(labels.countLimit, { count, limit: column.limit });
|
|
9419
|
-
return /* @__PURE__ */
|
|
9420
|
-
/* @__PURE__ */
|
|
9421
|
-
/* @__PURE__ */
|
|
9422
|
-
loading ? null : /* @__PURE__ */
|
|
9423
|
-
/* @__PURE__ */
|
|
9424
|
-
/* @__PURE__ */
|
|
9442
|
+
return /* @__PURE__ */ jsxs29("div", { className: Kanban_default.column, "data-kanban-column": column.id, "data-full": full || void 0, children: [
|
|
9443
|
+
/* @__PURE__ */ jsx39(ControlSizeProvider, { value: "s", children: /* @__PURE__ */ jsxs29("div", { className: Kanban_default.header, children: [
|
|
9444
|
+
/* @__PURE__ */ jsx39("h3", { id: headingId, className: Kanban_default.title, children: column.title }),
|
|
9445
|
+
loading ? null : /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
9446
|
+
/* @__PURE__ */ jsx39(Badge.Root, { color: full ? "orange" : "gray", "aria-hidden": "true", children: column.limit === void 0 ? count : `${count} / ${column.limit}` }),
|
|
9447
|
+
/* @__PURE__ */ jsx39(VisuallyHidden, { children: countText })
|
|
9425
9448
|
] }),
|
|
9426
|
-
actions ? /* @__PURE__ */
|
|
9449
|
+
actions ? /* @__PURE__ */ jsx39("div", { className: Kanban_default.actions, children: actions }) : null
|
|
9427
9450
|
] }) }),
|
|
9428
|
-
/* @__PURE__ */
|
|
9451
|
+
/* @__PURE__ */ jsx39(ScrollContainer, { className: Kanban_default.body, children: /* @__PURE__ */ jsx39(Crossfade, { state: loading ? "loading" : "ready", className: Kanban_default.swap, children: loading ? /* @__PURE__ */ jsx39("div", { className: Kanban_default.list, children: Array.from({ length: skeletons }, (_, index) => (
|
|
9429
9452
|
// biome-ignore lint/suspicious/noArrayIndexKey: identical placeholder cards
|
|
9430
|
-
/* @__PURE__ */
|
|
9431
|
-
/* @__PURE__ */
|
|
9432
|
-
/* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
9434
|
-
/* @__PURE__ */
|
|
9453
|
+
/* @__PURE__ */ jsxs29("div", { className: cx(Kanban_default.item, Kanban_default.skeleton), "aria-hidden": "true", children: [
|
|
9454
|
+
/* @__PURE__ */ jsx39(Skeleton, { lines: 2 }),
|
|
9455
|
+
/* @__PURE__ */ jsxs29("div", { className: Kanban_default.footer, children: [
|
|
9456
|
+
/* @__PURE__ */ jsx39(Skeleton, { shape: "block", className: Kanban_default.skeletonBadge }),
|
|
9457
|
+
/* @__PURE__ */ jsx39(Skeleton, { shape: "circle", size: "s" })
|
|
9435
9458
|
] })
|
|
9436
9459
|
] }, index)
|
|
9437
|
-
)) }) : /* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9460
|
+
)) }) : /* @__PURE__ */ jsxs29("div", { className: Kanban_default.drop, children: [
|
|
9461
|
+
/* @__PURE__ */ jsx39(
|
|
9439
9462
|
Dnd.Sortable,
|
|
9440
9463
|
{
|
|
9441
9464
|
as: "ul",
|
|
@@ -9448,10 +9471,10 @@ function KanbanColumnView({
|
|
|
9448
9471
|
canDrop: accepts,
|
|
9449
9472
|
disabled,
|
|
9450
9473
|
onReorder,
|
|
9451
|
-
renderItem: (item) => /* @__PURE__ */
|
|
9474
|
+
renderItem: (item) => /* @__PURE__ */ jsx39(ItemIdContext, { value: getId(item), children: renderItem(item) })
|
|
9452
9475
|
}
|
|
9453
9476
|
),
|
|
9454
|
-
count === 0 ? /* @__PURE__ */
|
|
9477
|
+
count === 0 ? /* @__PURE__ */ jsx39(EmptyPage.Root, { layout: "compact", className: Kanban_default.empty, children: /* @__PURE__ */ jsx39(EmptyPage.Title, { as: "p", children: labels.empty }) }) : null
|
|
9455
9478
|
] }) }) })
|
|
9456
9479
|
] });
|
|
9457
9480
|
}
|
|
@@ -9462,13 +9485,13 @@ function KanbanItem({
|
|
|
9462
9485
|
children,
|
|
9463
9486
|
...rest
|
|
9464
9487
|
}) {
|
|
9465
|
-
const id =
|
|
9466
|
-
const board =
|
|
9488
|
+
const id = React45.useContext(ItemIdContext);
|
|
9489
|
+
const board = React45.useContext(BoardContext);
|
|
9467
9490
|
if (id === null || board === null) {
|
|
9468
9491
|
throw new Error("Kanban.Item must be returned from Kanban.Root renderItem");
|
|
9469
9492
|
}
|
|
9470
9493
|
const locked = disabled || board.disabled;
|
|
9471
|
-
return /* @__PURE__ */
|
|
9494
|
+
return /* @__PURE__ */ jsx39(
|
|
9472
9495
|
Dnd.SortableItem,
|
|
9473
9496
|
{
|
|
9474
9497
|
id,
|
|
@@ -9486,29 +9509,29 @@ function KanbanItem({
|
|
|
9486
9509
|
const towardStart = event.key === (rtl ? "ArrowRight" : "ArrowLeft");
|
|
9487
9510
|
board.moveAcross(id, towardStart ? -1 : 1);
|
|
9488
9511
|
},
|
|
9489
|
-
children: /* @__PURE__ */
|
|
9512
|
+
children: /* @__PURE__ */ jsx39(ControlSizeProvider, { value: "m", children })
|
|
9490
9513
|
}
|
|
9491
9514
|
);
|
|
9492
9515
|
}
|
|
9493
9516
|
KanbanItem.displayName = "Kanban.Item";
|
|
9494
9517
|
function KanbanItemTitle({ className, ...rest }) {
|
|
9495
|
-
return /* @__PURE__ */
|
|
9518
|
+
return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.itemTitle, className), ...rest });
|
|
9496
9519
|
}
|
|
9497
9520
|
KanbanItemTitle.displayName = "Kanban.ItemTitle";
|
|
9498
9521
|
function KanbanItemDescription({ className, ...rest }) {
|
|
9499
|
-
return /* @__PURE__ */
|
|
9522
|
+
return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.itemDescription, className), ...rest });
|
|
9500
9523
|
}
|
|
9501
9524
|
KanbanItemDescription.displayName = "Kanban.ItemDescription";
|
|
9502
9525
|
function KanbanItemBadges({ className, ...rest }) {
|
|
9503
|
-
return /* @__PURE__ */
|
|
9526
|
+
return /* @__PURE__ */ jsx39("div", { className: cx(Kanban_default.itemBadges, className), ...rest });
|
|
9504
9527
|
}
|
|
9505
9528
|
KanbanItemBadges.displayName = "Kanban.ItemBadges";
|
|
9506
9529
|
function KanbanItemFooter({ className, ...rest }) {
|
|
9507
|
-
return /* @__PURE__ */
|
|
9530
|
+
return /* @__PURE__ */ jsx39("div", { className: cx(Kanban_default.footer, className), ...rest });
|
|
9508
9531
|
}
|
|
9509
9532
|
KanbanItemFooter.displayName = "Kanban.ItemFooter";
|
|
9510
9533
|
function KanbanItemCount({ className, ...rest }) {
|
|
9511
|
-
return /* @__PURE__ */
|
|
9534
|
+
return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.count, className), ...rest });
|
|
9512
9535
|
}
|
|
9513
9536
|
KanbanItemCount.displayName = "Kanban.ItemCount";
|
|
9514
9537
|
var Kanban = {
|
|
@@ -9545,7 +9568,7 @@ var Typography_default = {
|
|
|
9545
9568
|
};
|
|
9546
9569
|
|
|
9547
9570
|
// src/components/typography/Typography.tsx
|
|
9548
|
-
import { jsx as
|
|
9571
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
9549
9572
|
var ROLE_CLASS = {
|
|
9550
9573
|
caption: textRole_default.caption,
|
|
9551
9574
|
"body-s": textRole_default.bodyS,
|
|
@@ -9575,7 +9598,7 @@ function Typography({
|
|
|
9575
9598
|
ref,
|
|
9576
9599
|
...rest
|
|
9577
9600
|
}) {
|
|
9578
|
-
return /* @__PURE__ */
|
|
9601
|
+
return /* @__PURE__ */ jsx40(
|
|
9579
9602
|
Tag,
|
|
9580
9603
|
{
|
|
9581
9604
|
ref,
|
|
@@ -9608,7 +9631,7 @@ var LoginForm_default = {
|
|
|
9608
9631
|
};
|
|
9609
9632
|
|
|
9610
9633
|
// src/components/login-form/LoginForm.tsx
|
|
9611
|
-
import { jsx as
|
|
9634
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
9612
9635
|
var TITLE_ROLE = {
|
|
9613
9636
|
xs: "title-s",
|
|
9614
9637
|
s: "title-m",
|
|
@@ -9640,29 +9663,31 @@ function LoginFormRoot({
|
|
|
9640
9663
|
ref,
|
|
9641
9664
|
...rest
|
|
9642
9665
|
}) {
|
|
9643
|
-
|
|
9666
|
+
const depth = useNestedSurfaceDepth();
|
|
9667
|
+
return /* @__PURE__ */ jsx41(
|
|
9644
9668
|
"div",
|
|
9645
9669
|
{
|
|
9646
9670
|
ref,
|
|
9647
9671
|
...rest,
|
|
9648
9672
|
className: cx(LoginForm_default.root, className),
|
|
9673
|
+
"data-depth": depth,
|
|
9649
9674
|
...toDataAttributes({ size, align, flat }),
|
|
9650
|
-
children: /* @__PURE__ */
|
|
9675
|
+
children: /* @__PURE__ */ jsx41(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx41(ControlSizeProvider, { value: size, children }) })
|
|
9651
9676
|
}
|
|
9652
9677
|
);
|
|
9653
9678
|
}
|
|
9654
9679
|
LoginFormRoot.displayName = "LoginForm.Root";
|
|
9655
9680
|
function LoginFormHeader({ className, children, ...rest }) {
|
|
9656
|
-
return /* @__PURE__ */
|
|
9681
|
+
return /* @__PURE__ */ jsx41("header", { className: cx(LoginForm_default.header, className), ...rest, children });
|
|
9657
9682
|
}
|
|
9658
9683
|
LoginFormHeader.displayName = "LoginForm.Header";
|
|
9659
9684
|
function LoginFormLogo({ className, children, ...rest }) {
|
|
9660
|
-
return /* @__PURE__ */
|
|
9685
|
+
return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.logo, className), ...rest, children });
|
|
9661
9686
|
}
|
|
9662
9687
|
LoginFormLogo.displayName = "LoginForm.Logo";
|
|
9663
9688
|
function LoginFormTitle({ as = "h1", className, children, ...rest }) {
|
|
9664
9689
|
const size = useLoginFormSize();
|
|
9665
|
-
return /* @__PURE__ */
|
|
9690
|
+
return /* @__PURE__ */ jsx41(
|
|
9666
9691
|
Typography,
|
|
9667
9692
|
{
|
|
9668
9693
|
as,
|
|
@@ -9676,7 +9701,7 @@ function LoginFormTitle({ as = "h1", className, children, ...rest }) {
|
|
|
9676
9701
|
LoginFormTitle.displayName = "LoginForm.Title";
|
|
9677
9702
|
function LoginFormDescription({ className, children, ...rest }) {
|
|
9678
9703
|
const size = useLoginFormSize();
|
|
9679
|
-
return /* @__PURE__ */
|
|
9704
|
+
return /* @__PURE__ */ jsx41(
|
|
9680
9705
|
Typography,
|
|
9681
9706
|
{
|
|
9682
9707
|
as: "p",
|
|
@@ -9690,20 +9715,20 @@ function LoginFormDescription({ className, children, ...rest }) {
|
|
|
9690
9715
|
}
|
|
9691
9716
|
LoginFormDescription.displayName = "LoginForm.Description";
|
|
9692
9717
|
function LoginFormBody({ className, children, ...rest }) {
|
|
9693
|
-
return /* @__PURE__ */
|
|
9718
|
+
return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.body, className), ...rest, children });
|
|
9694
9719
|
}
|
|
9695
9720
|
LoginFormBody.displayName = "LoginForm.Body";
|
|
9696
9721
|
function LoginFormForm({ className, children, ref, ...rest }) {
|
|
9697
|
-
return /* @__PURE__ */
|
|
9722
|
+
return /* @__PURE__ */ jsx41("form", { ref, className: cx(LoginForm_default.form, className), ...rest, children });
|
|
9698
9723
|
}
|
|
9699
9724
|
LoginFormForm.displayName = "LoginForm.Form";
|
|
9700
9725
|
function LoginFormActions({ className, children, ...rest }) {
|
|
9701
|
-
return /* @__PURE__ */
|
|
9726
|
+
return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.actions, className), ...rest, children });
|
|
9702
9727
|
}
|
|
9703
9728
|
LoginFormActions.displayName = "LoginForm.Actions";
|
|
9704
9729
|
function LoginFormFooter({ className, children, ...rest }) {
|
|
9705
9730
|
const size = useLoginFormSize();
|
|
9706
|
-
return /* @__PURE__ */
|
|
9731
|
+
return /* @__PURE__ */ jsx41(
|
|
9707
9732
|
Typography,
|
|
9708
9733
|
{
|
|
9709
9734
|
as: "p",
|
|
@@ -9736,7 +9761,7 @@ var NativeSelect_default = {
|
|
|
9736
9761
|
};
|
|
9737
9762
|
|
|
9738
9763
|
// src/components/native-select/NativeSelect.tsx
|
|
9739
|
-
import { jsx as
|
|
9764
|
+
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9740
9765
|
var NATIVE_SELECT_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
9741
9766
|
function NativeSelect({
|
|
9742
9767
|
size = "m",
|
|
@@ -9763,7 +9788,7 @@ function NativeSelect({
|
|
|
9763
9788
|
const labels = { ...NATIVE_SELECT_LABELS, ...labelsProp };
|
|
9764
9789
|
const ids = useFieldFrame(id, { hint, error, invalid }, ariaDescribedBy);
|
|
9765
9790
|
const initial = defaultValue ?? (value === void 0 && placeholder ? "" : void 0);
|
|
9766
|
-
return /* @__PURE__ */
|
|
9791
|
+
return /* @__PURE__ */ jsx42(
|
|
9767
9792
|
FieldFrame,
|
|
9768
9793
|
{
|
|
9769
9794
|
size,
|
|
@@ -9776,8 +9801,8 @@ function NativeSelect({
|
|
|
9776
9801
|
disabled,
|
|
9777
9802
|
optionalLabel: labels.optional,
|
|
9778
9803
|
className,
|
|
9779
|
-
children: /* @__PURE__ */
|
|
9780
|
-
/* @__PURE__ */
|
|
9804
|
+
children: /* @__PURE__ */ jsx42(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs30("span", { className: cx(fieldTierClass, NativeSelect_default.root), ...toDataAttributes({ size }), children: [
|
|
9805
|
+
/* @__PURE__ */ jsxs30(
|
|
9781
9806
|
"select",
|
|
9782
9807
|
{
|
|
9783
9808
|
...rest,
|
|
@@ -9799,12 +9824,12 @@ function NativeSelect({
|
|
|
9799
9824
|
"focus-ring": focusRing ? void 0 : false
|
|
9800
9825
|
}),
|
|
9801
9826
|
children: [
|
|
9802
|
-
placeholder ? /* @__PURE__ */
|
|
9827
|
+
placeholder ? /* @__PURE__ */ jsx42("option", { value: "", children: placeholder }) : null,
|
|
9803
9828
|
children
|
|
9804
9829
|
]
|
|
9805
9830
|
}
|
|
9806
9831
|
),
|
|
9807
|
-
/* @__PURE__ */
|
|
9832
|
+
/* @__PURE__ */ jsx42("span", { className: NativeSelect_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx42(Icon, { name: "nav.chevronDown" }) })
|
|
9808
9833
|
] }) })
|
|
9809
9834
|
}
|
|
9810
9835
|
);
|
|
@@ -9812,7 +9837,7 @@ function NativeSelect({
|
|
|
9812
9837
|
NativeSelect.displayName = "NativeSelect";
|
|
9813
9838
|
|
|
9814
9839
|
// src/components/notification/Notification.tsx
|
|
9815
|
-
import * as
|
|
9840
|
+
import * as React46 from "react";
|
|
9816
9841
|
|
|
9817
9842
|
// src/components/notification/Notification.module.css
|
|
9818
9843
|
var Notification_default = {
|
|
@@ -9839,7 +9864,7 @@ var Notification_default = {
|
|
|
9839
9864
|
};
|
|
9840
9865
|
|
|
9841
9866
|
// src/components/notification/Notification.tsx
|
|
9842
|
-
import { jsx as
|
|
9867
|
+
import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9843
9868
|
var NOTIFICATION_LABELS = {
|
|
9844
9869
|
close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435",
|
|
9845
9870
|
regionTopLeft: "\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0445\u0443 \u0441\u043B\u0435\u0432\u0430",
|
|
@@ -9857,7 +9882,7 @@ var REGION_LABEL_KEY = {
|
|
|
9857
9882
|
"bottom-center": "regionBottomCenter",
|
|
9858
9883
|
"bottom-right": "regionBottomRight"
|
|
9859
9884
|
};
|
|
9860
|
-
var NotificationLabelsContext =
|
|
9885
|
+
var NotificationLabelsContext = React46.createContext(NOTIFICATION_LABELS);
|
|
9861
9886
|
var TONE_ICON = {
|
|
9862
9887
|
info: "status.info",
|
|
9863
9888
|
success: "status.success",
|
|
@@ -9885,15 +9910,16 @@ function CardView({
|
|
|
9885
9910
|
stackExpanded = false,
|
|
9886
9911
|
...rest
|
|
9887
9912
|
}) {
|
|
9888
|
-
const labels =
|
|
9913
|
+
const labels = React46.useContext(NotificationLabelsContext);
|
|
9889
9914
|
const liveRole = tone === "danger" || tone === "warning" ? "alert" : "status";
|
|
9890
|
-
return /* @__PURE__ */
|
|
9915
|
+
return /* @__PURE__ */ jsxs31(
|
|
9891
9916
|
"article",
|
|
9892
9917
|
{
|
|
9893
9918
|
...rest,
|
|
9894
9919
|
className: cx(Notification_default.card, className),
|
|
9895
9920
|
role: liveRole,
|
|
9896
9921
|
"aria-live": liveRole === "alert" ? "assertive" : "polite",
|
|
9922
|
+
"data-depth": "floating",
|
|
9897
9923
|
...toDataAttributes({
|
|
9898
9924
|
tone,
|
|
9899
9925
|
size,
|
|
@@ -9902,14 +9928,14 @@ function CardView({
|
|
|
9902
9928
|
"stack-expanded": stackExpanded
|
|
9903
9929
|
}),
|
|
9904
9930
|
children: [
|
|
9905
|
-
/* @__PURE__ */
|
|
9906
|
-
/* @__PURE__ */
|
|
9907
|
-
/* @__PURE__ */
|
|
9908
|
-
/* @__PURE__ */
|
|
9909
|
-
badge !== void 0 ? /* @__PURE__ */
|
|
9931
|
+
/* @__PURE__ */ jsx43("div", { className: Notification_default.iconWrap, "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx43(Icon, { name: TONE_ICON[tone] }) }),
|
|
9932
|
+
/* @__PURE__ */ jsxs31("div", { className: Notification_default.content, children: [
|
|
9933
|
+
/* @__PURE__ */ jsxs31("header", { className: Notification_default.header, children: [
|
|
9934
|
+
/* @__PURE__ */ jsx43("p", { className: Notification_default.title, children: title }),
|
|
9935
|
+
badge !== void 0 ? /* @__PURE__ */ jsx43(Badge.Root, { size: "xs", color: TONE_BADGE_COLOR[tone], children: badge }) : null
|
|
9910
9936
|
] }),
|
|
9911
|
-
description ? /* @__PURE__ */
|
|
9912
|
-
action ? /* @__PURE__ */
|
|
9937
|
+
description ? /* @__PURE__ */ jsx43("p", { className: Notification_default.description, children: description }) : null,
|
|
9938
|
+
action ? /* @__PURE__ */ jsx43("div", { className: Notification_default.actionRow, children: /* @__PURE__ */ jsx43(
|
|
9913
9939
|
Button.Root,
|
|
9914
9940
|
{
|
|
9915
9941
|
variant: "soft",
|
|
@@ -9920,7 +9946,7 @@ function CardView({
|
|
|
9920
9946
|
}
|
|
9921
9947
|
) }) : null
|
|
9922
9948
|
] }),
|
|
9923
|
-
onClose ? /* @__PURE__ */
|
|
9949
|
+
onClose ? /* @__PURE__ */ jsx43(
|
|
9924
9950
|
Button.Root,
|
|
9925
9951
|
{
|
|
9926
9952
|
variant: "ghost",
|
|
@@ -9928,10 +9954,10 @@ function CardView({
|
|
|
9928
9954
|
size: stepDown(size, 2),
|
|
9929
9955
|
"aria-label": labels.close,
|
|
9930
9956
|
onClick: onClose,
|
|
9931
|
-
children: /* @__PURE__ */
|
|
9957
|
+
children: /* @__PURE__ */ jsx43(Button.Icon, { children: /* @__PURE__ */ jsx43(Icon, { name: "action.close" }) })
|
|
9932
9958
|
}
|
|
9933
9959
|
) : null,
|
|
9934
|
-
countdown ? /* @__PURE__ */
|
|
9960
|
+
countdown ? /* @__PURE__ */ jsx43("div", { className: Notification_default.progressTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx43(
|
|
9935
9961
|
"span",
|
|
9936
9962
|
{
|
|
9937
9963
|
className: Notification_default.progressValue,
|
|
@@ -9949,14 +9975,14 @@ function CardView({
|
|
|
9949
9975
|
);
|
|
9950
9976
|
}
|
|
9951
9977
|
function NotificationCard({ onDismiss, ...props }) {
|
|
9952
|
-
return /* @__PURE__ */
|
|
9978
|
+
return /* @__PURE__ */ jsx43(CardView, { ...props, onClose: onDismiss });
|
|
9953
9979
|
}
|
|
9954
9980
|
function subscribeVisibility(listener) {
|
|
9955
9981
|
document.addEventListener("visibilitychange", listener);
|
|
9956
9982
|
return () => document.removeEventListener("visibilitychange", listener);
|
|
9957
9983
|
}
|
|
9958
9984
|
function useDocumentHidden() {
|
|
9959
|
-
return
|
|
9985
|
+
return React46.useSyncExternalStore(
|
|
9960
9986
|
subscribeVisibility,
|
|
9961
9987
|
() => document.visibilityState === "hidden",
|
|
9962
9988
|
() => false
|
|
@@ -9965,7 +9991,7 @@ function useDocumentHidden() {
|
|
|
9965
9991
|
function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
|
|
9966
9992
|
const hidden = useDocumentHidden();
|
|
9967
9993
|
const timed = !item.persistent && item.duration > 0;
|
|
9968
|
-
return /* @__PURE__ */
|
|
9994
|
+
return /* @__PURE__ */ jsx43(
|
|
9969
9995
|
CardView,
|
|
9970
9996
|
{
|
|
9971
9997
|
tone: item.tone,
|
|
@@ -9984,8 +10010,8 @@ function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
|
|
|
9984
10010
|
}
|
|
9985
10011
|
|
|
9986
10012
|
// src/components/notification/NotificationStore.tsx
|
|
9987
|
-
import * as
|
|
9988
|
-
import { jsx as
|
|
10013
|
+
import * as React47 from "react";
|
|
10014
|
+
import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9989
10015
|
var DEFAULT_DURATION = 5e3;
|
|
9990
10016
|
var PEEK_VISIBLE = 3;
|
|
9991
10017
|
var SCALE_STEP = 0.05;
|
|
@@ -10017,7 +10043,7 @@ var POSITIONS = [
|
|
|
10017
10043
|
"bottom-right"
|
|
10018
10044
|
];
|
|
10019
10045
|
var TONES = ["success", "danger", "warning", "info"];
|
|
10020
|
-
var StoreContext =
|
|
10046
|
+
var StoreContext = React47.createContext(null);
|
|
10021
10047
|
function newId() {
|
|
10022
10048
|
return globalThis.crypto?.randomUUID?.() ?? `ntf-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
10023
10049
|
}
|
|
@@ -10031,17 +10057,17 @@ function NotificationStack({
|
|
|
10031
10057
|
onDismiss,
|
|
10032
10058
|
onExited
|
|
10033
10059
|
}) {
|
|
10034
|
-
const labels =
|
|
10035
|
-
const [expanded, setExpanded] =
|
|
10036
|
-
const [heights, setHeights] =
|
|
10037
|
-
const collapseTimerRef =
|
|
10038
|
-
const lastLayoutRef =
|
|
10039
|
-
const listRef =
|
|
10040
|
-
const hoveredRef =
|
|
10041
|
-
const focusedRef =
|
|
10060
|
+
const labels = React47.useContext(NotificationLabelsContext);
|
|
10061
|
+
const [expanded, setExpanded] = React47.useState(false);
|
|
10062
|
+
const [heights, setHeights] = React47.useState({});
|
|
10063
|
+
const collapseTimerRef = React47.useRef(null);
|
|
10064
|
+
const lastLayoutRef = React47.useRef(/* @__PURE__ */ new Map());
|
|
10065
|
+
const listRef = React47.useRef(null);
|
|
10066
|
+
const hoveredRef = React47.useRef(false);
|
|
10067
|
+
const focusedRef = React47.useRef(false);
|
|
10042
10068
|
const top = isTop(position);
|
|
10043
|
-
const step =
|
|
10044
|
-
const syncExpanded =
|
|
10069
|
+
const step = React47.useMemo(space2Px, []);
|
|
10070
|
+
const syncExpanded = React47.useCallback(() => {
|
|
10045
10071
|
if (collapseTimerRef.current !== null) {
|
|
10046
10072
|
clearTimeout(collapseTimerRef.current);
|
|
10047
10073
|
collapseTimerRef.current = null;
|
|
@@ -10052,29 +10078,29 @@ function NotificationStack({
|
|
|
10052
10078
|
collapseTimerRef.current = window.setTimeout(() => setExpanded(false), COLLAPSE_DELAY_MS);
|
|
10053
10079
|
}
|
|
10054
10080
|
}, []);
|
|
10055
|
-
const handleHover =
|
|
10081
|
+
const handleHover = React47.useCallback(
|
|
10056
10082
|
(hovered) => {
|
|
10057
10083
|
hoveredRef.current = hovered;
|
|
10058
10084
|
syncExpanded();
|
|
10059
10085
|
},
|
|
10060
10086
|
[syncExpanded]
|
|
10061
10087
|
);
|
|
10062
|
-
|
|
10088
|
+
React47.useLayoutEffect(() => {
|
|
10063
10089
|
if (!focusedRef.current) return;
|
|
10064
10090
|
if (listRef.current?.contains(document.activeElement)) return;
|
|
10065
10091
|
focusedRef.current = false;
|
|
10066
10092
|
syncExpanded();
|
|
10067
10093
|
});
|
|
10068
|
-
|
|
10094
|
+
React47.useEffect(
|
|
10069
10095
|
() => () => {
|
|
10070
10096
|
if (collapseTimerRef.current !== null) clearTimeout(collapseTimerRef.current);
|
|
10071
10097
|
},
|
|
10072
10098
|
[]
|
|
10073
10099
|
);
|
|
10074
|
-
const reportHeight =
|
|
10100
|
+
const reportHeight = React47.useCallback((id, height) => {
|
|
10075
10101
|
setHeights((prev) => prev[id] === height ? prev : { ...prev, [id]: height });
|
|
10076
10102
|
}, []);
|
|
10077
|
-
|
|
10103
|
+
React47.useEffect(() => {
|
|
10078
10104
|
setHeights((prev) => {
|
|
10079
10105
|
const ids = new Set(items.map((n) => n.id));
|
|
10080
10106
|
const stale = Object.keys(prev).filter((id) => !ids.has(id));
|
|
@@ -10101,14 +10127,14 @@ function NotificationStack({
|
|
|
10101
10127
|
});
|
|
10102
10128
|
const frontHeight = active.length > 0 ? heights[active[0].id] ?? 0 : 0;
|
|
10103
10129
|
const stackHeight = active.length === 0 ? 0 : expanded ? flowHeight - step : frontHeight + Math.min(active.length - 1, PEEK_VISIBLE - 1) * step;
|
|
10104
|
-
|
|
10130
|
+
React47.useLayoutEffect(() => {
|
|
10105
10131
|
for (const [id, layout] of layouts) lastLayoutRef.current.set(id, layout);
|
|
10106
10132
|
const ids = new Set(items.map((n) => n.id));
|
|
10107
10133
|
for (const id of lastLayoutRef.current.keys()) {
|
|
10108
10134
|
if (!ids.has(id)) lastLayoutRef.current.delete(id);
|
|
10109
10135
|
}
|
|
10110
10136
|
});
|
|
10111
|
-
return /* @__PURE__ */
|
|
10137
|
+
return /* @__PURE__ */ jsx44(
|
|
10112
10138
|
"ol",
|
|
10113
10139
|
{
|
|
10114
10140
|
ref: listRef,
|
|
@@ -10130,7 +10156,7 @@ function NotificationStack({
|
|
|
10130
10156
|
children: items.map((item) => {
|
|
10131
10157
|
const closing = item.dismissing === true;
|
|
10132
10158
|
const layout = layouts.get(item.id) ?? lastLayoutRef.current.get(item.id) ?? RESTING_LAYOUT;
|
|
10133
|
-
return /* @__PURE__ */
|
|
10159
|
+
return /* @__PURE__ */ jsx44(
|
|
10134
10160
|
NotificationStackItem,
|
|
10135
10161
|
{
|
|
10136
10162
|
item,
|
|
@@ -10152,7 +10178,7 @@ function NotificationStack({
|
|
|
10152
10178
|
}
|
|
10153
10179
|
);
|
|
10154
10180
|
}
|
|
10155
|
-
var NotificationStackItem =
|
|
10181
|
+
var NotificationStackItem = React47.memo(function NotificationStackItem2({
|
|
10156
10182
|
item,
|
|
10157
10183
|
position,
|
|
10158
10184
|
index,
|
|
@@ -10166,9 +10192,9 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
|
|
|
10166
10192
|
onExited,
|
|
10167
10193
|
onHeight
|
|
10168
10194
|
}) {
|
|
10169
|
-
const ref =
|
|
10195
|
+
const ref = React47.useRef(null);
|
|
10170
10196
|
const { id } = item;
|
|
10171
|
-
|
|
10197
|
+
React47.useLayoutEffect(() => {
|
|
10172
10198
|
const el = ref.current;
|
|
10173
10199
|
if (!el) return;
|
|
10174
10200
|
onHeight(id, el.offsetHeight);
|
|
@@ -10179,10 +10205,10 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
|
|
|
10179
10205
|
}, [id, onHeight]);
|
|
10180
10206
|
const state = closing ? "closed" : "open";
|
|
10181
10207
|
const { axis, sign } = swipeDirection(position);
|
|
10182
|
-
const dragRef =
|
|
10208
|
+
const dragRef = React47.useRef(
|
|
10183
10209
|
null
|
|
10184
10210
|
);
|
|
10185
|
-
const [swiping, setSwiping] =
|
|
10211
|
+
const [swiping, setSwiping] = React47.useState(false);
|
|
10186
10212
|
const swipeAmount = (client, origin) => {
|
|
10187
10213
|
const toward = (client - origin) * sign;
|
|
10188
10214
|
if (toward >= 0) return toward;
|
|
@@ -10233,7 +10259,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
|
|
|
10233
10259
|
if (amount === 0 || prefersReducedMotion()) delete el.dataset.swipe;
|
|
10234
10260
|
else el.dataset.swipe = "return";
|
|
10235
10261
|
};
|
|
10236
|
-
return /* @__PURE__ */
|
|
10262
|
+
return /* @__PURE__ */ jsx44(
|
|
10237
10263
|
"li",
|
|
10238
10264
|
{
|
|
10239
10265
|
ref,
|
|
@@ -10247,7 +10273,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
|
|
|
10247
10273
|
"--ntf-opacity": opacity,
|
|
10248
10274
|
zIndex: Z_FRONT - index
|
|
10249
10275
|
},
|
|
10250
|
-
children: /* @__PURE__ */
|
|
10276
|
+
children: /* @__PURE__ */ jsx44(
|
|
10251
10277
|
"div",
|
|
10252
10278
|
{
|
|
10253
10279
|
className: Notification_default.motion,
|
|
@@ -10264,7 +10290,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
|
|
|
10264
10290
|
delete event.currentTarget.dataset.swipe;
|
|
10265
10291
|
}
|
|
10266
10292
|
},
|
|
10267
|
-
children: /* @__PURE__ */
|
|
10293
|
+
children: /* @__PURE__ */ jsx44(
|
|
10268
10294
|
ToastCard,
|
|
10269
10295
|
{
|
|
10270
10296
|
item,
|
|
@@ -10284,7 +10310,7 @@ function NotificationToaster({
|
|
|
10284
10310
|
onDismiss,
|
|
10285
10311
|
onExited
|
|
10286
10312
|
}) {
|
|
10287
|
-
const grouped =
|
|
10313
|
+
const grouped = React47.useMemo(() => {
|
|
10288
10314
|
const map = /* @__PURE__ */ new Map();
|
|
10289
10315
|
for (const entry of entries) {
|
|
10290
10316
|
if (!map.has(entry.position)) map.set(entry.position, /* @__PURE__ */ new Map());
|
|
@@ -10300,18 +10326,18 @@ function NotificationToaster({
|
|
|
10300
10326
|
}
|
|
10301
10327
|
return map;
|
|
10302
10328
|
}, [entries]);
|
|
10303
|
-
return /* @__PURE__ */
|
|
10329
|
+
return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44("div", { className: Notification_default.viewport, ...{ [LIVE_REGION_ATTR]: "" }, children: POSITIONS.map((pos) => {
|
|
10304
10330
|
const byTone = grouped.get(pos);
|
|
10305
10331
|
if (!byTone?.size) return null;
|
|
10306
10332
|
const [vertical, horizontal] = pos.split("-");
|
|
10307
10333
|
const stacks = TONES.map((tone) => ({ tone, items: byTone.get(tone) ?? [] })).filter(
|
|
10308
10334
|
(s) => s.items.length > 0
|
|
10309
10335
|
);
|
|
10310
|
-
return /* @__PURE__ */
|
|
10336
|
+
return /* @__PURE__ */ jsx44(
|
|
10311
10337
|
"section",
|
|
10312
10338
|
{
|
|
10313
10339
|
className: `${Notification_default.zone} ${Notification_default[vertical]} ${Notification_default[horizontal]}`,
|
|
10314
|
-
children: stacks.map((s) => /* @__PURE__ */
|
|
10340
|
+
children: stacks.map((s) => /* @__PURE__ */ jsx44(
|
|
10315
10341
|
NotificationStack,
|
|
10316
10342
|
{
|
|
10317
10343
|
position: pos,
|
|
@@ -10332,22 +10358,22 @@ function NotificationProvider({
|
|
|
10332
10358
|
max = 5,
|
|
10333
10359
|
labels: labelsProp
|
|
10334
10360
|
}) {
|
|
10335
|
-
const labels =
|
|
10361
|
+
const labels = React47.useMemo(
|
|
10336
10362
|
() => ({ ...NOTIFICATION_LABELS, ...labelsProp }),
|
|
10337
10363
|
[labelsProp]
|
|
10338
10364
|
);
|
|
10339
|
-
const [entries, setEntries] =
|
|
10340
|
-
const entriesRef =
|
|
10365
|
+
const [entries, setEntries] = React47.useState([]);
|
|
10366
|
+
const entriesRef = React47.useRef(entries);
|
|
10341
10367
|
entriesRef.current = entries;
|
|
10342
|
-
const exitTimersRef =
|
|
10343
|
-
|
|
10368
|
+
const exitTimersRef = React47.useRef(/* @__PURE__ */ new Map());
|
|
10369
|
+
React47.useEffect(() => {
|
|
10344
10370
|
const timers = exitTimersRef.current;
|
|
10345
10371
|
return () => {
|
|
10346
10372
|
for (const timer of timers.values()) clearTimeout(timer);
|
|
10347
10373
|
timers.clear();
|
|
10348
10374
|
};
|
|
10349
10375
|
}, []);
|
|
10350
|
-
const remove =
|
|
10376
|
+
const remove = React47.useCallback((id) => {
|
|
10351
10377
|
const timer = exitTimersRef.current.get(id);
|
|
10352
10378
|
if (timer !== void 0) {
|
|
10353
10379
|
clearTimeout(timer);
|
|
@@ -10355,7 +10381,7 @@ function NotificationProvider({
|
|
|
10355
10381
|
}
|
|
10356
10382
|
setEntries((prev) => prev.filter((n) => n.id !== id));
|
|
10357
10383
|
}, []);
|
|
10358
|
-
const startExit =
|
|
10384
|
+
const startExit = React47.useCallback(
|
|
10359
10385
|
(ids) => {
|
|
10360
10386
|
if (ids.length === 0) return;
|
|
10361
10387
|
const target = new Set(ids);
|
|
@@ -10382,12 +10408,12 @@ function NotificationProvider({
|
|
|
10382
10408
|
},
|
|
10383
10409
|
[remove]
|
|
10384
10410
|
);
|
|
10385
|
-
const dismiss =
|
|
10386
|
-
const dismissAll =
|
|
10411
|
+
const dismiss = React47.useCallback((id) => startExit([id]), [startExit]);
|
|
10412
|
+
const dismissAll = React47.useCallback(
|
|
10387
10413
|
() => startExit(entriesRef.current.filter((n) => !n.dismissing).map((n) => n.id)),
|
|
10388
10414
|
[startExit]
|
|
10389
10415
|
);
|
|
10390
|
-
const notify =
|
|
10416
|
+
const notify = React47.useCallback(
|
|
10391
10417
|
(options) => {
|
|
10392
10418
|
const id = newId();
|
|
10393
10419
|
const record = {
|
|
@@ -10414,24 +10440,24 @@ function NotificationProvider({
|
|
|
10414
10440
|
},
|
|
10415
10441
|
[position, max]
|
|
10416
10442
|
);
|
|
10417
|
-
const publicItems =
|
|
10418
|
-
const value =
|
|
10443
|
+
const publicItems = React47.useMemo(() => entries.filter((n) => !n.dismissing), [entries]);
|
|
10444
|
+
const value = React47.useMemo(
|
|
10419
10445
|
() => ({ items: publicItems, notify, dismiss, dismissAll }),
|
|
10420
10446
|
[publicItems, notify, dismiss, dismissAll]
|
|
10421
10447
|
);
|
|
10422
|
-
return /* @__PURE__ */
|
|
10448
|
+
return /* @__PURE__ */ jsx44(StoreContext.Provider, { value, children: /* @__PURE__ */ jsxs32(NotificationLabelsContext.Provider, { value: labels, children: [
|
|
10423
10449
|
children,
|
|
10424
|
-
/* @__PURE__ */
|
|
10450
|
+
/* @__PURE__ */ jsx44(NotificationToaster, { entries, onDismiss: dismiss, onExited: remove })
|
|
10425
10451
|
] }) });
|
|
10426
10452
|
}
|
|
10427
10453
|
function useNotifications() {
|
|
10428
|
-
const ctx =
|
|
10454
|
+
const ctx = React47.useContext(StoreContext);
|
|
10429
10455
|
if (!ctx) throw new Error("useNotifications must be used within NotificationProvider");
|
|
10430
10456
|
return ctx;
|
|
10431
10457
|
}
|
|
10432
10458
|
|
|
10433
10459
|
// src/components/page-content/PageContent.tsx
|
|
10434
|
-
import * as
|
|
10460
|
+
import * as React48 from "react";
|
|
10435
10461
|
|
|
10436
10462
|
// src/components/page-content/PageContent.module.css
|
|
10437
10463
|
var PageContent_default = {
|
|
@@ -10446,9 +10472,9 @@ var PageContent_default = {
|
|
|
10446
10472
|
};
|
|
10447
10473
|
|
|
10448
10474
|
// src/components/page-content/PageContent.tsx
|
|
10449
|
-
import { jsx as
|
|
10475
|
+
import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10450
10476
|
function PageContentRoot({ maxWidth = "full", className, ...rest }) {
|
|
10451
|
-
return /* @__PURE__ */
|
|
10477
|
+
return /* @__PURE__ */ jsx45(
|
|
10452
10478
|
"div",
|
|
10453
10479
|
{
|
|
10454
10480
|
className: cx(PageContent_default.root, className),
|
|
@@ -10459,25 +10485,25 @@ function PageContentRoot({ maxWidth = "full", className, ...rest }) {
|
|
|
10459
10485
|
}
|
|
10460
10486
|
PageContentRoot.displayName = "PageContent.Root";
|
|
10461
10487
|
function PageContentSection({ className, ...rest }) {
|
|
10462
|
-
return /* @__PURE__ */
|
|
10488
|
+
return /* @__PURE__ */ jsx45("section", { className: cx(PageContent_default.section, className), ...rest });
|
|
10463
10489
|
}
|
|
10464
10490
|
PageContentSection.displayName = "PageContent.Section";
|
|
10465
10491
|
function PageContentActions({ className, ...rest }) {
|
|
10466
|
-
return /* @__PURE__ */
|
|
10492
|
+
return /* @__PURE__ */ jsx45("div", { className: cx(PageContent_default.actions, className), ...rest });
|
|
10467
10493
|
}
|
|
10468
10494
|
PageContentActions.displayName = "PageContent.Actions";
|
|
10469
10495
|
function PageContentHeader({ className, children, ...rest }) {
|
|
10470
|
-
const items =
|
|
10471
|
-
const isActions = (child) =>
|
|
10496
|
+
const items = React48.Children.toArray(children);
|
|
10497
|
+
const isActions = (child) => React48.isValidElement(child) && child.type === PageContentActions;
|
|
10472
10498
|
const actions = items.filter(isActions);
|
|
10473
|
-
return /* @__PURE__ */
|
|
10499
|
+
return /* @__PURE__ */ jsxs33(
|
|
10474
10500
|
"div",
|
|
10475
10501
|
{
|
|
10476
10502
|
className: cx(PageContent_default.header, className),
|
|
10477
10503
|
"data-has-actions": actions.length > 0 ? "true" : void 0,
|
|
10478
10504
|
...rest,
|
|
10479
10505
|
children: [
|
|
10480
|
-
/* @__PURE__ */
|
|
10506
|
+
/* @__PURE__ */ jsx45("div", { className: PageContent_default.heading, children: items.filter((child) => !isActions(child)) }),
|
|
10481
10507
|
actions
|
|
10482
10508
|
]
|
|
10483
10509
|
}
|
|
@@ -10485,7 +10511,7 @@ function PageContentHeader({ className, children, ...rest }) {
|
|
|
10485
10511
|
}
|
|
10486
10512
|
PageContentHeader.displayName = "PageContent.Header";
|
|
10487
10513
|
function PageContentTitle({ className, ...rest }) {
|
|
10488
|
-
return /* @__PURE__ */
|
|
10514
|
+
return /* @__PURE__ */ jsx45("h1", { className: cx(PageContent_default.title, className), ...rest });
|
|
10489
10515
|
}
|
|
10490
10516
|
PageContentTitle.displayName = "PageContent.Title";
|
|
10491
10517
|
function PageContentDescription({
|
|
@@ -10493,7 +10519,7 @@ function PageContentDescription({
|
|
|
10493
10519
|
measure = "readable",
|
|
10494
10520
|
...rest
|
|
10495
10521
|
}) {
|
|
10496
|
-
return /* @__PURE__ */
|
|
10522
|
+
return /* @__PURE__ */ jsx45(
|
|
10497
10523
|
"p",
|
|
10498
10524
|
{
|
|
10499
10525
|
className: cx(PageContent_default.description, className),
|
|
@@ -10504,7 +10530,7 @@ function PageContentDescription({
|
|
|
10504
10530
|
}
|
|
10505
10531
|
PageContentDescription.displayName = "PageContent.Description";
|
|
10506
10532
|
function PageContentBody({ className, ...rest }) {
|
|
10507
|
-
return /* @__PURE__ */
|
|
10533
|
+
return /* @__PURE__ */ jsx45("div", { className: cx(PageContent_default.body, className), ...rest });
|
|
10508
10534
|
}
|
|
10509
10535
|
PageContentBody.displayName = "PageContent.Body";
|
|
10510
10536
|
var PageContent = {
|
|
@@ -10518,7 +10544,7 @@ var PageContent = {
|
|
|
10518
10544
|
};
|
|
10519
10545
|
|
|
10520
10546
|
// src/components/page-toolbar/PageToolbar.tsx
|
|
10521
|
-
import * as
|
|
10547
|
+
import * as React49 from "react";
|
|
10522
10548
|
|
|
10523
10549
|
// src/components/page-toolbar/PageToolbar.module.css
|
|
10524
10550
|
var PageToolbar_default = {
|
|
@@ -10533,37 +10559,37 @@ var PageToolbar_default = {
|
|
|
10533
10559
|
};
|
|
10534
10560
|
|
|
10535
10561
|
// src/components/page-toolbar/PageToolbar.tsx
|
|
10536
|
-
import { jsx as
|
|
10562
|
+
import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10537
10563
|
function PageToolbarRoot({ className, children, ref, ...rest }) {
|
|
10538
|
-
const items =
|
|
10539
|
-
const isChips = (child) =>
|
|
10540
|
-
return /* @__PURE__ */
|
|
10541
|
-
/* @__PURE__ */
|
|
10564
|
+
const items = React49.Children.toArray(children);
|
|
10565
|
+
const isChips = (child) => React49.isValidElement(child) && child.type === PageToolbarChips;
|
|
10566
|
+
return /* @__PURE__ */ jsxs34("div", { ...rest, ref, className: cx(PageToolbar_default.root, className), children: [
|
|
10567
|
+
/* @__PURE__ */ jsxs34("div", { className: PageToolbar_default.bar, children: [
|
|
10542
10568
|
items.filter((child) => !isChips(child)),
|
|
10543
|
-
/* @__PURE__ */
|
|
10569
|
+
/* @__PURE__ */ jsx46("span", { className: PageToolbar_default.break, "aria-hidden": "true" })
|
|
10544
10570
|
] }),
|
|
10545
10571
|
items.filter(isChips)
|
|
10546
10572
|
] });
|
|
10547
10573
|
}
|
|
10548
10574
|
PageToolbarRoot.displayName = "PageToolbar.Root";
|
|
10549
10575
|
function PageToolbarSections({ className, ...rest }) {
|
|
10550
|
-
return /* @__PURE__ */
|
|
10576
|
+
return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.sections, className) });
|
|
10551
10577
|
}
|
|
10552
10578
|
PageToolbarSections.displayName = "PageToolbar.Sections";
|
|
10553
10579
|
function PageToolbarTools({ className, ...rest }) {
|
|
10554
|
-
return /* @__PURE__ */
|
|
10580
|
+
return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.tools, className) });
|
|
10555
10581
|
}
|
|
10556
10582
|
PageToolbarTools.displayName = "PageToolbar.Tools";
|
|
10557
10583
|
function PageToolbarView({ className, ...rest }) {
|
|
10558
|
-
return /* @__PURE__ */
|
|
10584
|
+
return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.view, className) });
|
|
10559
10585
|
}
|
|
10560
10586
|
PageToolbarView.displayName = "PageToolbar.View";
|
|
10561
10587
|
function PageToolbarActions({ className, ...rest }) {
|
|
10562
|
-
return /* @__PURE__ */
|
|
10588
|
+
return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.actions, className) });
|
|
10563
10589
|
}
|
|
10564
10590
|
PageToolbarActions.displayName = "PageToolbar.Actions";
|
|
10565
10591
|
function PageToolbarChips({ className, ...rest }) {
|
|
10566
|
-
return /* @__PURE__ */
|
|
10592
|
+
return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.chips, className) });
|
|
10567
10593
|
}
|
|
10568
10594
|
PageToolbarChips.displayName = "PageToolbar.Chips";
|
|
10569
10595
|
var PageToolbar = {
|
|
@@ -10576,7 +10602,7 @@ var PageToolbar = {
|
|
|
10576
10602
|
};
|
|
10577
10603
|
|
|
10578
10604
|
// src/components/progress-circle/ProgressCircle.tsx
|
|
10579
|
-
import * as
|
|
10605
|
+
import * as React50 from "react";
|
|
10580
10606
|
|
|
10581
10607
|
// src/components/progress-circle/ProgressCircle.module.css
|
|
10582
10608
|
var ProgressCircle_default = {
|
|
@@ -10593,7 +10619,7 @@ var ProgressCircle_default = {
|
|
|
10593
10619
|
};
|
|
10594
10620
|
|
|
10595
10621
|
// src/components/progress-circle/ProgressCircle.tsx
|
|
10596
|
-
import { Fragment as
|
|
10622
|
+
import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10597
10623
|
var STROKE = 100 / 12;
|
|
10598
10624
|
var RADIUS = 50 - STROKE / 2;
|
|
10599
10625
|
var CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
@@ -10606,10 +10632,10 @@ function arcStyle(start, length) {
|
|
|
10606
10632
|
};
|
|
10607
10633
|
}
|
|
10608
10634
|
function Ring(props) {
|
|
10609
|
-
return /* @__PURE__ */
|
|
10635
|
+
return /* @__PURE__ */ jsx47("circle", { cx: 50, cy: 50, r: RADIUS, strokeWidth: STROKE, ...props });
|
|
10610
10636
|
}
|
|
10611
10637
|
function Cap({ position, tone }) {
|
|
10612
|
-
return /* @__PURE__ */
|
|
10638
|
+
return /* @__PURE__ */ jsx47(
|
|
10613
10639
|
"circle",
|
|
10614
10640
|
{
|
|
10615
10641
|
cx: 50 + RADIUS,
|
|
@@ -10628,7 +10654,7 @@ function SegmentArcs({
|
|
|
10628
10654
|
}) {
|
|
10629
10655
|
if (gap === "hairline" && arcs.length > 1) {
|
|
10630
10656
|
const inset = (STROKE + HAIRLINE_GAP) / 2;
|
|
10631
|
-
return /* @__PURE__ */
|
|
10657
|
+
return /* @__PURE__ */ jsx47(Fragment8, { children: arcs.map((a, i) => /* @__PURE__ */ jsx47(
|
|
10632
10658
|
Ring,
|
|
10633
10659
|
{
|
|
10634
10660
|
className: a.rest ? ProgressCircle_default.restRound : ProgressCircle_default.segmentRound,
|
|
@@ -10641,8 +10667,8 @@ function SegmentArcs({
|
|
|
10641
10667
|
const parts = arcs.filter((a) => !a.rest);
|
|
10642
10668
|
const first = parts[0];
|
|
10643
10669
|
const last = parts[parts.length - 1];
|
|
10644
|
-
return /* @__PURE__ */
|
|
10645
|
-
parts.map((a, i) => /* @__PURE__ */
|
|
10670
|
+
return /* @__PURE__ */ jsxs35(Fragment8, { children: [
|
|
10671
|
+
parts.map((a, i) => /* @__PURE__ */ jsx47(
|
|
10646
10672
|
Ring,
|
|
10647
10673
|
{
|
|
10648
10674
|
className: ProgressCircle_default.segment,
|
|
@@ -10651,9 +10677,9 @@ function SegmentArcs({
|
|
|
10651
10677
|
},
|
|
10652
10678
|
i
|
|
10653
10679
|
)),
|
|
10654
|
-
first && last && !closed ? /* @__PURE__ */
|
|
10655
|
-
/* @__PURE__ */
|
|
10656
|
-
/* @__PURE__ */
|
|
10680
|
+
first && last && !closed ? /* @__PURE__ */ jsxs35(Fragment8, { children: [
|
|
10681
|
+
/* @__PURE__ */ jsx47(Cap, { position: first.start, tone: first.tone }),
|
|
10682
|
+
/* @__PURE__ */ jsx47(Cap, { position: last.start + last.length, tone: last.tone })
|
|
10657
10683
|
] }) : null
|
|
10658
10684
|
] });
|
|
10659
10685
|
}
|
|
@@ -10671,7 +10697,7 @@ function ProgressCircle(props) {
|
|
|
10671
10697
|
labels,
|
|
10672
10698
|
...rest
|
|
10673
10699
|
} = props;
|
|
10674
|
-
const descriptionId =
|
|
10700
|
+
const descriptionId = React50.useId();
|
|
10675
10701
|
const showInner = children != null && children !== false && !SIZES_WITHOUT_INNER.has(size);
|
|
10676
10702
|
const valueText = typeof children === "string" || typeof children === "number" ? String(children) : void 0;
|
|
10677
10703
|
let tone;
|
|
@@ -10698,9 +10724,9 @@ function ProgressCircle(props) {
|
|
|
10698
10724
|
}
|
|
10699
10725
|
if (free > 0 && total > 0) arcs.push({ start: cursor, length: free * unit, rest: true });
|
|
10700
10726
|
const a11y = label ? { "aria-label": label, "aria-describedby": descriptionId } : { "aria-label": text };
|
|
10701
|
-
if (label) description = /* @__PURE__ */
|
|
10727
|
+
if (label) description = /* @__PURE__ */ jsx47(VisuallyHidden, { id: descriptionId, children: text });
|
|
10702
10728
|
svg = // biome-ignore lint/a11y/useSemanticElements: a distribution is a group of parts, not a fieldset
|
|
10703
|
-
/* @__PURE__ */
|
|
10729
|
+
/* @__PURE__ */ jsx47(
|
|
10704
10730
|
"svg",
|
|
10705
10731
|
{
|
|
10706
10732
|
viewBox: "0 0 100 100",
|
|
@@ -10708,16 +10734,16 @@ function ProgressCircle(props) {
|
|
|
10708
10734
|
role: "group",
|
|
10709
10735
|
...a11y,
|
|
10710
10736
|
...toDataAttributes({ "segment-gap": gap }),
|
|
10711
|
-
children: /* @__PURE__ */
|
|
10712
|
-
gap === "none" || total === 0 ? /* @__PURE__ */
|
|
10713
|
-
total > 0 ? /* @__PURE__ */
|
|
10737
|
+
children: /* @__PURE__ */ jsxs35("g", { className: ProgressCircle_default.arcs, children: [
|
|
10738
|
+
gap === "none" || total === 0 ? /* @__PURE__ */ jsx47(Ring, { className: ProgressCircle_default.track }) : null,
|
|
10739
|
+
total > 0 ? /* @__PURE__ */ jsx47(SegmentArcs, { arcs, gap, closed: free === 0 }) : null
|
|
10714
10740
|
] })
|
|
10715
10741
|
}
|
|
10716
10742
|
);
|
|
10717
10743
|
} else {
|
|
10718
10744
|
const { value, max, ratio } = resolveValue(valueProp ?? 0, maxProp);
|
|
10719
10745
|
tone = toneProp ?? "accent";
|
|
10720
|
-
svg = /* @__PURE__ */
|
|
10746
|
+
svg = /* @__PURE__ */ jsx47(
|
|
10721
10747
|
"svg",
|
|
10722
10748
|
{
|
|
10723
10749
|
viewBox: "0 0 100 100",
|
|
@@ -10728,9 +10754,9 @@ function ProgressCircle(props) {
|
|
|
10728
10754
|
"aria-valuemax": max,
|
|
10729
10755
|
"aria-label": label,
|
|
10730
10756
|
"aria-valuetext": valueText,
|
|
10731
|
-
children: /* @__PURE__ */
|
|
10732
|
-
/* @__PURE__ */
|
|
10733
|
-
/* @__PURE__ */
|
|
10757
|
+
children: /* @__PURE__ */ jsxs35("g", { className: ProgressCircle_default.arcs, children: [
|
|
10758
|
+
/* @__PURE__ */ jsx47(Ring, { className: ProgressCircle_default.track }),
|
|
10759
|
+
/* @__PURE__ */ jsx47(
|
|
10734
10760
|
Ring,
|
|
10735
10761
|
{
|
|
10736
10762
|
className: ProgressCircle_default.fill,
|
|
@@ -10745,15 +10771,15 @@ function ProgressCircle(props) {
|
|
|
10745
10771
|
}
|
|
10746
10772
|
);
|
|
10747
10773
|
}
|
|
10748
|
-
return /* @__PURE__ */
|
|
10774
|
+
return /* @__PURE__ */ jsxs35("div", { className: cx(ProgressCircle_default.root, className), ...rest, ...toDataAttributes({ size, tone }), children: [
|
|
10749
10775
|
svg,
|
|
10750
10776
|
description,
|
|
10751
|
-
showInner ? /* @__PURE__ */
|
|
10777
|
+
showInner ? /* @__PURE__ */ jsx47("div", { className: ProgressCircle_default.inner, "aria-hidden": valueText !== void 0 ? true : void 0, children }) : null
|
|
10752
10778
|
] });
|
|
10753
10779
|
}
|
|
10754
10780
|
|
|
10755
10781
|
// src/components/radio/Radio.tsx
|
|
10756
|
-
import * as
|
|
10782
|
+
import * as React51 from "react";
|
|
10757
10783
|
|
|
10758
10784
|
// src/components/radio/Radio.module.css
|
|
10759
10785
|
var Radio_default = {
|
|
@@ -10764,7 +10790,7 @@ var Radio_default = {
|
|
|
10764
10790
|
};
|
|
10765
10791
|
|
|
10766
10792
|
// src/components/radio/Radio.tsx
|
|
10767
|
-
import { Fragment as
|
|
10793
|
+
import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10768
10794
|
var RADIO_GROUP_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
10769
10795
|
var [RadioGroupProvider, useRadioGroupContext] = createComponentContext("Radio.Group");
|
|
10770
10796
|
function RadioGroup({
|
|
@@ -10793,7 +10819,7 @@ function RadioGroup({
|
|
|
10793
10819
|
const size = useControlSize(sizeProp);
|
|
10794
10820
|
const ids = useFieldFrame(id, { label, hint, error, invalid }, ariaDescribedBy);
|
|
10795
10821
|
const name = nameProp ?? ids.controlId;
|
|
10796
|
-
const reportChange =
|
|
10822
|
+
const reportChange = React51.useCallback(
|
|
10797
10823
|
(next) => {
|
|
10798
10824
|
if (next !== void 0) onValueChange?.(next);
|
|
10799
10825
|
},
|
|
@@ -10804,11 +10830,11 @@ function RadioGroup({
|
|
|
10804
10830
|
defaultValue,
|
|
10805
10831
|
onChange: reportChange
|
|
10806
10832
|
});
|
|
10807
|
-
const ctxValue =
|
|
10833
|
+
const ctxValue = React51.useMemo(
|
|
10808
10834
|
() => ({ name, value, setValue, size, disabled, invalid: ids.invalid, required }),
|
|
10809
10835
|
[name, value, setValue, size, disabled, ids.invalid, required]
|
|
10810
10836
|
);
|
|
10811
|
-
return /* @__PURE__ */
|
|
10837
|
+
return /* @__PURE__ */ jsx48(RadioGroupProvider, { value: ctxValue, children: /* @__PURE__ */ jsx48(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx48(
|
|
10812
10838
|
FieldFrame,
|
|
10813
10839
|
{
|
|
10814
10840
|
...rest,
|
|
@@ -10823,7 +10849,7 @@ function RadioGroup({
|
|
|
10823
10849
|
optionalLabel: labelsProp?.optional ?? RADIO_GROUP_LABELS.optional,
|
|
10824
10850
|
group: true,
|
|
10825
10851
|
className,
|
|
10826
|
-
children: /* @__PURE__ */
|
|
10852
|
+
children: /* @__PURE__ */ jsx48(
|
|
10827
10853
|
"div",
|
|
10828
10854
|
{
|
|
10829
10855
|
id: ids.controlId,
|
|
@@ -10858,7 +10884,7 @@ function RadioRoot({
|
|
|
10858
10884
|
const ids = useFieldFrame(id, { hint, invalid: group.invalid }, ariaDescribedBy);
|
|
10859
10885
|
const disabled = group.disabled || disabledProp;
|
|
10860
10886
|
const checked = group.value === value;
|
|
10861
|
-
return /* @__PURE__ */
|
|
10887
|
+
return /* @__PURE__ */ jsx48(
|
|
10862
10888
|
ChoiceField,
|
|
10863
10889
|
{
|
|
10864
10890
|
ids,
|
|
@@ -10867,8 +10893,8 @@ function RadioRoot({
|
|
|
10867
10893
|
disabled,
|
|
10868
10894
|
hint,
|
|
10869
10895
|
className: cx(Radio_default.root, className),
|
|
10870
|
-
control: /* @__PURE__ */
|
|
10871
|
-
/* @__PURE__ */
|
|
10896
|
+
control: /* @__PURE__ */ jsxs36(Fragment9, { children: [
|
|
10897
|
+
/* @__PURE__ */ jsx48(
|
|
10872
10898
|
"input",
|
|
10873
10899
|
{
|
|
10874
10900
|
...inputRest,
|
|
@@ -10886,7 +10912,7 @@ function RadioRoot({
|
|
|
10886
10912
|
"aria-describedby": ids.describedBy
|
|
10887
10913
|
}
|
|
10888
10914
|
),
|
|
10889
|
-
/* @__PURE__ */
|
|
10915
|
+
/* @__PURE__ */ jsx48("span", { className: cx(choiceVisualClass, Radio_default.control), "aria-hidden": "true", children: /* @__PURE__ */ jsx48("span", { className: Radio_default.dot }) })
|
|
10890
10916
|
] }),
|
|
10891
10917
|
children
|
|
10892
10918
|
}
|
|
@@ -10894,7 +10920,7 @@ function RadioRoot({
|
|
|
10894
10920
|
}
|
|
10895
10921
|
RadioRoot.displayName = "Radio.Root";
|
|
10896
10922
|
function RadioLabel(props) {
|
|
10897
|
-
return /* @__PURE__ */
|
|
10923
|
+
return /* @__PURE__ */ jsx48(ChoiceLabel, { ...props });
|
|
10898
10924
|
}
|
|
10899
10925
|
RadioLabel.displayName = "Radio.Label";
|
|
10900
10926
|
var Radio = {
|
|
@@ -10915,7 +10941,7 @@ var Slider_default = {
|
|
|
10915
10941
|
};
|
|
10916
10942
|
|
|
10917
10943
|
// src/components/slider/Slider.tsx
|
|
10918
|
-
import { jsx as
|
|
10944
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10919
10945
|
var SLIDER_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
10920
10946
|
var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
10921
10947
|
function Slider({
|
|
@@ -10954,7 +10980,7 @@ function Slider({
|
|
|
10954
10980
|
const safeValue = clamp(value, min, max);
|
|
10955
10981
|
const ratio = max > min ? (safeValue - min) / (max - min) : 0;
|
|
10956
10982
|
const valueText = formatValue ? formatValue(safeValue) : String(safeValue);
|
|
10957
|
-
return /* @__PURE__ */
|
|
10983
|
+
return /* @__PURE__ */ jsx49(
|
|
10958
10984
|
FieldFrame,
|
|
10959
10985
|
{
|
|
10960
10986
|
...rest,
|
|
@@ -10967,12 +10993,12 @@ function Slider({
|
|
|
10967
10993
|
error,
|
|
10968
10994
|
disabled,
|
|
10969
10995
|
optionalLabel: labelsProp?.optional ?? SLIDER_LABELS.optional,
|
|
10970
|
-
labelEnd: showValue ? /* @__PURE__ */
|
|
10996
|
+
labelEnd: showValue ? /* @__PURE__ */ jsx49("output", { className: Slider_default.value, htmlFor: ids.controlId, "aria-hidden": "true", children: valueText }) : void 0,
|
|
10971
10997
|
className: cx(Slider_default.root, className),
|
|
10972
10998
|
style: { ...style, "--slider-ratio": ratio },
|
|
10973
10999
|
...toDataAttributes({ tone }),
|
|
10974
|
-
children: /* @__PURE__ */
|
|
10975
|
-
/* @__PURE__ */
|
|
11000
|
+
children: /* @__PURE__ */ jsx49(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs37("div", { className: Slider_default.control, children: [
|
|
11001
|
+
/* @__PURE__ */ jsx49(
|
|
10976
11002
|
"input",
|
|
10977
11003
|
{
|
|
10978
11004
|
id: ids.controlId,
|
|
@@ -10993,15 +11019,15 @@ function Slider({
|
|
|
10993
11019
|
"aria-invalid": ids.invalid || void 0
|
|
10994
11020
|
}
|
|
10995
11021
|
),
|
|
10996
|
-
/* @__PURE__ */
|
|
10997
|
-
/* @__PURE__ */
|
|
11022
|
+
/* @__PURE__ */ jsx49("span", { className: Slider_default.track, "aria-hidden": "true", children: /* @__PURE__ */ jsx49("span", { className: Slider_default.range }) }),
|
|
11023
|
+
/* @__PURE__ */ jsx49("span", { className: Slider_default.thumb, "aria-hidden": "true" })
|
|
10998
11024
|
] }) })
|
|
10999
11025
|
}
|
|
11000
11026
|
);
|
|
11001
11027
|
}
|
|
11002
11028
|
|
|
11003
11029
|
// src/components/smart-filter/SmartFilter.tsx
|
|
11004
|
-
import * as
|
|
11030
|
+
import * as React52 from "react";
|
|
11005
11031
|
|
|
11006
11032
|
// src/components/smart-filter/model.ts
|
|
11007
11033
|
var EMPTY = { include: [], exclude: [] };
|
|
@@ -11065,7 +11091,7 @@ var SmartFilter_default = {
|
|
|
11065
11091
|
};
|
|
11066
11092
|
|
|
11067
11093
|
// src/components/smart-filter/SmartFilter.tsx
|
|
11068
|
-
import { Fragment as
|
|
11094
|
+
import { Fragment as Fragment11, jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11069
11095
|
var DEFAULT_LABELS4 = {
|
|
11070
11096
|
filter: "\u0424\u0438\u043B\u044C\u0442\u0440",
|
|
11071
11097
|
searchPlaceholder: "\u041F\u043E\u0438\u0441\u043A",
|
|
@@ -11113,7 +11139,7 @@ function SmartFilterRoot({
|
|
|
11113
11139
|
defaultValue: defaultSearch,
|
|
11114
11140
|
onChange: onSearchChange
|
|
11115
11141
|
});
|
|
11116
|
-
const [open, setOpen] =
|
|
11142
|
+
const [open, setOpen] = React52.useState(false);
|
|
11117
11143
|
const context = {
|
|
11118
11144
|
fields,
|
|
11119
11145
|
value: current,
|
|
@@ -11133,15 +11159,15 @@ function SmartFilterRoot({
|
|
|
11133
11159
|
size,
|
|
11134
11160
|
collapsedLimit
|
|
11135
11161
|
};
|
|
11136
|
-
return /* @__PURE__ */
|
|
11162
|
+
return /* @__PURE__ */ jsx50(SmartFilterProvider, { value: context, children: /* @__PURE__ */ jsx50(Popover.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx50("div", { ref, className: cx(SmartFilter_default.root, className), "data-size": size, children }) }) });
|
|
11137
11163
|
}
|
|
11138
11164
|
SmartFilterRoot.displayName = "SmartFilter.Root";
|
|
11139
11165
|
function SmartFilterToolbar({ className, ...rest }) {
|
|
11140
11166
|
const { fields, total, open, setOpen, search, setSearch, labels, size } = useSmartFilter();
|
|
11141
11167
|
const hasFilters = fields.length > 0;
|
|
11142
|
-
return /* @__PURE__ */
|
|
11143
|
-
/* @__PURE__ */
|
|
11144
|
-
hasFilters && /* @__PURE__ */
|
|
11168
|
+
return /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
11169
|
+
/* @__PURE__ */ jsx50(Popover.Anchor, { children: /* @__PURE__ */ jsxs38("div", { ...rest, className: cx(SmartFilter_default.toolbar, className), "data-slot": "smart-filter-toolbar", children: [
|
|
11170
|
+
hasFilters && /* @__PURE__ */ jsxs38(
|
|
11145
11171
|
Button.Root,
|
|
11146
11172
|
{
|
|
11147
11173
|
variant: "soft",
|
|
@@ -11152,15 +11178,15 @@ function SmartFilterToolbar({ className, ...rest }) {
|
|
|
11152
11178
|
"aria-haspopup": "dialog",
|
|
11153
11179
|
onClick: () => setOpen(!open),
|
|
11154
11180
|
children: [
|
|
11155
|
-
/* @__PURE__ */
|
|
11181
|
+
/* @__PURE__ */ jsx50(Button.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.filter" }) }),
|
|
11156
11182
|
labels.filter,
|
|
11157
|
-
total > 0 && /* @__PURE__ */
|
|
11183
|
+
total > 0 && /* @__PURE__ */ jsx50(Badge.Root, { color: "blue", children: total })
|
|
11158
11184
|
]
|
|
11159
11185
|
}
|
|
11160
11186
|
),
|
|
11161
|
-
/* @__PURE__ */
|
|
11162
|
-
/* @__PURE__ */
|
|
11163
|
-
/* @__PURE__ */
|
|
11187
|
+
/* @__PURE__ */ jsx50(Input.Root, { size, className: SmartFilter_default.search, labels: { clear: labels.clearSearch }, children: /* @__PURE__ */ jsxs38(Input.Wrapper, { children: [
|
|
11188
|
+
/* @__PURE__ */ jsx50(Input.Icon, { side: "start", children: /* @__PURE__ */ jsx50(Icon, { name: "action.search", tone: "secondary" }) }),
|
|
11189
|
+
/* @__PURE__ */ jsx50(
|
|
11164
11190
|
Input.Field,
|
|
11165
11191
|
{
|
|
11166
11192
|
type: "search",
|
|
@@ -11175,10 +11201,10 @@ function SmartFilterToolbar({ className, ...rest }) {
|
|
|
11175
11201
|
}
|
|
11176
11202
|
}
|
|
11177
11203
|
),
|
|
11178
|
-
search.length > 0 && /* @__PURE__ */
|
|
11204
|
+
search.length > 0 && /* @__PURE__ */ jsx50(Input.ClearButton, { onClick: () => setSearch("") })
|
|
11179
11205
|
] }) })
|
|
11180
11206
|
] }) }),
|
|
11181
|
-
hasFilters && /* @__PURE__ */
|
|
11207
|
+
hasFilters && /* @__PURE__ */ jsx50(Popover.Content, { matchTriggerWidth: true, flush: true, size, children: /* @__PURE__ */ jsx50(Panel, {}) })
|
|
11182
11208
|
] });
|
|
11183
11209
|
}
|
|
11184
11210
|
SmartFilterToolbar.displayName = "SmartFilter.Toolbar";
|
|
@@ -11196,7 +11222,7 @@ function Panel() {
|
|
|
11196
11222
|
collapsedLimit
|
|
11197
11223
|
} = useSmartFilter();
|
|
11198
11224
|
const query = search.trim();
|
|
11199
|
-
const [expanded, setExpanded] =
|
|
11225
|
+
const [expanded, setExpanded] = React52.useState(() => /* @__PURE__ */ new Set());
|
|
11200
11226
|
const rows = fields.map((field) => {
|
|
11201
11227
|
const selection = value[field.key];
|
|
11202
11228
|
const known = new Set(field.options.map((o) => o.value));
|
|
@@ -11214,7 +11240,7 @@ function Panel() {
|
|
|
11214
11240
|
if (query) {
|
|
11215
11241
|
sections.push({
|
|
11216
11242
|
key: "query",
|
|
11217
|
-
node: /* @__PURE__ */
|
|
11243
|
+
node: /* @__PURE__ */ jsx50("div", { className: SmartFilter_default.queryRow, children: /* @__PURE__ */ jsxs38(
|
|
11218
11244
|
Button.Root,
|
|
11219
11245
|
{
|
|
11220
11246
|
variant: "ghost",
|
|
@@ -11223,9 +11249,9 @@ function Panel() {
|
|
|
11223
11249
|
fullWidth: true,
|
|
11224
11250
|
onClick: () => setOpen(false),
|
|
11225
11251
|
children: [
|
|
11226
|
-
/* @__PURE__ */
|
|
11252
|
+
/* @__PURE__ */ jsx50(Button.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.search" }) }),
|
|
11227
11253
|
formatLabel(labels.searchText, { query }),
|
|
11228
|
-
/* @__PURE__ */
|
|
11254
|
+
/* @__PURE__ */ jsx50(Kbd, { className: SmartFilter_default.queryKey, children: "\u21B5" })
|
|
11229
11255
|
]
|
|
11230
11256
|
}
|
|
11231
11257
|
) })
|
|
@@ -11237,10 +11263,10 @@ function Panel() {
|
|
|
11237
11263
|
const all = field.options.map((o) => o.value);
|
|
11238
11264
|
sections.push({
|
|
11239
11265
|
key: `field:${field.key}`,
|
|
11240
|
-
node: /* @__PURE__ */
|
|
11241
|
-
/* @__PURE__ */
|
|
11242
|
-
/* @__PURE__ */
|
|
11243
|
-
shown.map((option) => /* @__PURE__ */
|
|
11266
|
+
node: /* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.row, "data-field": field.key, children: [
|
|
11267
|
+
/* @__PURE__ */ jsx50(Typography, { as: "span", variant: "body-s", tone: "secondary", children: field.label }),
|
|
11268
|
+
/* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.values, children: [
|
|
11269
|
+
shown.map((option) => /* @__PURE__ */ jsx50(
|
|
11244
11270
|
ValueToggle,
|
|
11245
11271
|
{
|
|
11246
11272
|
option,
|
|
@@ -11252,7 +11278,7 @@ function Panel() {
|
|
|
11252
11278
|
},
|
|
11253
11279
|
option.value
|
|
11254
11280
|
)),
|
|
11255
|
-
collapsible && /* @__PURE__ */
|
|
11281
|
+
collapsible && /* @__PURE__ */ jsxs38(
|
|
11256
11282
|
Badge.Root,
|
|
11257
11283
|
{
|
|
11258
11284
|
size,
|
|
@@ -11260,7 +11286,7 @@ function Panel() {
|
|
|
11260
11286
|
onPress: () => setExpanded((prev) => new Set(prev).add(field.key)),
|
|
11261
11287
|
children: [
|
|
11262
11288
|
formatLabel(labels.more, { count: options.length - collapsedLimit }),
|
|
11263
|
-
/* @__PURE__ */
|
|
11289
|
+
/* @__PURE__ */ jsx50(Badge.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "nav.chevronDown" }) })
|
|
11264
11290
|
]
|
|
11265
11291
|
}
|
|
11266
11292
|
)
|
|
@@ -11271,21 +11297,21 @@ function Panel() {
|
|
|
11271
11297
|
if (empty.length > 0) {
|
|
11272
11298
|
sections.push({
|
|
11273
11299
|
key: "empty",
|
|
11274
|
-
node: /* @__PURE__ */
|
|
11300
|
+
node: /* @__PURE__ */ jsx50(EmptyPage.Root, { layout: "compact", size, role: "status", children: /* @__PURE__ */ jsx50(EmptyPage.Description, { children: formatLabel(labels.noMatches, { fields: empty.join(", ") }) }) })
|
|
11275
11301
|
});
|
|
11276
11302
|
}
|
|
11277
11303
|
sections.push({
|
|
11278
11304
|
key: "footer",
|
|
11279
|
-
node: /* @__PURE__ */
|
|
11280
|
-
/* @__PURE__ */
|
|
11281
|
-
/* @__PURE__ */
|
|
11282
|
-
total > 0 && /* @__PURE__ */
|
|
11305
|
+
node: /* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.footer, children: [
|
|
11306
|
+
/* @__PURE__ */ jsx50(Typography, { as: "span", variant: "caption", tone: "muted", className: SmartFilter_default.hint, children: labels.hint }),
|
|
11307
|
+
/* @__PURE__ */ jsx50(Typography, { as: "span", variant: "caption", tone: "muted", children: formatLabel(labels.count, { count: total }) }),
|
|
11308
|
+
total > 0 && /* @__PURE__ */ jsx50(Button.Root, { variant: "ghost", tone: "neutral", size: "xs", onClick: clearAll, children: labels.reset })
|
|
11283
11309
|
] })
|
|
11284
11310
|
});
|
|
11285
|
-
return /* @__PURE__ */
|
|
11286
|
-
/* @__PURE__ */
|
|
11287
|
-
sections.map((section, index) => /* @__PURE__ */
|
|
11288
|
-
index > 0 && /* @__PURE__ */
|
|
11311
|
+
return /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
11312
|
+
/* @__PURE__ */ jsx50(Popover.Title, { children: /* @__PURE__ */ jsx50(VisuallyHidden, { children: labels.filter }) }),
|
|
11313
|
+
sections.map((section, index) => /* @__PURE__ */ jsxs38(React52.Fragment, { children: [
|
|
11314
|
+
index > 0 && /* @__PURE__ */ jsx50(Divider, { role: "presentation" }),
|
|
11289
11315
|
section.node
|
|
11290
11316
|
] }, section.key))
|
|
11291
11317
|
] });
|
|
@@ -11301,7 +11327,7 @@ var TIER_BELOW = {
|
|
|
11301
11327
|
};
|
|
11302
11328
|
function ValueToggle({ option, size, mode, canHide, query, onMode }) {
|
|
11303
11329
|
const { labels } = useSmartFilter();
|
|
11304
|
-
return /* @__PURE__ */
|
|
11330
|
+
return /* @__PURE__ */ jsxs38(
|
|
11305
11331
|
Badge.Root,
|
|
11306
11332
|
{
|
|
11307
11333
|
size: tagSizeOf(size),
|
|
@@ -11318,9 +11344,9 @@ function ValueToggle({ option, size, mode, canHide, query, onMode }) {
|
|
|
11318
11344
|
},
|
|
11319
11345
|
children: [
|
|
11320
11346
|
mode === "exclude" && `${labels.not} `,
|
|
11321
|
-
option.icon ? /* @__PURE__ */
|
|
11322
|
-
/* @__PURE__ */
|
|
11323
|
-
/* @__PURE__ */
|
|
11347
|
+
option.icon ? /* @__PURE__ */ jsx50(Badge.Icon, { children: option.icon }) : null,
|
|
11348
|
+
/* @__PURE__ */ jsx50("span", { children: /* @__PURE__ */ jsx50(HighlightMatch, { text: option.label, query }) }),
|
|
11349
|
+
/* @__PURE__ */ jsx50(
|
|
11324
11350
|
Badge.Action,
|
|
11325
11351
|
{
|
|
11326
11352
|
label: formatLabel(mode === "exclude" ? labels.unhideValue : labels.hideValue, {
|
|
@@ -11340,7 +11366,7 @@ function SmartFilterChips({ className, ...rest }) {
|
|
|
11340
11366
|
const { fields, value, setSelection, total, clearAll, setOpen, setSearch, labels, size } = useSmartFilter();
|
|
11341
11367
|
if (total === 0) return null;
|
|
11342
11368
|
const tagSize = tagSizeOf(size);
|
|
11343
|
-
return /* @__PURE__ */
|
|
11369
|
+
return /* @__PURE__ */ jsxs38("div", { ...rest, className: cx(SmartFilter_default.chips, className), "data-slot": "smart-filter-chips", children: [
|
|
11344
11370
|
fields.flatMap((field) => {
|
|
11345
11371
|
const selection = value[field.key];
|
|
11346
11372
|
if (!selection) return [];
|
|
@@ -11350,7 +11376,7 @@ function SmartFilterChips({ className, ...rest }) {
|
|
|
11350
11376
|
field: field.label,
|
|
11351
11377
|
value: labelOf2(v)
|
|
11352
11378
|
});
|
|
11353
|
-
return /* @__PURE__ */
|
|
11379
|
+
return /* @__PURE__ */ jsx50(
|
|
11354
11380
|
Badge.Root,
|
|
11355
11381
|
{
|
|
11356
11382
|
size: tagSize,
|
|
@@ -11368,7 +11394,7 @@ function SmartFilterChips({ className, ...rest }) {
|
|
|
11368
11394
|
...selection.exclude.map((v) => tag(v, true))
|
|
11369
11395
|
];
|
|
11370
11396
|
}),
|
|
11371
|
-
/* @__PURE__ */
|
|
11397
|
+
/* @__PURE__ */ jsxs38(
|
|
11372
11398
|
Badge.Root,
|
|
11373
11399
|
{
|
|
11374
11400
|
size: tagSize,
|
|
@@ -11377,12 +11403,12 @@ function SmartFilterChips({ className, ...rest }) {
|
|
|
11377
11403
|
setOpen(true);
|
|
11378
11404
|
},
|
|
11379
11405
|
children: [
|
|
11380
|
-
/* @__PURE__ */
|
|
11406
|
+
/* @__PURE__ */ jsx50(Badge.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.add" }) }),
|
|
11381
11407
|
labels.add
|
|
11382
11408
|
]
|
|
11383
11409
|
}
|
|
11384
11410
|
),
|
|
11385
|
-
/* @__PURE__ */
|
|
11411
|
+
/* @__PURE__ */ jsx50(LinkButton, { asChild: true, tone: "neutral", size: TIER_BELOW[tagSize], className: SmartFilter_default.clearAll, children: /* @__PURE__ */ jsx50("button", { type: "button", onClick: clearAll, children: labels.clearAll }) })
|
|
11386
11412
|
] });
|
|
11387
11413
|
}
|
|
11388
11414
|
SmartFilterChips.displayName = "SmartFilter.Chips";
|
|
@@ -11392,6 +11418,152 @@ var SmartFilter = {
|
|
|
11392
11418
|
Chips: SmartFilterChips
|
|
11393
11419
|
};
|
|
11394
11420
|
|
|
11421
|
+
// src/components/sparkline/Sparkline.tsx
|
|
11422
|
+
import * as React53 from "react";
|
|
11423
|
+
|
|
11424
|
+
// src/components/sparkline/Sparkline.module.css
|
|
11425
|
+
var Sparkline_default = {
|
|
11426
|
+
root: "Sparkline_root",
|
|
11427
|
+
head: "Sparkline_head",
|
|
11428
|
+
label: "Sparkline_label",
|
|
11429
|
+
date: "Sparkline_date",
|
|
11430
|
+
valueRow: "Sparkline_valueRow",
|
|
11431
|
+
value: "Sparkline_value",
|
|
11432
|
+
change: "Sparkline_change",
|
|
11433
|
+
trend: "Sparkline_trend",
|
|
11434
|
+
plot: "Sparkline_plot",
|
|
11435
|
+
svg: "Sparkline_svg",
|
|
11436
|
+
line: "Sparkline_line",
|
|
11437
|
+
area: "Sparkline_area",
|
|
11438
|
+
cursor: "Sparkline_cursor",
|
|
11439
|
+
guide: "Sparkline_guide",
|
|
11440
|
+
dot: "Sparkline_dot"
|
|
11441
|
+
};
|
|
11442
|
+
|
|
11443
|
+
// src/components/sparkline/Sparkline.tsx
|
|
11444
|
+
import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11445
|
+
var SPARKLINE_LABELS = { point: "{label}: {value}" };
|
|
11446
|
+
var NUMBER = new Intl.NumberFormat("ru-RU");
|
|
11447
|
+
var PERCENT = new Intl.NumberFormat("ru-RU", { maximumFractionDigits: 1 });
|
|
11448
|
+
function changeAt(data, index) {
|
|
11449
|
+
if (index <= 0) return null;
|
|
11450
|
+
const prev = data[index - 1].value;
|
|
11451
|
+
return prev === 0 ? null : (data[index].value - prev) / Math.abs(prev) * 100;
|
|
11452
|
+
}
|
|
11453
|
+
function Sparkline({
|
|
11454
|
+
data,
|
|
11455
|
+
label,
|
|
11456
|
+
formatValue = (value) => NUMBER.format(value),
|
|
11457
|
+
labels: labelsProp,
|
|
11458
|
+
className,
|
|
11459
|
+
ref,
|
|
11460
|
+
...rest
|
|
11461
|
+
}) {
|
|
11462
|
+
const labels = { ...SPARKLINE_LABELS, ...labelsProp };
|
|
11463
|
+
const last = data.length - 1;
|
|
11464
|
+
const [active, setActive] = React53.useState(null);
|
|
11465
|
+
const index = active === null ? last : Math.min(active, last);
|
|
11466
|
+
const point = data[index];
|
|
11467
|
+
const [series, setSeries] = React53.useState({ data, version: 0 });
|
|
11468
|
+
if (series.data !== data) setSeries({ data, version: series.version + 1 });
|
|
11469
|
+
const version = series.data === data ? series.version : series.version + 1;
|
|
11470
|
+
const swapped = useStateSwap(version);
|
|
11471
|
+
const values = data.map((p) => p.value);
|
|
11472
|
+
const min = Math.min(...values);
|
|
11473
|
+
const max = Math.max(...values);
|
|
11474
|
+
const span2 = max - min || 1;
|
|
11475
|
+
const y = (value) => 1 - (value - min) / span2;
|
|
11476
|
+
const x = (i) => last > 0 ? i / last : 0.5;
|
|
11477
|
+
const line = data.map((p, i) => `${i ? "L" : "M"}${x(i) * 100},${y(p.value) * 100}`).join("");
|
|
11478
|
+
const fromPointer = (event) => {
|
|
11479
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
11480
|
+
const ratio = rect.width ? (event.clientX - rect.left) / rect.width : 1;
|
|
11481
|
+
setActive(Math.max(0, Math.min(last, Math.round(ratio * last))));
|
|
11482
|
+
};
|
|
11483
|
+
const change = changeAt(data, index);
|
|
11484
|
+
const valueText = point ? formatValue(point.value) : "";
|
|
11485
|
+
return /* @__PURE__ */ jsxs39(
|
|
11486
|
+
"div",
|
|
11487
|
+
{
|
|
11488
|
+
...rest,
|
|
11489
|
+
ref,
|
|
11490
|
+
className: cx(Sparkline_default.root, className),
|
|
11491
|
+
"data-scrubbing": active !== null || void 0,
|
|
11492
|
+
children: [
|
|
11493
|
+
/* @__PURE__ */ jsxs39("div", { className: Sparkline_default.head, children: [
|
|
11494
|
+
/* @__PURE__ */ jsx51("span", { className: Sparkline_default.label, children: label }),
|
|
11495
|
+
/* @__PURE__ */ jsx51("span", { className: Sparkline_default.date, children: point?.label })
|
|
11496
|
+
] }),
|
|
11497
|
+
/* @__PURE__ */ jsxs39("div", { className: Sparkline_default.valueRow, children: [
|
|
11498
|
+
/* @__PURE__ */ jsx51("span", { className: Sparkline_default.value, children: active === null ? /* @__PURE__ */ jsx51(RollingNumber, { children: valueText }) : valueText }),
|
|
11499
|
+
change !== null ? /* @__PURE__ */ jsxs39(Badge.Root, { color: change < 0 ? "red" : "green", className: Sparkline_default.change, children: [
|
|
11500
|
+
/* @__PURE__ */ jsx51(Badge.Icon, { className: Sparkline_default.trend, "data-down": change < 0 || void 0, children: /* @__PURE__ */ jsx51(Icon, { name: "status.trendUp" }) }),
|
|
11501
|
+
`${change > 0 ? "+" : change < 0 ? "\u2212" : ""}${PERCENT.format(Math.abs(change))}%`
|
|
11502
|
+
] }) : null
|
|
11503
|
+
] }),
|
|
11504
|
+
/* @__PURE__ */ jsxs39(
|
|
11505
|
+
"div",
|
|
11506
|
+
{
|
|
11507
|
+
className: Sparkline_default.plot,
|
|
11508
|
+
role: "slider",
|
|
11509
|
+
tabIndex: 0,
|
|
11510
|
+
"aria-label": label,
|
|
11511
|
+
"aria-valuemin": 0,
|
|
11512
|
+
"aria-valuemax": Math.max(last, 0),
|
|
11513
|
+
"aria-valuenow": index,
|
|
11514
|
+
"aria-valuetext": point ? formatLabel(labels.point, { label: point.label, value: valueText }) : void 0,
|
|
11515
|
+
onPointerDown: (event) => {
|
|
11516
|
+
if (event.pointerType !== "mouse") event.currentTarget.setPointerCapture(event.pointerId);
|
|
11517
|
+
fromPointer(event);
|
|
11518
|
+
},
|
|
11519
|
+
onPointerMove: fromPointer,
|
|
11520
|
+
onPointerLeave: () => setActive(null),
|
|
11521
|
+
onPointerUp: (event) => {
|
|
11522
|
+
if (event.pointerType !== "mouse") setActive(null);
|
|
11523
|
+
},
|
|
11524
|
+
onPointerCancel: () => setActive(null),
|
|
11525
|
+
onKeyDown: (event) => {
|
|
11526
|
+
const next = event.key === "ArrowLeft" || event.key === "ArrowDown" ? index - 1 : event.key === "ArrowRight" || event.key === "ArrowUp" ? index + 1 : event.key === "Home" ? 0 : event.key === "End" ? last : null;
|
|
11527
|
+
if (next === null) return;
|
|
11528
|
+
event.preventDefault();
|
|
11529
|
+
setActive(Math.max(0, Math.min(last, next)));
|
|
11530
|
+
},
|
|
11531
|
+
onBlur: () => setActive(null),
|
|
11532
|
+
children: [
|
|
11533
|
+
/* @__PURE__ */ jsx51(
|
|
11534
|
+
"svg",
|
|
11535
|
+
{
|
|
11536
|
+
className: cx(Sparkline_default.svg, swapped && swapMotion_default.swapIn),
|
|
11537
|
+
viewBox: "0 0 100 100",
|
|
11538
|
+
preserveAspectRatio: "none",
|
|
11539
|
+
"aria-hidden": "true",
|
|
11540
|
+
children: data.length > 1 ? /* @__PURE__ */ jsxs39(Fragment12, { children: [
|
|
11541
|
+
/* @__PURE__ */ jsx51("path", { className: Sparkline_default.area, d: `${line}L100,100L0,100Z` }),
|
|
11542
|
+
/* @__PURE__ */ jsx51("path", { className: Sparkline_default.line, d: line })
|
|
11543
|
+
] }) : null
|
|
11544
|
+
},
|
|
11545
|
+
version
|
|
11546
|
+
),
|
|
11547
|
+
point ? /* @__PURE__ */ jsxs39(
|
|
11548
|
+
"span",
|
|
11549
|
+
{
|
|
11550
|
+
className: Sparkline_default.cursor,
|
|
11551
|
+
"aria-hidden": "true",
|
|
11552
|
+
style: { "--sparkline-x": x(index), "--sparkline-y": y(point.value) },
|
|
11553
|
+
children: [
|
|
11554
|
+
/* @__PURE__ */ jsx51("span", { className: Sparkline_default.guide }),
|
|
11555
|
+
/* @__PURE__ */ jsx51("span", { className: Sparkline_default.dot })
|
|
11556
|
+
]
|
|
11557
|
+
}
|
|
11558
|
+
) : null
|
|
11559
|
+
]
|
|
11560
|
+
}
|
|
11561
|
+
)
|
|
11562
|
+
]
|
|
11563
|
+
}
|
|
11564
|
+
);
|
|
11565
|
+
}
|
|
11566
|
+
|
|
11395
11567
|
// src/components/stepper/Stepper.tsx
|
|
11396
11568
|
import * as React54 from "react";
|
|
11397
11569
|
|
|
@@ -11633,7 +11805,6 @@ var Tabs_default = {
|
|
|
11633
11805
|
list: "Tabs_list",
|
|
11634
11806
|
indicator: "Tabs_indicator",
|
|
11635
11807
|
indicatorFolder: "Tabs_indicatorFolder",
|
|
11636
|
-
indicatorPill: "Tabs_indicatorPill",
|
|
11637
11808
|
item: "Tabs_item",
|
|
11638
11809
|
tab: "Tabs_tab",
|
|
11639
11810
|
content: "Tabs_content",
|
|
@@ -11708,14 +11879,16 @@ function TabsRoot({
|
|
|
11708
11879
|
...minItemWidth !== void 0 && { "--tabs-item-min": cssLength(minItemWidth) },
|
|
11709
11880
|
...maxItemWidth !== void 0 && { "--tabs-item-max": cssLength(maxItemWidth) }
|
|
11710
11881
|
};
|
|
11882
|
+
const depth = useNestedSurfaceDepth();
|
|
11711
11883
|
return /* @__PURE__ */ jsx54(TabsProvider, { value: context, children: /* @__PURE__ */ jsx54(
|
|
11712
11884
|
"div",
|
|
11713
11885
|
{
|
|
11714
11886
|
...rest,
|
|
11715
11887
|
className: cx(Tabs_default.root, className),
|
|
11716
11888
|
style: { ...style, ...widths },
|
|
11889
|
+
"data-depth": depth,
|
|
11717
11890
|
...toDataAttributes({ orientation, size, tone, "full-width": fullWidth }),
|
|
11718
|
-
children: /* @__PURE__ */ jsx54("div", { className: Tabs_default.layout, children })
|
|
11891
|
+
children: /* @__PURE__ */ jsx54(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx54("div", { className: Tabs_default.layout, children }) })
|
|
11719
11892
|
}
|
|
11720
11893
|
) });
|
|
11721
11894
|
}
|
|
@@ -11774,7 +11947,11 @@ function placeIndicator(list, indicator, activeValue, animate) {
|
|
|
11774
11947
|
}
|
|
11775
11948
|
const left = box.offsetLeft;
|
|
11776
11949
|
const right = left + box.offsetWidth;
|
|
11777
|
-
const
|
|
11950
|
+
const top = box.offsetTop;
|
|
11951
|
+
const bottom = top + box.offsetHeight;
|
|
11952
|
+
const column = getComputedStyle(list).flexDirection.startsWith("column");
|
|
11953
|
+
indicator.dataset.axis = column ? "y" : "x";
|
|
11954
|
+
const flare = Number.parseFloat(getComputedStyle(indicator).scrollMarginTop) || 0;
|
|
11778
11955
|
const transform = `translate(${left}px, ${box.offsetTop}px)`;
|
|
11779
11956
|
const width = `${box.offsetWidth}px`;
|
|
11780
11957
|
const height = `${box.offsetHeight}px`;
|
|
@@ -11786,18 +11963,35 @@ function placeIndicator(list, indicator, activeValue, animate) {
|
|
|
11786
11963
|
indicator.style.transform = transform;
|
|
11787
11964
|
indicator.style.width = width;
|
|
11788
11965
|
indicator.style.height = height;
|
|
11789
|
-
|
|
11790
|
-
indicator.dataset.
|
|
11966
|
+
const scrolls = !column && list.scrollWidth > list.clientWidth + 0.5;
|
|
11967
|
+
indicator.dataset.edgeStart = String(column ? top - flare < 0 : left - flare < 0);
|
|
11968
|
+
indicator.dataset.edgeEnd = String(
|
|
11969
|
+
box === items.at(-1) && (column ? bottom + flare > list.clientHeight : scrolls || right + flare > list.clientWidth)
|
|
11970
|
+
);
|
|
11791
11971
|
indicator.dataset.visible = String(box.offsetWidth > 0 && box.offsetHeight > 0);
|
|
11792
11972
|
}
|
|
11973
|
+
function fadeDepth(list) {
|
|
11974
|
+
const raw = getComputedStyle(list).getPropertyValue("--prime-space-8").trim();
|
|
11975
|
+
const value = Number.parseFloat(raw);
|
|
11976
|
+
if (!Number.isFinite(value)) return 0;
|
|
11977
|
+
if (raw.endsWith("rem")) {
|
|
11978
|
+
return value * (Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16);
|
|
11979
|
+
}
|
|
11980
|
+
return value;
|
|
11981
|
+
}
|
|
11793
11982
|
function revealActive(list, smooth) {
|
|
11794
11983
|
if (list.scrollWidth <= list.clientWidth || typeof list.scrollTo !== "function") return;
|
|
11795
11984
|
const box = list.querySelector('[role="tab"][aria-selected="true"]')?.parentElement;
|
|
11796
11985
|
if (!box) return;
|
|
11797
|
-
const
|
|
11798
|
-
const
|
|
11799
|
-
const
|
|
11800
|
-
|
|
11986
|
+
const margin = fadeDepth(list);
|
|
11987
|
+
const max = list.scrollWidth - list.clientWidth;
|
|
11988
|
+
const start = box.offsetLeft - margin;
|
|
11989
|
+
const end = box.offsetLeft + box.offsetWidth + margin;
|
|
11990
|
+
const target = start < list.scrollLeft ? start : end > list.scrollLeft + list.clientWidth ? end - list.clientWidth : null;
|
|
11991
|
+
if (target === null) return;
|
|
11992
|
+
const left = Math.min(max, Math.max(0, target));
|
|
11993
|
+
if (Math.abs(left - list.scrollLeft) < 1) return;
|
|
11994
|
+
list.scrollTo({ left, behavior: smooth ? "smooth" : "auto" });
|
|
11801
11995
|
}
|
|
11802
11996
|
function useListLayout(listRef, indicatorRef, userChangeRef, activeValue, horizontal) {
|
|
11803
11997
|
const [collapse, setCollapse] = React55.useState("full");
|
|
@@ -11874,7 +12068,7 @@ function TabsList({ children, className, ref, ...rest }) {
|
|
|
11874
12068
|
role: "tablist",
|
|
11875
12069
|
"aria-orientation": orientation,
|
|
11876
12070
|
className: cx(Tabs_default.list, className),
|
|
11877
|
-
"data-indicator":
|
|
12071
|
+
"data-indicator": "folder",
|
|
11878
12072
|
"data-collapse": collapse,
|
|
11879
12073
|
onKeyDown: handleKeyDown,
|
|
11880
12074
|
children: [
|
|
@@ -11882,7 +12076,7 @@ function TabsList({ children, className, ref, ...rest }) {
|
|
|
11882
12076
|
"div",
|
|
11883
12077
|
{
|
|
11884
12078
|
ref: indicatorRef,
|
|
11885
|
-
className: cx(Tabs_default.indicator,
|
|
12079
|
+
className: cx(Tabs_default.indicator, Tabs_default.indicatorFolder),
|
|
11886
12080
|
"data-indicator": "",
|
|
11887
12081
|
"aria-hidden": "true",
|
|
11888
12082
|
onTransitionEnd: (event) => {
|
|
@@ -13194,6 +13388,103 @@ var Timeline = {
|
|
|
13194
13388
|
GapMeta: TimelineGapMeta
|
|
13195
13389
|
};
|
|
13196
13390
|
|
|
13391
|
+
// src/motion/celebrate.ts
|
|
13392
|
+
var COLOR_TOKENS = [
|
|
13393
|
+
"--prime-color-accent-default",
|
|
13394
|
+
"--prime-color-success-default",
|
|
13395
|
+
"--prime-color-warning-default",
|
|
13396
|
+
"--prime-color-info-default"
|
|
13397
|
+
];
|
|
13398
|
+
var PIECES = 90;
|
|
13399
|
+
var DURATION_MS = 1400;
|
|
13400
|
+
var GRAVITY = 16e-4;
|
|
13401
|
+
var DRAG = 12e-4;
|
|
13402
|
+
function celebrate(options = {}) {
|
|
13403
|
+
if (typeof window === "undefined" || typeof document === "undefined") return Promise.resolve();
|
|
13404
|
+
if (prefersReducedMotion()) return Promise.resolve();
|
|
13405
|
+
const width = window.innerWidth;
|
|
13406
|
+
const height = window.innerHeight;
|
|
13407
|
+
const { origin } = options;
|
|
13408
|
+
let x = width / 2;
|
|
13409
|
+
let y = height / 3;
|
|
13410
|
+
let themed = document.body;
|
|
13411
|
+
if (origin instanceof Element) {
|
|
13412
|
+
const rect = origin.getBoundingClientRect();
|
|
13413
|
+
x = rect.left + rect.width / 2;
|
|
13414
|
+
y = rect.top + rect.height / 2;
|
|
13415
|
+
themed = origin;
|
|
13416
|
+
} else if (origin) {
|
|
13417
|
+
x = origin.x;
|
|
13418
|
+
y = origin.y;
|
|
13419
|
+
}
|
|
13420
|
+
const canvas = document.createElement("canvas");
|
|
13421
|
+
const ctx = canvas.getContext("2d");
|
|
13422
|
+
if (!ctx) return Promise.resolve();
|
|
13423
|
+
const dpr = window.devicePixelRatio || 1;
|
|
13424
|
+
canvas.width = width * dpr;
|
|
13425
|
+
canvas.height = height * dpr;
|
|
13426
|
+
canvas.setAttribute("aria-hidden", "true");
|
|
13427
|
+
Object.assign(canvas.style, {
|
|
13428
|
+
position: "fixed",
|
|
13429
|
+
inset: "0",
|
|
13430
|
+
width: "100%",
|
|
13431
|
+
height: "100%",
|
|
13432
|
+
pointerEvents: "none",
|
|
13433
|
+
zIndex: "var(--prime-z-toast)"
|
|
13434
|
+
});
|
|
13435
|
+
ctx.scale(dpr, dpr);
|
|
13436
|
+
document.body.append(canvas);
|
|
13437
|
+
const css = getComputedStyle(themed);
|
|
13438
|
+
const colors = COLOR_TOKENS.map((token) => css.getPropertyValue(token).trim()).filter(Boolean);
|
|
13439
|
+
const palette = colors.length > 0 ? colors : ["currentColor"];
|
|
13440
|
+
const pieces = Array.from({ length: PIECES }, () => {
|
|
13441
|
+
const direction = -Math.PI / 2 + (Math.random() - 0.5) * (Math.PI * 2) / 3;
|
|
13442
|
+
const speed = 0.45 + Math.random() * 0.75;
|
|
13443
|
+
return {
|
|
13444
|
+
x,
|
|
13445
|
+
y,
|
|
13446
|
+
vx: Math.cos(direction) * speed,
|
|
13447
|
+
vy: Math.sin(direction) * speed,
|
|
13448
|
+
angle: Math.random() * Math.PI,
|
|
13449
|
+
spin: (Math.random() - 0.5) * 0.02,
|
|
13450
|
+
size: 5 + Math.random() * 5,
|
|
13451
|
+
color: palette[Math.floor(Math.random() * palette.length)]
|
|
13452
|
+
};
|
|
13453
|
+
});
|
|
13454
|
+
return new Promise((resolve) => {
|
|
13455
|
+
const start = performance.now();
|
|
13456
|
+
let prev = start;
|
|
13457
|
+
const frame = (now) => {
|
|
13458
|
+
const t = now - start;
|
|
13459
|
+
const dt = Math.min(32, now - prev);
|
|
13460
|
+
prev = now;
|
|
13461
|
+
ctx.clearRect(0, 0, width, height);
|
|
13462
|
+
if (t >= DURATION_MS) {
|
|
13463
|
+
canvas.remove();
|
|
13464
|
+
resolve();
|
|
13465
|
+
return;
|
|
13466
|
+
}
|
|
13467
|
+
ctx.globalAlpha = t < DURATION_MS * 0.6 ? 1 : 1 - (t - DURATION_MS * 0.6) / (DURATION_MS * 0.4);
|
|
13468
|
+
for (const piece of pieces) {
|
|
13469
|
+
piece.vy += GRAVITY * dt;
|
|
13470
|
+
piece.vx *= 1 - DRAG * dt;
|
|
13471
|
+
piece.vy *= 1 - DRAG * dt;
|
|
13472
|
+
piece.x += piece.vx * dt;
|
|
13473
|
+
piece.y += piece.vy * dt;
|
|
13474
|
+
piece.angle += piece.spin * dt;
|
|
13475
|
+
ctx.save();
|
|
13476
|
+
ctx.translate(piece.x, piece.y);
|
|
13477
|
+
ctx.rotate(piece.angle);
|
|
13478
|
+
ctx.fillStyle = piece.color;
|
|
13479
|
+
ctx.fillRect(-piece.size / 2, -piece.size / 4, piece.size, piece.size / 2);
|
|
13480
|
+
ctx.restore();
|
|
13481
|
+
}
|
|
13482
|
+
requestAnimationFrame(frame);
|
|
13483
|
+
};
|
|
13484
|
+
requestAnimationFrame(frame);
|
|
13485
|
+
});
|
|
13486
|
+
}
|
|
13487
|
+
|
|
13197
13488
|
export {
|
|
13198
13489
|
Kbd,
|
|
13199
13490
|
AppHeader,
|
|
@@ -13234,7 +13525,6 @@ export {
|
|
|
13234
13525
|
applyTheme,
|
|
13235
13526
|
SegmentedControl,
|
|
13236
13527
|
ExampleFrame,
|
|
13237
|
-
ProgressBar,
|
|
13238
13528
|
FileUpload,
|
|
13239
13529
|
Kanban,
|
|
13240
13530
|
Typography,
|
|
@@ -13251,10 +13541,12 @@ export {
|
|
|
13251
13541
|
matchesSmartFilter,
|
|
13252
13542
|
resolveSmartFilterValues,
|
|
13253
13543
|
SmartFilter,
|
|
13544
|
+
Sparkline,
|
|
13254
13545
|
Stepper,
|
|
13255
13546
|
Switch,
|
|
13256
13547
|
Tabs,
|
|
13257
13548
|
TagSelect,
|
|
13258
13549
|
Textarea,
|
|
13259
|
-
Timeline
|
|
13550
|
+
Timeline,
|
|
13551
|
+
celebrate
|
|
13260
13552
|
};
|