prime-ui-kit 0.9.3 → 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 +9 -4
- package/THIRD_PARTY_NOTICES +76 -0
- package/dist/chunks/{chunk-6JTZOA5I.js → chunk-4TRNUP45.js} +534 -522
- package/dist/chunks/chunk-EJ2ZVQYL.js +5805 -0
- package/dist/chunks/chunk-GFKDZFQR.js +1208 -0
- package/dist/chunks/{chunk-OAE4IQX2.js → chunk-K4FACFQ2.js} +8 -6
- package/dist/chunks/{chunk-U5SR2LZR.js → chunk-T7CLQXGB.js} +4 -2
- package/dist/color-picker.js +3 -2
- package/dist/components/button/Button.d.ts +5 -2
- 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 +80 -79
- package/dist/icons.js +996 -0
- package/dist/index.css +427 -132
- package/dist/index.js +6 -4
- package/dist/internal/ChoiceField.d.ts +1 -1
- package/dist/internal/FieldFrame.d.ts +17 -0
- package/dist/tokens/primitives.d.ts +1 -0
- package/dist/tokens/semantic.d.ts +1 -0
- package/dist/tokens/themes/dark.d.ts +1 -0
- package/package.json +11 -4
- package/src/components/button/COMPONENT.md +5 -3
- package/src/components/button/examples/in-form.tsx +15 -3
- package/src/components/button/examples/label-morph.tsx +7 -2
- package/src/components/button/examples/variants.tsx +1 -0
- package/src/components/checkbox/COMPONENT.md +1 -1
- package/src/components/color-picker/COMPONENT.md +2 -2
- 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 +2 -2
- package/src/components/color-swatches/examples/in-form.tsx +11 -5
- 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 +3 -3
- package/src/components/digit-input/examples/in-form.tsx +22 -4
- package/src/components/digit-input/examples/validation.tsx +12 -5
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/in-form.tsx +7 -2
- 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 +3 -3
- package/src/components/input/examples/in-form.tsx +42 -7
- package/src/components/input/examples/validation.tsx +38 -13
- package/src/components/modal/COMPONENT.md +1 -1
- 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/popover/COMPONENT.md +1 -1
- package/src/components/popover/examples/in-form.tsx +27 -5
- 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/slider/COMPONENT.md +1 -1
- package/src/components/switch/COMPONENT.md +1 -1
- 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/styles/theme-dark.css +1 -0
- package/src/styles/theme-light.css +1 -0
- package/src/styles/tokens.css +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Regional settings form: the required country is checked on submit, the error
|
|
1
|
+
/** Regional settings form: the required country is checked on submit, the error shakes the field and leaves once a country is picked, a calm note confirms the save — `required`, `error`, `hint`. */
|
|
2
2
|
import { Button, Select, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
@@ -7,10 +7,12 @@ import styles from "./examples.module.css";
|
|
|
7
7
|
export default function SelectInFormExample() {
|
|
8
8
|
const [country, setCountry] = React.useState("");
|
|
9
9
|
const [error, setError] = React.useState<string>();
|
|
10
|
+
const [saved, setSaved] = React.useState(false);
|
|
10
11
|
|
|
11
12
|
const submit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
12
13
|
event.preventDefault();
|
|
13
14
|
setError(country ? undefined : "Выберите страну");
|
|
15
|
+
setSaved(Boolean(country));
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
return (
|
|
@@ -33,6 +35,7 @@ export default function SelectInFormExample() {
|
|
|
33
35
|
onValueChange={(value) => {
|
|
34
36
|
setCountry(value);
|
|
35
37
|
setError(undefined);
|
|
38
|
+
setSaved(false);
|
|
36
39
|
}}
|
|
37
40
|
>
|
|
38
41
|
<Select.Trigger>
|
|
@@ -44,7 +47,12 @@ export default function SelectInFormExample() {
|
|
|
44
47
|
<Select.Item value="am">Армения</Select.Item>
|
|
45
48
|
</Select.Content>
|
|
46
49
|
</Select.Root>
|
|
47
|
-
<Select.Root
|
|
50
|
+
<Select.Root
|
|
51
|
+
label="Часовой пояс"
|
|
52
|
+
hint="Время в отчётах и уведомлениях"
|
|
53
|
+
defaultValue="msk"
|
|
54
|
+
onValueChange={() => setSaved(false)}
|
|
55
|
+
>
|
|
48
56
|
<Select.Trigger>
|
|
49
57
|
<Select.Value />
|
|
50
58
|
</Select.Trigger>
|
|
@@ -56,7 +64,21 @@ export default function SelectInFormExample() {
|
|
|
56
64
|
</Select.Root>
|
|
57
65
|
</div>
|
|
58
66
|
<div className={styles.formActions}>
|
|
59
|
-
|
|
67
|
+
{saved ? (
|
|
68
|
+
<Typography as="p" variant="body-s" tone="secondary">
|
|
69
|
+
Настройки сохранены
|
|
70
|
+
</Typography>
|
|
71
|
+
) : null}
|
|
72
|
+
<Button.Root
|
|
73
|
+
variant="ghost"
|
|
74
|
+
tone="neutral"
|
|
75
|
+
type="reset"
|
|
76
|
+
onClick={() => {
|
|
77
|
+
setCountry("");
|
|
78
|
+
setError(undefined);
|
|
79
|
+
setSaved(false);
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
60
82
|
Отменить
|
|
61
83
|
</Button.Root>
|
|
62
84
|
<Button.Root type="submit">Сохранить</Button.Root>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Live validation: unassigning the owner shakes the field and drops the error in, picking someone clears it; required and optional markers and a hint — `required`, `optional`, `hint`, `error`. */
|
|
2
2
|
import { Select } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
export default function SelectValidationExample() {
|
|
6
|
+
const [owner, setOwner] = React.useState("anna");
|
|
7
|
+
|
|
5
8
|
return (
|
|
6
9
|
<>
|
|
7
10
|
<Select.Root label="Страна" required hint="Определяет валюту счетов" defaultValue="ru">
|
|
@@ -16,13 +19,15 @@ export default function SelectValidationExample() {
|
|
|
16
19
|
<Select.Root
|
|
17
20
|
label="Ответственный"
|
|
18
21
|
required
|
|
19
|
-
error="Назначьте ответственного"
|
|
20
|
-
|
|
22
|
+
error={owner === "none" ? "Назначьте ответственного" : undefined}
|
|
23
|
+
value={owner}
|
|
24
|
+
onValueChange={setOwner}
|
|
21
25
|
>
|
|
22
26
|
<Select.Trigger>
|
|
23
27
|
<Select.Value />
|
|
24
28
|
</Select.Trigger>
|
|
25
29
|
<Select.Content>
|
|
30
|
+
<Select.Item value="none">Не назначен</Select.Item>
|
|
26
31
|
<Select.Item value="anna">Анна Петрова</Select.Item>
|
|
27
32
|
<Select.Item value="ivan">Иван Смирнов</Select.Item>
|
|
28
33
|
</Select.Content>
|
|
@@ -110,7 +110,7 @@ Tone never carries meaning alone: the label names what the value means.
|
|
|
110
110
|
|---|---|---|
|
|
111
111
|
| default | — | `data-size`, `data-tone`; track `fill-strong`, tone pill up to the thumb centre, opaque thumb |
|
|
112
112
|
| hover | pointer (fine pointers only) | light liquid glass: the thumb grows to 110%, turns translucent and slightly frosted |
|
|
113
|
-
| invalid | `invalid` or a non-empty `error` | `data-invalid="true"` on the root, `aria-invalid` on the input; the error replaces the hint, danger focus ring |
|
|
113
|
+
| invalid | `invalid` or a non-empty `error` | `data-invalid="true"` on the root, `aria-invalid` on the input; the error replaces the hint, danger focus ring; the control shakes once when an error arrives (`data-shake` on the frame) |
|
|
114
114
|
| pressed | dragging | clear glass: the thumb grows to 125%, the rounded end of the fill shows through |
|
|
115
115
|
| focus-visible | keyboard | outer focus ring around the thumb |
|
|
116
116
|
| disabled | `disabled` | `data-disabled="true"` on the root, native `disabled`; muted track and fill, flat thumb, `cursor: not-allowed` |
|
|
@@ -87,7 +87,7 @@ No `variant` / `tone` / `color`.
|
|
|
87
87
|
|---|---|---|
|
|
88
88
|
| off | `checked={false}` / default | `data-state="unchecked"`; track `fill-strong` (hover `fill-strong-hover`), thumb at the start |
|
|
89
89
|
| on | `checked` / `defaultChecked` | `data-state="checked"`; accent track, the thumb glides to the end |
|
|
90
|
-
| invalid | `invalid` or a non-empty `error` | `data-invalid="true"`, `aria-invalid`; danger ring on the off track and on focus |
|
|
90
|
+
| invalid | `invalid` or a non-empty `error` | `data-invalid="true"`, `aria-invalid`; danger ring on the off track and on focus; the row shakes once when an error arrives (`data-shake`) |
|
|
91
91
|
| disabled | `disabled` | `data-disabled="true"`; off track `fill-muted`, on track `accent-soft`, `cursor: not-allowed` |
|
|
92
92
|
| read-only | `readOnly` | `aria-readonly="true"` on the input, `data-readonly="true"` on the field; no hover or press, default cursor |
|
|
93
93
|
| pressed | pointer press | the track scales to the compact press scale (not when disabled or read-only) |
|
|
@@ -96,7 +96,7 @@ No `variant` or `tone`. The control is the field look; chips are soft Badges on
|
|
|
96
96
|
| collapsed / expanded | focus inside or the list open | `data-expanded="true"` on the control: every chip on up to three rows (then scroll with edge fades); the height animates |
|
|
97
97
|
| open | focus, typing, arrows | `data-state="open"` on the control; list `data-state`, `data-side` |
|
|
98
98
|
| overflow | more chips than fit at rest | a «+N» Badge button with `labels.more` and the hidden labels in `title` |
|
|
99
|
-
| invalid | `invalid` or `error` | `data-invalid="true"`, `aria-invalid` on the input |
|
|
99
|
+
| invalid | `invalid` or `error` | `data-invalid="true"`, `aria-invalid` on the input; the control shakes once when an error arrives (`data-shake` on the frame) |
|
|
100
100
|
| disabled | `disabled` | `data-disabled="true"`, native `disabled` on the input |
|
|
101
101
|
| option highlighted / selected / disabled | keyboard and pointer / value / option `disabled` | `data-highlighted`, `aria-selected` + checked indicator, `data-disabled` |
|
|
102
102
|
|
|
@@ -147,13 +147,13 @@ No `variant` or `tone`. The control is the field look; chips are soft Badges on
|
|
|
147
147
|
| [overview.tsx](examples/overview.tsx) | A labelled tag field: focus opens the list, typing filters it, picked tags become chips — `label`, `options`. |
|
|
148
148
|
| [sizes.tsx](examples/sizes.tsx) | Every size tier with two picked tags; chips sit one tier below the field — `size`. |
|
|
149
149
|
| [states.tsx](examples/states.tsx) | A default field next to a disabled and an invalid one, with a disabled option in the list — `disabled`, `invalid`. |
|
|
150
|
-
| [validation.tsx](examples/validation.tsx) |
|
|
150
|
+
| [validation.tsx](examples/validation.tsx) | Live validation: removing the last region shakes the field and drops the error in, adding one clears it; required and optional markers and a hint — `required`, `optional`, `hint`, `error`. |
|
|
151
151
|
| [creatable.tsx](examples/creatable.tsx) | A typed text that is not in the list becomes a new tag from the Create row or Enter — `creatable`, `onCreate`, `defaultColor`. |
|
|
152
152
|
| [many-tags.tsx](examples/many-tags.tsx) | More tags than fit: at rest one row with «+N», focused every tag on up to three wrapped rows that scroll — `defaultValue`. |
|
|
153
153
|
| [manage-tags.tsx](examples/manage-tags.tsx) | Users keep their own tag dictionary: the row «⋯» menu renames, recolors or deletes an option — `onOptionUpdate`, `onOptionDelete`. |
|
|
154
154
|
| [controlled.tsx](examples/controlled.tsx) | The parent owns the value: a preset button replaces the tags and the count follows them — `value`, `onValueChange`. |
|
|
155
155
|
| [controlled-open.tsx](examples/controlled-open.tsx) | The parent owns the list: a button opens it from code, Escape or an outside press closes it — `open`, `onOpenChange`. |
|
|
156
|
-
| [in-form.tsx](examples/in-form.tsx) | A new task form: the required labels field is checked on submit
|
|
156
|
+
| [in-form.tsx](examples/in-form.tsx) | A new task form: the required labels field is checked on submit, its error shakes the field and leaves once a label is added, a calm note confirms the task — `required`, `error`, `creatable`. |
|
|
157
157
|
|
|
158
158
|
## Mistakes
|
|
159
159
|
- `TagSelect.Root` → TagSelect is a single export: `<TagSelect …/>`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** A new task form: the required labels field is checked on submit
|
|
1
|
+
/** A new task form: the required labels field is checked on submit, its error shakes the field and leaves once a label is added, a calm note confirms the task — `required`, `error`, `creatable`. */
|
|
2
2
|
import { Button, Input, TagSelect, type TagSelectOption, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
@@ -19,10 +19,12 @@ const PEOPLE: TagSelectOption[] = [
|
|
|
19
19
|
export default function TagSelectInFormExample() {
|
|
20
20
|
const [labels, setLabels] = React.useState<string[]>([]);
|
|
21
21
|
const [error, setError] = React.useState<string>();
|
|
22
|
+
const [saved, setSaved] = React.useState(false);
|
|
22
23
|
|
|
23
24
|
const submit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
24
25
|
event.preventDefault();
|
|
25
26
|
setError(labels.length ? undefined : "Добавьте хотя бы одну метку");
|
|
27
|
+
setSaved(labels.length > 0);
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
return (
|
|
@@ -45,13 +47,28 @@ export default function TagSelectInFormExample() {
|
|
|
45
47
|
onValueChange={(next) => {
|
|
46
48
|
setLabels(next);
|
|
47
49
|
setError(undefined);
|
|
50
|
+
setSaved(false);
|
|
48
51
|
}}
|
|
49
52
|
creatable
|
|
50
53
|
placeholder="Добавить метку"
|
|
51
54
|
/>
|
|
52
55
|
<TagSelect label="Наблюдатели" optional options={PEOPLE} placeholder="Добавить человека" />
|
|
53
56
|
<div className={styles.actions}>
|
|
54
|
-
|
|
57
|
+
{saved ? (
|
|
58
|
+
<Typography as="p" variant="body-s" tone="secondary">
|
|
59
|
+
Задача создана
|
|
60
|
+
</Typography>
|
|
61
|
+
) : null}
|
|
62
|
+
<Button.Root
|
|
63
|
+
variant="ghost"
|
|
64
|
+
tone="neutral"
|
|
65
|
+
type="reset"
|
|
66
|
+
onClick={() => {
|
|
67
|
+
setLabels([]);
|
|
68
|
+
setError(undefined);
|
|
69
|
+
setSaved(false);
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
55
72
|
Отмена
|
|
56
73
|
</Button.Root>
|
|
57
74
|
<Button.Root type="submit">Создать задачу</Button.Root>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Live validation: removing the last region shakes the field and drops the error in, adding one clears it; required and optional markers and a hint — `required`, `optional`, `hint`, `error`. */
|
|
2
2
|
import { TagSelect, type TagSelectOption } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
const CITIES: TagSelectOption[] = [
|
|
5
6
|
{ value: "msk", label: "Москва", color: "blue" },
|
|
@@ -13,6 +14,8 @@ const PEOPLE: TagSelectOption[] = [
|
|
|
13
14
|
];
|
|
14
15
|
|
|
15
16
|
export default function TagSelectValidationExample() {
|
|
17
|
+
const [regions, setRegions] = React.useState(["msk"]);
|
|
18
|
+
|
|
16
19
|
return (
|
|
17
20
|
<>
|
|
18
21
|
<TagSelect
|
|
@@ -25,8 +28,10 @@ export default function TagSelectValidationExample() {
|
|
|
25
28
|
<TagSelect
|
|
26
29
|
label="Регионы"
|
|
27
30
|
required
|
|
28
|
-
error="Добавьте хотя бы один регион"
|
|
31
|
+
error={regions.length ? undefined : "Добавьте хотя бы один регион"}
|
|
29
32
|
options={CITIES}
|
|
33
|
+
value={regions}
|
|
34
|
+
onValueChange={setRegions}
|
|
30
35
|
placeholder="Добавить регион"
|
|
31
36
|
/>
|
|
32
37
|
<TagSelect label="Наблюдатели" optional options={PEOPLE} placeholder="Добавить человека" />
|
|
@@ -100,7 +100,7 @@ Textarea has no `variant` or `tone`: one field treatment (fill, no visible borde
|
|
|
100
100
|
| hover | — | fill darkens (not when focused, disabled or read-only) |
|
|
101
101
|
| focus | keyboard focus | focus fill and inset focus ring on the field box; clicking the box padding focuses the textarea |
|
|
102
102
|
| no focus ring | `focusRing={false}` | `data-focus-ring="false"` on the field box |
|
|
103
|
-
| invalid | `invalid` or non-empty `error` | `data-invalid="true"` on the outer wrapper and the field box, `aria-invalid="true"`, danger ring |
|
|
103
|
+
| invalid | `invalid` or non-empty `error` | `data-invalid="true"` on the outer wrapper and the field box, `aria-invalid="true"`, danger ring; the control shakes once when an error arrives (`data-shake` on the frame) |
|
|
104
104
|
| disabled | `disabled` | `data-disabled="true"` on the field box, disabled fill and text; label and hint dimmed |
|
|
105
105
|
| read-only | `readOnly` | `data-readonly="true"` on the field box, no hover, default cursor |
|
|
106
106
|
| reserved support row | `reserveSupportRow` | `data-reserve="true"` on the support row |
|
|
@@ -141,11 +141,11 @@ Textarea has no `variant` or `tone`: one field treatment (fill, no visible borde
|
|
|
141
141
|
| [overview.tsx](examples/overview.tsx) | A labelled multi-line field with a hint; the height follows the text — `label`, `hint`. |
|
|
142
142
|
| [sizes.tsx](examples/sizes.tsx) | Every size tier; text, padding, label and hint follow the tier — `size`. |
|
|
143
143
|
| [states.tsx](examples/states.tsx) | A default field next to a read-only and a disabled one — `readOnly`, `disabled`. |
|
|
144
|
-
| [validation.tsx](examples/validation.tsx) |
|
|
144
|
+
| [validation.tsx](examples/validation.tsx) | Live validation: an error shakes the field as it arrives, drops in and leaves as soon as the text is fixed; required and optional markers, a hint and a support row that does not shift — `required`, `optional`, `hint`, `error`, `reserveSupportRow`. |
|
|
145
145
|
| [auto-resize.tsx](examples/auto-resize.tsx) | A field that grows with its text next to a fixed one with a resize handle — `autoResize`, `rows`. |
|
|
146
146
|
| [without-focus-ring.tsx](examples/without-focus-ring.tsx) | A single reply composer where the caret and the lighter fill show focus — `focusRing`. |
|
|
147
147
|
| [controlled.tsx](examples/controlled.tsx) | The parent owns the text; the counter follows it and `maxLength` stops extra input — `value`, `onValueChange`, `Textarea.Counter`, `maxLength`. |
|
|
148
|
-
| [in-form.tsx](examples/in-form.tsx) | Support request form: the description is checked on submit
|
|
148
|
+
| [in-form.tsx](examples/in-form.tsx) | Support request form: the description is checked on submit, its error leaves as soon as the text is long enough and does not shift the form, a sent request turns the button green — `required`, `error`, `reserveSupportRow`. |
|
|
149
149
|
|
|
150
150
|
## Mistakes
|
|
151
151
|
- `<Textarea.Root><textarea /></Textarea.Root>` → Textarea.Root renders the textarea itself; pass native props to the root.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Support request form: the description is checked on submit
|
|
1
|
+
/** Support request form: the description is checked on submit, its error leaves as soon as the text is long enough and does not shift the form, a sent request turns the button green — `required`, `error`, `reserveSupportRow`. */
|
|
2
2
|
import { Button, Input, Textarea, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
@@ -9,13 +9,16 @@ const MIN_LENGTH = 20;
|
|
|
9
9
|
|
|
10
10
|
export default function TextareaInFormExample() {
|
|
11
11
|
const [message, setMessage] = React.useState("");
|
|
12
|
-
const [
|
|
12
|
+
const [checked, setChecked] = React.useState(false);
|
|
13
|
+
const [sent, setSent] = React.useState(false);
|
|
14
|
+
const tooShort = message.trim().length < MIN_LENGTH;
|
|
15
|
+
// After the first submit the check is live: the error leaves as soon as the text is long enough.
|
|
16
|
+
const error = checked && tooShort ? "Опишите проблему хотя бы в 20 символах" : undefined;
|
|
13
17
|
|
|
14
18
|
const submit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
15
19
|
event.preventDefault();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
);
|
|
20
|
+
setChecked(true);
|
|
21
|
+
setSent(!tooShort);
|
|
19
22
|
};
|
|
20
23
|
|
|
21
24
|
return (
|
|
@@ -44,7 +47,10 @@ export default function TextareaInFormExample() {
|
|
|
44
47
|
error={error}
|
|
45
48
|
value={message}
|
|
46
49
|
maxLength={LIMIT}
|
|
47
|
-
onValueChange={
|
|
50
|
+
onValueChange={(value) => {
|
|
51
|
+
setMessage(value);
|
|
52
|
+
setSent(false);
|
|
53
|
+
}}
|
|
48
54
|
counter={<Textarea.Counter current={message.length} max={LIMIT} />}
|
|
49
55
|
/>
|
|
50
56
|
</div>
|
|
@@ -53,11 +59,17 @@ export default function TextareaInFormExample() {
|
|
|
53
59
|
variant="ghost"
|
|
54
60
|
tone="neutral"
|
|
55
61
|
type="reset"
|
|
56
|
-
onClick={() =>
|
|
62
|
+
onClick={() => {
|
|
63
|
+
setMessage("");
|
|
64
|
+
setChecked(false);
|
|
65
|
+
setSent(false);
|
|
66
|
+
}}
|
|
57
67
|
>
|
|
58
68
|
Отменить
|
|
59
69
|
</Button.Root>
|
|
60
|
-
<Button.Root type="submit"
|
|
70
|
+
<Button.Root type="submit" tone={sent ? "success" : "accent"}>
|
|
71
|
+
{sent ? "Отправлено" : "Отправить"}
|
|
72
|
+
</Button.Root>
|
|
61
73
|
</div>
|
|
62
74
|
</form>
|
|
63
75
|
);
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Live validation: an error shakes the field as it arrives, drops in and leaves as soon as the text is fixed; required and optional markers, a hint and a support row that does not shift — `required`, `optional`, `hint`, `error`, `reserveSupportRow`. */
|
|
2
2
|
import { Button, Textarea } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
+
const MIN_REASON = 20;
|
|
6
|
+
|
|
5
7
|
export default function TextareaValidationExample() {
|
|
6
|
-
const [
|
|
8
|
+
const [reason, setReason] = React.useState("Нет");
|
|
9
|
+
const [comment, setComment] = React.useState("Оплата частями");
|
|
10
|
+
const [commentError, setCommentError] = React.useState<string>();
|
|
11
|
+
|
|
12
|
+
const send = () => setCommentError(/\d{3,}/.test(comment) ? undefined : "Укажите номер договора");
|
|
7
13
|
|
|
8
14
|
return (
|
|
9
15
|
<>
|
|
@@ -16,18 +22,28 @@ export default function TextareaValidationExample() {
|
|
|
16
22
|
<Textarea.Root
|
|
17
23
|
label="Причина отказа"
|
|
18
24
|
required
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
value={reason}
|
|
26
|
+
onValueChange={setReason}
|
|
27
|
+
hint="Клиент получит её в письме"
|
|
28
|
+
error={
|
|
29
|
+
reason.trim().length < MIN_REASON
|
|
30
|
+
? `Опишите причину хотя бы в ${MIN_REASON} символах`
|
|
31
|
+
: undefined
|
|
32
|
+
}
|
|
21
33
|
/>
|
|
22
34
|
<Textarea.Root
|
|
23
35
|
label="Комментарий для бухгалтерии"
|
|
24
36
|
optional
|
|
25
37
|
reserveSupportRow
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
value={comment}
|
|
39
|
+
onValueChange={(value) => {
|
|
40
|
+
setComment(value);
|
|
41
|
+
setCommentError(undefined);
|
|
42
|
+
}}
|
|
43
|
+
error={commentError}
|
|
28
44
|
/>
|
|
29
|
-
<Button.Root variant="soft" tone="neutral" onClick={
|
|
30
|
-
|
|
45
|
+
<Button.Root variant="soft" tone="neutral" onClick={send}>
|
|
46
|
+
Отправить в бухгалтерию
|
|
31
47
|
</Button.Root>
|
|
32
48
|
</>
|
|
33
49
|
);
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
--prime-color-palette-yellow-text: var(--prime-ref-color-yellow-300);
|
|
104
104
|
--prime-color-success-default: var(--prime-ref-color-green-400);
|
|
105
105
|
--prime-color-success-fg: var(--prime-ref-color-gray-950);
|
|
106
|
+
--prime-color-success-hover: var(--prime-ref-color-green-300);
|
|
106
107
|
--prime-color-success-soft: color-mix(in srgb, var(--prime-ref-color-green-500) 16%, transparent);
|
|
107
108
|
--prime-color-success-text: var(--prime-ref-color-green-300);
|
|
108
109
|
--prime-color-text-disabled: var(--prime-ref-color-gray-600);
|
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
--prime-color-palette-yellow-text: var(--prime-ref-color-yellow-800);
|
|
165
165
|
--prime-color-success-default: var(--prime-ref-color-green-700);
|
|
166
166
|
--prime-color-success-fg: var(--prime-ref-color-white);
|
|
167
|
+
--prime-color-success-hover: var(--prime-ref-color-green-800);
|
|
167
168
|
--prime-color-success-soft: var(--prime-ref-color-green-100);
|
|
168
169
|
--prime-color-success-text: var(--prime-ref-color-green-700);
|
|
169
170
|
--prime-color-text-disabled: var(--prime-ref-color-gray-400);
|
package/src/styles/tokens.css
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
--prime-ref-color-green-400: #4ade80;
|
|
32
32
|
--prime-ref-color-green-500: #22c55e;
|
|
33
33
|
--prime-ref-color-green-700: #15803d;
|
|
34
|
+
--prime-ref-color-green-800: #166534;
|
|
34
35
|
--prime-ref-color-orange-100: #ffedd5;
|
|
35
36
|
--prime-ref-color-orange-300: #fdba74;
|
|
36
37
|
--prime-ref-color-orange-400: #fb923c;
|