@webority/ui-react 0.13.5 → 0.15.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/dist/types/components/AppActionIcon.d.ts +5 -1
- package/dist/types/components/AppAlert.d.ts +21 -4
- package/dist/types/components/AppChoiceCard.d.ts +13 -3
- package/dist/types/components/AppCommandPalette.d.ts +62 -0
- package/dist/types/components/AppConfirmDialog.d.ts +4 -1
- package/dist/types/components/AppCountrySelect.d.ts +14 -0
- package/dist/types/components/AppInfoTip.d.ts +2 -1
- package/dist/types/components/AppRepeater.d.ts +4 -1
- package/dist/types/components/AppSegmented.d.ts +11 -42
- package/dist/types/components/AppSelect.d.ts +3 -0
- package/dist/types/components/ModalIcons.d.ts +6 -0
- package/dist/types/components/renderIconProp.d.ts +4 -2
- package/dist/types/index.d.ts +3 -1
- package/dist/types/lib/useCommandPaletteShortcut.d.ts +20 -0
- package/dist/ui-react.js +1165 -913
- package/package.json +3 -3
- package/dist/types/components/AppCallout.d.ts +0 -38
package/dist/ui-react.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, createElement as r, forwardRef as i, useCallback as a, useEffect as o, useId as s, useInsertionEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
2
2
|
import { Alert as p, Badge as m, Breadcrumb as h, Button as g, Card as _, Dropdown as v, Form as y, Modal as b, Offcanvas as x, OverlayTrigger as S, Popover as C, Tooltip as w } from "react-bootstrap";
|
|
3
3
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
4
|
-
import { COPY_FEEDBACK_MS as O, DEFAULT_IMAGE_ACCEPT as k, DEFAULT_MAX_SIZE_MB as A, acceptLabel as j, copyTextToClipboard as M, evaluatePassword as N, isImageFile as P, isImageOnlyAccept as F,
|
|
5
|
-
import { getConsent as
|
|
4
|
+
import { COPY_FEEDBACK_MS as O, DEFAULT_IMAGE_ACCEPT as k, DEFAULT_MAX_SIZE_MB as A, acceptLabel as j, copyTextToClipboard as M, evaluatePassword as N, isImageFile as P, isImageOnlyAccept as F, matchSegments as I, validateFile as L } from "@webority/ui-elements";
|
|
5
|
+
import { getConsent as R, saveConsent as z } from "@webority/analytics/site";
|
|
6
6
|
//#region src/components/iconCatalogLoaders.g.js
|
|
7
|
-
function
|
|
7
|
+
function B(e) {
|
|
8
8
|
let t = e[0]?.toLowerCase();
|
|
9
9
|
return t && t >= "a" && t <= "z" ? t : "_";
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var V = {
|
|
12
12
|
a: () => import("./a.g-kGcGx7fd.js"),
|
|
13
13
|
b: () => import("./b.g-Dkq-W_Lw.js"),
|
|
14
14
|
c: () => import("./c.g-D3DSTTq_.js"),
|
|
@@ -34,7 +34,7 @@ var ee = {
|
|
|
34
34
|
w: () => import("./w.g-CGXIqJB2.js"),
|
|
35
35
|
x: () => import("./x.g-CIuI3Fqx.js"),
|
|
36
36
|
z: () => import("./z.g-BUP3BJiy.js")
|
|
37
|
-
},
|
|
37
|
+
}, H = {
|
|
38
38
|
outline: {
|
|
39
39
|
a: () => import("./a.g-DpfOFhWD.js"),
|
|
40
40
|
b: () => import("./b.g-MJlor3xB.js"),
|
|
@@ -170,7 +170,7 @@ var ee = {
|
|
|
170
170
|
x: () => import("./x.g-Cc7upOBC.js"),
|
|
171
171
|
z: () => import("./z.g-COIy6PjH.js")
|
|
172
172
|
}
|
|
173
|
-
}, V = /* @__PURE__ */ "aave.activity.add.add-circle.add-square.additem.airdrop.airplane.airplane-square.airpod.airpods.alarm.alert-circle.alert-triangle.align-bottom.align-horizontally.align-left.align-right.align-top.align-vertically.android.ankr.apple.aquarius.archive.archive-add.archive-book.archive-box.archive-minus.archive-slash.archive-tick.arrange-horizontal.arrange-horizontal-circle.arrange-horizontal-square.arrange-vertical.arrange-vertical-circle.arrange-vertical-square.arrow.arrow-circle-down.arrow-circle-down-2.arrow-circle-left.arrow-circle-left-2.arrow-circle-right.arrow-circle-right-2.arrow-circle-up.arrow-circle-up-2.arrow-down.arrow-down-2.arrow-down-3.arrow-down-up.arrow-forward.arrow-forward-square.arrow-left.arrow-left-2.arrow-left-3.arrow-right.arrow-right-2.arrow-right-3.arrow-rotate-left.arrow-rotate-right.arrow-square.arrow-square-down.arrow-square-left.arrow-square-right.arrow-square-up.arrow-swap-horizontal.arrow-swap-vertical.arrow-up.arrow-up-2.arrow-up-3.arrow-up-right.attach-circle.attach-square.audio-square.augur.autobrightness.autonio.avalanche.award.back.back-square.backward.backward-10-seconds.backward-15-seconds.backward-5-seconds.backward-item.badge-check.bag.bag-2.bag-cross.bag-cross-1.bag-happy.bag-tick.bag-tick-2.bag-timer.bank.barcode.battery-charging.battery-disable.battery-empty.battery-empty-1.battery-full.be.bell.bezier.bill.binance-coin.binance-usd.bitcoin.bitcoin-card.bitcoin-convert.bitcoin-refresh.blend.blend-2.blogger.bluetooth.bluetooth-2.bluetooth-circle.bluetooth-rectangle.blur.book.book-1.book-saved.book-square.bookmark.bookmark-2.bootstrap.box.box-1.box-2.box-add.box-remove.box-seam.box-search.box-tick.box-time.briefcase.brifecase-cross.brifecase-tick.brifecase-timer.brodcast.broom.brush.brush-2.brush-3.brush-big.brush-square.bubble.bucket.bucket-circle.bucket-square.bug.building.building-2.building-3.building-4.buildings.buildings-2.buliding.bullseye.bus.buy-crypto.cake.calculator.calendar.calendar-1.calendar-2.calendar-add.calendar-check.calendar-circle.calendar-dots.calendar-edit.calendar-remove.calendar-search.calendar-tick.call.call-add.call-calling.call-incoming.call-minus.call-outgoing.call-received.call-remove.call-slash.camera.camera-slash.candle.candle-2.car.card.card-add.card-coin.card-edit.card-pos.card-receive.card-remove.card-remove-1.card-send.card-slash.card-tick.card-tick-1.cardano.cards.cash-stack.category.category-2.cd.celo.celsius.chainlink.chart.chart-1.chart-2.chart-21.chart-circle.chart-column.chart-fail.chart-square.chart-success.chat.chat-dots.check.check-check.check-circle.chemical-glass.chevron-down.chevron-left.chevron-right.chevron-up.chevrons-left.chevrons-right.chevrons-up-down.chrome.circle.circle-help.civic.clipboard.clipboard-check.clipboard-close.clipboard-export.clipboard-import.clipboard-text.clipboard-tick.clock.close-circle.close-square.cloud.cloud-add.cloud-change.cloud-connection.cloud-cross.cloud-drizzle.cloud-fog.cloud-lightning.cloud-minus.cloud-notif.cloud-plus.cloud-remove.cloud-snow.cloud-sunny.code.code-1.code-circle.coffee.coin.coin-1.coins.color-swatch.colorfilter.colors-square.command.command-square.component.computing.contact.convert.convert-3-d-cube.convert-card.convertshape.convertshape-2.copy.copy-success.copyright.courthouse.cpu.cpu-charge.cpu-setting.creative-commons.credit-card.crop.crown.crown-1.cup.cursor.cut.dai.danger.dash.data.data-2.decred.dent.designtools.device-message.devices.diagram.diagram-3.diamonds.direct.direct-down.direct-inbox.direct-left.direct-normal.direct-notification.direct-right.direct-send.direct-up.directbox-default.directbox-notif.directbox-receive.directbox-send.discount-circle.discount-shape.discover.dislike.display.document.document-cloud.document-code.document-code-2.document-copy.document-download.document-favorite.document-filter.document-forward.document-like.document-previous.document-sketch.document-text.document-text-1.document-upload.dollar-circle.dollar-square.download.dribbble.driver.driver-2.driver-refresh.driving.drop.dropbox.edit.edit-2.educare.electricity.element.element-2.element-3.element-4.element-equal.element-plus.emercoin.emoji-happy.emoji-normal.emoji-sad.emoji-smile.empty-wallet.empty-wallet-add.empty-wallet-change.empty-wallet-remove.empty-wallet-tick.empty-wallet-time.enjin-coin.eos.eraser.eraser-square.ethereum.ethereum-classic.export.export-circle.export-curve.export-square.external-drive.external-link.eye.eye-off.eye-slash.facebook.factory.fatrows.favorite-chart.figma.figma-1.file-plus-2.file-text.files.filter.filter-add.filter-edit.filter-remove.filter-search.filter-square.filter-tick.finger-cricle.finger-scan.firstline.flag.flag-2.flash.flash-circle.flash-slash.flashy.folder.folder-2.folder-add.folder-cloud.folder-connection.folder-cross.folder-favorite.folder-kanban.folder-minus.folder-open.folder-plus.forbidden.forbidden-2.format-circle.format-square.forward.forward-10-seconds.forward-15-seconds.forward-5-seconds.forward-item.framer.ftx-token.gallery.gallery-add.gallery-edit.gallery-export.gallery-favorite.gallery-import.gallery-remove.gallery-slash.gallery-tick.game.gameboy.gas-station.gauge.gemini.gemini-2.ghost.gift.glass.global.global-edit.global-refresh.global-search.globe.globe2.google.google-drive.google-play.gps.gps-slash.grammerly.graph.grid.grid-1.grid-2.grid-3.grid-4.grid-5.grid-6.grid-7.grid-8.grid-9.grid-edit.grid-eraser.grid-lock.hamberger-menu.happyemoji.hard-hat.harmony.hashtag.hashtag-down.hashtag-square.hashtag-up.headphone.headphones.health.heart.heart-add.heart-circle.heart-edit.heart-remove.heart-search.heart-slash.heart-tick.hedera-hashgraph.hex.hierarchy.hierarchy-2.hierarchy-3.hierarchy-square.hierarchy-square-2.hierarchy-square-3.history.home.home-2.home-3.home-hashtag.home-trend-down.home-trend-up.home-wifi.hospital.house.house-2.html-3.html-5.huobi-token.i-24-support.i-3-d-cube-scan.i-3-d-rotate.i-3-d-square.i-3-dcube.i-3-square.icon.illustrator.image.import.import-circle.import-curve.import-square.inbox.info.info-circle.information.instagram.iost.java-script.js.judge.kanban.key.key-square.keyboard.keyboard-open.kyber-network.lamp.lamp-charge.lamp-on.lamp-slash.language-circle.language-square.layer.layout-dashboard.layout-grid.layout-maximize.level.lifebuoy.lightbulb.like.like-1.like-dislike.like-shapes.like-tag.link.link-1.link-2.link-21.link-circle.link-square.list.litecoin.location.location-add.location-cross.location-discover.location-minus.location-slash.location-tick.lock.lock-1.lock-circle.lock-slash.log-out.login.login-curve.logout.logout-curve.lovely.magic-star.magicpen.mail.main-component.maker.man.map.map-1.map-pin.mask.mask-left.mask-right.math.maximize.maximize-1.maximize-2.maximize-3.maximize-4.maximize-circle.medal.medal-star.menu.menu-board.message.message-2.message-add.message-add-1.message-circle.message-edit.message-favorite.message-minus.message-notif.message-programming.message-question.message-remove.message-search.message-square.message-text.message-text-1.message-tick.message-time.messages.messages-1.messages-2.messages-3.messenger.microphone.microphone-2.microphone-slash.microphone-slash-1.microscope.milk.mini-music-sqaure.minus.minus-cirlce.minus-square.mirror.mirroring-screen.mobile.mobile-programming.monero.money.money-2.money-3.money-4.money-add.money-archive.money-change.money-forbidden.money-recive.money-remove.money-send.money-tick.money-time.moneys.monitor.monitor-mobbile.monitor-recorder.moon.more.more-2.more-circle.more-horizontal.more-square.mouse.mouse-circle.mouse-square.music.music-circle.music-dashboard.music-filter.music-library-2.music-play.music-playlist.music-square.music-square-add.music-square-remove.music-square-search.musicnote.nebulas.nem.nexo.next.note.note-1.note-add.note-favorite.note-remove.note-square.note-text.notepad.notepad-2.notification.notification-1.notification-bing.notification-circle.notification-favorite.notification-status.ocean-protocol.okb.okru.omega-circle.omega-square.ontology.paintbucket.palette.panel-left-close.panel-left-open.paperclip.paperclip-2.password-check.path-tool.path-tool-2.path-tool-square.pause.pause-circle.paypal.pen-add.pen-close.pen-remove.pen-tool.pen-tool-2.pencil.people.percentage-circle.percentage-square.personalcard.pet.pharagraphspacing.phone.photoshop.picture-frame.play.play-add.play-circle.play-cricle.play-remove.plug.plus.plus-circle.pointer.polkadot.polygon.polyswarm.presention-chart.previous.printer.printer-slash.profile.profile-2-user.profile-add.profile-circle.profile-delete.profile-remove.profile-tick.programming-arrow.programming-arrows.python.quant.quote-down.quote-down-circle.quote-down-square.quote-up.quote-up-circle.quote-up-square.radar.radar-2.radio.ram.ram-2.rank.ranking.receipt.receipt-1.receipt-2.receipt-21.receipt-add.receipt-discount.receipt-disscount.receipt-edit.receipt-item.receipt-minus.receipt-search.receipt-square.receipt-text.receive.receive-square.receive-square-2.record.record-circle.recovery-convert.refresh.refresh-2.refresh-circle.refresh-cw.refresh-left-square.refresh-right-square.refresh-square.repeat.repeat-circle.repeate-music.repeate-one.reserve.rotate-ccw.rotate-left.rotate-right.route-square.routing.routing-2.row-horizontal.row-vertical.ruler.ruler-pen.safe-home.sagittarius.save-2.save-add.save-minus.save-remove.scan.scan-barcode.scanner.scanning.scissor.screenmirroring.scroll.search.search-favorite.search-favorite-1.search-normal.search-normal-1.search-status.search-status-1.search-zoom-in.search-zoom-in-1.search-zoom-out.search-zoom-out-1.security.security-card.security-safe.security-time.security-user.send.send-2.server.setting.setting-2.setting-3.setting-4.setting-5.settings.shapes.shapes-1.share.share-2.shield.shield-check.shield-cross.shield-lock.shield-plus.shield-search.shield-security.shield-slash.shield-tick.ship.shop.shop-add.shop-remove.shopping-bag.shopping-cart.shuffle.shutterstock.siacoin.sidebar-bottom.sidebar-left.sidebar-right.sidebar-top.signpost.simcard.simcard-1.simcard-2.size.slack.slash.slider.slider-horizontal.slider-horizontal-1.slider-vertical.slider-vertical-1.smallcaps.smart-car.smart-home.smileys.sms.sms-edit.sms-notification.sms-search.sms-star.sms-tracking.snapchat.solana.sort.sound.sparkles.speaker.speedometer.spotify.stacks.star.star-1.star-slash.stars.status.status-up.stellar.sticker.stickynote.stop.stop-circle.story.strongbox.strongbox-2.subtitle.sun.sun-1.sun-fog.table-document.table-lamp.tag.tag-2.tag-cross.tag-right.tag-user.task.task-square.teacher.telephone.tenx.tether.text.text-block.text-bold.text-italic.text-underline.textalign-center.textalign-justifycenter.textalign-justifyleft.textalign-justifyright.textalign-left.textalign-right.the-graph.theta.thorchain.tick-circle.tick-square.ticket.ticket-2.ticket-discount.ticket-expired.ticket-star.timer.timer-1.timer-pause.timer-start.toggle-off.toggle-off-circle.toggle-on.toggle-on-circle.trade.transaction-minus.translate.transmit.transmit-sqaure-2.transmit-square.trash.trash-2.tree.trello.trend-down.trend-up.trending-up.triangle.triangle-logo.trontron.truck.truck-fast.truck-remove.truck-tick.truck-time.trush-square.twitch.two-page.ui-8.unlimited.unlock.upload.usd-coin.user.user-add.user-check.user-cirlce-add.user-edit.user-minus.user-octagon.user-plus.user-remove.user-search.user-square.user-tag.user-tick.users.velas.verify.vibe.video.video-add.video-circle.video-horizontal.video-octagon.video-play.video-remove.video-slash.video-square.video-tick.video-time.video-vertical.voice-cricle.voice-square.volume.volume-cross.volume-high.volume-low.volume-low-1.volume-mute.volume-slash.volume-up.wallet.wallet-1.wallet-2.wallet-3.wallet-add.wallet-add-1.wallet-check.wallet-minus.wallet-money.wallet-remove.wallet-search.wallet2.wanchain.wanchain-1.wand-sparkles.warning-2.watch.watch-status.weight.weight-meter.whatsapp.wifi.wifi-square.wind.wind-2.windows.wing.woman.wrist-clock.x.x-circle.xd.xiaomi.xrp.youtube.zap.zel.zoom.zoom-in.zoom-out".split("."), te = {
|
|
173
|
+
}, ee = /* @__PURE__ */ "aave.activity.add.add-circle.add-square.additem.airdrop.airplane.airplane-square.airpod.airpods.alarm.alert-circle.alert-triangle.align-bottom.align-horizontally.align-left.align-right.align-top.align-vertically.android.ankr.apple.aquarius.archive.archive-add.archive-book.archive-box.archive-minus.archive-slash.archive-tick.arrange-horizontal.arrange-horizontal-circle.arrange-horizontal-square.arrange-vertical.arrange-vertical-circle.arrange-vertical-square.arrow.arrow-circle-down.arrow-circle-down-2.arrow-circle-left.arrow-circle-left-2.arrow-circle-right.arrow-circle-right-2.arrow-circle-up.arrow-circle-up-2.arrow-down.arrow-down-2.arrow-down-3.arrow-down-up.arrow-forward.arrow-forward-square.arrow-left.arrow-left-2.arrow-left-3.arrow-right.arrow-right-2.arrow-right-3.arrow-rotate-left.arrow-rotate-right.arrow-square.arrow-square-down.arrow-square-left.arrow-square-right.arrow-square-up.arrow-swap-horizontal.arrow-swap-vertical.arrow-up.arrow-up-2.arrow-up-3.arrow-up-right.attach-circle.attach-square.audio-square.augur.autobrightness.autonio.avalanche.award.back.back-square.backward.backward-10-seconds.backward-15-seconds.backward-5-seconds.backward-item.badge-check.bag.bag-2.bag-cross.bag-cross-1.bag-happy.bag-tick.bag-tick-2.bag-timer.bank.barcode.battery-charging.battery-disable.battery-empty.battery-empty-1.battery-full.be.bell.bezier.bill.binance-coin.binance-usd.bitcoin.bitcoin-card.bitcoin-convert.bitcoin-refresh.blend.blend-2.blogger.bluetooth.bluetooth-2.bluetooth-circle.bluetooth-rectangle.blur.book.book-1.book-saved.book-square.bookmark.bookmark-2.bootstrap.box.box-1.box-2.box-add.box-remove.box-seam.box-search.box-tick.box-time.briefcase.brifecase-cross.brifecase-tick.brifecase-timer.brodcast.broom.brush.brush-2.brush-3.brush-big.brush-square.bubble.bucket.bucket-circle.bucket-square.bug.building.building-2.building-3.building-4.buildings.buildings-2.buliding.bullseye.bus.buy-crypto.cake.calculator.calendar.calendar-1.calendar-2.calendar-add.calendar-check.calendar-circle.calendar-dots.calendar-edit.calendar-remove.calendar-search.calendar-tick.call.call-add.call-calling.call-incoming.call-minus.call-outgoing.call-received.call-remove.call-slash.camera.camera-slash.candle.candle-2.car.card.card-add.card-coin.card-edit.card-pos.card-receive.card-remove.card-remove-1.card-send.card-slash.card-tick.card-tick-1.cardano.cards.cash-stack.category.category-2.cd.celo.celsius.chainlink.chart.chart-1.chart-2.chart-21.chart-circle.chart-column.chart-fail.chart-square.chart-success.chat.chat-dots.check.check-check.check-circle.chemical-glass.chevron-down.chevron-left.chevron-right.chevron-up.chevrons-left.chevrons-right.chevrons-up-down.chrome.circle.circle-help.civic.clipboard.clipboard-check.clipboard-close.clipboard-export.clipboard-import.clipboard-text.clipboard-tick.clock.close-circle.close-square.cloud.cloud-add.cloud-change.cloud-connection.cloud-cross.cloud-drizzle.cloud-fog.cloud-lightning.cloud-minus.cloud-notif.cloud-plus.cloud-remove.cloud-snow.cloud-sunny.code.code-1.code-circle.coffee.coin.coin-1.coins.color-swatch.colorfilter.colors-square.command.command-square.component.computing.contact.convert.convert-3-d-cube.convert-card.convertshape.convertshape-2.copy.copy-success.copyright.courthouse.cpu.cpu-charge.cpu-setting.creative-commons.credit-card.crop.crown.crown-1.cup.cursor.cut.dai.danger.dash.data.data-2.decred.dent.designtools.device-message.devices.diagram.diagram-3.diamonds.direct.direct-down.direct-inbox.direct-left.direct-normal.direct-notification.direct-right.direct-send.direct-up.directbox-default.directbox-notif.directbox-receive.directbox-send.discount-circle.discount-shape.discover.dislike.display.document.document-cloud.document-code.document-code-2.document-copy.document-download.document-favorite.document-filter.document-forward.document-like.document-previous.document-sketch.document-text.document-text-1.document-upload.dollar-circle.dollar-square.download.dribbble.driver.driver-2.driver-refresh.driving.drop.dropbox.edit.edit-2.educare.electricity.element.element-2.element-3.element-4.element-equal.element-plus.emercoin.emoji-happy.emoji-normal.emoji-sad.emoji-smile.empty-wallet.empty-wallet-add.empty-wallet-change.empty-wallet-remove.empty-wallet-tick.empty-wallet-time.enjin-coin.eos.eraser.eraser-square.ethereum.ethereum-classic.export.export-circle.export-curve.export-square.external-drive.external-link.eye.eye-off.eye-slash.facebook.factory.fatrows.favorite-chart.figma.figma-1.file-plus-2.file-text.files.filter.filter-add.filter-edit.filter-remove.filter-search.filter-square.filter-tick.finger-cricle.finger-scan.firstline.flag.flag-2.flash.flash-circle.flash-slash.flashy.folder.folder-2.folder-add.folder-cloud.folder-connection.folder-cross.folder-favorite.folder-kanban.folder-minus.folder-open.folder-plus.forbidden.forbidden-2.format-circle.format-square.forward.forward-10-seconds.forward-15-seconds.forward-5-seconds.forward-item.framer.ftx-token.gallery.gallery-add.gallery-edit.gallery-export.gallery-favorite.gallery-import.gallery-remove.gallery-slash.gallery-tick.game.gameboy.gas-station.gauge.gemini.gemini-2.ghost.gift.glass.global.global-edit.global-refresh.global-search.globe.globe2.google.google-drive.google-play.gps.gps-slash.grammerly.graph.grid.grid-1.grid-2.grid-3.grid-4.grid-5.grid-6.grid-7.grid-8.grid-9.grid-edit.grid-eraser.grid-lock.hamberger-menu.happyemoji.hard-hat.harmony.hashtag.hashtag-down.hashtag-square.hashtag-up.headphone.headphones.health.heart.heart-add.heart-circle.heart-edit.heart-remove.heart-search.heart-slash.heart-tick.hedera-hashgraph.hex.hierarchy.hierarchy-2.hierarchy-3.hierarchy-square.hierarchy-square-2.hierarchy-square-3.history.home.home-2.home-3.home-hashtag.home-trend-down.home-trend-up.home-wifi.hospital.house.house-2.html-3.html-5.huobi-token.i-24-support.i-3-d-cube-scan.i-3-d-rotate.i-3-d-square.i-3-dcube.i-3-square.icon.illustrator.image.import.import-circle.import-curve.import-square.inbox.info.info-circle.information.instagram.iost.java-script.js.judge.kanban.key.key-square.keyboard.keyboard-open.kyber-network.lamp.lamp-charge.lamp-on.lamp-slash.language-circle.language-square.layer.layout-dashboard.layout-grid.layout-maximize.level.lifebuoy.lightbulb.like.like-1.like-dislike.like-shapes.like-tag.link.link-1.link-2.link-21.link-circle.link-square.list.litecoin.location.location-add.location-cross.location-discover.location-minus.location-slash.location-tick.lock.lock-1.lock-circle.lock-slash.log-out.login.login-curve.logout.logout-curve.lovely.magic-star.magicpen.mail.main-component.maker.man.map.map-1.map-pin.mask.mask-left.mask-right.math.maximize.maximize-1.maximize-2.maximize-3.maximize-4.maximize-circle.medal.medal-star.menu.menu-board.message.message-2.message-add.message-add-1.message-circle.message-edit.message-favorite.message-minus.message-notif.message-programming.message-question.message-remove.message-search.message-square.message-text.message-text-1.message-tick.message-time.messages.messages-1.messages-2.messages-3.messenger.microphone.microphone-2.microphone-slash.microphone-slash-1.microscope.milk.mini-music-sqaure.minus.minus-cirlce.minus-square.mirror.mirroring-screen.mobile.mobile-programming.monero.money.money-2.money-3.money-4.money-add.money-archive.money-change.money-forbidden.money-recive.money-remove.money-send.money-tick.money-time.moneys.monitor.monitor-mobbile.monitor-recorder.moon.more.more-2.more-circle.more-horizontal.more-square.mouse.mouse-circle.mouse-square.music.music-circle.music-dashboard.music-filter.music-library-2.music-play.music-playlist.music-square.music-square-add.music-square-remove.music-square-search.musicnote.nebulas.nem.nexo.next.note.note-1.note-add.note-favorite.note-remove.note-square.note-text.notepad.notepad-2.notification.notification-1.notification-bing.notification-circle.notification-favorite.notification-status.ocean-protocol.okb.okru.omega-circle.omega-square.ontology.paintbucket.palette.panel-left-close.panel-left-open.paperclip.paperclip-2.password-check.path-tool.path-tool-2.path-tool-square.pause.pause-circle.paypal.pen-add.pen-close.pen-remove.pen-tool.pen-tool-2.pencil.people.percentage-circle.percentage-square.personalcard.pet.pharagraphspacing.phone.photoshop.picture-frame.play.play-add.play-circle.play-cricle.play-remove.plug.plus.plus-circle.pointer.polkadot.polygon.polyswarm.presention-chart.previous.printer.printer-slash.profile.profile-2-user.profile-add.profile-circle.profile-delete.profile-remove.profile-tick.programming-arrow.programming-arrows.python.quant.quote-down.quote-down-circle.quote-down-square.quote-up.quote-up-circle.quote-up-square.radar.radar-2.radio.ram.ram-2.rank.ranking.receipt.receipt-1.receipt-2.receipt-21.receipt-add.receipt-discount.receipt-disscount.receipt-edit.receipt-item.receipt-minus.receipt-search.receipt-square.receipt-text.receive.receive-square.receive-square-2.record.record-circle.recovery-convert.refresh.refresh-2.refresh-circle.refresh-cw.refresh-left-square.refresh-right-square.refresh-square.repeat.repeat-circle.repeate-music.repeate-one.reserve.rotate-ccw.rotate-left.rotate-right.route-square.routing.routing-2.row-horizontal.row-vertical.ruler.ruler-pen.safe-home.sagittarius.save-2.save-add.save-minus.save-remove.scan.scan-barcode.scanner.scanning.scissor.screenmirroring.scroll.search.search-favorite.search-favorite-1.search-normal.search-normal-1.search-status.search-status-1.search-zoom-in.search-zoom-in-1.search-zoom-out.search-zoom-out-1.security.security-card.security-safe.security-time.security-user.send.send-2.server.setting.setting-2.setting-3.setting-4.setting-5.settings.shapes.shapes-1.share.share-2.shield.shield-check.shield-cross.shield-lock.shield-plus.shield-search.shield-security.shield-slash.shield-tick.ship.shop.shop-add.shop-remove.shopping-bag.shopping-cart.shuffle.shutterstock.siacoin.sidebar-bottom.sidebar-left.sidebar-right.sidebar-top.signpost.simcard.simcard-1.simcard-2.size.slack.slash.slider.slider-horizontal.slider-horizontal-1.slider-vertical.slider-vertical-1.smallcaps.smart-car.smart-home.smileys.sms.sms-edit.sms-notification.sms-search.sms-star.sms-tracking.snapchat.solana.sort.sound.sparkles.speaker.speedometer.spotify.stacks.star.star-1.star-slash.stars.status.status-up.stellar.sticker.stickynote.stop.stop-circle.story.strongbox.strongbox-2.subtitle.sun.sun-1.sun-fog.table-document.table-lamp.tag.tag-2.tag-cross.tag-right.tag-user.task.task-square.teacher.telephone.tenx.tether.text.text-block.text-bold.text-italic.text-underline.textalign-center.textalign-justifycenter.textalign-justifyleft.textalign-justifyright.textalign-left.textalign-right.the-graph.theta.thorchain.tick-circle.tick-square.ticket.ticket-2.ticket-discount.ticket-expired.ticket-star.timer.timer-1.timer-pause.timer-start.toggle-off.toggle-off-circle.toggle-on.toggle-on-circle.trade.transaction-minus.translate.transmit.transmit-sqaure-2.transmit-square.trash.trash-2.tree.trello.trend-down.trend-up.trending-up.triangle.triangle-logo.trontron.truck.truck-fast.truck-remove.truck-tick.truck-time.trush-square.twitch.two-page.ui-8.unlimited.unlock.upload.usd-coin.user.user-add.user-check.user-cirlce-add.user-edit.user-minus.user-octagon.user-plus.user-remove.user-search.user-square.user-tag.user-tick.users.velas.verify.vibe.video.video-add.video-circle.video-horizontal.video-octagon.video-play.video-remove.video-slash.video-square.video-tick.video-time.video-vertical.voice-cricle.voice-square.volume.volume-cross.volume-high.volume-low.volume-low-1.volume-mute.volume-slash.volume-up.wallet.wallet-1.wallet-2.wallet-3.wallet-add.wallet-add-1.wallet-check.wallet-minus.wallet-money.wallet-remove.wallet-search.wallet2.wanchain.wanchain-1.wand-sparkles.warning-2.watch.watch-status.weight.weight-meter.whatsapp.wifi.wifi-square.wind.wind-2.windows.wing.woman.wrist-clock.x.x-circle.xd.xiaomi.xrp.youtube.zap.zel.zoom.zoom-in.zoom-out".split("."), U = {
|
|
174
174
|
activity: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
175
175
|
alarm: "<path d=\"M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
176
176
|
"alert-circle": "<path d=\"M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M12 16.2v.1\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -319,19 +319,19 @@ var ee = {
|
|
|
319
319
|
"zoom-in": "<path d=\"M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
320
320
|
"zoom-out": "<path d=\"M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>"
|
|
321
321
|
};
|
|
322
|
-
Object.keys(
|
|
322
|
+
Object.keys(U);
|
|
323
323
|
//#endregion
|
|
324
324
|
//#region src/components/warnUnknownProps.js
|
|
325
|
-
var
|
|
325
|
+
var te = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), ne = () => {
|
|
326
326
|
try {
|
|
327
327
|
return process.env.NODE_ENV !== "production";
|
|
328
328
|
} catch {
|
|
329
329
|
return !0;
|
|
330
330
|
}
|
|
331
331
|
}, re = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), ie = /* @__PURE__ */ new Set();
|
|
332
|
-
function
|
|
332
|
+
function W(e, t) {
|
|
333
333
|
if (!(!ne() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
|
|
334
|
-
if (re(n) ||
|
|
334
|
+
if (re(n) || te.has(n)) continue;
|
|
335
335
|
let t = `${e}.${n}`;
|
|
336
336
|
ie.has(t) || (ie.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui-react.webority.dev.`));
|
|
337
337
|
}
|
|
@@ -345,7 +345,7 @@ var ae = () => {
|
|
|
345
345
|
return !0;
|
|
346
346
|
}
|
|
347
347
|
}, oe = /* @__PURE__ */ new Set();
|
|
348
|
-
function
|
|
348
|
+
function G(e, t, n, r) {
|
|
349
349
|
if (!ae() || n == null) return;
|
|
350
350
|
let i = r instanceof Set ? r : new Set(r);
|
|
351
351
|
if (i.has(n)) return;
|
|
@@ -359,15 +359,15 @@ var se = {
|
|
|
359
359
|
end: "right",
|
|
360
360
|
top: "top",
|
|
361
361
|
bottom: "bottom"
|
|
362
|
-
},
|
|
362
|
+
}, K = [
|
|
363
363
|
"auto",
|
|
364
364
|
"top",
|
|
365
365
|
"bottom",
|
|
366
366
|
"start",
|
|
367
367
|
"end"
|
|
368
368
|
];
|
|
369
|
-
function
|
|
370
|
-
|
|
369
|
+
function ce({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
370
|
+
W("AppTooltip", c), G("AppTooltip", "placement", r, K);
|
|
371
371
|
let l = /* @__PURE__ */ E(w, {
|
|
372
372
|
id: s(),
|
|
373
373
|
className: [
|
|
@@ -387,8 +387,8 @@ function G({ content: e, children: t, placement: r = "top", tone: i = "default",
|
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/components/withTooltip.jsx
|
|
390
|
-
function
|
|
391
|
-
return t == null || t === "" ? e : /* @__PURE__ */ E(
|
|
390
|
+
function q(e, t, n) {
|
|
391
|
+
return t == null || t === "" ? e : /* @__PURE__ */ E(ce, {
|
|
392
392
|
content: t,
|
|
393
393
|
placement: n || "auto",
|
|
394
394
|
children: e
|
|
@@ -412,11 +412,11 @@ function he() {
|
|
|
412
412
|
}, 1e3));
|
|
413
413
|
}), fe;
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var J = new Set(ee), ge = Object.create(null), _e = Object.create(null), ve = Object.create(null), ye = Object.create(null);
|
|
416
416
|
function be(e) {
|
|
417
|
-
let t =
|
|
417
|
+
let t = B(e), n = V[t];
|
|
418
418
|
return n ? (_e[t] ||= n().then((e) => {
|
|
419
|
-
Object.assign(
|
|
419
|
+
Object.assign(ge, e.FULL_GLYPHS), ye[t] = !1;
|
|
420
420
|
let n = ve[t];
|
|
421
421
|
if (n) {
|
|
422
422
|
for (let e of n) e();
|
|
@@ -428,47 +428,47 @@ function be(e) {
|
|
|
428
428
|
}, 1e3));
|
|
429
429
|
}), _e[t]) : null;
|
|
430
430
|
}
|
|
431
|
-
var
|
|
432
|
-
function
|
|
433
|
-
let n =
|
|
431
|
+
var xe = Object.create(null), Se = Object.create(null), Ce = Object.create(null), we = Object.create(null);
|
|
432
|
+
function Te(e, t) {
|
|
433
|
+
let n = H[e];
|
|
434
434
|
if (!n) return null;
|
|
435
|
-
let r =
|
|
435
|
+
let r = B(t), i = n[r];
|
|
436
436
|
if (!i) return null;
|
|
437
437
|
let a = `${e}:${r}`;
|
|
438
|
-
return
|
|
439
|
-
let n =
|
|
440
|
-
Object.assign(n, t.FULL_VARIANT_GLYPHS),
|
|
441
|
-
let r =
|
|
438
|
+
return Se[a] ||= i().then((t) => {
|
|
439
|
+
let n = xe[e] || (xe[e] = Object.create(null));
|
|
440
|
+
Object.assign(n, t.FULL_VARIANT_GLYPHS), we[a] = !1;
|
|
441
|
+
let r = Ce[a];
|
|
442
442
|
if (r) {
|
|
443
443
|
for (let e of r) e();
|
|
444
444
|
r.clear();
|
|
445
445
|
}
|
|
446
446
|
}).catch((t) => {
|
|
447
|
-
|
|
448
|
-
for (let e of [...
|
|
447
|
+
Se[a] = null, ue(`${e} icon catalogue '${r}' shard`, t), we[a] ? Ce[a]?.clear() : (we[a] = !0, setTimeout(() => {
|
|
448
|
+
for (let e of [...Ce[a] || []]) e();
|
|
449
449
|
}, 1e3));
|
|
450
|
-
}),
|
|
450
|
+
}), Se[a];
|
|
451
451
|
}
|
|
452
|
-
var
|
|
453
|
-
function
|
|
454
|
-
for (let [t, n] of Object.entries(e))
|
|
452
|
+
var Ee = ee, De = /* @__PURE__ */ new Map();
|
|
453
|
+
function Oe(e) {
|
|
454
|
+
for (let [t, n] of Object.entries(e)) De.set(t, n);
|
|
455
455
|
}
|
|
456
456
|
function Y({ name: e, size: t = 16, variant: n, tooltip: r, tooltipPlacement: i, className: a, color: s, style: c, ...l }) {
|
|
457
|
-
|
|
458
|
-
let u = !!n && n !== "linear", d = r != null && r !== "", p = (e) => d ?
|
|
457
|
+
W("AppIcon", l);
|
|
458
|
+
let u = !!n && n !== "linear", d = r != null && r !== "", p = (e) => d ? q(/* @__PURE__ */ E("span", {
|
|
459
459
|
className: "wui-icon-tip",
|
|
460
460
|
role: "img",
|
|
461
461
|
"aria-label": r,
|
|
462
462
|
children: e
|
|
463
|
-
}), r, i) : e, m =
|
|
463
|
+
}), r, i) : e, m = U[e] !== void 0, h = !m && J.has(e), [, g] = f(0);
|
|
464
464
|
o(() => {
|
|
465
465
|
let t = () => g((e) => e + 1);
|
|
466
466
|
u && m && !de && (me.add(t), he());
|
|
467
|
-
let r = h ?
|
|
468
|
-
h &&
|
|
469
|
-
let i = u && h ? `${n}:${
|
|
470
|
-
return u && h &&
|
|
471
|
-
me.delete(t), r && ve[r]?.delete(t), i &&
|
|
467
|
+
let r = h ? B(e) : null;
|
|
468
|
+
h && ge[e] === void 0 && ((ve[r] ||= /* @__PURE__ */ new Set()).add(t), be(e));
|
|
469
|
+
let i = u && h ? `${n}:${B(e)}` : null;
|
|
470
|
+
return u && h && xe[n]?.[e] === void 0 && ((Ce[i] ||= /* @__PURE__ */ new Set()).add(t), Te(n, e)), () => {
|
|
471
|
+
me.delete(t), r && ve[r]?.delete(t), i && Ce[i]?.delete(t);
|
|
472
472
|
};
|
|
473
473
|
}, [
|
|
474
474
|
e,
|
|
@@ -477,7 +477,7 @@ function Y({ name: e, size: t = 16, variant: n, tooltip: r, tooltipPlacement: i,
|
|
|
477
477
|
h,
|
|
478
478
|
n
|
|
479
479
|
]);
|
|
480
|
-
let _ =
|
|
480
|
+
let _ = De.get(e);
|
|
481
481
|
if (_) return p(_({
|
|
482
482
|
size: t,
|
|
483
483
|
color: s,
|
|
@@ -507,7 +507,7 @@ function Y({ name: e, size: t = 16, variant: n, tooltip: r, tooltipPlacement: i,
|
|
|
507
507
|
}), /* @__PURE__ */ E("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
508
508
|
})
|
|
509
509
|
}));
|
|
510
|
-
let v = u && (de?.[n]?.[e] ||
|
|
510
|
+
let v = u && (de?.[n]?.[e] || xe?.[n]?.[e]) || U[e] || ge[e];
|
|
511
511
|
return v ? p(/* @__PURE__ */ E("svg", {
|
|
512
512
|
width: t,
|
|
513
513
|
height: t,
|
|
@@ -527,8 +527,8 @@ function Y({ name: e, size: t = 16, variant: n, tooltip: r, tooltipPlacement: i,
|
|
|
527
527
|
}
|
|
528
528
|
//#endregion
|
|
529
529
|
//#region src/components/AppAccordion.jsx
|
|
530
|
-
function
|
|
531
|
-
|
|
530
|
+
function ke({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
531
|
+
W("AppAccordion", i);
|
|
532
532
|
let a = s(), o = n || a, [c, l] = f(() => {
|
|
533
533
|
let n = e.map((e, t) => ({
|
|
534
534
|
item: e,
|
|
@@ -579,57 +579,81 @@ function Oe({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
579
579
|
}
|
|
580
580
|
//#endregion
|
|
581
581
|
//#region src/components/renderIconProp.js
|
|
582
|
-
function X(e, { size: t = 16, className: n } = {}) {
|
|
582
|
+
function X(e, { size: t = 16, className: n, variant: i } = {}) {
|
|
583
583
|
return e == null || e === !1 ? null : typeof e == "string" ? r(Y, {
|
|
584
584
|
name: e,
|
|
585
585
|
size: t,
|
|
586
|
-
className: n
|
|
586
|
+
className: n,
|
|
587
|
+
variant: i
|
|
587
588
|
}) : e;
|
|
588
589
|
}
|
|
589
590
|
//#endregion
|
|
590
591
|
//#region src/components/AppActionIcon.jsx
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
var Ae = [
|
|
593
|
+
"linear",
|
|
594
|
+
"outline",
|
|
595
|
+
"bold",
|
|
596
|
+
"bulk",
|
|
597
|
+
"broken",
|
|
598
|
+
"twotone"
|
|
599
|
+
];
|
|
600
|
+
function je({ icon: e, iconVariant: t, label: n, tooltipPlacement: r = "auto", danger: i = !1, disabled: a = !1, size: o = 20, onClick: s, className: c = "", as: l, href: u, ...d }) {
|
|
601
|
+
W("AppActionIcon", d), G("AppActionIcon", "iconVariant", t, Ae);
|
|
602
|
+
let f = [
|
|
594
603
|
"u-action",
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
].filter(Boolean).join(" "), { style:
|
|
598
|
-
"--wui-action-size": `${
|
|
599
|
-
...
|
|
600
|
-
},
|
|
601
|
-
return
|
|
602
|
-
type:
|
|
603
|
-
href:
|
|
604
|
-
className:
|
|
605
|
-
style:
|
|
606
|
-
"aria-label":
|
|
607
|
-
disabled:
|
|
608
|
-
"aria-disabled": !
|
|
609
|
-
role: !
|
|
610
|
-
tabIndex: !
|
|
604
|
+
i ? "danger" : "",
|
|
605
|
+
c
|
|
606
|
+
].filter(Boolean).join(" "), { style: p, ...m } = d, h = {
|
|
607
|
+
"--wui-action-size": `${o + 16}px`,
|
|
608
|
+
...p
|
|
609
|
+
}, g = l ?? (u ? "a" : "button"), _ = g === "button";
|
|
610
|
+
return q(/* @__PURE__ */ E(g, {
|
|
611
|
+
type: _ ? "button" : void 0,
|
|
612
|
+
href: _ || a ? void 0 : u,
|
|
613
|
+
className: f,
|
|
614
|
+
style: h,
|
|
615
|
+
"aria-label": n,
|
|
616
|
+
disabled: _ ? a : void 0,
|
|
617
|
+
"aria-disabled": !_ && a ? "true" : void 0,
|
|
618
|
+
role: !_ && a ? "link" : void 0,
|
|
619
|
+
tabIndex: !_ && a ? -1 : void 0,
|
|
611
620
|
onClick: (e) => {
|
|
612
|
-
if (
|
|
621
|
+
if (a) {
|
|
613
622
|
e.preventDefault(), e.stopPropagation();
|
|
614
623
|
return;
|
|
615
624
|
}
|
|
616
|
-
|
|
625
|
+
s?.(e);
|
|
617
626
|
},
|
|
618
|
-
...
|
|
619
|
-
children: X(e, {
|
|
620
|
-
|
|
627
|
+
...m,
|
|
628
|
+
children: X(e, {
|
|
629
|
+
size: o,
|
|
630
|
+
variant: t
|
|
631
|
+
})
|
|
632
|
+
}), n, r);
|
|
621
633
|
}
|
|
622
634
|
//#endregion
|
|
623
635
|
//#region src/components/AppAlert.jsx
|
|
624
|
-
var
|
|
636
|
+
var Me = {
|
|
625
637
|
info: "info",
|
|
626
638
|
success: "check",
|
|
627
639
|
warning: "alert-triangle",
|
|
628
640
|
danger: "x"
|
|
629
|
-
}
|
|
630
|
-
|
|
641
|
+
}, Ne = [
|
|
642
|
+
"sm",
|
|
643
|
+
"md",
|
|
644
|
+
"lg"
|
|
645
|
+
], Pe = [
|
|
646
|
+
"alert",
|
|
647
|
+
"status",
|
|
648
|
+
"none"
|
|
649
|
+
];
|
|
650
|
+
function Fe(e, t, n, r, i) {
|
|
631
651
|
return n ? /* @__PURE__ */ E("span", {
|
|
632
652
|
className: "alert-icon alert-icon-image",
|
|
653
|
+
style: i > 0 ? {
|
|
654
|
+
width: i,
|
|
655
|
+
height: i
|
|
656
|
+
} : void 0,
|
|
633
657
|
children: /* @__PURE__ */ E("img", {
|
|
634
658
|
src: n,
|
|
635
659
|
alt: r
|
|
@@ -645,34 +669,45 @@ function je(e, t, n, r) {
|
|
|
645
669
|
children: e
|
|
646
670
|
}) : null;
|
|
647
671
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
650
|
-
let
|
|
672
|
+
function Ie({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", imageSize: o, className: s = "", onClose: c, dismissible: l, bordered: u = !0, accent: d = !1, size: f = "md", action: m, role: h = "alert", ...g }) {
|
|
673
|
+
W("AppAlert", g), G("AppAlert", "size", f, Ne), G("AppAlert", "role", h, Pe);
|
|
674
|
+
let _ = r === void 0 ? Me[e] : r === "none" ? null : r, v = !!i || !!_, y = m != null && m !== !1, b = n ? /* @__PURE__ */ E("div", {
|
|
651
675
|
className: "alert-heading",
|
|
652
676
|
children: n
|
|
653
|
-
}) : null,
|
|
677
|
+
}) : null, x = v && !!b && !!t, S = f === "lg" ? x ? 17 : 15 : x ? 13 : 11;
|
|
654
678
|
return /* @__PURE__ */ E(p, {
|
|
655
679
|
variant: e,
|
|
656
680
|
className: [
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
681
|
+
v ? "alert-has-icon" : "",
|
|
682
|
+
y ? "alert-has-action" : "",
|
|
683
|
+
x ? "alert-stack" : "",
|
|
684
|
+
u ? "" : "alert-borderless",
|
|
685
|
+
d ? "alert-accent" : "",
|
|
686
|
+
f === "sm" ? "alert-sm" : "",
|
|
687
|
+
f === "lg" ? "alert-lg" : "",
|
|
688
|
+
s
|
|
661
689
|
].filter(Boolean).join(" ") || void 0,
|
|
662
|
-
onClose:
|
|
663
|
-
dismissible:
|
|
690
|
+
onClose: c,
|
|
691
|
+
dismissible: l ?? typeof c == "function",
|
|
664
692
|
transition: !1,
|
|
665
|
-
role:
|
|
666
|
-
...
|
|
667
|
-
children:
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
693
|
+
role: h === "none" ? void 0 : h,
|
|
694
|
+
...g,
|
|
695
|
+
children: v || y ? /* @__PURE__ */ D(T, { children: [
|
|
696
|
+
v && Fe(_, S, i, a, o),
|
|
697
|
+
/* @__PURE__ */ D("div", {
|
|
698
|
+
className: "alert-content",
|
|
699
|
+
children: [b, t]
|
|
700
|
+
}),
|
|
701
|
+
y && /* @__PURE__ */ E("div", {
|
|
702
|
+
className: "alert-action",
|
|
703
|
+
children: m
|
|
704
|
+
})
|
|
705
|
+
] }) : /* @__PURE__ */ D(T, { children: [b, t] })
|
|
671
706
|
});
|
|
672
707
|
}
|
|
673
708
|
//#endregion
|
|
674
709
|
//#region src/components/AppButton.jsx
|
|
675
|
-
var
|
|
710
|
+
var Le = {
|
|
676
711
|
primary: "primary",
|
|
677
712
|
secondary: "secondary",
|
|
678
713
|
outline: "outline-primary",
|
|
@@ -685,28 +720,28 @@ var Ne = {
|
|
|
685
720
|
warning: "warning",
|
|
686
721
|
subtle: "subtle",
|
|
687
722
|
"outline-light": "outline-light"
|
|
688
|
-
},
|
|
723
|
+
}, Re = {
|
|
689
724
|
sm: 14,
|
|
690
725
|
md: 16,
|
|
691
726
|
lg: 20
|
|
692
727
|
};
|
|
693
|
-
function
|
|
728
|
+
function ze(e, t, n) {
|
|
694
729
|
if (!e) return null;
|
|
695
730
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
696
731
|
return typeof e == "string" ? /* @__PURE__ */ E(Y, {
|
|
697
732
|
name: e,
|
|
698
|
-
size:
|
|
733
|
+
size: Re[n] ?? Re.md,
|
|
699
734
|
className: r
|
|
700
735
|
}) : /* @__PURE__ */ E("span", {
|
|
701
736
|
className: `d-inline-flex ${r}`,
|
|
702
737
|
children: e
|
|
703
738
|
});
|
|
704
739
|
}
|
|
705
|
-
function
|
|
706
|
-
if (
|
|
740
|
+
function Be({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, static: u = !1, tooltip: d, tooltipPlacement: f, className: p = "", ...m }) {
|
|
741
|
+
if (W("AppButton", m), G("AppButton", "variant", t, Object.keys(Le)), G("AppButton", "size", n, Object.keys(Re)), u) return q(/* @__PURE__ */ D("span", {
|
|
707
742
|
className: [
|
|
708
743
|
"btn",
|
|
709
|
-
`btn-${
|
|
744
|
+
`btn-${Le[t] ?? "primary"}`,
|
|
710
745
|
n === "sm" ? "btn-sm" : n === "lg" ? "btn-lg" : "",
|
|
711
746
|
o ? "w-100" : "",
|
|
712
747
|
"btn-static",
|
|
@@ -714,9 +749,9 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
714
749
|
].filter(Boolean).join(" "),
|
|
715
750
|
...m,
|
|
716
751
|
children: [
|
|
717
|
-
|
|
752
|
+
ze(s, "left", n),
|
|
718
753
|
e,
|
|
719
|
-
|
|
754
|
+
ze(c, "right", n)
|
|
720
755
|
]
|
|
721
756
|
}), d, f);
|
|
722
757
|
let h = [
|
|
@@ -724,10 +759,10 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
724
759
|
i ? "is-loading" : "",
|
|
725
760
|
p
|
|
726
761
|
].filter(Boolean).join(" ");
|
|
727
|
-
return
|
|
762
|
+
return q(/* @__PURE__ */ D(g, {
|
|
728
763
|
type: (m.as === void 0 || m.as === "button") && l === void 0 ? r : void 0,
|
|
729
764
|
href: l,
|
|
730
|
-
variant:
|
|
765
|
+
variant: Le[t] ?? "primary",
|
|
731
766
|
size: n === "md" ? void 0 : n,
|
|
732
767
|
disabled: a || i,
|
|
733
768
|
"aria-busy": i || void 0,
|
|
@@ -738,16 +773,16 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
738
773
|
className: "spinner-border spinner-border-sm me-2",
|
|
739
774
|
"aria-hidden": "true"
|
|
740
775
|
}),
|
|
741
|
-
!i &&
|
|
776
|
+
!i && ze(s, "left", n),
|
|
742
777
|
e,
|
|
743
|
-
!i &&
|
|
778
|
+
!i && ze(c, "right", n)
|
|
744
779
|
]
|
|
745
780
|
}), d, f);
|
|
746
781
|
}
|
|
747
782
|
//#endregion
|
|
748
783
|
//#region src/components/AppEmptyState.jsx
|
|
749
|
-
function
|
|
750
|
-
return
|
|
784
|
+
function Ve({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
785
|
+
return W("AppEmptyState", c), /* @__PURE__ */ D("div", {
|
|
751
786
|
className: [
|
|
752
787
|
"empty-state",
|
|
753
788
|
n === "sm" ? "empty-state-sm" : "",
|
|
@@ -777,8 +812,8 @@ function Le({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
777
812
|
}
|
|
778
813
|
//#endregion
|
|
779
814
|
//#region src/components/AppSpinner.jsx
|
|
780
|
-
function
|
|
781
|
-
|
|
815
|
+
function He({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
816
|
+
W("AppSpinner", r);
|
|
782
817
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
783
818
|
return /* @__PURE__ */ E("span", {
|
|
784
819
|
className: `spinner-border${!s && e === "sm" ? " spinner-border-sm" : ""}${n ? ` ${n}` : ""}`,
|
|
@@ -795,8 +830,8 @@ function Re({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
795
830
|
}
|
|
796
831
|
//#endregion
|
|
797
832
|
//#region src/components/AppAsyncBlock.jsx
|
|
798
|
-
function
|
|
799
|
-
|
|
833
|
+
function Ue({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
834
|
+
W("AppAsyncBlock", s);
|
|
800
835
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
801
836
|
return e ? /* @__PURE__ */ E("div", {
|
|
802
837
|
className: c,
|
|
@@ -804,17 +839,17 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
804
839
|
...s,
|
|
805
840
|
children: a ?? /* @__PURE__ */ E("div", {
|
|
806
841
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
807
|
-
children: /* @__PURE__ */ E(
|
|
842
|
+
children: /* @__PURE__ */ E(He, { label: "Loading" })
|
|
808
843
|
})
|
|
809
844
|
}) : t ? /* @__PURE__ */ E("div", {
|
|
810
845
|
className: c,
|
|
811
846
|
"data-state": "error",
|
|
812
847
|
...s,
|
|
813
|
-
children: /* @__PURE__ */ E(
|
|
848
|
+
children: /* @__PURE__ */ E(Ve, {
|
|
814
849
|
icon: "alert-circle",
|
|
815
850
|
title: "Something went wrong",
|
|
816
851
|
text: t,
|
|
817
|
-
action: i ? /* @__PURE__ */ E(
|
|
852
|
+
action: i ? /* @__PURE__ */ E(Be, {
|
|
818
853
|
variant: "secondary",
|
|
819
854
|
onClick: i,
|
|
820
855
|
children: "Retry"
|
|
@@ -824,7 +859,7 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
824
859
|
className: c,
|
|
825
860
|
"data-state": "empty",
|
|
826
861
|
...s,
|
|
827
|
-
children: /* @__PURE__ */ E(
|
|
862
|
+
children: /* @__PURE__ */ E(Ve, {
|
|
828
863
|
icon: "inbox",
|
|
829
864
|
title: "Nothing to show yet"
|
|
830
865
|
})
|
|
@@ -837,15 +872,15 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
837
872
|
}
|
|
838
873
|
//#endregion
|
|
839
874
|
//#region src/components/AppPopover.jsx
|
|
840
|
-
var
|
|
875
|
+
var We = {
|
|
841
876
|
start: "left",
|
|
842
877
|
end: "right",
|
|
843
878
|
top: "top",
|
|
844
879
|
bottom: "bottom",
|
|
845
880
|
auto: "auto"
|
|
846
881
|
};
|
|
847
|
-
function
|
|
848
|
-
|
|
882
|
+
function Ge({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
883
|
+
W("AppPopover", l);
|
|
849
884
|
let u = s(), [d, p] = f(!1), m = (e) => {
|
|
850
885
|
p(e), o?.(e);
|
|
851
886
|
}, h = /* @__PURE__ */ D(C, {
|
|
@@ -866,7 +901,7 @@ function Ve({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
866
901
|
}), T = a === "click", O = a === "hover" || Array.isArray(a) && a.includes("hover");
|
|
867
902
|
return /* @__PURE__ */ E(S, {
|
|
868
903
|
trigger: a,
|
|
869
|
-
placement:
|
|
904
|
+
placement: We[i] || i,
|
|
870
905
|
overlay: h,
|
|
871
906
|
rootClose: T,
|
|
872
907
|
delay: O ? {
|
|
@@ -879,13 +914,19 @@ function Ve({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
879
914
|
}
|
|
880
915
|
//#endregion
|
|
881
916
|
//#region src/components/AppInfoTip.jsx
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
917
|
+
var Ke = {
|
|
918
|
+
sm: " infotip-popover-sm",
|
|
919
|
+
md: "",
|
|
920
|
+
lg: " infotip-popover-lg",
|
|
921
|
+
xl: " infotip-popover-xl"
|
|
922
|
+
};
|
|
923
|
+
function qe({ label: e, children: t, placement: n = "auto", width: r = "md", className: i = "", ...a }) {
|
|
924
|
+
W("AppInfoTip", a), G("AppInfoTip", "width", r, Object.keys(Ke));
|
|
925
|
+
let [o, s] = f(!1), c = !!e;
|
|
926
|
+
return !c && !t ? null : /* @__PURE__ */ E("span", {
|
|
927
|
+
className: `infotip${i ? ` ${i}` : ""}`,
|
|
928
|
+
...a,
|
|
929
|
+
children: /* @__PURE__ */ E(Ge, {
|
|
889
930
|
trigger: /* @__PURE__ */ E("button", {
|
|
890
931
|
type: "button",
|
|
891
932
|
className: "infotip-btn",
|
|
@@ -895,11 +936,12 @@ function He({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
895
936
|
size: 16
|
|
896
937
|
})
|
|
897
938
|
}),
|
|
898
|
-
title:
|
|
939
|
+
title: c ? e : void 0,
|
|
899
940
|
placement: n,
|
|
900
941
|
triggerType: ["hover", "focus"],
|
|
901
|
-
|
|
902
|
-
|
|
942
|
+
className: `infotip-popover${Ke[r] ?? ""}`,
|
|
943
|
+
onToggle: s,
|
|
944
|
+
"aria-expanded": o,
|
|
903
945
|
children: t
|
|
904
946
|
})
|
|
905
947
|
});
|
|
@@ -915,8 +957,8 @@ function Z() {
|
|
|
915
957
|
}
|
|
916
958
|
//#endregion
|
|
917
959
|
//#region src/components/useWuiControl.js
|
|
918
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s =
|
|
919
|
-
let u = d(null), f = r ??
|
|
960
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = Je, on: l } = {}) {
|
|
961
|
+
let u = d(null), f = r ?? Ye, p = i ?? Xe, m = (s || Je).join("\0"), h = Object.keys(l ?? {}).join("\0"), g = d(null);
|
|
920
962
|
g.current === null && (g.current = {
|
|
921
963
|
ref: e,
|
|
922
964
|
value: t,
|
|
@@ -944,7 +986,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
944
986
|
_.current = null;
|
|
945
987
|
}
|
|
946
988
|
}, []), y = a((e) => {
|
|
947
|
-
let t = g.current.eventKey ? g.current.eventKey.split("\0") :
|
|
989
|
+
let t = g.current.eventKey ? g.current.eventKey.split("\0") : Je, n = Object.keys(g.current.on ?? {}), r = {
|
|
948
990
|
el: e,
|
|
949
991
|
names: t,
|
|
950
992
|
extraNames: n,
|
|
@@ -970,7 +1012,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
970
1012
|
n && !Object.is(t, n.last) && (n.last = void 0);
|
|
971
1013
|
}, [t, p]), o(() => {
|
|
972
1014
|
let e = u.current, t = _.current;
|
|
973
|
-
!e || !t || (t.names.join("\0") !== (m ||
|
|
1015
|
+
!e || !t || (t.names.join("\0") !== (m || Je.join("\0")) || t.extraNames.join("\0") !== h) && (v(), y(e));
|
|
974
1016
|
}, [
|
|
975
1017
|
m,
|
|
976
1018
|
h,
|
|
@@ -981,15 +1023,15 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
981
1023
|
innerRef: u
|
|
982
1024
|
};
|
|
983
1025
|
}
|
|
984
|
-
var
|
|
985
|
-
function
|
|
1026
|
+
var Je = ["change"];
|
|
1027
|
+
function Ye(e) {
|
|
986
1028
|
return e.value;
|
|
987
1029
|
}
|
|
988
|
-
function
|
|
1030
|
+
function Xe(e, t) {
|
|
989
1031
|
let n = t ?? "";
|
|
990
1032
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
991
1033
|
}
|
|
992
|
-
function
|
|
1034
|
+
function Ze(e, t) {
|
|
993
1035
|
let n = e || [], r = t || [];
|
|
994
1036
|
return n.length === r.length && n.every((e, t) => {
|
|
995
1037
|
let n = r[t];
|
|
@@ -999,28 +1041,28 @@ function Ke(e, t) {
|
|
|
999
1041
|
return i.length === Object.keys(n).length && i.every((t) => Object.is(e[t], n[t]));
|
|
1000
1042
|
});
|
|
1001
1043
|
}
|
|
1002
|
-
function
|
|
1044
|
+
function Qe(e) {
|
|
1003
1045
|
return e.values;
|
|
1004
1046
|
}
|
|
1005
|
-
function
|
|
1047
|
+
function $e(e, t) {
|
|
1006
1048
|
let n = t || [], r = e.values || [];
|
|
1007
1049
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
1008
1050
|
}
|
|
1009
|
-
function
|
|
1051
|
+
function et(e) {
|
|
1010
1052
|
return {
|
|
1011
1053
|
start: e.start,
|
|
1012
1054
|
end: e.end
|
|
1013
1055
|
};
|
|
1014
1056
|
}
|
|
1015
|
-
function
|
|
1057
|
+
function tt(e, t) {
|
|
1016
1058
|
if (t === void 0) return;
|
|
1017
1059
|
let n = Number.parseFloat(t);
|
|
1018
1060
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
1019
1061
|
}
|
|
1020
1062
|
//#endregion
|
|
1021
1063
|
//#region src/components/AppAutocomplete.jsx
|
|
1022
|
-
var
|
|
1023
|
-
|
|
1064
|
+
var nt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, id: p, label: m, error: h, hint: g, required: _ = !1, help: v, helpLabel: y = "More information", fieldClassName: b = "", ...x }, S) {
|
|
1065
|
+
W("AppAutocomplete", x);
|
|
1024
1066
|
let C = typeof r == "function", w = s(), T = p || w, { setRef: O, innerRef: k } = Q({
|
|
1025
1067
|
ref: S,
|
|
1026
1068
|
value: e ?? "",
|
|
@@ -1030,7 +1072,7 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1030
1072
|
let e = k.current;
|
|
1031
1073
|
if (!e || C) return;
|
|
1032
1074
|
let t = n || [];
|
|
1033
|
-
|
|
1075
|
+
Ze(t, e.options) || (e.options = t);
|
|
1034
1076
|
}, [
|
|
1035
1077
|
n,
|
|
1036
1078
|
C,
|
|
@@ -1066,7 +1108,7 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1066
1108
|
children: [
|
|
1067
1109
|
m,
|
|
1068
1110
|
_ && /* @__PURE__ */ E(Z, {}),
|
|
1069
|
-
v && /* @__PURE__ */ E(
|
|
1111
|
+
v && /* @__PURE__ */ E(qe, {
|
|
1070
1112
|
label: y,
|
|
1071
1113
|
children: v
|
|
1072
1114
|
})
|
|
@@ -1100,14 +1142,14 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1100
1142
|
}) : null
|
|
1101
1143
|
]
|
|
1102
1144
|
});
|
|
1103
|
-
}),
|
|
1145
|
+
}), rt = /* @__PURE__ */ new Set([
|
|
1104
1146
|
"xs",
|
|
1105
1147
|
"sm",
|
|
1106
1148
|
"md",
|
|
1107
1149
|
"lg",
|
|
1108
1150
|
"xl",
|
|
1109
1151
|
"2xl"
|
|
1110
|
-
]),
|
|
1152
|
+
]), it = {
|
|
1111
1153
|
xs: 20,
|
|
1112
1154
|
sm: 24,
|
|
1113
1155
|
md: 32,
|
|
@@ -1115,30 +1157,30 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1115
1157
|
xl: 64,
|
|
1116
1158
|
"2xl": 96
|
|
1117
1159
|
};
|
|
1118
|
-
function
|
|
1160
|
+
function at(e) {
|
|
1119
1161
|
let t = (e || "").trim();
|
|
1120
1162
|
if (!t) return "?";
|
|
1121
1163
|
let n = t.split(/\s+/).filter(Boolean);
|
|
1122
1164
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
1123
1165
|
}
|
|
1124
|
-
function
|
|
1166
|
+
function ot(e) {
|
|
1125
1167
|
let t = e || "", n = 0;
|
|
1126
1168
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
1127
1169
|
return n % 360;
|
|
1128
1170
|
}
|
|
1129
|
-
function
|
|
1171
|
+
function st(e) {
|
|
1130
1172
|
if (typeof e == "number") return e;
|
|
1131
|
-
if (
|
|
1173
|
+
if (it[e] != null) return it[e];
|
|
1132
1174
|
let t = Number.parseInt(e, 10);
|
|
1133
1175
|
return Number.isNaN(t) ? 32 : t;
|
|
1134
1176
|
}
|
|
1135
|
-
function
|
|
1136
|
-
|
|
1177
|
+
function ct({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: d, onClick: p, linkComponent: m, tooltip: h, tooltipPlacement: g, className: _ = "", ...v }) {
|
|
1178
|
+
W("AppAvatar", v);
|
|
1137
1179
|
let { style: y, ...b } = v, [x, S] = f(!1);
|
|
1138
1180
|
o(() => {
|
|
1139
1181
|
S(!1);
|
|
1140
1182
|
}, [t]);
|
|
1141
|
-
let C = typeof n == "string" &&
|
|
1183
|
+
let C = typeof n == "string" && rt.has(n), w = C ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, O = d != null || p != null, k = t != null && t !== "" && !x, A = [
|
|
1142
1184
|
"avatar",
|
|
1143
1185
|
C && n !== "md" ? `avatar-${n}` : "",
|
|
1144
1186
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -1147,16 +1189,16 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1147
1189
|
O ? "avatar-clickable" : "",
|
|
1148
1190
|
_
|
|
1149
1191
|
].filter(Boolean).join(" "), j = {};
|
|
1150
|
-
w && (j["--avatar-size"] = w), i === "auto" && (j["--avatar-hue"] =
|
|
1192
|
+
w && (j["--avatar-size"] = w), i === "auto" && (j["--avatar-hue"] = ot(e));
|
|
1151
1193
|
let M = Object.keys(j).length || y ? {
|
|
1152
1194
|
...j,
|
|
1153
1195
|
...y
|
|
1154
1196
|
} : void 0, N = /* @__PURE__ */ E("span", {
|
|
1155
1197
|
className: "avatar-face",
|
|
1156
1198
|
"aria-hidden": "true",
|
|
1157
|
-
children: l == null ?
|
|
1199
|
+
children: l == null ? at(e) : /* @__PURE__ */ E(Y, {
|
|
1158
1200
|
name: l,
|
|
1159
|
-
size: Math.round(
|
|
1201
|
+
size: Math.round(st(n) * .55)
|
|
1160
1202
|
})
|
|
1161
1203
|
}), P = /* @__PURE__ */ D(T, { children: [
|
|
1162
1204
|
a !== "none" && /* @__PURE__ */ E("span", {
|
|
@@ -1184,7 +1226,7 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1184
1226
|
] });
|
|
1185
1227
|
if (d != null) {
|
|
1186
1228
|
let t = m || "a", n = m ? { to: d } : { href: d };
|
|
1187
|
-
return
|
|
1229
|
+
return q(/* @__PURE__ */ E(t, {
|
|
1188
1230
|
className: A,
|
|
1189
1231
|
style: M,
|
|
1190
1232
|
...b,
|
|
@@ -1194,7 +1236,7 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1194
1236
|
children: F
|
|
1195
1237
|
}), h, g);
|
|
1196
1238
|
}
|
|
1197
|
-
return
|
|
1239
|
+
return q(p == null ? k ? /* @__PURE__ */ E("span", {
|
|
1198
1240
|
className: A,
|
|
1199
1241
|
style: M,
|
|
1200
1242
|
...b,
|
|
@@ -1218,7 +1260,7 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1218
1260
|
}
|
|
1219
1261
|
//#endregion
|
|
1220
1262
|
//#region src/components/AppAvatarGroup.jsx
|
|
1221
|
-
var
|
|
1263
|
+
var lt = {
|
|
1222
1264
|
xs: 20,
|
|
1223
1265
|
sm: 24,
|
|
1224
1266
|
md: 32,
|
|
@@ -1226,16 +1268,16 @@ var it = {
|
|
|
1226
1268
|
xl: 64,
|
|
1227
1269
|
"2xl": 96
|
|
1228
1270
|
};
|
|
1229
|
-
function
|
|
1230
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
1271
|
+
function ut(e) {
|
|
1272
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : lt[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${lt[e]}px`;
|
|
1231
1273
|
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1274
|
+
function dt({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
1275
|
+
W("AppAvatarGroup", a);
|
|
1234
1276
|
let { style: o, ...s } = a, c = [
|
|
1235
1277
|
"avatar-group",
|
|
1236
1278
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
1237
1279
|
i
|
|
1238
|
-
].filter(Boolean).join(" "), l =
|
|
1280
|
+
].filter(Boolean).join(" "), l = ut(t), u = l ? {
|
|
1239
1281
|
"--avatar-size": l,
|
|
1240
1282
|
...o
|
|
1241
1283
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -1253,8 +1295,8 @@ function ot({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
1253
1295
|
}
|
|
1254
1296
|
//#endregion
|
|
1255
1297
|
//#region src/components/AppBadge.jsx
|
|
1256
|
-
function
|
|
1257
|
-
return
|
|
1298
|
+
function ft({ children: e, tone: t, dot: n = !1, tooltip: r, tooltipPlacement: i, className: a = "", ...o }) {
|
|
1299
|
+
return W("AppBadge", o), q(/* @__PURE__ */ E(m, {
|
|
1258
1300
|
bg: !1,
|
|
1259
1301
|
className: [
|
|
1260
1302
|
t && t !== "neutral" ? `badge-${t}` : "",
|
|
@@ -1267,18 +1309,18 @@ function st({ children: e, tone: t, dot: n = !1, tooltip: r, tooltipPlacement: i
|
|
|
1267
1309
|
}
|
|
1268
1310
|
//#endregion
|
|
1269
1311
|
//#region src/components/AppBanner.jsx
|
|
1270
|
-
var
|
|
1312
|
+
var pt = [
|
|
1271
1313
|
"info",
|
|
1272
1314
|
"success",
|
|
1273
1315
|
"warning",
|
|
1274
1316
|
"danger",
|
|
1275
1317
|
"neutral"
|
|
1276
1318
|
];
|
|
1277
|
-
function
|
|
1278
|
-
|
|
1319
|
+
function mt({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
1320
|
+
W("AppBanner", o);
|
|
1279
1321
|
let [s, c] = f(!0);
|
|
1280
1322
|
if (!s) return null;
|
|
1281
|
-
let l =
|
|
1323
|
+
let l = pt.includes(e) ? e : "info", u = () => {
|
|
1282
1324
|
c(!1), i?.();
|
|
1283
1325
|
};
|
|
1284
1326
|
return /* @__PURE__ */ D("div", {
|
|
@@ -1309,8 +1351,8 @@ function lt({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
1309
1351
|
}
|
|
1310
1352
|
//#endregion
|
|
1311
1353
|
//#region src/components/AppBreadcrumbs.jsx
|
|
1312
|
-
function
|
|
1313
|
-
return
|
|
1354
|
+
function ht({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
1355
|
+
return W("AppBreadcrumbs", r), /* @__PURE__ */ E(h, {
|
|
1314
1356
|
className: n || void 0,
|
|
1315
1357
|
...r,
|
|
1316
1358
|
children: e.map((n, r) => {
|
|
@@ -1327,75 +1369,15 @@ function ut({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
1327
1369
|
});
|
|
1328
1370
|
}
|
|
1329
1371
|
//#endregion
|
|
1330
|
-
//#region src/components/AppCallout.jsx
|
|
1331
|
-
var dt = {
|
|
1332
|
-
info: "info",
|
|
1333
|
-
success: "check",
|
|
1334
|
-
warning: "alert-triangle",
|
|
1335
|
-
danger: "x"
|
|
1336
|
-
};
|
|
1337
|
-
function ft({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: d = "", ...p }) {
|
|
1338
|
-
U("AppCallout", p);
|
|
1339
|
-
let [m, h] = f(!0);
|
|
1340
|
-
if (!m) return null;
|
|
1341
|
-
let g = r === void 0 ? dt[t] : r === "none" ? null : r, _ = !!i, v = _ || !!g, y = v && !!n && e != null && e !== !1 && e !== "", b = y ? 13 : 11;
|
|
1342
|
-
return /* @__PURE__ */ D("div", {
|
|
1343
|
-
className: [
|
|
1344
|
-
"info-callout",
|
|
1345
|
-
`tone-${t}`,
|
|
1346
|
-
o === "sm" ? "info-callout-sm" : "",
|
|
1347
|
-
y ? "info-callout-stack" : "",
|
|
1348
|
-
s ? "" : "info-callout-borderless",
|
|
1349
|
-
d
|
|
1350
|
-
].filter(Boolean).join(" "),
|
|
1351
|
-
...p,
|
|
1352
|
-
children: [
|
|
1353
|
-
v && /* @__PURE__ */ E("span", {
|
|
1354
|
-
className: `info-callout-icon${_ ? " info-callout-icon-image" : ""}`,
|
|
1355
|
-
children: _ ? /* @__PURE__ */ E("img", {
|
|
1356
|
-
src: i,
|
|
1357
|
-
alt: a
|
|
1358
|
-
}) : typeof g == "string" ? /* @__PURE__ */ E(Y, {
|
|
1359
|
-
name: g,
|
|
1360
|
-
size: b
|
|
1361
|
-
}) : g
|
|
1362
|
-
}),
|
|
1363
|
-
/* @__PURE__ */ D("div", {
|
|
1364
|
-
className: "info-callout-content",
|
|
1365
|
-
children: [n && /* @__PURE__ */ E("div", {
|
|
1366
|
-
className: "info-callout-heading",
|
|
1367
|
-
children: n
|
|
1368
|
-
}), e]
|
|
1369
|
-
}),
|
|
1370
|
-
c ? /* @__PURE__ */ E("div", {
|
|
1371
|
-
className: "info-callout-action",
|
|
1372
|
-
children: c
|
|
1373
|
-
}) : null,
|
|
1374
|
-
l && /* @__PURE__ */ E("button", {
|
|
1375
|
-
type: "button",
|
|
1376
|
-
className: "info-callout-close",
|
|
1377
|
-
"aria-label": "Dismiss",
|
|
1378
|
-
onClick: () => {
|
|
1379
|
-
h(!1), u?.();
|
|
1380
|
-
},
|
|
1381
|
-
children: /* @__PURE__ */ E(Y, {
|
|
1382
|
-
name: "x",
|
|
1383
|
-
size: 18
|
|
1384
|
-
})
|
|
1385
|
-
})
|
|
1386
|
-
]
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
//#endregion
|
|
1390
1372
|
//#region src/components/AppCard.jsx
|
|
1391
|
-
var
|
|
1373
|
+
var gt = {
|
|
1392
1374
|
xs: 320,
|
|
1393
1375
|
sm: 420,
|
|
1394
1376
|
md: 560,
|
|
1395
1377
|
lg: 720
|
|
1396
1378
|
};
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1379
|
+
function _t({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: f = "md", maxWidth: p, className: m = "", bodyClassName: h = "", headerClassName: g = "", body: v = !0, lifted: y = !1, href: b, onClick: x, linkComponent: S, ...C }) {
|
|
1380
|
+
W("AppCard", C);
|
|
1399
1381
|
let { style: w, ...O } = C, k = b != null || x != null, A = [
|
|
1400
1382
|
u && u !== "default" ? `card-${u}` : "",
|
|
1401
1383
|
u === "accent" && d && d !== "primary" ? `tone-${d}` : "",
|
|
@@ -1404,7 +1386,7 @@ function mt({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
1404
1386
|
p == null ? "" : "card-constrained",
|
|
1405
1387
|
k ? "card-clickable" : "",
|
|
1406
1388
|
m
|
|
1407
|
-
].filter(Boolean).join(" ") || void 0, j = p == null ? void 0 :
|
|
1389
|
+
].filter(Boolean).join(" ") || void 0, j = p == null ? void 0 : gt[p] == null ? typeof p == "number" ? `${p}px` : p : `${gt[p]}px`, M = j ? {
|
|
1408
1390
|
"--card-max-width": j,
|
|
1409
1391
|
...w
|
|
1410
1392
|
} : w, N = {};
|
|
@@ -1475,7 +1457,7 @@ function mt({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
1475
1457
|
}
|
|
1476
1458
|
//#endregion
|
|
1477
1459
|
//#region src/lib/CheckField.jsx
|
|
1478
|
-
var
|
|
1460
|
+
var vt = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
1479
1461
|
let d = s(), f = t || d, p = r ? `${f}-error` : void 0, m = i ? `${f}-hint` : void 0;
|
|
1480
1462
|
return /* @__PURE__ */ D("div", {
|
|
1481
1463
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -1506,8 +1488,8 @@ var ht = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
1506
1488
|
}) : null
|
|
1507
1489
|
]
|
|
1508
1490
|
});
|
|
1509
|
-
}),
|
|
1510
|
-
return
|
|
1491
|
+
}), yt = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
1492
|
+
return W("AppCheckbox", o), /* @__PURE__ */ E(vt, {
|
|
1511
1493
|
ref: s,
|
|
1512
1494
|
label: e,
|
|
1513
1495
|
id: t,
|
|
@@ -1522,8 +1504,8 @@ var ht = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
1522
1504
|
});
|
|
1523
1505
|
//#endregion
|
|
1524
1506
|
//#region src/components/AppChip.jsx
|
|
1525
|
-
function
|
|
1526
|
-
|
|
1507
|
+
function bt({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...f }) {
|
|
1508
|
+
W("AppChip", f);
|
|
1527
1509
|
let p = e ?? t, m = [
|
|
1528
1510
|
"chip",
|
|
1529
1511
|
n && n !== "neutral" ? n : "",
|
|
@@ -1576,10 +1558,24 @@ function _t({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
1576
1558
|
}
|
|
1577
1559
|
//#endregion
|
|
1578
1560
|
//#region src/components/AppChoiceCard.jsx
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1561
|
+
var xt = {
|
|
1562
|
+
sm: " wui-struct-card-sm",
|
|
1563
|
+
md: "",
|
|
1564
|
+
lg: " wui-struct-card-lg"
|
|
1565
|
+
}, St = {
|
|
1566
|
+
inline: "",
|
|
1567
|
+
stacked: " wui-struct-card-stacked"
|
|
1568
|
+
}, Ct = {
|
|
1569
|
+
sm: 16,
|
|
1570
|
+
md: 18,
|
|
1571
|
+
lg: 22
|
|
1572
|
+
};
|
|
1573
|
+
function wt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s, image: c, imageAlt: l = "", children: u, title: d, description: f, checkIcon: p = "check", checkSize: m = 18, hideCheck: h = !1, size: g = "md", layout: _ = "inline", className: v = "", ...y }) {
|
|
1574
|
+
W("AppChoiceCard", y), G("AppChoiceCard", "size", g, Object.keys(xt)), G("AppChoiceCard", "layout", _, Object.keys(St));
|
|
1575
|
+
let b = xt[g] ?? "", x = St[_] ?? "", S = s ?? Ct[g] ?? Ct.md;
|
|
1576
|
+
return /* @__PURE__ */ D("label", {
|
|
1577
|
+
className: `struct-card${c ? " struct-card-img-card" : ""}${b}${x}${h ? " wui-struct-card-no-check" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
1578
|
+
...y,
|
|
1583
1579
|
children: [
|
|
1584
1580
|
/* @__PURE__ */ E("input", {
|
|
1585
1581
|
type: t ? "checkbox" : "radio",
|
|
@@ -1600,7 +1596,8 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1600
1596
|
className: "struct-card-ic",
|
|
1601
1597
|
children: o || /* @__PURE__ */ E(Y, {
|
|
1602
1598
|
name: a,
|
|
1603
|
-
size:
|
|
1599
|
+
size: S,
|
|
1600
|
+
variant: r ? "bold" : void 0
|
|
1604
1601
|
})
|
|
1605
1602
|
}) : null,
|
|
1606
1603
|
/* @__PURE__ */ E("span", {
|
|
@@ -1613,7 +1610,7 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1613
1610
|
children: f
|
|
1614
1611
|
})] })
|
|
1615
1612
|
}),
|
|
1616
|
-
/* @__PURE__ */ E("span", {
|
|
1613
|
+
!h && /* @__PURE__ */ E("span", {
|
|
1617
1614
|
className: "struct-card-check",
|
|
1618
1615
|
children: /* @__PURE__ */ E(Y, {
|
|
1619
1616
|
name: p,
|
|
@@ -1625,8 +1622,8 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1625
1622
|
}
|
|
1626
1623
|
//#endregion
|
|
1627
1624
|
//#region src/components/AppChoiceChip.jsx
|
|
1628
|
-
function
|
|
1629
|
-
return
|
|
1625
|
+
function Tt({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
1626
|
+
return W("AppChoiceChip", u), /* @__PURE__ */ D("label", {
|
|
1630
1627
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
1631
1628
|
...u,
|
|
1632
1629
|
children: [
|
|
@@ -1647,8 +1644,8 @@ function yt({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
1647
1644
|
}
|
|
1648
1645
|
//#endregion
|
|
1649
1646
|
//#region src/components/AppColorField.jsx
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1647
|
+
function Et({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", fieldClassName: f = "", ...p }) {
|
|
1648
|
+
W("AppColorField", p);
|
|
1652
1649
|
let m = s(), h = c || m, g = i ? `${h}-error` : a ? `${h}-hint` : void 0, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", y = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
1653
1650
|
return /* @__PURE__ */ D("div", {
|
|
1654
1651
|
className: `field${f ? ` ${f}` : ""}`,
|
|
@@ -1698,14 +1695,279 @@ function bt({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
1698
1695
|
});
|
|
1699
1696
|
}
|
|
1700
1697
|
//#endregion
|
|
1698
|
+
//#region src/components/AppModal.jsx
|
|
1699
|
+
var Dt = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Ot = {
|
|
1700
|
+
sm: 380,
|
|
1701
|
+
md: 440,
|
|
1702
|
+
lg: 640,
|
|
1703
|
+
xl: 880
|
|
1704
|
+
}, kt = !1;
|
|
1705
|
+
function At() {
|
|
1706
|
+
let e = !0;
|
|
1707
|
+
try {
|
|
1708
|
+
e = process.env.NODE_ENV !== "production";
|
|
1709
|
+
} catch {
|
|
1710
|
+
e = !0;
|
|
1711
|
+
}
|
|
1712
|
+
!e || kt || (kt = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
1713
|
+
}
|
|
1714
|
+
function jt({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: u = "md", placement: f = "center", hideHeader: p = !1, staticBackdrop: m = !1, ariaLabel: h, className: g = "", children: _, ...v }) {
|
|
1715
|
+
W("AppModal", v), G("AppModal", "size", typeof u == "string" ? u : null, Object.keys(Ot));
|
|
1716
|
+
let { style: y, ...x } = v;
|
|
1717
|
+
p && !h && typeof n != "string" && At();
|
|
1718
|
+
let S = d(null);
|
|
1719
|
+
o(() => {
|
|
1720
|
+
if (!e) return;
|
|
1721
|
+
let t = S.current?.closest(".modal-content");
|
|
1722
|
+
if (!t) return;
|
|
1723
|
+
let n = () => Array.from(t.querySelectorAll(Dt));
|
|
1724
|
+
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
1725
|
+
}, [e]);
|
|
1726
|
+
let C = typeof u == "number" ? u : Ot[u] ?? Ot.md, w = [
|
|
1727
|
+
"wui-modal",
|
|
1728
|
+
a === "default" ? "" : `tone-${a}`,
|
|
1729
|
+
g
|
|
1730
|
+
].filter(Boolean).join(" ");
|
|
1731
|
+
return /* @__PURE__ */ D(b, {
|
|
1732
|
+
...x,
|
|
1733
|
+
show: e,
|
|
1734
|
+
onHide: c,
|
|
1735
|
+
backdrop: !m || "static",
|
|
1736
|
+
keyboard: !m,
|
|
1737
|
+
autoFocus: !1,
|
|
1738
|
+
enforceFocus: !0,
|
|
1739
|
+
restoreFocus: !0,
|
|
1740
|
+
centered: f !== "top",
|
|
1741
|
+
className: "wui-modal-shell",
|
|
1742
|
+
style: {
|
|
1743
|
+
"--wui-modal-max-width": `${C}px`,
|
|
1744
|
+
...y
|
|
1745
|
+
},
|
|
1746
|
+
dialogClassName: "wui-rb-dialog",
|
|
1747
|
+
contentClassName: w,
|
|
1748
|
+
backdropClassName: "wui-modal-dim",
|
|
1749
|
+
"aria-label": h || (typeof n == "string" ? n : void 0),
|
|
1750
|
+
children: [
|
|
1751
|
+
!p && /* @__PURE__ */ D("div", {
|
|
1752
|
+
className: "wui-modal-header",
|
|
1753
|
+
children: [/* @__PURE__ */ D("div", {
|
|
1754
|
+
className: "wui-modal-heading",
|
|
1755
|
+
children: [i && /* @__PURE__ */ E("span", {
|
|
1756
|
+
className: "wui-modal-headicon",
|
|
1757
|
+
children: /* @__PURE__ */ E(Y, {
|
|
1758
|
+
name: i,
|
|
1759
|
+
size: 18
|
|
1760
|
+
})
|
|
1761
|
+
}), /* @__PURE__ */ D("div", {
|
|
1762
|
+
className: "wui-modal-headtext",
|
|
1763
|
+
children: [
|
|
1764
|
+
t && /* @__PURE__ */ E("div", {
|
|
1765
|
+
className: "wui-modal-eyebrow",
|
|
1766
|
+
children: t
|
|
1767
|
+
}),
|
|
1768
|
+
/* @__PURE__ */ E("div", {
|
|
1769
|
+
className: "wui-modal-title",
|
|
1770
|
+
children: n
|
|
1771
|
+
}),
|
|
1772
|
+
r && /* @__PURE__ */ E("div", {
|
|
1773
|
+
className: "wui-modal-subtitle",
|
|
1774
|
+
children: r
|
|
1775
|
+
})
|
|
1776
|
+
]
|
|
1777
|
+
})]
|
|
1778
|
+
}), s && /* @__PURE__ */ E("button", {
|
|
1779
|
+
type: "button",
|
|
1780
|
+
className: "wui-modal-close",
|
|
1781
|
+
onClick: c,
|
|
1782
|
+
"aria-label": "Close",
|
|
1783
|
+
children: /* @__PURE__ */ E("svg", {
|
|
1784
|
+
width: "18",
|
|
1785
|
+
height: "18",
|
|
1786
|
+
viewBox: "0 0 24 24",
|
|
1787
|
+
fill: "none",
|
|
1788
|
+
stroke: "currentColor",
|
|
1789
|
+
strokeWidth: "2",
|
|
1790
|
+
strokeLinecap: "round",
|
|
1791
|
+
strokeLinejoin: "round",
|
|
1792
|
+
"aria-hidden": "true",
|
|
1793
|
+
children: /* @__PURE__ */ E("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
1794
|
+
})
|
|
1795
|
+
})]
|
|
1796
|
+
}),
|
|
1797
|
+
/* @__PURE__ */ E("div", {
|
|
1798
|
+
className: "wui-modal-body",
|
|
1799
|
+
ref: S,
|
|
1800
|
+
children: _
|
|
1801
|
+
}),
|
|
1802
|
+
l && /* @__PURE__ */ E("div", {
|
|
1803
|
+
className: "wui-modal-footer",
|
|
1804
|
+
children: l
|
|
1805
|
+
})
|
|
1806
|
+
]
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
//#endregion
|
|
1810
|
+
//#region src/components/AppCommandPalette.jsx
|
|
1811
|
+
var Mt = "lg";
|
|
1812
|
+
function Nt({ open: e, onClose: t, query: n = "", onQueryChange: r, placeholder: i = "Search…", groups: a = [], loading: o = !1, emptyText: c = "No results", footer: l, ariaLabel: u = "Search", highlight: d = !0, id: f, className: p = "", ...m }) {
|
|
1813
|
+
W("AppCommandPalette", m);
|
|
1814
|
+
let h = s(), g = f || h;
|
|
1815
|
+
return /* @__PURE__ */ E(jt, {
|
|
1816
|
+
open: e,
|
|
1817
|
+
onClose: t,
|
|
1818
|
+
hideHeader: !0,
|
|
1819
|
+
placement: "top",
|
|
1820
|
+
size: Mt,
|
|
1821
|
+
ariaLabel: u,
|
|
1822
|
+
className: `wui-cmd-card${p ? ` ${p}` : ""}`,
|
|
1823
|
+
children: /* @__PURE__ */ E(Pt, {
|
|
1824
|
+
baseId: g,
|
|
1825
|
+
query: n,
|
|
1826
|
+
onQueryChange: r,
|
|
1827
|
+
placeholder: i,
|
|
1828
|
+
groups: a,
|
|
1829
|
+
loading: o,
|
|
1830
|
+
emptyText: c,
|
|
1831
|
+
footer: l,
|
|
1832
|
+
ariaLabel: u,
|
|
1833
|
+
highlight: d,
|
|
1834
|
+
onClose: t,
|
|
1835
|
+
rest: m
|
|
1836
|
+
})
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
function Pt({ baseId: e, query: t, onQueryChange: n, placeholder: r, groups: i, loading: a, emptyText: s, footer: c, ariaLabel: u, highlight: f, onClose: p, rest: m }) {
|
|
1840
|
+
let h = d(null), g = `${e}-list`, _ = i.filter((e) => e.items?.length), v = !a && t.trim() !== "" && _.length === 0;
|
|
1841
|
+
return l(() => {
|
|
1842
|
+
h.current?.refresh?.();
|
|
1843
|
+
}), o(() => {
|
|
1844
|
+
let e = h.current, t = (e) => {
|
|
1845
|
+
let t = i.find((t) => String(t.key) === e.detail.groupKey)?.items?.find((t) => String(t.key) === e.detail.key);
|
|
1846
|
+
t && (e.preventDefault(), t.onSelect?.(), p?.());
|
|
1847
|
+
};
|
|
1848
|
+
return e.addEventListener("wui-command-palette:select", t), () => e.removeEventListener("wui-command-palette:select", t);
|
|
1849
|
+
}, [i, p]), /* @__PURE__ */ D("wui-command-palette", {
|
|
1850
|
+
ref: h,
|
|
1851
|
+
...m,
|
|
1852
|
+
children: [
|
|
1853
|
+
/* @__PURE__ */ D("div", {
|
|
1854
|
+
className: "wui-cmd-search",
|
|
1855
|
+
children: [
|
|
1856
|
+
/* @__PURE__ */ E("span", {
|
|
1857
|
+
className: "wui-cmd-search-icon",
|
|
1858
|
+
"aria-hidden": "true",
|
|
1859
|
+
children: /* @__PURE__ */ E(Y, {
|
|
1860
|
+
name: "search",
|
|
1861
|
+
size: 18
|
|
1862
|
+
})
|
|
1863
|
+
}),
|
|
1864
|
+
/* @__PURE__ */ E("input", {
|
|
1865
|
+
className: "wui-cmd-input",
|
|
1866
|
+
type: "text",
|
|
1867
|
+
role: "combobox",
|
|
1868
|
+
"aria-expanded": "true",
|
|
1869
|
+
"aria-controls": g,
|
|
1870
|
+
"aria-autocomplete": "list",
|
|
1871
|
+
"aria-label": u,
|
|
1872
|
+
placeholder: r,
|
|
1873
|
+
autoComplete: "off",
|
|
1874
|
+
spellCheck: !1,
|
|
1875
|
+
"data-autofocus": "",
|
|
1876
|
+
value: t,
|
|
1877
|
+
onChange: (e) => n?.(e.target.value)
|
|
1878
|
+
}),
|
|
1879
|
+
a && /* @__PURE__ */ E(He, {
|
|
1880
|
+
size: "sm",
|
|
1881
|
+
className: "wui-cmd-spinner"
|
|
1882
|
+
})
|
|
1883
|
+
]
|
|
1884
|
+
}),
|
|
1885
|
+
/* @__PURE__ */ E("div", {
|
|
1886
|
+
className: "wui-cmd-list",
|
|
1887
|
+
role: "listbox",
|
|
1888
|
+
id: g,
|
|
1889
|
+
"aria-label": "Results",
|
|
1890
|
+
"aria-busy": a ? "true" : void 0,
|
|
1891
|
+
hidden: _.length === 0,
|
|
1892
|
+
children: _.map((n) => {
|
|
1893
|
+
let r = `${e}-${It(n.key)}`;
|
|
1894
|
+
return /* @__PURE__ */ D("div", {
|
|
1895
|
+
className: "wui-cmd-group",
|
|
1896
|
+
role: "group",
|
|
1897
|
+
"aria-labelledby": r,
|
|
1898
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1899
|
+
className: "wui-cmd-group-label",
|
|
1900
|
+
role: "presentation",
|
|
1901
|
+
id: r,
|
|
1902
|
+
children: n.label
|
|
1903
|
+
}), n.items.map((e) => /* @__PURE__ */ D("div", {
|
|
1904
|
+
className: "wui-cmd-item",
|
|
1905
|
+
role: "option",
|
|
1906
|
+
id: `${r}-${It(e.key)}`,
|
|
1907
|
+
"data-group-key": String(n.key),
|
|
1908
|
+
"data-key": String(e.key),
|
|
1909
|
+
children: [
|
|
1910
|
+
e.icon != null && /* @__PURE__ */ E("span", {
|
|
1911
|
+
className: "wui-cmd-item-icon",
|
|
1912
|
+
"aria-hidden": "true",
|
|
1913
|
+
children: X(e.icon, { size: 18 })
|
|
1914
|
+
}),
|
|
1915
|
+
/* @__PURE__ */ D("span", {
|
|
1916
|
+
className: "wui-cmd-item-text",
|
|
1917
|
+
children: [/* @__PURE__ */ E("span", {
|
|
1918
|
+
className: "wui-cmd-item-label",
|
|
1919
|
+
children: f ? Ft(e.label, t) : e.label
|
|
1920
|
+
}), e.description != null && /* @__PURE__ */ E("span", {
|
|
1921
|
+
className: "wui-cmd-item-desc",
|
|
1922
|
+
children: e.description
|
|
1923
|
+
})]
|
|
1924
|
+
}),
|
|
1925
|
+
e.meta != null && /* @__PURE__ */ E("span", {
|
|
1926
|
+
className: "wui-cmd-item-meta",
|
|
1927
|
+
children: e.meta
|
|
1928
|
+
})
|
|
1929
|
+
]
|
|
1930
|
+
}, e.key))]
|
|
1931
|
+
}, n.key);
|
|
1932
|
+
})
|
|
1933
|
+
}),
|
|
1934
|
+
/* @__PURE__ */ E("div", {
|
|
1935
|
+
className: "wui-cmd-empty",
|
|
1936
|
+
role: "status",
|
|
1937
|
+
children: v ? s : null
|
|
1938
|
+
}),
|
|
1939
|
+
c != null && /* @__PURE__ */ E("div", {
|
|
1940
|
+
className: "wui-cmd-footer",
|
|
1941
|
+
children: c
|
|
1942
|
+
})
|
|
1943
|
+
]
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
function Ft(e, n) {
|
|
1947
|
+
if (typeof e != "string") return e;
|
|
1948
|
+
let r = I(e, n);
|
|
1949
|
+
if (r.length === 1 && !r[0].match) return e;
|
|
1950
|
+
let i = 0;
|
|
1951
|
+
return r.map((e) => {
|
|
1952
|
+
let n = i;
|
|
1953
|
+
return i += e.text.length, e.match ? /* @__PURE__ */ E("mark", {
|
|
1954
|
+
className: "wui-cmd-mark",
|
|
1955
|
+
children: e.text
|
|
1956
|
+
}, n) : /* @__PURE__ */ E(t, { children: e.text }, n);
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
function It(e) {
|
|
1960
|
+
return String(e).replace(/\s+/g, "_");
|
|
1961
|
+
}
|
|
1962
|
+
//#endregion
|
|
1701
1963
|
//#region src/lib/emptyValue.js
|
|
1702
|
-
function
|
|
1964
|
+
function Lt(e) {
|
|
1703
1965
|
return e == null || e === "";
|
|
1704
1966
|
}
|
|
1705
1967
|
//#endregion
|
|
1706
1968
|
//#region src/components/AppCompareTable.jsx
|
|
1707
|
-
function
|
|
1708
|
-
|
|
1969
|
+
function Rt({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
1970
|
+
W("AppCompareTable", i);
|
|
1709
1971
|
let a = (e) => e === !0 ? /* @__PURE__ */ E("span", {
|
|
1710
1972
|
className: "compare-yes",
|
|
1711
1973
|
children: /* @__PURE__ */ E(Y, {
|
|
@@ -1741,66 +2003,66 @@ function St({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
1741
2003
|
}
|
|
1742
2004
|
//#endregion
|
|
1743
2005
|
//#region src/components/AppInput.jsx
|
|
1744
|
-
var
|
|
1745
|
-
|
|
1746
|
-
let [R, z] = f(!1),
|
|
1747
|
-
|
|
1748
|
-
},
|
|
2006
|
+
var zt = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: u, rightIcon: p, onRightIconClick: m, rightIconLabel: h, unit: g, id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: O, suffix: k, action: A, floatingLabel: j = !1, variant: M, passwordRequirements: P = !1, requirementsPlacement: F = "auto", ...I }, L) {
|
|
2007
|
+
W("AppInput", I);
|
|
2008
|
+
let [R, z] = f(!1), B = s(), V = _ || B, H = c === "password", ee = H && R ? "text" : c, U = d(null), te = (e) => {
|
|
2009
|
+
U.current = e, typeof L == "function" ? L(e) : L && (L.current = e);
|
|
2010
|
+
}, ne = String(I.value ?? I.defaultValue ?? ""), [re, ie] = f(() => !!ne), [ae, oe] = f(() => ne.length), G = C && !S, se = C || w, K = H && !!P, [ce, q] = f(ne);
|
|
1749
2011
|
o(() => {
|
|
1750
|
-
!
|
|
1751
|
-
}, [I.value,
|
|
1752
|
-
if (!
|
|
2012
|
+
!K || I.value === void 0 || q(String(I.value ?? ""));
|
|
2013
|
+
}, [I.value, K]), o(() => {
|
|
2014
|
+
if (!se || I.value === void 0) return;
|
|
1753
2015
|
let e = String(I.value ?? "");
|
|
1754
|
-
|
|
1755
|
-
}, [I.value,
|
|
1756
|
-
let
|
|
1757
|
-
|
|
1758
|
-
},
|
|
1759
|
-
|
|
1760
|
-
},
|
|
2016
|
+
ie(!!e), oe(e.length);
|
|
2017
|
+
}, [I.value, se]);
|
|
2018
|
+
let le = (e) => {
|
|
2019
|
+
ie(!!e.target.value), oe(e.target.value.length), I.onInput?.(e);
|
|
2020
|
+
}, ue = (e) => {
|
|
2021
|
+
K && q(e.target.value), se ? le(e) : I.onInput?.(e);
|
|
2022
|
+
}, de = G ? /* @__PURE__ */ E("button", {
|
|
1761
2023
|
type: "button",
|
|
1762
2024
|
className: "input-clear",
|
|
1763
2025
|
onClick: () => {
|
|
1764
|
-
let e =
|
|
2026
|
+
let e = U.current;
|
|
1765
2027
|
if (!e) return;
|
|
1766
2028
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
1767
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
2029
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
|
|
1768
2030
|
},
|
|
1769
2031
|
"aria-label": "Clear",
|
|
1770
2032
|
tabIndex: -1,
|
|
1771
|
-
hidden: !
|
|
2033
|
+
hidden: !re,
|
|
1772
2034
|
children: /* @__PURE__ */ E(Y, {
|
|
1773
2035
|
name: "x",
|
|
1774
2036
|
size: 16
|
|
1775
2037
|
})
|
|
1776
|
-
}) : null,
|
|
2038
|
+
}) : null, fe = n && V ? `${V}-error` : void 0, pe = r && V ? `${V}-hint` : void 0, me = fe || pe, he = [
|
|
1777
2039
|
"input",
|
|
1778
2040
|
l === "sm" ? "input-sm" : "",
|
|
1779
2041
|
l === "lg" ? "input-lg" : "",
|
|
1780
2042
|
n ? "error" : "",
|
|
1781
|
-
|
|
2043
|
+
H ? "pw" : "",
|
|
1782
2044
|
g ? "num-input" : "",
|
|
1783
|
-
!(j && e || O || k || g ||
|
|
2045
|
+
!(j && e || O || k || g || H || p) && C && G ? "has-clear" : "",
|
|
1784
2046
|
M === "bare" ? "input-bare" : "",
|
|
1785
2047
|
b
|
|
1786
|
-
].filter(Boolean).join(" "),
|
|
1787
|
-
id:
|
|
2048
|
+
].filter(Boolean).join(" "), J = /* @__PURE__ */ E(y.Control, {
|
|
2049
|
+
id: V,
|
|
1788
2050
|
name: v,
|
|
1789
|
-
type:
|
|
1790
|
-
className:
|
|
2051
|
+
type: ee,
|
|
2052
|
+
className: he,
|
|
1791
2053
|
disabled: S,
|
|
1792
2054
|
required: t,
|
|
1793
2055
|
"aria-invalid": n ? "true" : "false",
|
|
1794
|
-
"aria-describedby":
|
|
2056
|
+
"aria-describedby": me,
|
|
1795
2057
|
maxLength: T,
|
|
1796
2058
|
...I,
|
|
1797
2059
|
placeholder: j ? " " : I.placeholder,
|
|
1798
|
-
ref:
|
|
1799
|
-
onInput:
|
|
1800
|
-
}),
|
|
2060
|
+
ref: te,
|
|
2061
|
+
onInput: se || K ? ue : I.onInput
|
|
2062
|
+
}), ge = P === !0 || P, _e = ge && typeof ge == "object" && ge.title || "Password Requirements", ve = K ? N(ce, ge) : null, ye = K ? /* @__PURE__ */ E("ul", {
|
|
1801
2063
|
className: "pw-criteria",
|
|
1802
2064
|
"aria-live": "polite",
|
|
1803
|
-
children:
|
|
2065
|
+
children: ve.map((e) => /* @__PURE__ */ D("li", {
|
|
1804
2066
|
className: `pw-rule ${e.met ? "met" : "unmet"}`,
|
|
1805
2067
|
children: [
|
|
1806
2068
|
/* @__PURE__ */ E("span", {
|
|
@@ -1817,16 +2079,16 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1817
2079
|
})
|
|
1818
2080
|
]
|
|
1819
2081
|
}, e.key))
|
|
1820
|
-
}) : null,
|
|
1821
|
-
if (j && e)
|
|
2082
|
+
}) : null, be;
|
|
2083
|
+
if (j && e) be = /* @__PURE__ */ D("div", {
|
|
1822
2084
|
className: "field-float",
|
|
1823
|
-
children: [
|
|
2085
|
+
children: [J, /* @__PURE__ */ D("label", {
|
|
1824
2086
|
className: "float-label",
|
|
1825
|
-
htmlFor:
|
|
2087
|
+
htmlFor: V,
|
|
1826
2088
|
children: [e, t && /* @__PURE__ */ E(Z, {})]
|
|
1827
2089
|
})]
|
|
1828
2090
|
});
|
|
1829
|
-
else if (A)
|
|
2091
|
+
else if (A) be = /* @__PURE__ */ D("div", {
|
|
1830
2092
|
className: "input-action-row",
|
|
1831
2093
|
children: [/* @__PURE__ */ D("div", {
|
|
1832
2094
|
className: u ? "input-icon" : "input-wrap",
|
|
@@ -1836,34 +2098,34 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1836
2098
|
name: u,
|
|
1837
2099
|
size: 16
|
|
1838
2100
|
})
|
|
1839
|
-
}),
|
|
2101
|
+
}), J]
|
|
1840
2102
|
}), /* @__PURE__ */ E("div", {
|
|
1841
2103
|
className: "input-action",
|
|
1842
2104
|
children: A
|
|
1843
2105
|
})]
|
|
1844
2106
|
});
|
|
1845
|
-
else if (O || k)
|
|
2107
|
+
else if (O || k) be = /* @__PURE__ */ D("div", {
|
|
1846
2108
|
className: "input-affixed",
|
|
1847
2109
|
children: [
|
|
1848
2110
|
O != null && /* @__PURE__ */ E("span", {
|
|
1849
2111
|
className: "affix affix-pre",
|
|
1850
2112
|
children: O
|
|
1851
2113
|
}),
|
|
1852
|
-
|
|
2114
|
+
J,
|
|
1853
2115
|
k != null && /* @__PURE__ */ E("span", {
|
|
1854
2116
|
className: "affix affix-suf",
|
|
1855
2117
|
children: k
|
|
1856
2118
|
})
|
|
1857
2119
|
]
|
|
1858
2120
|
});
|
|
1859
|
-
else if (g)
|
|
2121
|
+
else if (g) be = /* @__PURE__ */ D("div", {
|
|
1860
2122
|
className: "input-with-unit",
|
|
1861
|
-
children: [
|
|
2123
|
+
children: [J, /* @__PURE__ */ E("span", {
|
|
1862
2124
|
className: "unit",
|
|
1863
2125
|
children: g
|
|
1864
2126
|
})]
|
|
1865
2127
|
});
|
|
1866
|
-
else if (
|
|
2128
|
+
else if (H) {
|
|
1867
2129
|
let e = /* @__PURE__ */ D("div", {
|
|
1868
2130
|
className: u ? "input-icon" : "input-wrap",
|
|
1869
2131
|
children: [
|
|
@@ -1874,7 +2136,7 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1874
2136
|
size: 16
|
|
1875
2137
|
})
|
|
1876
2138
|
}),
|
|
1877
|
-
|
|
2139
|
+
J,
|
|
1878
2140
|
/* @__PURE__ */ D("button", {
|
|
1879
2141
|
type: "button",
|
|
1880
2142
|
className: `pw-toggle${R ? " pw-revealed" : ""}`,
|
|
@@ -1893,17 +2155,17 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1893
2155
|
})
|
|
1894
2156
|
]
|
|
1895
2157
|
});
|
|
1896
|
-
|
|
2158
|
+
be = K ? /* @__PURE__ */ E(Ge, {
|
|
1897
2159
|
trigger: e,
|
|
1898
2160
|
triggerType: "focus",
|
|
1899
2161
|
placement: F,
|
|
1900
|
-
title:
|
|
2162
|
+
title: _e,
|
|
1901
2163
|
className: "pw-popover",
|
|
1902
|
-
children:
|
|
2164
|
+
children: ye
|
|
1903
2165
|
}) : e;
|
|
1904
|
-
} else
|
|
2166
|
+
} else be = p ? /* @__PURE__ */ D("div", {
|
|
1905
2167
|
className: "input-wrap",
|
|
1906
|
-
children: [
|
|
2168
|
+
children: [J, /* @__PURE__ */ E("button", {
|
|
1907
2169
|
type: "button",
|
|
1908
2170
|
className: "pw-toggle",
|
|
1909
2171
|
onClick: m,
|
|
@@ -1925,8 +2187,8 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1925
2187
|
size: 16
|
|
1926
2188
|
})
|
|
1927
2189
|
}),
|
|
1928
|
-
|
|
1929
|
-
|
|
2190
|
+
J,
|
|
2191
|
+
de
|
|
1930
2192
|
]
|
|
1931
2193
|
}) : u ? /* @__PURE__ */ D("div", {
|
|
1932
2194
|
className: "input-icon",
|
|
@@ -1936,196 +2198,85 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1936
2198
|
name: u,
|
|
1937
2199
|
size: 16
|
|
1938
2200
|
})
|
|
1939
|
-
}),
|
|
1940
|
-
}) :
|
|
2201
|
+
}), J]
|
|
2202
|
+
}) : J;
|
|
1941
2203
|
return /* @__PURE__ */ D(y.Group, {
|
|
1942
2204
|
className: `field${x ? ` ${x}` : ""}`,
|
|
1943
2205
|
children: [
|
|
1944
2206
|
e && !j && /* @__PURE__ */ D(y.Label, {
|
|
1945
2207
|
className: "label",
|
|
1946
|
-
htmlFor:
|
|
2208
|
+
htmlFor: V,
|
|
1947
2209
|
children: [
|
|
1948
2210
|
e,
|
|
1949
2211
|
t && /* @__PURE__ */ E(Z, {}),
|
|
1950
|
-
i && /* @__PURE__ */ E(
|
|
2212
|
+
i && /* @__PURE__ */ E(qe, {
|
|
1951
2213
|
label: a,
|
|
1952
2214
|
children: i
|
|
1953
2215
|
})
|
|
1954
2216
|
]
|
|
1955
2217
|
}),
|
|
1956
|
-
|
|
2218
|
+
be,
|
|
1957
2219
|
n ? /* @__PURE__ */ E("div", {
|
|
1958
2220
|
className: "field-error",
|
|
1959
|
-
id:
|
|
2221
|
+
id: fe,
|
|
1960
2222
|
children: n
|
|
1961
2223
|
}) : r ? /* @__PURE__ */ E("div", {
|
|
1962
2224
|
className: "field-hint",
|
|
1963
|
-
id:
|
|
2225
|
+
id: pe,
|
|
1964
2226
|
children: r
|
|
1965
2227
|
}) : null,
|
|
1966
2228
|
w && /* @__PURE__ */ D("div", {
|
|
1967
|
-
className: `field-count${T &&
|
|
1968
|
-
children: [
|
|
2229
|
+
className: `field-count${T && ae >= T ? " at-limit" : ""}`,
|
|
2230
|
+
children: [ae, T ? ` / ${T}` : ""]
|
|
1969
2231
|
})
|
|
1970
2232
|
]
|
|
1971
2233
|
});
|
|
1972
|
-
}),
|
|
1973
|
-
sm: 380,
|
|
1974
|
-
md: 440,
|
|
1975
|
-
lg: 640,
|
|
1976
|
-
xl: 880
|
|
1977
|
-
}, Et = !1;
|
|
1978
|
-
function Dt() {
|
|
1979
|
-
let e = !0;
|
|
1980
|
-
try {
|
|
1981
|
-
e = process.env.NODE_ENV !== "production";
|
|
1982
|
-
} catch {
|
|
1983
|
-
e = !0;
|
|
1984
|
-
}
|
|
1985
|
-
!e || Et || (Et = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
1986
|
-
}
|
|
1987
|
-
function Ot({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: u = "md", placement: f = "center", hideHeader: p = !1, staticBackdrop: m = !1, ariaLabel: h, className: g = "", children: _, ...v }) {
|
|
1988
|
-
U("AppModal", v), W("AppModal", "size", typeof u == "string" ? u : null, Object.keys(Tt));
|
|
1989
|
-
let { style: y, ...x } = v;
|
|
1990
|
-
p && !h && typeof n != "string" && Dt();
|
|
1991
|
-
let S = d(null);
|
|
1992
|
-
o(() => {
|
|
1993
|
-
if (!e) return;
|
|
1994
|
-
let t = S.current?.closest(".modal-content");
|
|
1995
|
-
if (!t) return;
|
|
1996
|
-
let n = () => Array.from(t.querySelectorAll(wt));
|
|
1997
|
-
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
1998
|
-
}, [e]);
|
|
1999
|
-
let C = typeof u == "number" ? u : Tt[u] ?? Tt.md, w = [
|
|
2000
|
-
"wui-modal",
|
|
2001
|
-
a === "default" ? "" : `tone-${a}`,
|
|
2002
|
-
g
|
|
2003
|
-
].filter(Boolean).join(" ");
|
|
2004
|
-
return /* @__PURE__ */ D(b, {
|
|
2005
|
-
...x,
|
|
2006
|
-
show: e,
|
|
2007
|
-
onHide: c,
|
|
2008
|
-
backdrop: !m || "static",
|
|
2009
|
-
keyboard: !m,
|
|
2010
|
-
autoFocus: !1,
|
|
2011
|
-
enforceFocus: !0,
|
|
2012
|
-
restoreFocus: !0,
|
|
2013
|
-
centered: f !== "top",
|
|
2014
|
-
className: "wui-modal-shell",
|
|
2015
|
-
style: {
|
|
2016
|
-
"--wui-modal-max-width": `${C}px`,
|
|
2017
|
-
...y
|
|
2018
|
-
},
|
|
2019
|
-
dialogClassName: "wui-rb-dialog",
|
|
2020
|
-
contentClassName: w,
|
|
2021
|
-
backdropClassName: "wui-modal-dim",
|
|
2022
|
-
"aria-label": h || (typeof n == "string" ? n : void 0),
|
|
2023
|
-
children: [
|
|
2024
|
-
!p && /* @__PURE__ */ D("div", {
|
|
2025
|
-
className: "wui-modal-header",
|
|
2026
|
-
children: [/* @__PURE__ */ D("div", {
|
|
2027
|
-
className: "wui-modal-heading",
|
|
2028
|
-
children: [i && /* @__PURE__ */ E("span", {
|
|
2029
|
-
className: "wui-modal-headicon",
|
|
2030
|
-
children: /* @__PURE__ */ E(Y, {
|
|
2031
|
-
name: i,
|
|
2032
|
-
size: 18
|
|
2033
|
-
})
|
|
2034
|
-
}), /* @__PURE__ */ D("div", {
|
|
2035
|
-
className: "wui-modal-headtext",
|
|
2036
|
-
children: [
|
|
2037
|
-
t && /* @__PURE__ */ E("div", {
|
|
2038
|
-
className: "wui-modal-eyebrow",
|
|
2039
|
-
children: t
|
|
2040
|
-
}),
|
|
2041
|
-
/* @__PURE__ */ E("div", {
|
|
2042
|
-
className: "wui-modal-title",
|
|
2043
|
-
children: n
|
|
2044
|
-
}),
|
|
2045
|
-
r && /* @__PURE__ */ E("div", {
|
|
2046
|
-
className: "wui-modal-subtitle",
|
|
2047
|
-
children: r
|
|
2048
|
-
})
|
|
2049
|
-
]
|
|
2050
|
-
})]
|
|
2051
|
-
}), s && /* @__PURE__ */ E("button", {
|
|
2052
|
-
type: "button",
|
|
2053
|
-
className: "wui-modal-close",
|
|
2054
|
-
onClick: c,
|
|
2055
|
-
"aria-label": "Close",
|
|
2056
|
-
children: /* @__PURE__ */ E("svg", {
|
|
2057
|
-
width: "18",
|
|
2058
|
-
height: "18",
|
|
2059
|
-
viewBox: "0 0 24 24",
|
|
2060
|
-
fill: "none",
|
|
2061
|
-
stroke: "currentColor",
|
|
2062
|
-
strokeWidth: "2",
|
|
2063
|
-
strokeLinecap: "round",
|
|
2064
|
-
strokeLinejoin: "round",
|
|
2065
|
-
"aria-hidden": "true",
|
|
2066
|
-
children: /* @__PURE__ */ E("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
2067
|
-
})
|
|
2068
|
-
})]
|
|
2069
|
-
}),
|
|
2070
|
-
/* @__PURE__ */ E("div", {
|
|
2071
|
-
className: "wui-modal-body",
|
|
2072
|
-
ref: S,
|
|
2073
|
-
children: _
|
|
2074
|
-
}),
|
|
2075
|
-
l && /* @__PURE__ */ E("div", {
|
|
2076
|
-
className: "wui-modal-footer",
|
|
2077
|
-
children: l
|
|
2078
|
-
})
|
|
2079
|
-
]
|
|
2080
|
-
});
|
|
2081
|
-
}
|
|
2082
|
-
//#endregion
|
|
2083
|
-
//#region src/components/ModalIcons.jsx
|
|
2084
|
-
var kt = (e) => function({ size: t = 72 }) {
|
|
2234
|
+
}), Bt = (e) => function({ size: t = 72 }) {
|
|
2085
2235
|
return /* @__PURE__ */ E("wui-status-icon", {
|
|
2086
2236
|
tone: e,
|
|
2087
2237
|
size: t
|
|
2088
2238
|
});
|
|
2089
|
-
},
|
|
2090
|
-
success:
|
|
2091
|
-
error:
|
|
2092
|
-
warning:
|
|
2093
|
-
info:
|
|
2094
|
-
delete:
|
|
2239
|
+
}, Vt = {
|
|
2240
|
+
success: Bt("success"),
|
|
2241
|
+
error: Bt("error"),
|
|
2242
|
+
warning: Bt("warning"),
|
|
2243
|
+
info: Bt("info"),
|
|
2244
|
+
delete: Bt("delete"),
|
|
2245
|
+
primary: Bt("primary")
|
|
2095
2246
|
};
|
|
2096
2247
|
//#endregion
|
|
2097
2248
|
//#region src/components/AppConfirmDialog.jsx
|
|
2098
|
-
function
|
|
2099
|
-
|
|
2100
|
-
let [
|
|
2249
|
+
function Ht({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, image: c, iconSize: l, confirmPhrase: u, onConfirm: d, onClose: p, loading: m = !1, staticBackdrop: h = !1, placement: g = "center", size: _ = "md", className: v = "", ...y }) {
|
|
2250
|
+
W("AppConfirmDialog", y);
|
|
2251
|
+
let [b, x] = f("");
|
|
2101
2252
|
if (o(() => {
|
|
2102
|
-
e ||
|
|
2253
|
+
e || x("");
|
|
2103
2254
|
}, [e]), !e) return null;
|
|
2104
|
-
let
|
|
2105
|
-
|
|
2255
|
+
let S = !!u && b.trim() !== u, C = c ? null : Vt[s || (a ? "delete" : "info")], w = l > 0 ? { "--wui-confirm-icon-size": `${l}px` } : void 0, O = () => {
|
|
2256
|
+
m || p?.();
|
|
2106
2257
|
};
|
|
2107
|
-
return /* @__PURE__ */ E(
|
|
2108
|
-
...
|
|
2258
|
+
return /* @__PURE__ */ E(jt, {
|
|
2259
|
+
...y,
|
|
2109
2260
|
open: e,
|
|
2110
2261
|
hideHeader: !0,
|
|
2111
2262
|
title: t,
|
|
2112
|
-
onClose:
|
|
2113
|
-
staticBackdrop:
|
|
2114
|
-
placement:
|
|
2115
|
-
size:
|
|
2116
|
-
className: ["wui-confirm",
|
|
2263
|
+
onClose: O,
|
|
2264
|
+
staticBackdrop: h,
|
|
2265
|
+
placement: g,
|
|
2266
|
+
size: _,
|
|
2267
|
+
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
2117
2268
|
footer: /* @__PURE__ */ D("div", {
|
|
2118
2269
|
className: "wui-confirm-actions",
|
|
2119
|
-
children: [/* @__PURE__ */ E(
|
|
2270
|
+
children: [/* @__PURE__ */ E(Be, {
|
|
2120
2271
|
variant: "secondary",
|
|
2121
|
-
disabled:
|
|
2122
|
-
onClick:
|
|
2272
|
+
disabled: m,
|
|
2273
|
+
onClick: O,
|
|
2123
2274
|
children: i
|
|
2124
|
-
}), /* @__PURE__ */ E(
|
|
2275
|
+
}), /* @__PURE__ */ E(Be, {
|
|
2125
2276
|
variant: a ? "danger" : "primary",
|
|
2126
|
-
disabled:
|
|
2127
|
-
loading:
|
|
2128
|
-
onClick:
|
|
2277
|
+
disabled: S,
|
|
2278
|
+
loading: m,
|
|
2279
|
+
onClick: d,
|
|
2129
2280
|
children: r
|
|
2130
2281
|
})]
|
|
2131
2282
|
}),
|
|
@@ -2134,14 +2285,16 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2134
2285
|
children: [
|
|
2135
2286
|
c ? /* @__PURE__ */ E("span", {
|
|
2136
2287
|
className: "wui-confirm-icon",
|
|
2288
|
+
style: w,
|
|
2137
2289
|
children: /* @__PURE__ */ E("img", {
|
|
2138
2290
|
src: c,
|
|
2139
2291
|
alt: "",
|
|
2140
2292
|
"aria-hidden": "true"
|
|
2141
2293
|
})
|
|
2142
|
-
}) :
|
|
2294
|
+
}) : C && /* @__PURE__ */ E("span", {
|
|
2143
2295
|
className: "wui-confirm-icon",
|
|
2144
|
-
|
|
2296
|
+
style: w,
|
|
2297
|
+
children: /* @__PURE__ */ E(C, { size: 120 })
|
|
2145
2298
|
}),
|
|
2146
2299
|
/* @__PURE__ */ E("h3", {
|
|
2147
2300
|
className: "wui-confirm-title",
|
|
@@ -2153,17 +2306,17 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2153
2306
|
className: "wui-confirm-msg",
|
|
2154
2307
|
children: n
|
|
2155
2308
|
}),
|
|
2156
|
-
|
|
2309
|
+
u && /* @__PURE__ */ E(zt, {
|
|
2157
2310
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2158
2311
|
label: /* @__PURE__ */ D(T, { children: [
|
|
2159
2312
|
"Type ",
|
|
2160
|
-
/* @__PURE__ */ E("strong", { children:
|
|
2313
|
+
/* @__PURE__ */ E("strong", { children: u }),
|
|
2161
2314
|
" to confirm"
|
|
2162
2315
|
] }),
|
|
2163
|
-
value:
|
|
2164
|
-
onChange: (e) =>
|
|
2165
|
-
"aria-label": `Type ${
|
|
2166
|
-
disabled:
|
|
2316
|
+
value: b,
|
|
2317
|
+
onChange: (e) => x(e.target.value),
|
|
2318
|
+
"aria-label": `Type ${u} to confirm`,
|
|
2319
|
+
disabled: m
|
|
2167
2320
|
})
|
|
2168
2321
|
]
|
|
2169
2322
|
})
|
|
@@ -2171,16 +2324,16 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2171
2324
|
}
|
|
2172
2325
|
//#endregion
|
|
2173
2326
|
//#region src/components/AppConsentBanner.jsx
|
|
2174
|
-
var
|
|
2175
|
-
function
|
|
2176
|
-
|
|
2327
|
+
var Ut = ["bottom-left", "bottom-right"];
|
|
2328
|
+
function Wt({ heading: e, description: t, policyHref: n, policyLabel: r, analyticsDescription: i, functionalDescription: a, marketingDescription: s, position: c = "bottom-left", standalone: l = !1, className: u = "", style: d, ...f }) {
|
|
2329
|
+
W("AppConsentBanner", f), G("AppConsentBanner", "position", c, Ut);
|
|
2177
2330
|
let { setRef: p, innerRef: m } = Q({ on: { "wui-consent-save": (e) => {
|
|
2178
|
-
|
|
2331
|
+
z(e.detail), m.current && (m.current.preferences = R());
|
|
2179
2332
|
} } });
|
|
2180
2333
|
return o(() => {
|
|
2181
2334
|
let e = m.current;
|
|
2182
2335
|
if (!e) return;
|
|
2183
|
-
let t =
|
|
2336
|
+
let t = R();
|
|
2184
2337
|
e.preferences = t, t.decided || e.open();
|
|
2185
2338
|
}, [m]), /* @__PURE__ */ E("wui-consent-banner", {
|
|
2186
2339
|
ref: p,
|
|
@@ -2200,26 +2353,26 @@ function Nt({ heading: e, description: t, policyHref: n, policyLabel: r, analyti
|
|
|
2200
2353
|
}
|
|
2201
2354
|
//#endregion
|
|
2202
2355
|
//#region src/components/AppCopyButton.jsx
|
|
2203
|
-
var
|
|
2356
|
+
var Gt = {
|
|
2204
2357
|
sm: 14,
|
|
2205
2358
|
md: 16,
|
|
2206
2359
|
lg: 20
|
|
2207
2360
|
};
|
|
2208
|
-
function
|
|
2209
|
-
|
|
2361
|
+
function Kt({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: s = "ghost", onCopied: c, className: l = "", tooltip: u, tooltipPlacement: p, ...m }) {
|
|
2362
|
+
W("AppCopyButton", m), G("AppCopyButton", "size", i, Object.keys(Gt));
|
|
2210
2363
|
let [h, g] = f(!1), _ = d(null);
|
|
2211
2364
|
o(() => () => clearTimeout(_.current), []);
|
|
2212
2365
|
let v = a(async () => {
|
|
2213
2366
|
await M(e) && (g(!0), clearTimeout(_.current), _.current = setTimeout(() => g(!1), O), c?.());
|
|
2214
2367
|
}, [e, c]), y = h ? n : t, b = h ? "check" : "files";
|
|
2215
|
-
return
|
|
2368
|
+
return q(r ? /* @__PURE__ */ E(je, {
|
|
2216
2369
|
icon: b,
|
|
2217
2370
|
label: y,
|
|
2218
|
-
size:
|
|
2371
|
+
size: Gt[i] ?? Gt.md,
|
|
2219
2372
|
onClick: v,
|
|
2220
2373
|
className: l,
|
|
2221
2374
|
...m
|
|
2222
|
-
}) : /* @__PURE__ */ E(
|
|
2375
|
+
}) : /* @__PURE__ */ E(Be, {
|
|
2223
2376
|
leftIcon: b,
|
|
2224
2377
|
variant: s,
|
|
2225
2378
|
size: i,
|
|
@@ -2231,9 +2384,75 @@ function Ft({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
2231
2384
|
}), u, p);
|
|
2232
2385
|
}
|
|
2233
2386
|
//#endregion
|
|
2387
|
+
//#region src/components/AppCountrySelect.jsx
|
|
2388
|
+
var qt = [
|
|
2389
|
+
"sm",
|
|
2390
|
+
"md",
|
|
2391
|
+
"lg"
|
|
2392
|
+
], Jt = i(function({ value: e, onChange: t, countries: n, placeholder: r = "Select country", searchPlaceholder: i = "Search countries...", searchable: a = !0, clearable: o = !1, size: c = "md", floatingLabel: l = !1, disabled: u, label: d, required: f = !1, error: p, hint: m, help: h, helpLabel: g = "More information", id: _, name: v, className: y = "", fieldClassName: b = "", "aria-label": x, "aria-labelledby": S, "aria-describedby": C, ...w }, T) {
|
|
2393
|
+
W("AppCountrySelect", w), G("AppCountrySelect", "size", c, qt);
|
|
2394
|
+
let O = s(), { setRef: k } = Q({
|
|
2395
|
+
ref: T,
|
|
2396
|
+
value: e ?? "",
|
|
2397
|
+
onChange: t
|
|
2398
|
+
}), A = _ || O, j = l && d, M = p && A ? `${A}-error` : void 0, N = m && A ? `${A}-hint` : void 0, P = /* @__PURE__ */ E("wui-country-select", {
|
|
2399
|
+
"aria-label": x || (typeof d == "string" ? d : void 0),
|
|
2400
|
+
"aria-labelledby": S || void 0,
|
|
2401
|
+
"aria-describedby": M || N || C || void 0,
|
|
2402
|
+
"aria-invalid": p ? "true" : void 0,
|
|
2403
|
+
ref: k,
|
|
2404
|
+
id: A,
|
|
2405
|
+
name: v,
|
|
2406
|
+
countries: Array.isArray(n) ? n.join(",") : void 0,
|
|
2407
|
+
placeholder: j ? " " : r,
|
|
2408
|
+
"search-placeholder": i,
|
|
2409
|
+
searchable: a ? "" : void 0,
|
|
2410
|
+
clearable: o ? "" : void 0,
|
|
2411
|
+
size: c === "sm" || c === "lg" ? c : void 0,
|
|
2412
|
+
disabled: u ? "" : void 0,
|
|
2413
|
+
required: f ? "" : void 0,
|
|
2414
|
+
className: y || void 0,
|
|
2415
|
+
...w
|
|
2416
|
+
});
|
|
2417
|
+
return !d && !p && !m ? P : /* @__PURE__ */ D("div", {
|
|
2418
|
+
className: ["field", b].filter(Boolean).join(" "),
|
|
2419
|
+
children: [
|
|
2420
|
+
d && !j && /* @__PURE__ */ D("label", {
|
|
2421
|
+
className: "label",
|
|
2422
|
+
htmlFor: A,
|
|
2423
|
+
children: [
|
|
2424
|
+
d,
|
|
2425
|
+
f && /* @__PURE__ */ E(Z, {}),
|
|
2426
|
+
h && /* @__PURE__ */ E(qe, {
|
|
2427
|
+
label: g,
|
|
2428
|
+
children: h
|
|
2429
|
+
})
|
|
2430
|
+
]
|
|
2431
|
+
}),
|
|
2432
|
+
j ? /* @__PURE__ */ D("div", {
|
|
2433
|
+
className: "field-float",
|
|
2434
|
+
children: [P, /* @__PURE__ */ D("label", {
|
|
2435
|
+
className: "float-label",
|
|
2436
|
+
htmlFor: A,
|
|
2437
|
+
children: [d, f && /* @__PURE__ */ E(Z, {})]
|
|
2438
|
+
})]
|
|
2439
|
+
}) : P,
|
|
2440
|
+
p ? /* @__PURE__ */ E("div", {
|
|
2441
|
+
className: "field-error",
|
|
2442
|
+
id: M,
|
|
2443
|
+
children: p
|
|
2444
|
+
}) : m ? /* @__PURE__ */ E("div", {
|
|
2445
|
+
className: "field-hint",
|
|
2446
|
+
id: N,
|
|
2447
|
+
children: m
|
|
2448
|
+
}) : null
|
|
2449
|
+
]
|
|
2450
|
+
});
|
|
2451
|
+
});
|
|
2452
|
+
//#endregion
|
|
2234
2453
|
//#region src/components/AppSkeleton.jsx
|
|
2235
|
-
function
|
|
2236
|
-
return
|
|
2454
|
+
function Yt({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
2455
|
+
return W("AppSkeleton", a), /* @__PURE__ */ E("span", {
|
|
2237
2456
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
2238
2457
|
"aria-hidden": "true",
|
|
2239
2458
|
style: {
|
|
@@ -2245,29 +2464,29 @@ function It({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
2245
2464
|
...a
|
|
2246
2465
|
});
|
|
2247
2466
|
}
|
|
2248
|
-
function
|
|
2249
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(
|
|
2467
|
+
function Xt({ rows: e = 4, cols: t = 5 }) {
|
|
2468
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(Yt, {
|
|
2250
2469
|
width: t === 0 ? "70%" : "50%",
|
|
2251
2470
|
height: 12
|
|
2252
2471
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
2253
2472
|
}
|
|
2254
2473
|
//#endregion
|
|
2255
2474
|
//#region src/lib/pageWindow.js
|
|
2256
|
-
var
|
|
2475
|
+
var Zt = (e, t) => {
|
|
2257
2476
|
let n = [];
|
|
2258
2477
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
2259
2478
|
return n;
|
|
2260
2479
|
};
|
|
2261
|
-
function
|
|
2480
|
+
function Qt(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
2262
2481
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
2263
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
2264
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
2265
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
2482
|
+
if (i <= n * 2 + 3 + r * 2) return Zt(1, i);
|
|
2483
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Zt(1, r);
|
|
2484
|
+
return u.push(...c ? ["ellipsis-left"] : Zt(r + 1, o - 1)), u.push(...Zt(o, s)), u.push(...l ? ["ellipsis-right"] : Zt(s + 1, i - r)), u.push(...Zt(i - r + 1, i)), u;
|
|
2266
2485
|
}
|
|
2267
2486
|
//#endregion
|
|
2268
2487
|
//#region src/components/AppSelectMini.jsx
|
|
2269
|
-
function
|
|
2270
|
-
|
|
2488
|
+
function $t({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...p }) {
|
|
2489
|
+
W("AppSelectMini", p);
|
|
2271
2490
|
let { setRef: m, innerRef: h } = Q({
|
|
2272
2491
|
value: e ?? "",
|
|
2273
2492
|
onChange: t
|
|
@@ -2280,7 +2499,7 @@ function Bt({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
2280
2499
|
label: e.label ?? e.text ?? "",
|
|
2281
2500
|
icon: e.icon
|
|
2282
2501
|
}));
|
|
2283
|
-
|
|
2502
|
+
Ze(t, e.options) || (e.options = t);
|
|
2284
2503
|
}, [n, h]), o(() => {
|
|
2285
2504
|
let e = h.current;
|
|
2286
2505
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -2303,22 +2522,22 @@ function Bt({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
2303
2522
|
}
|
|
2304
2523
|
//#endregion
|
|
2305
2524
|
//#region src/components/AppTablePagination.jsx
|
|
2306
|
-
var
|
|
2525
|
+
var en = [
|
|
2307
2526
|
5,
|
|
2308
2527
|
10,
|
|
2309
2528
|
25,
|
|
2310
2529
|
50
|
|
2311
2530
|
];
|
|
2312
|
-
function
|
|
2313
|
-
|
|
2314
|
-
let p = l === "numbered", m = p ?
|
|
2531
|
+
function tn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = en, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
2532
|
+
W("AppTablePagination", f);
|
|
2533
|
+
let p = l === "numbered", m = p ? Qt(e, t) : null;
|
|
2315
2534
|
return /* @__PURE__ */ D("div", {
|
|
2316
2535
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
2317
2536
|
...f,
|
|
2318
2537
|
children: [
|
|
2319
2538
|
u && /* @__PURE__ */ D("span", {
|
|
2320
2539
|
className: "tpg-rows",
|
|
2321
|
-
children: ["Rows per page:", /* @__PURE__ */ E(
|
|
2540
|
+
children: ["Rows per page:", /* @__PURE__ */ E($t, {
|
|
2322
2541
|
value: n,
|
|
2323
2542
|
onChange: (e) => s(Number(e)),
|
|
2324
2543
|
ariaLabel: "Rows per page",
|
|
@@ -2382,14 +2601,14 @@ function Ht({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
2382
2601
|
}
|
|
2383
2602
|
//#endregion
|
|
2384
2603
|
//#region src/components/AppDataTable.jsx
|
|
2385
|
-
function
|
|
2604
|
+
function nn(e) {
|
|
2386
2605
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
2387
2606
|
}
|
|
2388
|
-
function
|
|
2607
|
+
function rn(e) {
|
|
2389
2608
|
return e == null || e === "" ? "-" : typeof e == "boolean" ? String(e) : e;
|
|
2390
2609
|
}
|
|
2391
|
-
function
|
|
2392
|
-
|
|
2610
|
+
function an({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: d, rowActionsLabel: p, pagination: m, ariaLabel: h, className: g = "", wrapperClassName: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, renderExpanded: S, ...C }) {
|
|
2611
|
+
W("AppDataTable", C);
|
|
2393
2612
|
let w = typeof S == "function", [O, k] = f(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
2394
2613
|
let n = new Set(t);
|
|
2395
2614
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -2425,7 +2644,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2425
2644
|
e.map((e, t) => {
|
|
2426
2645
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
2427
2646
|
return /* @__PURE__ */ D("th", {
|
|
2428
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
2647
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + nn(e.align),
|
|
2429
2648
|
style: e.width ? { width: e.width } : void 0,
|
|
2430
2649
|
tabIndex: n ? 0 : void 0,
|
|
2431
2650
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -2452,7 +2671,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2452
2671
|
children: "Actions"
|
|
2453
2672
|
})
|
|
2454
2673
|
}))
|
|
2455
|
-
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(
|
|
2674
|
+
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(Xt, {
|
|
2456
2675
|
rows: s,
|
|
2457
2676
|
cols: j
|
|
2458
2677
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -2486,9 +2705,9 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2486
2705
|
})
|
|
2487
2706
|
}),
|
|
2488
2707
|
e.map((e, t) => /* @__PURE__ */ E("td", {
|
|
2489
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
2708
|
+
className: (t === 0 ? "wui-name-cell " : "") + nn(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
2490
2709
|
style: e.cellStyle,
|
|
2491
|
-
children: e.render ? e.render(n) :
|
|
2710
|
+
children: e.render ? e.render(n) : rn(n[e.key])
|
|
2492
2711
|
}, e.key)),
|
|
2493
2712
|
d && /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E("div", {
|
|
2494
2713
|
className: "u-row-actions",
|
|
@@ -2511,7 +2730,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2511
2730
|
children: I
|
|
2512
2731
|
}) : I
|
|
2513
2732
|
})]
|
|
2514
|
-
}), m && m.total > 0 && /* @__PURE__ */ E(
|
|
2733
|
+
}), m && m.total > 0 && /* @__PURE__ */ E(tn, {
|
|
2515
2734
|
page: m.page,
|
|
2516
2735
|
totalPages: m.totalPages,
|
|
2517
2736
|
pageSize: m.pageSize,
|
|
@@ -2526,8 +2745,8 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2526
2745
|
}
|
|
2527
2746
|
//#endregion
|
|
2528
2747
|
//#region src/components/AppDatePicker.jsx
|
|
2529
|
-
var
|
|
2530
|
-
|
|
2748
|
+
var on = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: p, id: m, ariaLabel: h, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
2749
|
+
W("AppDatePicker", v);
|
|
2531
2750
|
let b = s(), x = m || b, { setRef: S } = Q({
|
|
2532
2751
|
ref: y,
|
|
2533
2752
|
value: e ?? "",
|
|
@@ -2570,8 +2789,8 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2570
2789
|
})
|
|
2571
2790
|
]
|
|
2572
2791
|
});
|
|
2573
|
-
}),
|
|
2574
|
-
|
|
2792
|
+
}), sn = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: p = "Start – End", disabled: m, size: h, firstDay: g, id: _, ariaLabel: v, className: y = "", fieldClassName: b = "", ...x }, S) {
|
|
2793
|
+
W("AppDateRangePicker", x);
|
|
2575
2794
|
let C = s(), w = _ || C, { setRef: T, innerRef: O } = Q({
|
|
2576
2795
|
ref: S,
|
|
2577
2796
|
onChange: n
|
|
@@ -2631,8 +2850,8 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2631
2850
|
});
|
|
2632
2851
|
//#endregion
|
|
2633
2852
|
//#region src/components/AppDescriptions.jsx
|
|
2634
|
-
function
|
|
2635
|
-
return
|
|
2853
|
+
function cn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
2854
|
+
return W("AppDescriptions", o), /* @__PURE__ */ D("div", {
|
|
2636
2855
|
className: [
|
|
2637
2856
|
"descs",
|
|
2638
2857
|
`descs-col-${t}`,
|
|
@@ -2647,7 +2866,7 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2647
2866
|
}), /* @__PURE__ */ E("dl", {
|
|
2648
2867
|
className: "descs-list",
|
|
2649
2868
|
children: e.map((e, t) => {
|
|
2650
|
-
let n =
|
|
2869
|
+
let n = Lt(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
2651
2870
|
return /* @__PURE__ */ D("div", {
|
|
2652
2871
|
className: "descs-item",
|
|
2653
2872
|
style: { "--descs-span": r },
|
|
@@ -2665,18 +2884,18 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2665
2884
|
}
|
|
2666
2885
|
//#endregion
|
|
2667
2886
|
//#region src/components/AppDropdown.jsx
|
|
2668
|
-
var
|
|
2669
|
-
function
|
|
2887
|
+
var ln = !1;
|
|
2888
|
+
function un() {
|
|
2670
2889
|
let e = !0;
|
|
2671
2890
|
try {
|
|
2672
2891
|
e = process.env.NODE_ENV !== "production";
|
|
2673
2892
|
} catch {
|
|
2674
2893
|
e = !0;
|
|
2675
2894
|
}
|
|
2676
|
-
!e ||
|
|
2895
|
+
!e || ln || (ln = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
2677
2896
|
}
|
|
2678
|
-
function
|
|
2679
|
-
|
|
2897
|
+
function dn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: s = [], menuClassName: c = "", linkComponent: l, children: u, trigger: d, ...p }) {
|
|
2898
|
+
W("AppDropdown", p), !d && !i && !r && un();
|
|
2680
2899
|
let m = n ?? (d ? "wui-dropdown-trigger" : "topbar-icon-btn"), [h, g] = f(!1);
|
|
2681
2900
|
return o(() => {
|
|
2682
2901
|
if (!h) return;
|
|
@@ -2693,7 +2912,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2693
2912
|
onToggle: (e) => g(e),
|
|
2694
2913
|
...p,
|
|
2695
2914
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
2696
|
-
as:
|
|
2915
|
+
as: fn,
|
|
2697
2916
|
icon: e,
|
|
2698
2917
|
iconSize: t,
|
|
2699
2918
|
btnClassName: m,
|
|
@@ -2729,7 +2948,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2729
2948
|
})]
|
|
2730
2949
|
});
|
|
2731
2950
|
}
|
|
2732
|
-
var
|
|
2951
|
+
var fn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
2733
2952
|
return /* @__PURE__ */ E("button", {
|
|
2734
2953
|
ref: s,
|
|
2735
2954
|
type: "button",
|
|
@@ -2744,16 +2963,16 @@ var Qt = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
2744
2963
|
});
|
|
2745
2964
|
//#endregion
|
|
2746
2965
|
//#region src/lib/fileItem.js
|
|
2747
|
-
function
|
|
2966
|
+
function pn(e) {
|
|
2748
2967
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
2749
2968
|
}
|
|
2750
|
-
function
|
|
2969
|
+
function mn(e) {
|
|
2751
2970
|
return e instanceof File ? e.name : e?.name;
|
|
2752
2971
|
}
|
|
2753
|
-
function
|
|
2972
|
+
function hn(e) {
|
|
2754
2973
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
2755
2974
|
}
|
|
2756
|
-
function
|
|
2975
|
+
function gn(e, t) {
|
|
2757
2976
|
let [n, r] = f(null);
|
|
2758
2977
|
return o(() => {
|
|
2759
2978
|
if (!t) {
|
|
@@ -2769,8 +2988,8 @@ function nn(e, t) {
|
|
|
2769
2988
|
}
|
|
2770
2989
|
//#endregion
|
|
2771
2990
|
//#region src/lib/FileItemRow.jsx
|
|
2772
|
-
function
|
|
2773
|
-
let i =
|
|
2991
|
+
function _n({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
2992
|
+
let i = gn(e, t), a = mn(e), o = hn(e);
|
|
2774
2993
|
return /* @__PURE__ */ D("div", {
|
|
2775
2994
|
className: "attach-item",
|
|
2776
2995
|
children: [
|
|
@@ -2809,15 +3028,15 @@ function rn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
2809
3028
|
}
|
|
2810
3029
|
//#endregion
|
|
2811
3030
|
//#region src/components/AppFileAttachment.jsx
|
|
2812
|
-
function
|
|
2813
|
-
|
|
2814
|
-
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S =
|
|
3031
|
+
function vn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = k, maxSizeMb: o = A, optional: c = !1, validate: l = !0, error: u, id: d, ...p }) {
|
|
3032
|
+
W("AppFileAttachment", p);
|
|
3033
|
+
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S = yn(a, o);
|
|
2815
3034
|
function C(e) {
|
|
2816
3035
|
let n = Array.from(e.target.files || []);
|
|
2817
3036
|
if (e.target.value = "", !n.length) return;
|
|
2818
3037
|
let s = [], c = "";
|
|
2819
3038
|
for (let e of n) {
|
|
2820
|
-
let t = l ?
|
|
3039
|
+
let t = l ? L(e, {
|
|
2821
3040
|
accept: a,
|
|
2822
3041
|
maxSizeMb: o
|
|
2823
3042
|
}) : null;
|
|
@@ -2828,14 +3047,14 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2828
3047
|
s.push(e);
|
|
2829
3048
|
}
|
|
2830
3049
|
if (_(c), s.length) if (i) {
|
|
2831
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
2832
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
3050
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(pn));
|
|
3051
|
+
r(e.concat(s.filter((e) => !n.has(pn(e)))));
|
|
2833
3052
|
} else r(s[0]);
|
|
2834
3053
|
}
|
|
2835
3054
|
function w(e) {
|
|
2836
3055
|
_(""), r(i ? v.filter((t, n) => n !== e) : null);
|
|
2837
3056
|
}
|
|
2838
|
-
let O = u || g, j = O ? `${h}-error` : void 0, M = i || v.length === 0, N = y ? "image" : "file",
|
|
3057
|
+
let O = u || g, j = O ? `${h}-error` : void 0, M = i || v.length === 0, N = y ? "image" : "file", I = i ? `Add ${N}s` : `Add ${y ? "an" : "a"} ${N}`;
|
|
2839
3058
|
return /* @__PURE__ */ D("div", {
|
|
2840
3059
|
className: "field",
|
|
2841
3060
|
children: [
|
|
@@ -2862,7 +3081,7 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2862
3081
|
className: "attach-drop-copy",
|
|
2863
3082
|
children: [/* @__PURE__ */ E("span", {
|
|
2864
3083
|
className: "attach-drop-title",
|
|
2865
|
-
children:
|
|
3084
|
+
children: I
|
|
2866
3085
|
}), S && /* @__PURE__ */ E("span", {
|
|
2867
3086
|
className: "attach-drop-hint",
|
|
2868
3087
|
children: S
|
|
@@ -2884,17 +3103,17 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2884
3103
|
onChange: C,
|
|
2885
3104
|
...p
|
|
2886
3105
|
})] }),
|
|
2887
|
-
x ? /* @__PURE__ */ E(
|
|
3106
|
+
x ? /* @__PURE__ */ E(bn, {
|
|
2888
3107
|
item: v[0],
|
|
2889
3108
|
isImage: !0,
|
|
2890
3109
|
onRemove: () => w(0)
|
|
2891
3110
|
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
2892
3111
|
className: "attach-list",
|
|
2893
|
-
children: v.map((e, t) => /* @__PURE__ */ E(
|
|
3112
|
+
children: v.map((e, t) => /* @__PURE__ */ E(_n, {
|
|
2894
3113
|
item: e,
|
|
2895
3114
|
isImage: b(e),
|
|
2896
3115
|
onRemove: () => w(t)
|
|
2897
|
-
},
|
|
3116
|
+
}, pn(e)))
|
|
2898
3117
|
}),
|
|
2899
3118
|
O && /* @__PURE__ */ E("div", {
|
|
2900
3119
|
className: "field-error",
|
|
@@ -2904,12 +3123,12 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2904
3123
|
]
|
|
2905
3124
|
});
|
|
2906
3125
|
}
|
|
2907
|
-
function
|
|
3126
|
+
function yn(e, t) {
|
|
2908
3127
|
let n = e?.trim() ? j(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
2909
3128
|
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
2910
3129
|
}
|
|
2911
|
-
function
|
|
2912
|
-
let r =
|
|
3130
|
+
function bn({ item: e, isImage: t, onRemove: n }) {
|
|
3131
|
+
let r = gn(e, t), i = mn(e), a = hn(e);
|
|
2913
3132
|
return /* @__PURE__ */ D("div", {
|
|
2914
3133
|
className: "attach-preview",
|
|
2915
3134
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -2941,8 +3160,8 @@ function sn({ item: e, isImage: t, onRemove: n }) {
|
|
|
2941
3160
|
}
|
|
2942
3161
|
//#endregion
|
|
2943
3162
|
//#region src/components/AppFilePicker.jsx
|
|
2944
|
-
function
|
|
2945
|
-
|
|
3163
|
+
function xn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, maxFiles: c, accept: l = ".jpg,.jpeg,.png", maxSizeMb: u = A, required: p, error: m, hint: h, loading: g = !1, className: _ = "", fieldClassName: v = "", style: y, ...b }) {
|
|
3164
|
+
W("AppFilePicker", b);
|
|
2946
3165
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
2947
3166
|
o(() => {
|
|
2948
3167
|
if (!a && t instanceof File && P(t)) {
|
|
@@ -2951,18 +3170,18 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2951
3170
|
}
|
|
2952
3171
|
S(null);
|
|
2953
3172
|
}, [t, a]);
|
|
2954
|
-
let
|
|
2955
|
-
let t =
|
|
3173
|
+
let I = a ? Array.isArray(t) ? t : t ? [t] : [] : [], R = m || T, z = R ? `${N}-error` : void 0, B = h && !R ? `${N}-hint` : void 0, V = z || B, H = F(l), ee = !a && !!t, U = ee && (t instanceof File ? P(t) : H || P(t)), te = t?.name, ne = U ? t?.url || x : null, re = U ? "image" : "file", ie = e ? `Change ${e}` : `Change ${re}`, ae = e ? `Remove ${e}` : `Remove ${re}`, oe = e ? `${e} preview` : `Selected ${re} preview`, G = (e) => {
|
|
3174
|
+
let t = L(e, {
|
|
2956
3175
|
accept: l,
|
|
2957
3176
|
maxSizeMb: u
|
|
2958
3177
|
});
|
|
2959
3178
|
return t ? (O(t), !1) : (O(""), i(e), !0);
|
|
2960
|
-
},
|
|
3179
|
+
}, se = (e) => {
|
|
2961
3180
|
let n = Array.from(e || []);
|
|
2962
3181
|
if (!n.length) return;
|
|
2963
|
-
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(
|
|
3182
|
+
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(pn)), o = "", s = [];
|
|
2964
3183
|
for (let e of n) {
|
|
2965
|
-
let t =
|
|
3184
|
+
let t = L(e, {
|
|
2966
3185
|
accept: l,
|
|
2967
3186
|
maxSizeMb: u
|
|
2968
3187
|
});
|
|
@@ -2970,40 +3189,40 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2970
3189
|
o ||= t;
|
|
2971
3190
|
continue;
|
|
2972
3191
|
}
|
|
2973
|
-
a.has(
|
|
3192
|
+
a.has(pn(e)) || (a.add(pn(e)), s.push(e));
|
|
2974
3193
|
}
|
|
2975
3194
|
let d = r.concat(s);
|
|
2976
3195
|
c && d.length > c && (d = d.slice(0, c), o ||= `Up to ${c} files.`), O(o), i(d);
|
|
2977
|
-
},
|
|
3196
|
+
}, K = (e) => {
|
|
2978
3197
|
if (a) {
|
|
2979
|
-
|
|
3198
|
+
se(e.target.files);
|
|
2980
3199
|
return;
|
|
2981
3200
|
}
|
|
2982
3201
|
let t = e.target.files?.[0] || null;
|
|
2983
|
-
t && (
|
|
2984
|
-
},
|
|
3202
|
+
t && (G(t) || (e.target.value = ""));
|
|
3203
|
+
}, ce = (e) => {
|
|
2985
3204
|
if (e.preventDefault(), w(!1), g) return;
|
|
2986
3205
|
if (a) {
|
|
2987
|
-
|
|
3206
|
+
se(e.dataTransfer.files);
|
|
2988
3207
|
return;
|
|
2989
3208
|
}
|
|
2990
3209
|
let t = e.dataTransfer.files?.[0];
|
|
2991
|
-
t &&
|
|
2992
|
-
},
|
|
2993
|
-
O(""), i(
|
|
2994
|
-
},
|
|
3210
|
+
t && G(t);
|
|
3211
|
+
}, le = (e) => {
|
|
3212
|
+
O(""), i(I.filter((t, n) => n !== e));
|
|
3213
|
+
}, ue = () => k.current?.click(), de = g ? /* @__PURE__ */ E("span", {
|
|
2995
3214
|
className: "wui-file-busy",
|
|
2996
3215
|
children: /* @__PURE__ */ E("span", {
|
|
2997
3216
|
className: "spinner-border spinner-border-sm",
|
|
2998
3217
|
role: "status",
|
|
2999
3218
|
"aria-label": "Loading"
|
|
3000
3219
|
})
|
|
3001
|
-
}) : null,
|
|
3220
|
+
}) : null, fe = /* @__PURE__ */ E("input", {
|
|
3002
3221
|
id: N,
|
|
3003
3222
|
name: n,
|
|
3004
3223
|
ref: k,
|
|
3005
3224
|
type: "file",
|
|
3006
|
-
"aria-describedby":
|
|
3225
|
+
"aria-describedby": V,
|
|
3007
3226
|
accept: l,
|
|
3008
3227
|
multiple: a || void 0,
|
|
3009
3228
|
disabled: g || void 0,
|
|
@@ -3011,7 +3230,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3011
3230
|
onClick: (e) => {
|
|
3012
3231
|
e.currentTarget.value = "";
|
|
3013
3232
|
},
|
|
3014
|
-
onChange:
|
|
3233
|
+
onChange: K,
|
|
3015
3234
|
...b
|
|
3016
3235
|
});
|
|
3017
3236
|
return /* @__PURE__ */ D("div", {
|
|
@@ -3022,7 +3241,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3022
3241
|
htmlFor: N,
|
|
3023
3242
|
children: [e, p && /* @__PURE__ */ E(Z, {})]
|
|
3024
3243
|
}),
|
|
3025
|
-
|
|
3244
|
+
ee ? /* @__PURE__ */ D("div", {
|
|
3026
3245
|
className: `file-preview${R ? " error" : ""}${_ ? ` ${_}` : ""}`,
|
|
3027
3246
|
style: y,
|
|
3028
3247
|
"aria-busy": g || void 0,
|
|
@@ -3030,12 +3249,12 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3030
3249
|
/* @__PURE__ */ D("button", {
|
|
3031
3250
|
type: "button",
|
|
3032
3251
|
className: "file-preview-open",
|
|
3033
|
-
"aria-label":
|
|
3034
|
-
onClick:
|
|
3252
|
+
"aria-label": ie,
|
|
3253
|
+
onClick: ue,
|
|
3035
3254
|
disabled: g,
|
|
3036
|
-
children: [
|
|
3037
|
-
src:
|
|
3038
|
-
alt:
|
|
3255
|
+
children: [U && ne ? /* @__PURE__ */ E("img", {
|
|
3256
|
+
src: ne,
|
|
3257
|
+
alt: oe,
|
|
3039
3258
|
className: "file-preview-img"
|
|
3040
3259
|
}) : /* @__PURE__ */ D("span", {
|
|
3041
3260
|
className: "file-preview-file",
|
|
@@ -3044,7 +3263,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3044
3263
|
size: 28
|
|
3045
3264
|
}), /* @__PURE__ */ E("span", {
|
|
3046
3265
|
className: "file-preview-file-name",
|
|
3047
|
-
children:
|
|
3266
|
+
children: te
|
|
3048
3267
|
})]
|
|
3049
3268
|
}), /* @__PURE__ */ E("span", {
|
|
3050
3269
|
className: "file-preview-overlay",
|
|
@@ -3052,31 +3271,31 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3052
3271
|
className: "file-preview-cta",
|
|
3053
3272
|
children: [
|
|
3054
3273
|
/* @__PURE__ */ E(Y, {
|
|
3055
|
-
name:
|
|
3274
|
+
name: U ? "image" : "file-text",
|
|
3056
3275
|
size: 16
|
|
3057
3276
|
}),
|
|
3058
3277
|
" ",
|
|
3059
|
-
|
|
3278
|
+
U ? "Change image" : "Change file"
|
|
3060
3279
|
]
|
|
3061
3280
|
})
|
|
3062
3281
|
})]
|
|
3063
3282
|
}),
|
|
3064
|
-
|
|
3283
|
+
q(/* @__PURE__ */ E("button", {
|
|
3065
3284
|
type: "button",
|
|
3066
3285
|
className: "file-preview-remove",
|
|
3067
|
-
"aria-label":
|
|
3286
|
+
"aria-label": ae,
|
|
3068
3287
|
onClick: () => i(null),
|
|
3069
3288
|
disabled: g,
|
|
3070
3289
|
children: /* @__PURE__ */ E(Y, {
|
|
3071
3290
|
name: "x",
|
|
3072
3291
|
size: 16
|
|
3073
3292
|
})
|
|
3074
|
-
}),
|
|
3075
|
-
|
|
3076
|
-
|
|
3293
|
+
}), ae),
|
|
3294
|
+
fe,
|
|
3295
|
+
de
|
|
3077
3296
|
]
|
|
3078
3297
|
}) : /* @__PURE__ */ D("div", {
|
|
3079
|
-
className: `file-input file-input-tall${C ? " dragging" : ""}${R ? " error" : ""}${a &&
|
|
3298
|
+
className: `file-input file-input-tall${C ? " dragging" : ""}${R ? " error" : ""}${a && I.length > 0 ? " has-files" : ""}${_ ? ` ${_}` : ""}`,
|
|
3080
3299
|
style: y,
|
|
3081
3300
|
"aria-busy": g || void 0,
|
|
3082
3301
|
onDragOver: (e) => {
|
|
@@ -3085,7 +3304,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3085
3304
|
onDragLeave: (e) => {
|
|
3086
3305
|
e.preventDefault(), w(!1);
|
|
3087
3306
|
},
|
|
3088
|
-
onDrop:
|
|
3307
|
+
onDrop: ce,
|
|
3089
3308
|
children: [
|
|
3090
3309
|
/* @__PURE__ */ D("label", {
|
|
3091
3310
|
htmlFor: N,
|
|
@@ -3111,16 +3330,16 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3111
3330
|
})
|
|
3112
3331
|
]
|
|
3113
3332
|
}),
|
|
3114
|
-
pe,
|
|
3115
3333
|
fe,
|
|
3116
|
-
|
|
3334
|
+
de,
|
|
3335
|
+
a && I.length > 0 && /* @__PURE__ */ E("div", {
|
|
3117
3336
|
className: "attach-list",
|
|
3118
|
-
children:
|
|
3337
|
+
children: I.map((e, t) => /* @__PURE__ */ E(_n, {
|
|
3119
3338
|
item: e,
|
|
3120
|
-
isImage: e instanceof File ? P(e) :
|
|
3339
|
+
isImage: e instanceof File ? P(e) : H || P(e),
|
|
3121
3340
|
noun: "file",
|
|
3122
|
-
onRemove: () =>
|
|
3123
|
-
},
|
|
3341
|
+
onRemove: () => le(t)
|
|
3342
|
+
}, pn(e)))
|
|
3124
3343
|
})
|
|
3125
3344
|
]
|
|
3126
3345
|
}),
|
|
@@ -3130,7 +3349,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3130
3349
|
children: R
|
|
3131
3350
|
}) : h ? /* @__PURE__ */ E("div", {
|
|
3132
3351
|
className: "field-hint",
|
|
3133
|
-
id:
|
|
3352
|
+
id: B,
|
|
3134
3353
|
children: h
|
|
3135
3354
|
}) : null
|
|
3136
3355
|
]
|
|
@@ -3138,8 +3357,8 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3138
3357
|
}
|
|
3139
3358
|
//#endregion
|
|
3140
3359
|
//#region src/components/AppFloatingDock.jsx
|
|
3141
|
-
function
|
|
3142
|
-
return
|
|
3360
|
+
function Sn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3361
|
+
return W("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3143
3362
|
role: "navigation",
|
|
3144
3363
|
"aria-label": n,
|
|
3145
3364
|
static: r ? void 0 : "",
|
|
@@ -3180,8 +3399,8 @@ function ln({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3180
3399
|
}
|
|
3181
3400
|
//#endregion
|
|
3182
3401
|
//#region src/components/AppFormActions.jsx
|
|
3183
|
-
function
|
|
3184
|
-
return
|
|
3402
|
+
function Cn({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3403
|
+
return W("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3185
3404
|
className: [
|
|
3186
3405
|
"form-actions",
|
|
3187
3406
|
t ? "form-actions-sticky" : "",
|
|
@@ -3194,8 +3413,8 @@ function un({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3194
3413
|
}
|
|
3195
3414
|
//#endregion
|
|
3196
3415
|
//#region src/components/AppFormRow.jsx
|
|
3197
|
-
function
|
|
3198
|
-
|
|
3416
|
+
function wn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3417
|
+
W("AppFormRow", r);
|
|
3199
3418
|
let { style: i, ...a } = r;
|
|
3200
3419
|
return /* @__PURE__ */ E("div", {
|
|
3201
3420
|
className: ["form-row-grid", n].filter(Boolean).join(" "),
|
|
@@ -3209,8 +3428,8 @@ function dn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3209
3428
|
}
|
|
3210
3429
|
//#endregion
|
|
3211
3430
|
//#region src/components/AppFormSection.jsx
|
|
3212
|
-
function
|
|
3213
|
-
return
|
|
3431
|
+
function Tn({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
3432
|
+
return W("AppFormSection", i), /* @__PURE__ */ D("section", {
|
|
3214
3433
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
3215
3434
|
...i,
|
|
3216
3435
|
children: [(t != null || n != null) && /* @__PURE__ */ D("div", {
|
|
@@ -3230,12 +3449,12 @@ function fn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3230
3449
|
}
|
|
3231
3450
|
//#endregion
|
|
3232
3451
|
//#region src/components/AppInfoList.jsx
|
|
3233
|
-
function
|
|
3234
|
-
return
|
|
3452
|
+
function En({ items: e = [], className: t = "", ...n }) {
|
|
3453
|
+
return W("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3235
3454
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3236
3455
|
...n,
|
|
3237
3456
|
children: e.map((e, t) => {
|
|
3238
|
-
let n =
|
|
3457
|
+
let n = Lt(e.value), r = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
3239
3458
|
className: "info-icon",
|
|
3240
3459
|
children: X(e.icon, { size: 16 })
|
|
3241
3460
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -3261,23 +3480,23 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3261
3480
|
}
|
|
3262
3481
|
//#endregion
|
|
3263
3482
|
//#region src/components/AppKpiTile.jsx
|
|
3264
|
-
var
|
|
3265
|
-
function
|
|
3266
|
-
if (!e || e.length < 2) return `0,${
|
|
3267
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
3268
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
3483
|
+
var Dn = 48, On = 16;
|
|
3484
|
+
function kn(e) {
|
|
3485
|
+
if (!e || e.length < 2) return `0,${On / 2} ${Dn},${On / 2}`;
|
|
3486
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = Dn / (e.length - 1);
|
|
3487
|
+
return e.map((e, i) => `${i * r},${n === 0 ? On / 2 : On - (e - t) / n * On}`).join(" ");
|
|
3269
3488
|
}
|
|
3270
|
-
function
|
|
3489
|
+
function An(e) {
|
|
3271
3490
|
if (typeof e != "string") return "flat";
|
|
3272
3491
|
let t = e.trim();
|
|
3273
3492
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3274
3493
|
}
|
|
3275
|
-
function
|
|
3276
|
-
|
|
3494
|
+
function jn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: p, linkComponent: m, className: h = "", style: g, iconClassName: _ = "", labelClassName: v = "", valueClassName: y = "", captionClassName: b = "", deltaClassName: x = "", sparklineClassName: S = "", ...C }) {
|
|
3495
|
+
W("AppKpiTile", C);
|
|
3277
3496
|
let w = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${h ? ` ${h}` : ""}`, T = typeof u == "number" && u > 0 ? {
|
|
3278
3497
|
...g,
|
|
3279
3498
|
"--wui-kpi-value-size": `${u}px`
|
|
3280
|
-
} : g, O = o ??
|
|
3499
|
+
} : g, O = o ?? An(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3281
3500
|
return p != null && (A = m ? {
|
|
3282
3501
|
as: m,
|
|
3283
3502
|
to: p
|
|
@@ -3315,12 +3534,12 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3315
3534
|
}),
|
|
3316
3535
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3317
3536
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3318
|
-
width:
|
|
3319
|
-
height:
|
|
3320
|
-
viewBox: `0 0 ${
|
|
3537
|
+
width: Dn,
|
|
3538
|
+
height: On,
|
|
3539
|
+
viewBox: `0 0 ${Dn} ${On}`,
|
|
3321
3540
|
"aria-hidden": "true",
|
|
3322
3541
|
children: /* @__PURE__ */ E("polyline", {
|
|
3323
|
-
points:
|
|
3542
|
+
points: kn(s),
|
|
3324
3543
|
stroke: "currentColor",
|
|
3325
3544
|
fill: "none"
|
|
3326
3545
|
})
|
|
@@ -3330,11 +3549,11 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3330
3549
|
}
|
|
3331
3550
|
//#endregion
|
|
3332
3551
|
//#region src/components/AppLink.jsx
|
|
3333
|
-
var
|
|
3552
|
+
var Mn = {
|
|
3334
3553
|
sm: 13,
|
|
3335
3554
|
md: 15,
|
|
3336
3555
|
lg: 18
|
|
3337
|
-
},
|
|
3556
|
+
}, Nn = [
|
|
3338
3557
|
"underline",
|
|
3339
3558
|
"underline-center",
|
|
3340
3559
|
"static",
|
|
@@ -3348,35 +3567,35 @@ var yn = {
|
|
|
3348
3567
|
"shine",
|
|
3349
3568
|
"none"
|
|
3350
3569
|
];
|
|
3351
|
-
function
|
|
3570
|
+
function Pn(e, t, n) {
|
|
3352
3571
|
if (!e) return null;
|
|
3353
3572
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3354
3573
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3355
3574
|
className: r,
|
|
3356
3575
|
children: /* @__PURE__ */ E(Y, {
|
|
3357
3576
|
name: e,
|
|
3358
|
-
size:
|
|
3577
|
+
size: Mn[n] ?? Mn.md
|
|
3359
3578
|
})
|
|
3360
3579
|
}) : /* @__PURE__ */ E("span", {
|
|
3361
3580
|
className: r,
|
|
3362
3581
|
children: e
|
|
3363
3582
|
});
|
|
3364
3583
|
}
|
|
3365
|
-
function
|
|
3366
|
-
|
|
3367
|
-
let f =
|
|
3584
|
+
function Fn({ children: e, label: t, href: n, animation: r = "underline", leftIcon: i = null, rightIcon: a = null, size: o = "md", external: s = !1, disabled: c = !1, linkComponent: l, className: u = "", ...d }) {
|
|
3585
|
+
W("AppLink", d), G("AppLink", "animation", r, Nn), G("AppLink", "size", o, Object.keys(Mn));
|
|
3586
|
+
let f = Nn.includes(r) ? r : "underline", p = f === "icon" && !a && !i ? "arrow-right" : a, m = [
|
|
3368
3587
|
"wui-link",
|
|
3369
3588
|
`wui-link--${f}`,
|
|
3370
3589
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3371
3590
|
c ? "is-disabled" : "",
|
|
3372
3591
|
u
|
|
3373
3592
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3374
|
-
|
|
3593
|
+
Pn(i, "left", o),
|
|
3375
3594
|
/* @__PURE__ */ E("span", {
|
|
3376
3595
|
className: "wui-link__label",
|
|
3377
3596
|
children: e ?? t
|
|
3378
3597
|
}),
|
|
3379
|
-
|
|
3598
|
+
Pn(p, "right", o)
|
|
3380
3599
|
] });
|
|
3381
3600
|
return c ? /* @__PURE__ */ E("span", {
|
|
3382
3601
|
className: m,
|
|
@@ -3399,105 +3618,105 @@ function Sn({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3399
3618
|
}
|
|
3400
3619
|
//#endregion
|
|
3401
3620
|
//#region src/components/AppLogoPicker.jsx
|
|
3402
|
-
var
|
|
3621
|
+
var In = {
|
|
3403
3622
|
sm: 72,
|
|
3404
3623
|
md: 120,
|
|
3405
3624
|
lg: 160
|
|
3406
3625
|
};
|
|
3407
|
-
function
|
|
3408
|
-
|
|
3409
|
-
let j = d(null), M = s(), [N, P] = f(null), [F,
|
|
3626
|
+
function Ln({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: u = A, overlayIcon: p = "image", overlayLabel: m = "Update photo", ariaLabel: h = "Upload photo", label: g, hint: _, error: v, layout: y = "stacked", title: b, subtitle: x, required: S = !1, variant: C = "initials", size: w = "md", shape: T = "circle", className: O = "", ...k }) {
|
|
3627
|
+
W("AppLogoPicker", k), G("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(In));
|
|
3628
|
+
let j = d(null), M = s(), [N, P] = f(null), [F, I] = f(""), [R, z] = f(!1), [B, V] = f(!1);
|
|
3410
3629
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3411
3630
|
P(null), z(!1);
|
|
3412
3631
|
}, [e]);
|
|
3413
|
-
let
|
|
3414
|
-
|
|
3415
|
-
},
|
|
3416
|
-
let t =
|
|
3632
|
+
let H = a || c, ee = N || (e && !R ? e : null), U = v || F, te = _ && !U ? `${M}-hint` : void 0, ne = U ? `${M}-error` : void 0, re = !H && (!!N || !!ee && !!i), ie = () => {
|
|
3633
|
+
H || j.current?.click();
|
|
3634
|
+
}, ae = (e) => {
|
|
3635
|
+
let t = L(e, {
|
|
3417
3636
|
accept: l,
|
|
3418
3637
|
maxSizeMb: u
|
|
3419
3638
|
});
|
|
3420
3639
|
if (t) {
|
|
3421
|
-
|
|
3640
|
+
I(t);
|
|
3422
3641
|
return;
|
|
3423
3642
|
}
|
|
3424
|
-
|
|
3425
|
-
},
|
|
3643
|
+
I(""), z(!1), P(URL.createObjectURL(e)), r(e);
|
|
3644
|
+
}, oe = (e) => {
|
|
3426
3645
|
let t = e.target.files?.[0];
|
|
3427
|
-
e.target.value = "", t &&
|
|
3428
|
-
},
|
|
3429
|
-
if (e.preventDefault(),
|
|
3646
|
+
e.target.value = "", t && ae(t);
|
|
3647
|
+
}, se = (e) => {
|
|
3648
|
+
if (e.preventDefault(), V(!1), H) return;
|
|
3430
3649
|
let t = e.dataTransfer.files?.[0];
|
|
3431
|
-
t &&
|
|
3432
|
-
},
|
|
3433
|
-
P(null),
|
|
3434
|
-
},
|
|
3650
|
+
t && ae(t);
|
|
3651
|
+
}, K = () => {
|
|
3652
|
+
P(null), I(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3653
|
+
}, ce = typeof w == "number" ? w : In[w] ?? In.md, le = Math.max(14, Math.round(ce * .18)), ue = Math.round(ce * .5), de = [
|
|
3435
3654
|
"set-uploader",
|
|
3436
3655
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3437
3656
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
3438
|
-
|
|
3439
|
-
].filter(Boolean).join(" "),
|
|
3657
|
+
B && "is-dragging"
|
|
3658
|
+
].filter(Boolean).join(" "), fe = y === "inline", pe = y === "profile", me = /* @__PURE__ */ D("div", {
|
|
3440
3659
|
className: "set-uploader-shell",
|
|
3441
|
-
style: { "--wui-logo-size": `${
|
|
3660
|
+
style: { "--wui-logo-size": `${ce}px` },
|
|
3442
3661
|
children: [
|
|
3443
3662
|
/* @__PURE__ */ E("button", {
|
|
3444
3663
|
type: "button",
|
|
3445
|
-
className:
|
|
3446
|
-
onClick:
|
|
3447
|
-
disabled:
|
|
3664
|
+
className: de,
|
|
3665
|
+
onClick: ie,
|
|
3666
|
+
disabled: H,
|
|
3448
3667
|
"aria-busy": a || void 0,
|
|
3449
3668
|
"aria-label": h,
|
|
3450
|
-
"aria-describedby":
|
|
3669
|
+
"aria-describedby": ne || te,
|
|
3451
3670
|
onDragOver: (e) => {
|
|
3452
|
-
e.preventDefault(), !
|
|
3671
|
+
e.preventDefault(), !H && !B && V(!0);
|
|
3453
3672
|
},
|
|
3454
3673
|
onDragLeave: (e) => {
|
|
3455
|
-
e.preventDefault(),
|
|
3674
|
+
e.preventDefault(), V(!1);
|
|
3456
3675
|
},
|
|
3457
|
-
onDrop:
|
|
3676
|
+
onDrop: se,
|
|
3458
3677
|
...k,
|
|
3459
3678
|
children: /* @__PURE__ */ D("span", {
|
|
3460
3679
|
className: "set-uploader-ring",
|
|
3461
3680
|
"data-overlay-label": m,
|
|
3462
|
-
children: [
|
|
3681
|
+
children: [ee ? /* @__PURE__ */ E("img", {
|
|
3463
3682
|
className: "set-uploader-img",
|
|
3464
|
-
src:
|
|
3683
|
+
src: ee,
|
|
3465
3684
|
alt: "",
|
|
3466
3685
|
onError: () => z(!0)
|
|
3467
3686
|
}) : /* @__PURE__ */ E("span", {
|
|
3468
3687
|
className: "set-uploader-logo",
|
|
3469
3688
|
children: t || C === "avatar" && /* @__PURE__ */ E(Y, {
|
|
3470
3689
|
name: "user",
|
|
3471
|
-
size:
|
|
3690
|
+
size: ue
|
|
3472
3691
|
})
|
|
3473
3692
|
}), a ? /* @__PURE__ */ E("span", {
|
|
3474
3693
|
className: "set-uploader-overlay is-loading",
|
|
3475
3694
|
"aria-hidden": "true",
|
|
3476
3695
|
children: /* @__PURE__ */ E(Y, {
|
|
3477
3696
|
name: "refresh-cw",
|
|
3478
|
-
size:
|
|
3697
|
+
size: le,
|
|
3479
3698
|
className: "wui-spin"
|
|
3480
3699
|
})
|
|
3481
3700
|
}) : !c && /* @__PURE__ */ D("span", {
|
|
3482
3701
|
className: "set-uploader-overlay",
|
|
3483
3702
|
children: [/* @__PURE__ */ E(Y, {
|
|
3484
3703
|
name: p,
|
|
3485
|
-
size:
|
|
3704
|
+
size: le
|
|
3486
3705
|
}), /* @__PURE__ */ E("span", { children: m })]
|
|
3487
3706
|
})]
|
|
3488
3707
|
})
|
|
3489
3708
|
}),
|
|
3490
|
-
|
|
3709
|
+
q(/* @__PURE__ */ E("button", {
|
|
3491
3710
|
type: "button",
|
|
3492
3711
|
className: "set-uploader-remove",
|
|
3493
|
-
hidden: !
|
|
3712
|
+
hidden: !re,
|
|
3494
3713
|
"aria-label": "Remove photo",
|
|
3495
|
-
onClick:
|
|
3714
|
+
onClick: K,
|
|
3496
3715
|
children: /* @__PURE__ */ E(Y, {
|
|
3497
3716
|
name: "x",
|
|
3498
3717
|
size: 14
|
|
3499
3718
|
})
|
|
3500
|
-
}),
|
|
3719
|
+
}), re ? "Remove photo" : null),
|
|
3501
3720
|
/* @__PURE__ */ E("input", {
|
|
3502
3721
|
id: M,
|
|
3503
3722
|
ref: j,
|
|
@@ -3505,23 +3724,23 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3505
3724
|
name: n,
|
|
3506
3725
|
hidden: !0,
|
|
3507
3726
|
accept: l,
|
|
3508
|
-
onChange:
|
|
3509
|
-
disabled:
|
|
3727
|
+
onChange: oe,
|
|
3728
|
+
disabled: H
|
|
3510
3729
|
})
|
|
3511
3730
|
]
|
|
3512
|
-
}),
|
|
3731
|
+
}), he = _ && !U ? /* @__PURE__ */ E("div", {
|
|
3513
3732
|
className: "set-uploader-hint",
|
|
3514
|
-
id:
|
|
3733
|
+
id: te,
|
|
3515
3734
|
children: _
|
|
3516
|
-
}) : null,
|
|
3735
|
+
}) : null, J = U ? /* @__PURE__ */ E("div", {
|
|
3517
3736
|
className: "field-error",
|
|
3518
|
-
id:
|
|
3519
|
-
children:
|
|
3520
|
-
}) : null,
|
|
3737
|
+
id: ne,
|
|
3738
|
+
children: U
|
|
3739
|
+
}) : null, ge = g && /* @__PURE__ */ D("label", {
|
|
3521
3740
|
className: "label",
|
|
3522
3741
|
htmlFor: M,
|
|
3523
3742
|
children: [g, S && /* @__PURE__ */ E(Z, {})]
|
|
3524
|
-
}),
|
|
3743
|
+
}), _e = /* @__PURE__ */ D("div", {
|
|
3525
3744
|
className: "set-uploader-meta",
|
|
3526
3745
|
children: [
|
|
3527
3746
|
b && /* @__PURE__ */ E("div", {
|
|
@@ -3532,56 +3751,56 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3532
3751
|
className: "set-uploader-subtitle",
|
|
3533
3752
|
children: x
|
|
3534
3753
|
}),
|
|
3535
|
-
|
|
3536
|
-
|
|
3754
|
+
he,
|
|
3755
|
+
J
|
|
3537
3756
|
]
|
|
3538
3757
|
});
|
|
3539
|
-
return
|
|
3758
|
+
return fe ? /* @__PURE__ */ D("div", {
|
|
3540
3759
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
3541
|
-
children: [
|
|
3760
|
+
children: [ge, /* @__PURE__ */ D("div", {
|
|
3542
3761
|
className: "set-uploader-row",
|
|
3543
|
-
children: [
|
|
3762
|
+
children: [me, _e]
|
|
3544
3763
|
})]
|
|
3545
|
-
}) :
|
|
3764
|
+
}) : pe ? /* @__PURE__ */ D("div", {
|
|
3546
3765
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
3547
3766
|
children: [
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3767
|
+
ge,
|
|
3768
|
+
me,
|
|
3769
|
+
_e
|
|
3551
3770
|
]
|
|
3552
3771
|
}) : /* @__PURE__ */ D("div", {
|
|
3553
3772
|
className: `field set-uploader-field${O ? ` ${O}` : ""}`,
|
|
3554
3773
|
children: [
|
|
3555
|
-
_e,
|
|
3556
|
-
he,
|
|
3557
3774
|
ge,
|
|
3558
|
-
|
|
3775
|
+
me,
|
|
3776
|
+
he,
|
|
3777
|
+
J
|
|
3559
3778
|
]
|
|
3560
3779
|
});
|
|
3561
3780
|
}
|
|
3562
3781
|
//#endregion
|
|
3563
3782
|
//#region src/components/AppMeter.jsx
|
|
3564
|
-
var
|
|
3783
|
+
var Rn = [
|
|
3565
3784
|
"info",
|
|
3566
3785
|
"success",
|
|
3567
3786
|
"warning",
|
|
3568
3787
|
"danger",
|
|
3569
3788
|
"neutral"
|
|
3570
3789
|
];
|
|
3571
|
-
function
|
|
3790
|
+
function zn(e, t, n) {
|
|
3572
3791
|
let r = n - t;
|
|
3573
3792
|
if (!(r > 0)) return 0;
|
|
3574
3793
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3575
3794
|
return Number(i.toFixed(2));
|
|
3576
3795
|
}
|
|
3577
|
-
function
|
|
3796
|
+
function Bn(e, t, n, r, i) {
|
|
3578
3797
|
if (t == null && n == null) return i;
|
|
3579
3798
|
let a = "mid";
|
|
3580
3799
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
3581
3800
|
}
|
|
3582
|
-
function
|
|
3583
|
-
|
|
3584
|
-
let f =
|
|
3801
|
+
function Vn({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
3802
|
+
W("AppMeter", d);
|
|
3803
|
+
let f = Bn(e, a, o, i, Rn.includes(r) ? r : "info"), p = zn(e, t, n);
|
|
3585
3804
|
return /* @__PURE__ */ E("div", {
|
|
3586
3805
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3587
3806
|
role: "meter",
|
|
@@ -3599,20 +3818,20 @@ function On({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3599
3818
|
}
|
|
3600
3819
|
//#endregion
|
|
3601
3820
|
//#region src/components/AppMultiSelect.jsx
|
|
3602
|
-
var
|
|
3603
|
-
|
|
3821
|
+
var Hn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, allowCustom: f = !1, validateCustom: p, customPattern: m, customInvalidMessage: h, name: g, id: _, label: v, error: y, hint: b, required: x = !1, help: S, helpLabel: C = "More information", fieldClassName: w = "", ...T }, O) {
|
|
3822
|
+
W("AppMultiSelect", T);
|
|
3604
3823
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3605
3824
|
ref: O,
|
|
3606
3825
|
value: e,
|
|
3607
3826
|
onChange: t,
|
|
3608
|
-
readValue:
|
|
3609
|
-
writeValue:
|
|
3827
|
+
readValue: Qe,
|
|
3828
|
+
writeValue: $e
|
|
3610
3829
|
});
|
|
3611
3830
|
return o(() => {
|
|
3612
3831
|
let e = M.current;
|
|
3613
3832
|
if (!e) return;
|
|
3614
3833
|
let t = n || [];
|
|
3615
|
-
|
|
3834
|
+
Ze(t, e.options) || (e.options = t);
|
|
3616
3835
|
}, [n, M]), o(() => {
|
|
3617
3836
|
let e = M.current;
|
|
3618
3837
|
e && (e.validateCustom = p ?? null);
|
|
@@ -3625,7 +3844,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3625
3844
|
children: [
|
|
3626
3845
|
v,
|
|
3627
3846
|
x && /* @__PURE__ */ E(Z, {}),
|
|
3628
|
-
S && /* @__PURE__ */ E(
|
|
3847
|
+
S && /* @__PURE__ */ E(qe, {
|
|
3629
3848
|
label: C,
|
|
3630
3849
|
children: S
|
|
3631
3850
|
})
|
|
@@ -3662,8 +3881,8 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3662
3881
|
}) : null
|
|
3663
3882
|
]
|
|
3664
3883
|
});
|
|
3665
|
-
}),
|
|
3666
|
-
|
|
3884
|
+
}), Un = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: d, step: p = 1, precision: m = 0, unit: h, size: g = "md", id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, ...C }, w) {
|
|
3885
|
+
W("AppNumberInput", C);
|
|
3667
3886
|
let T = s(), O = _ || T, k = (e) => {
|
|
3668
3887
|
if (m === 0) return Math.round(e);
|
|
3669
3888
|
let t = 10 ** m;
|
|
@@ -3682,19 +3901,19 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3682
3901
|
let P = (e) => {
|
|
3683
3902
|
let t = (j(M) ?? A(0)) + e * p, n = A(k(t));
|
|
3684
3903
|
N(String(n)), l?.(n);
|
|
3685
|
-
}, F = j(M), I = S || F !== null && typeof u == "number" && F <= u, L = S || F !== null && typeof d == "number" && F >= d, R = n && O ? `${O}-error` : void 0, z = r && O ? `${O}-hint` : void 0,
|
|
3904
|
+
}, F = j(M), I = S || F !== null && typeof u == "number" && F <= u, L = S || F !== null && typeof d == "number" && F >= d, R = n && O ? `${O}-error` : void 0, z = r && O ? `${O}-hint` : void 0, B = R || z, V = [
|
|
3686
3905
|
"input",
|
|
3687
3906
|
g === "sm" ? "input-sm" : "",
|
|
3688
3907
|
g === "lg" ? "input-lg" : "",
|
|
3689
3908
|
n ? "error" : "",
|
|
3690
3909
|
"num-input",
|
|
3691
3910
|
b
|
|
3692
|
-
].filter(Boolean).join(" "),
|
|
3911
|
+
].filter(Boolean).join(" "), H = (e) => {
|
|
3693
3912
|
let t = e.target.value;
|
|
3694
3913
|
N(t);
|
|
3695
3914
|
let n = j(t);
|
|
3696
3915
|
n !== null && l?.(n);
|
|
3697
|
-
},
|
|
3916
|
+
}, ee = (e) => {
|
|
3698
3917
|
let t = j(e.target.value);
|
|
3699
3918
|
if (t === null) N(""), l?.("");
|
|
3700
3919
|
else {
|
|
@@ -3702,25 +3921,25 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3702
3921
|
N(String(e)), l?.(e);
|
|
3703
3922
|
}
|
|
3704
3923
|
C.onBlur?.(e);
|
|
3705
|
-
},
|
|
3924
|
+
}, U = (e) => {
|
|
3706
3925
|
e.key === "ArrowUp" ? (e.preventDefault(), P(1)) : e.key === "ArrowDown" && (e.preventDefault(), P(-1)), C.onKeyDown?.(e);
|
|
3707
|
-
},
|
|
3926
|
+
}, te = /* @__PURE__ */ E(y.Control, {
|
|
3708
3927
|
...C,
|
|
3709
3928
|
id: O,
|
|
3710
3929
|
name: v,
|
|
3711
3930
|
type: "text",
|
|
3712
3931
|
inputMode: m > 0 ? "decimal" : "numeric",
|
|
3713
|
-
className:
|
|
3932
|
+
className: V,
|
|
3714
3933
|
disabled: S,
|
|
3715
3934
|
required: t,
|
|
3716
3935
|
"aria-invalid": n ? "true" : "false",
|
|
3717
|
-
"aria-describedby":
|
|
3936
|
+
"aria-describedby": B,
|
|
3718
3937
|
value: M,
|
|
3719
3938
|
ref: w,
|
|
3720
|
-
onChange:
|
|
3721
|
-
onBlur:
|
|
3722
|
-
onKeyDown:
|
|
3723
|
-
}),
|
|
3939
|
+
onChange: H,
|
|
3940
|
+
onBlur: ee,
|
|
3941
|
+
onKeyDown: U
|
|
3942
|
+
}), ne = /* @__PURE__ */ D("div", {
|
|
3724
3943
|
className: [
|
|
3725
3944
|
"num-wrap",
|
|
3726
3945
|
g === "sm" ? "num-wrap-sm" : "",
|
|
@@ -3739,7 +3958,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3739
3958
|
size: 16
|
|
3740
3959
|
})
|
|
3741
3960
|
}),
|
|
3742
|
-
|
|
3961
|
+
te,
|
|
3743
3962
|
h && /* @__PURE__ */ E("span", {
|
|
3744
3963
|
className: "affix",
|
|
3745
3964
|
children: h
|
|
@@ -3767,13 +3986,13 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3767
3986
|
children: [
|
|
3768
3987
|
e,
|
|
3769
3988
|
t && /* @__PURE__ */ E(Z, {}),
|
|
3770
|
-
i && /* @__PURE__ */ E(
|
|
3989
|
+
i && /* @__PURE__ */ E(qe, {
|
|
3771
3990
|
label: a,
|
|
3772
3991
|
children: i
|
|
3773
3992
|
})
|
|
3774
3993
|
]
|
|
3775
3994
|
}),
|
|
3776
|
-
|
|
3995
|
+
ne,
|
|
3777
3996
|
n ? /* @__PURE__ */ E("div", {
|
|
3778
3997
|
className: "field-error",
|
|
3779
3998
|
id: R,
|
|
@@ -3785,8 +4004,8 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3785
4004
|
}) : null
|
|
3786
4005
|
]
|
|
3787
4006
|
});
|
|
3788
|
-
}),
|
|
3789
|
-
|
|
4007
|
+
}), Wn = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: p = "", fieldClassName: m = "", ...h }, g) {
|
|
4008
|
+
W("AppOtpInput", h);
|
|
3790
4009
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
3791
4010
|
ref: g,
|
|
3792
4011
|
value: e ?? "",
|
|
@@ -3830,8 +4049,8 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3830
4049
|
});
|
|
3831
4050
|
//#endregion
|
|
3832
4051
|
//#region src/components/AppPageHeader.jsx
|
|
3833
|
-
function
|
|
3834
|
-
|
|
4052
|
+
function Gn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...p }) {
|
|
4053
|
+
W("AppPageHeader", p);
|
|
3835
4054
|
let m = [
|
|
3836
4055
|
"page-header",
|
|
3837
4056
|
c && c !== "md" ? `page-header-${c}` : "",
|
|
@@ -3889,9 +4108,9 @@ function Mn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3889
4108
|
}
|
|
3890
4109
|
//#endregion
|
|
3891
4110
|
//#region src/components/AppPagination.jsx
|
|
3892
|
-
function
|
|
3893
|
-
if (
|
|
3894
|
-
let c =
|
|
4111
|
+
function Kn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
4112
|
+
if (W("AppPagination", s), t <= 1) return null;
|
|
4113
|
+
let c = Qt(e, t, { siblingCount: r });
|
|
3895
4114
|
return /* @__PURE__ */ E("nav", {
|
|
3896
4115
|
className: [
|
|
3897
4116
|
"pagination-nav",
|
|
@@ -3949,8 +4168,8 @@ function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
3949
4168
|
}
|
|
3950
4169
|
//#endregion
|
|
3951
4170
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3952
|
-
var
|
|
3953
|
-
|
|
4171
|
+
var qn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, id: a, label: o = "Phone number", placeholder: c, required: l = !1, error: u, showFlag: d = !0, showDialCode: f = !0, size: p = "md", fieldClassName: m = "", ...h }, g) {
|
|
4172
|
+
W("AppPhoneNumberInput", h);
|
|
3954
4173
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
3955
4174
|
ref: g,
|
|
3956
4175
|
value: e ?? "",
|
|
@@ -3990,8 +4209,8 @@ var Pn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
3990
4209
|
});
|
|
3991
4210
|
//#endregion
|
|
3992
4211
|
//#region src/components/AppPricingCard.jsx
|
|
3993
|
-
function
|
|
3994
|
-
return
|
|
4212
|
+
function Jn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
4213
|
+
return W("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
3995
4214
|
className: [
|
|
3996
4215
|
"plan-card",
|
|
3997
4216
|
o ? "featured" : "",
|
|
@@ -4044,21 +4263,21 @@ function Fn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4044
4263
|
}
|
|
4045
4264
|
//#endregion
|
|
4046
4265
|
//#region src/components/AppProgress.jsx
|
|
4047
|
-
var
|
|
4266
|
+
var Yn = [
|
|
4048
4267
|
"info",
|
|
4049
4268
|
"success",
|
|
4050
4269
|
"warning",
|
|
4051
4270
|
"danger",
|
|
4052
4271
|
"neutral"
|
|
4053
4272
|
];
|
|
4054
|
-
function
|
|
4273
|
+
function Xn(e, t) {
|
|
4055
4274
|
if (!(t > 0)) return 0;
|
|
4056
4275
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4057
4276
|
return Number(n.toFixed(2));
|
|
4058
4277
|
}
|
|
4059
|
-
function
|
|
4060
|
-
|
|
4061
|
-
let d =
|
|
4278
|
+
function Zn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
4279
|
+
W("AppProgress", u);
|
|
4280
|
+
let d = Yn.includes(n) ? n : "info", f = Xn(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4062
4281
|
"progress-bar",
|
|
4063
4282
|
`wui-progress-${d}`,
|
|
4064
4283
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4082,8 +4301,8 @@ function Rn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4082
4301
|
}
|
|
4083
4302
|
//#endregion
|
|
4084
4303
|
//#region src/components/AppRadio.jsx
|
|
4085
|
-
var
|
|
4086
|
-
return
|
|
4304
|
+
var Qn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
4305
|
+
return W("AppRadio", o), /* @__PURE__ */ E(vt, {
|
|
4087
4306
|
ref: s,
|
|
4088
4307
|
label: e,
|
|
4089
4308
|
id: t,
|
|
@@ -4098,27 +4317,27 @@ var zn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4098
4317
|
});
|
|
4099
4318
|
//#endregion
|
|
4100
4319
|
//#region src/components/AppRepeater.jsx
|
|
4101
|
-
function
|
|
4102
|
-
|
|
4103
|
-
let
|
|
4320
|
+
function $n({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, addLabel: a = "Add another", addVariant: o = "secondary", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
|
|
4321
|
+
W("AppRepeater", p);
|
|
4322
|
+
let m = typeof u == "number" && e.length >= u, h = !!i && e.length > l;
|
|
4104
4323
|
return /* @__PURE__ */ D("div", {
|
|
4105
|
-
className: `repeater${
|
|
4106
|
-
...
|
|
4324
|
+
className: `repeater${f ? ` ${f}` : ""}`,
|
|
4325
|
+
...p,
|
|
4107
4326
|
children: [
|
|
4108
|
-
e.length === 0 &&
|
|
4327
|
+
e.length === 0 && c && /* @__PURE__ */ E("div", {
|
|
4109
4328
|
className: "repeater-empty",
|
|
4110
|
-
children:
|
|
4329
|
+
children: c
|
|
4111
4330
|
}),
|
|
4112
4331
|
e.map((e, r) => {
|
|
4113
4332
|
let a = n ? n(e, r) : null;
|
|
4114
4333
|
return /* @__PURE__ */ D("div", {
|
|
4115
4334
|
className: "repeater-row",
|
|
4116
4335
|
children: [
|
|
4117
|
-
(!!a ||
|
|
4336
|
+
(!!a || h) && /* @__PURE__ */ E("span", {
|
|
4118
4337
|
className: "repeater-row-label",
|
|
4119
4338
|
children: a
|
|
4120
4339
|
}),
|
|
4121
|
-
|
|
4340
|
+
d && /* @__PURE__ */ E("span", {
|
|
4122
4341
|
className: "repeater-index",
|
|
4123
4342
|
children: r + 1
|
|
4124
4343
|
}),
|
|
@@ -4126,9 +4345,9 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4126
4345
|
className: "repeater-body",
|
|
4127
4346
|
children: t(e, r)
|
|
4128
4347
|
}),
|
|
4129
|
-
|
|
4348
|
+
h && /* @__PURE__ */ E(je, {
|
|
4130
4349
|
icon: "trash-2",
|
|
4131
|
-
label: `${
|
|
4350
|
+
label: `${s} ${r + 1}`,
|
|
4132
4351
|
danger: !0,
|
|
4133
4352
|
className: "repeater-remove",
|
|
4134
4353
|
onClick: () => i(r)
|
|
@@ -4136,12 +4355,12 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4136
4355
|
]
|
|
4137
4356
|
}, e.id ?? r);
|
|
4138
4357
|
}),
|
|
4139
|
-
/* @__PURE__ */ E(
|
|
4140
|
-
variant:
|
|
4358
|
+
/* @__PURE__ */ E(Be, {
|
|
4359
|
+
variant: o,
|
|
4141
4360
|
size: "sm",
|
|
4142
4361
|
leftIcon: "plus",
|
|
4143
4362
|
className: "repeater-add",
|
|
4144
|
-
disabled:
|
|
4363
|
+
disabled: m,
|
|
4145
4364
|
onClick: r,
|
|
4146
4365
|
children: a
|
|
4147
4366
|
})
|
|
@@ -4150,8 +4369,8 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4150
4369
|
}
|
|
4151
4370
|
//#endregion
|
|
4152
4371
|
//#region src/components/AppResourceCard.jsx
|
|
4153
|
-
function
|
|
4154
|
-
|
|
4372
|
+
function er({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4373
|
+
W("AppResourceCard", s);
|
|
4155
4374
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4156
4375
|
className: "res-card-icon",
|
|
4157
4376
|
children: /* @__PURE__ */ E(Y, {
|
|
@@ -4184,7 +4403,7 @@ function Vn({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4184
4403
|
}
|
|
4185
4404
|
//#endregion
|
|
4186
4405
|
//#region src/components/AppResult.jsx
|
|
4187
|
-
var
|
|
4406
|
+
var tr = {
|
|
4188
4407
|
success: {
|
|
4189
4408
|
icon: "check-circle",
|
|
4190
4409
|
tone: "success"
|
|
@@ -4205,9 +4424,9 @@ var Hn = {
|
|
|
4205
4424
|
404: { tone: "muted" },
|
|
4206
4425
|
500: { tone: "muted" }
|
|
4207
4426
|
};
|
|
4208
|
-
function
|
|
4209
|
-
|
|
4210
|
-
let c =
|
|
4427
|
+
function nr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
4428
|
+
W("AppResult", s), G("AppResult", "status", e, Object.keys(tr));
|
|
4429
|
+
let c = tr[e] || tr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
4211
4430
|
return /* @__PURE__ */ D("div", {
|
|
4212
4431
|
className: [
|
|
4213
4432
|
"result",
|
|
@@ -4245,8 +4464,8 @@ function Un({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4245
4464
|
}
|
|
4246
4465
|
//#endregion
|
|
4247
4466
|
//#region src/components/AppScrollbar.jsx
|
|
4248
|
-
function
|
|
4249
|
-
return
|
|
4467
|
+
function rr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4468
|
+
return W("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4250
4469
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4251
4470
|
style: n == null ? r : {
|
|
4252
4471
|
maxHeight: n,
|
|
@@ -4258,8 +4477,8 @@ function Wn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4258
4477
|
}
|
|
4259
4478
|
//#endregion
|
|
4260
4479
|
//#region src/components/AppSearch.jsx
|
|
4261
|
-
function
|
|
4262
|
-
|
|
4480
|
+
function ir({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
4481
|
+
W("AppSearch", u);
|
|
4263
4482
|
let d = t || n;
|
|
4264
4483
|
return /* @__PURE__ */ D("div", {
|
|
4265
4484
|
className: [
|
|
@@ -4305,17 +4524,24 @@ function Gn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4305
4524
|
}
|
|
4306
4525
|
//#endregion
|
|
4307
4526
|
//#region src/components/AppSegmented.jsx
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4527
|
+
var ar = {
|
|
4528
|
+
sm: "segmented-sm",
|
|
4529
|
+
md: "",
|
|
4530
|
+
lg: "segmented-lg",
|
|
4531
|
+
xl: "segmented-xl"
|
|
4532
|
+
};
|
|
4533
|
+
function or({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: c = !1, bordered: u = !0, disabled: f = !1, className: p = "", ...m }) {
|
|
4534
|
+
W("AppSegmented", m), G("AppSegmented", "size", a, Object.keys(ar));
|
|
4535
|
+
let h = s(), g = i || h, _ = d(null), v = d(null), y = [
|
|
4311
4536
|
"segmented",
|
|
4312
|
-
a
|
|
4537
|
+
ar[a] ?? "",
|
|
4313
4538
|
c ? "segmented-full" : "",
|
|
4314
|
-
u ? "
|
|
4315
|
-
f
|
|
4539
|
+
u ? "" : "segmented-borderless",
|
|
4540
|
+
f ? "is-disabled" : "",
|
|
4541
|
+
p
|
|
4316
4542
|
].filter(Boolean).join(" ");
|
|
4317
4543
|
return l(() => {
|
|
4318
|
-
let e =
|
|
4544
|
+
let e = _.current, t = v.current;
|
|
4319
4545
|
if (!e || !t) return;
|
|
4320
4546
|
let n = (n) => {
|
|
4321
4547
|
let r = e.querySelector(".segmented-option:has(.segmented-input:checked)");
|
|
@@ -4323,7 +4549,7 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4323
4549
|
t.style.opacity = "0";
|
|
4324
4550
|
return;
|
|
4325
4551
|
}
|
|
4326
|
-
n || e.classList.remove("is-animated"), t.style.width = `${r.offsetWidth}px`, t.style.transform = `translateX(${r.offsetLeft}px)`, t.style.opacity = "1", n || requestAnimationFrame(() =>
|
|
4552
|
+
n || e.classList.remove("is-animated"), t.style.width = `${r.offsetWidth}px`, t.style.transform = `translateX(${r.offsetLeft}px)`, t.style.opacity = "1", n || requestAnimationFrame(() => _.current?.classList.add("is-animated"));
|
|
4327
4553
|
};
|
|
4328
4554
|
n(!0);
|
|
4329
4555
|
let r = typeof ResizeObserver < "u" ? new ResizeObserver(() => n(!1)) : null;
|
|
@@ -4334,18 +4560,18 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4334
4560
|
a,
|
|
4335
4561
|
c
|
|
4336
4562
|
]), o(() => {
|
|
4337
|
-
let e = requestAnimationFrame(() =>
|
|
4563
|
+
let e = requestAnimationFrame(() => _.current?.classList.add("is-animated"));
|
|
4338
4564
|
return () => cancelAnimationFrame(e);
|
|
4339
4565
|
}, []), /* @__PURE__ */ D("div", {
|
|
4340
|
-
ref:
|
|
4341
|
-
className:
|
|
4566
|
+
ref: _,
|
|
4567
|
+
className: y,
|
|
4342
4568
|
role: "radiogroup",
|
|
4343
4569
|
"aria-label": r,
|
|
4344
|
-
"aria-disabled":
|
|
4345
|
-
...
|
|
4570
|
+
"aria-disabled": f || void 0,
|
|
4571
|
+
...m,
|
|
4346
4572
|
children: [/* @__PURE__ */ E("span", {
|
|
4347
4573
|
className: "segmented-thumb",
|
|
4348
|
-
ref:
|
|
4574
|
+
ref: v,
|
|
4349
4575
|
"aria-hidden": "true"
|
|
4350
4576
|
}), e.map((e) => /* @__PURE__ */ D("label", {
|
|
4351
4577
|
className: "segmented-option",
|
|
@@ -4353,10 +4579,10 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4353
4579
|
/* @__PURE__ */ E("input", {
|
|
4354
4580
|
type: "radio",
|
|
4355
4581
|
className: "segmented-input",
|
|
4356
|
-
name:
|
|
4582
|
+
name: g,
|
|
4357
4583
|
value: e.value,
|
|
4358
4584
|
checked: e.value === t,
|
|
4359
|
-
disabled:
|
|
4585
|
+
disabled: f || e.disabled,
|
|
4360
4586
|
onChange: () => n?.(e.value)
|
|
4361
4587
|
}),
|
|
4362
4588
|
e.icon && /* @__PURE__ */ E(Y, {
|
|
@@ -4379,81 +4605,94 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4379
4605
|
}
|
|
4380
4606
|
//#endregion
|
|
4381
4607
|
//#region src/components/AppSelect.jsx
|
|
4382
|
-
var
|
|
4383
|
-
|
|
4384
|
-
let
|
|
4385
|
-
ref:
|
|
4608
|
+
var sr = (e) => e == null ? "" : e.label ?? e.text ?? "", cr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, prefix: d, suffix: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": O, "aria-describedby": k, ...A }, j) {
|
|
4609
|
+
W("AppSelect", A);
|
|
4610
|
+
let M = s(), { setRef: N, innerRef: P } = Q({
|
|
4611
|
+
ref: j,
|
|
4386
4612
|
value: e ?? "",
|
|
4387
4613
|
onChange: t
|
|
4388
4614
|
});
|
|
4389
4615
|
o(() => {
|
|
4390
|
-
let e =
|
|
4616
|
+
let e = P.current;
|
|
4391
4617
|
if (!e) return;
|
|
4392
4618
|
let t = n.map((e) => ({
|
|
4393
4619
|
value: e.value,
|
|
4394
|
-
label:
|
|
4620
|
+
label: sr(e),
|
|
4395
4621
|
icon: e.icon
|
|
4396
4622
|
}));
|
|
4397
|
-
|
|
4398
|
-
}, [n,
|
|
4399
|
-
let
|
|
4400
|
-
"aria-label":
|
|
4401
|
-
"aria-labelledby":
|
|
4402
|
-
"aria-describedby":
|
|
4403
|
-
"aria-invalid":
|
|
4404
|
-
ref:
|
|
4405
|
-
id:
|
|
4406
|
-
name:
|
|
4407
|
-
placeholder:
|
|
4623
|
+
Ze(t, e.options) || (e.options = t);
|
|
4624
|
+
}, [n, P]);
|
|
4625
|
+
let F = x || M, I = p && h, L = _ && F ? `${F}-error` : void 0, R = v && F ? `${F}-hint` : void 0, z = /* @__PURE__ */ E("wui-select", {
|
|
4626
|
+
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
4627
|
+
"aria-labelledby": O || void 0,
|
|
4628
|
+
"aria-describedby": L || R || k || void 0,
|
|
4629
|
+
"aria-invalid": _ ? "true" : void 0,
|
|
4630
|
+
ref: N,
|
|
4631
|
+
id: F,
|
|
4632
|
+
name: S,
|
|
4633
|
+
placeholder: p && h ? " " : r,
|
|
4408
4634
|
"search-placeholder": i,
|
|
4409
4635
|
searchable: a ? "" : void 0,
|
|
4410
4636
|
clearable: c ? "" : void 0,
|
|
4411
4637
|
size: l || void 0,
|
|
4412
4638
|
icon: u || void 0,
|
|
4413
|
-
disabled:
|
|
4414
|
-
required:
|
|
4415
|
-
className:
|
|
4416
|
-
...
|
|
4417
|
-
})
|
|
4418
|
-
|
|
4419
|
-
|
|
4639
|
+
disabled: m ? "" : void 0,
|
|
4640
|
+
required: g ? "" : void 0,
|
|
4641
|
+
className: C || void 0,
|
|
4642
|
+
...A
|
|
4643
|
+
}), B = !I && (d != null || f != null) ? /* @__PURE__ */ D("div", {
|
|
4644
|
+
className: "input-affixed",
|
|
4645
|
+
children: [
|
|
4646
|
+
d != null && /* @__PURE__ */ E("span", {
|
|
4647
|
+
className: "affix affix-pre",
|
|
4648
|
+
children: d
|
|
4649
|
+
}),
|
|
4650
|
+
z,
|
|
4651
|
+
f != null && /* @__PURE__ */ E("span", {
|
|
4652
|
+
className: "affix affix-suf",
|
|
4653
|
+
children: f
|
|
4654
|
+
})
|
|
4655
|
+
]
|
|
4656
|
+
}) : z;
|
|
4657
|
+
return !h && !_ && !v ? B : /* @__PURE__ */ D("div", {
|
|
4658
|
+
className: ["field", w].filter(Boolean).join(" "),
|
|
4420
4659
|
children: [
|
|
4421
|
-
|
|
4660
|
+
h && !I && /* @__PURE__ */ D("label", {
|
|
4422
4661
|
className: "label",
|
|
4423
|
-
htmlFor:
|
|
4662
|
+
htmlFor: F,
|
|
4424
4663
|
children: [
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
label:
|
|
4429
|
-
children:
|
|
4664
|
+
h,
|
|
4665
|
+
g && /* @__PURE__ */ E(Z, {}),
|
|
4666
|
+
y && /* @__PURE__ */ E(qe, {
|
|
4667
|
+
label: b,
|
|
4668
|
+
children: y
|
|
4430
4669
|
})
|
|
4431
4670
|
]
|
|
4432
4671
|
}),
|
|
4433
|
-
|
|
4672
|
+
I ? /* @__PURE__ */ D("div", {
|
|
4434
4673
|
className: "field-float",
|
|
4435
|
-
children: [
|
|
4674
|
+
children: [z, /* @__PURE__ */ D("label", {
|
|
4436
4675
|
className: "float-label",
|
|
4437
|
-
htmlFor:
|
|
4438
|
-
children: [
|
|
4676
|
+
htmlFor: F,
|
|
4677
|
+
children: [h, g && /* @__PURE__ */ E(Z, {})]
|
|
4439
4678
|
})]
|
|
4440
|
-
}) :
|
|
4441
|
-
|
|
4679
|
+
}) : B,
|
|
4680
|
+
_ ? /* @__PURE__ */ E("div", {
|
|
4442
4681
|
className: "field-error",
|
|
4443
|
-
id:
|
|
4444
|
-
children:
|
|
4445
|
-
}) :
|
|
4682
|
+
id: L,
|
|
4683
|
+
children: _
|
|
4684
|
+
}) : v ? /* @__PURE__ */ E("div", {
|
|
4446
4685
|
className: "field-hint",
|
|
4447
|
-
id:
|
|
4448
|
-
children:
|
|
4686
|
+
id: R,
|
|
4687
|
+
children: v
|
|
4449
4688
|
}) : null
|
|
4450
4689
|
]
|
|
4451
4690
|
});
|
|
4452
4691
|
});
|
|
4453
4692
|
//#endregion
|
|
4454
4693
|
//#region src/components/AppShell.jsx
|
|
4455
|
-
function
|
|
4456
|
-
|
|
4694
|
+
function lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: d, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4695
|
+
W("AppShell", _);
|
|
4457
4696
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4458
4697
|
let e = !w;
|
|
4459
4698
|
u === void 0 && y(e), d?.(e);
|
|
@@ -4500,7 +4739,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4500
4739
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4501
4740
|
className: "app-nav-group-label",
|
|
4502
4741
|
children: e.label
|
|
4503
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
4742
|
+
}), e.items.map((e) => /* @__PURE__ */ E(ur, {
|
|
4504
4743
|
item: e,
|
|
4505
4744
|
linkComponent: h,
|
|
4506
4745
|
onNavigate: () => x(!1)
|
|
@@ -4567,7 +4806,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4567
4806
|
]
|
|
4568
4807
|
});
|
|
4569
4808
|
}
|
|
4570
|
-
function
|
|
4809
|
+
function ur({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4571
4810
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4572
4811
|
o(() => {
|
|
4573
4812
|
a && !s && c(!0);
|
|
@@ -4609,7 +4848,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4609
4848
|
"aria-hidden": !s || void 0,
|
|
4610
4849
|
children: /* @__PURE__ */ E("div", {
|
|
4611
4850
|
className: "app-nav-sub-inner",
|
|
4612
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
4851
|
+
children: e.children.map((e) => /* @__PURE__ */ E(ur, {
|
|
4613
4852
|
item: e,
|
|
4614
4853
|
linkComponent: t,
|
|
4615
4854
|
onNavigate: n,
|
|
@@ -4650,7 +4889,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4650
4889
|
}
|
|
4651
4890
|
//#endregion
|
|
4652
4891
|
//#region src/components/AppSidebarMenu.jsx
|
|
4653
|
-
var
|
|
4892
|
+
var dr = {
|
|
4654
4893
|
left: "start",
|
|
4655
4894
|
right: "end",
|
|
4656
4895
|
start: "start",
|
|
@@ -4658,9 +4897,9 @@ var Zn = {
|
|
|
4658
4897
|
top: "top",
|
|
4659
4898
|
bottom: "bottom"
|
|
4660
4899
|
};
|
|
4661
|
-
function
|
|
4662
|
-
|
|
4663
|
-
let { style: y, ...b } = v, S =
|
|
4900
|
+
function fr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: p = !0, responsive: m, className: h = "", bodyClassName: g = "", ariaLabel: _, ...v }) {
|
|
4901
|
+
W("AppSidebarMenu", v), G("AppSidebarMenu", "side", n, Object.keys(dr));
|
|
4902
|
+
let { style: y, ...b } = v, S = dr[n] || "end", C = c || l || y ? {
|
|
4664
4903
|
...c && { "--asm-width": c },
|
|
4665
4904
|
...l && { "--asm-max-width": l },
|
|
4666
4905
|
...y
|
|
@@ -4689,7 +4928,7 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4689
4928
|
size: 18
|
|
4690
4929
|
})
|
|
4691
4930
|
}), r]
|
|
4692
|
-
}), p && /* @__PURE__ */ E(
|
|
4931
|
+
}), p && /* @__PURE__ */ E(Be, {
|
|
4693
4932
|
variant: "ghost",
|
|
4694
4933
|
className: "btn-icon",
|
|
4695
4934
|
onClick: t,
|
|
@@ -4713,14 +4952,14 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4713
4952
|
}
|
|
4714
4953
|
//#endregion
|
|
4715
4954
|
//#region src/components/AppSlider.jsx
|
|
4716
|
-
var
|
|
4717
|
-
|
|
4955
|
+
var pr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: p, min: m = 0, max: h = 100, step: g = 1, disabled: _, size: v, showValue: y, unit: b, id: x, ariaLabel: S, className: C = "", fieldClassName: w = "", ...T }, O) {
|
|
4956
|
+
W("AppSlider", T);
|
|
4718
4957
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
4719
4958
|
ref: O,
|
|
4720
4959
|
value: j ? void 0 : e,
|
|
4721
4960
|
onChange: i,
|
|
4722
|
-
readValue: j ?
|
|
4723
|
-
writeValue: j ? void 0 :
|
|
4961
|
+
readValue: j ? et : void 0,
|
|
4962
|
+
writeValue: j ? void 0 : tt
|
|
4724
4963
|
});
|
|
4725
4964
|
o(() => {
|
|
4726
4965
|
if (!j) return;
|
|
@@ -4774,14 +5013,14 @@ var $n = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
4774
5013
|
})
|
|
4775
5014
|
]
|
|
4776
5015
|
});
|
|
4777
|
-
}),
|
|
5016
|
+
}), mr = {
|
|
4778
5017
|
sm: 44,
|
|
4779
5018
|
md: 56,
|
|
4780
5019
|
lg: 72
|
|
4781
5020
|
};
|
|
4782
|
-
function
|
|
4783
|
-
|
|
4784
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
5021
|
+
function hr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
5022
|
+
W("AppSplash", c), G("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(mr));
|
|
5023
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : mr[a] ?? mr.md, f = i === "ring" ? /* @__PURE__ */ E("span", {
|
|
4785
5024
|
className: "splash-ring",
|
|
4786
5025
|
"aria-hidden": "true"
|
|
4787
5026
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -4828,8 +5067,8 @@ function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4828
5067
|
}
|
|
4829
5068
|
//#endregion
|
|
4830
5069
|
//#region src/components/AppStatusBadge.jsx
|
|
4831
|
-
function
|
|
4832
|
-
return
|
|
5070
|
+
function gr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
5071
|
+
return W("AppStatusBadge", a), e == null || e === "" ? "-" : q(/* @__PURE__ */ E("span", {
|
|
4833
5072
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4834
5073
|
...a,
|
|
4835
5074
|
children: e
|
|
@@ -4837,8 +5076,8 @@ function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
4837
5076
|
}
|
|
4838
5077
|
//#endregion
|
|
4839
5078
|
//#region src/components/AppStepper.jsx
|
|
4840
|
-
function
|
|
4841
|
-
|
|
5079
|
+
function _r({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
5080
|
+
W("AppStepper", c);
|
|
4842
5081
|
let l = t === "journey";
|
|
4843
5082
|
return /* @__PURE__ */ E("nav", {
|
|
4844
5083
|
className: [
|
|
@@ -4850,7 +5089,7 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4850
5089
|
"aria-label": a,
|
|
4851
5090
|
...c,
|
|
4852
5091
|
children: e.map((t, n) => {
|
|
4853
|
-
let a = t.status ||
|
|
5092
|
+
let a = t.status || vr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
4854
5093
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
4855
5094
|
name: "check",
|
|
4856
5095
|
size: 14
|
|
@@ -4914,13 +5153,13 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4914
5153
|
})
|
|
4915
5154
|
});
|
|
4916
5155
|
}
|
|
4917
|
-
function
|
|
5156
|
+
function vr(e, t) {
|
|
4918
5157
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
4919
5158
|
}
|
|
4920
5159
|
//#endregion
|
|
4921
5160
|
//#region src/components/AppSwitch.jsx
|
|
4922
|
-
var
|
|
4923
|
-
return
|
|
5161
|
+
var yr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
5162
|
+
return W("AppSwitch", s), /* @__PURE__ */ E(vt, {
|
|
4924
5163
|
ref: c,
|
|
4925
5164
|
label: e,
|
|
4926
5165
|
id: t,
|
|
@@ -4935,8 +5174,8 @@ var ar = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
4935
5174
|
});
|
|
4936
5175
|
//#endregion
|
|
4937
5176
|
//#region src/components/AppTableEmptyState.jsx
|
|
4938
|
-
function
|
|
4939
|
-
return
|
|
5177
|
+
function br({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
5178
|
+
return W("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
4940
5179
|
className: "tbl-empty",
|
|
4941
5180
|
...i,
|
|
4942
5181
|
children: [
|
|
@@ -4961,9 +5200,9 @@ function or({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
4961
5200
|
}
|
|
4962
5201
|
//#endregion
|
|
4963
5202
|
//#region src/components/AppTabs.jsx
|
|
4964
|
-
var
|
|
4965
|
-
function
|
|
4966
|
-
|
|
5203
|
+
var xr = 1, Sr = 28, Cr = .7;
|
|
5204
|
+
function wr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "underline", orientation: s = "horizontal", size: c = "md", fitted: u = !1, activation: p = "automatic", ariaLabel: m, className: h = "", style: g, ..._ }) {
|
|
5205
|
+
W("AppTabs", _);
|
|
4967
5206
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
4968
5207
|
o(() => {
|
|
4969
5208
|
S(t);
|
|
@@ -4974,7 +5213,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4974
5213
|
let e = v.current, t = y.current;
|
|
4975
5214
|
if (!e || !t || b) return;
|
|
4976
5215
|
let n = e.scrollWidth - e.clientWidth;
|
|
4977
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft >
|
|
5216
|
+
t.classList.toggle("is-overflow-start", e.scrollLeft > xr), t.classList.toggle("is-overflow-end", n > xr && e.scrollLeft < n - xr);
|
|
4978
5217
|
}, [b]), M = a(() => {
|
|
4979
5218
|
let n = v.current;
|
|
4980
5219
|
if (!n) return;
|
|
@@ -4990,7 +5229,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4990
5229
|
if (!e || b) return;
|
|
4991
5230
|
let t = e.querySelector(".app-tab.active");
|
|
4992
5231
|
if (!t) return;
|
|
4993
|
-
let n =
|
|
5232
|
+
let n = Sr, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
4994
5233
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
4995
5234
|
}, [b]);
|
|
4996
5235
|
l(() => {
|
|
@@ -5025,7 +5264,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5025
5264
|
}
|
|
5026
5265
|
let I = (e) => {
|
|
5027
5266
|
let t = v.current;
|
|
5028
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
5267
|
+
t && t.scrollBy({ left: e * t.clientWidth * Cr });
|
|
5029
5268
|
}, L = [
|
|
5030
5269
|
"app-tabs",
|
|
5031
5270
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5097,7 +5336,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5097
5336
|
},
|
|
5098
5337
|
children: s
|
|
5099
5338
|
}, e.key);
|
|
5100
|
-
return e.tooltip ? /* @__PURE__ */ E(
|
|
5339
|
+
return e.tooltip ? /* @__PURE__ */ E(ce, {
|
|
5101
5340
|
content: e.tooltip,
|
|
5102
5341
|
children: c
|
|
5103
5342
|
}, e.key) : c;
|
|
@@ -5138,14 +5377,14 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5138
5377
|
}
|
|
5139
5378
|
//#endregion
|
|
5140
5379
|
//#region src/components/AppTagInput.jsx
|
|
5141
|
-
var
|
|
5142
|
-
|
|
5380
|
+
var Tr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: p, ariaLabel: m, className: h = "", fieldClassName: g = "", help: _, helpLabel: v = "More information", ...y }, b) {
|
|
5381
|
+
W("AppTagInput", y);
|
|
5143
5382
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5144
5383
|
ref: b,
|
|
5145
5384
|
value: e,
|
|
5146
5385
|
onChange: t,
|
|
5147
|
-
readValue:
|
|
5148
|
-
writeValue:
|
|
5386
|
+
readValue: Qe,
|
|
5387
|
+
writeValue: $e
|
|
5149
5388
|
});
|
|
5150
5389
|
return /* @__PURE__ */ D("div", {
|
|
5151
5390
|
className: `field${g ? ` ${g}` : ""}`,
|
|
@@ -5156,7 +5395,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5156
5395
|
children: [
|
|
5157
5396
|
i,
|
|
5158
5397
|
c && /* @__PURE__ */ E(Z, {}),
|
|
5159
|
-
_ && /* @__PURE__ */ E(
|
|
5398
|
+
_ && /* @__PURE__ */ E(qe, {
|
|
5160
5399
|
label: v,
|
|
5161
5400
|
children: _
|
|
5162
5401
|
})
|
|
@@ -5189,8 +5428,8 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5189
5428
|
}) : null
|
|
5190
5429
|
]
|
|
5191
5430
|
});
|
|
5192
|
-
}),
|
|
5193
|
-
|
|
5431
|
+
}), Er = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: c = "More information", id: u, name: p, rows: m = 4, autoGrow: h = !1, showCount: g = !1, maxLength: _, className: v = "", fieldClassName: b = "", ...x }, S) {
|
|
5432
|
+
W("AppTextarea", x);
|
|
5194
5433
|
let C = s(), w = u || C, T = [
|
|
5195
5434
|
"textarea",
|
|
5196
5435
|
h ? "autosize" : "",
|
|
@@ -5225,7 +5464,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5225
5464
|
children: [
|
|
5226
5465
|
e,
|
|
5227
5466
|
t && /* @__PURE__ */ E(Z, {}),
|
|
5228
|
-
i && /* @__PURE__ */ E(
|
|
5467
|
+
i && /* @__PURE__ */ E(qe, {
|
|
5229
5468
|
label: c,
|
|
5230
5469
|
children: i
|
|
5231
5470
|
})
|
|
@@ -5260,7 +5499,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5260
5499
|
})
|
|
5261
5500
|
]
|
|
5262
5501
|
});
|
|
5263
|
-
}),
|
|
5502
|
+
}), Dr = {
|
|
5264
5503
|
done: "check",
|
|
5265
5504
|
current: "clock",
|
|
5266
5505
|
"on-hold": "lock",
|
|
@@ -5269,8 +5508,8 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5269
5508
|
skipped: "arrow-right",
|
|
5270
5509
|
upcoming: null
|
|
5271
5510
|
};
|
|
5272
|
-
function
|
|
5273
|
-
|
|
5511
|
+
function Or({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5512
|
+
W("AppTimeline", o);
|
|
5274
5513
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
5275
5514
|
return /* @__PURE__ */ E("ol", {
|
|
5276
5515
|
className: c,
|
|
@@ -5280,7 +5519,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5280
5519
|
} : a,
|
|
5281
5520
|
...o,
|
|
5282
5521
|
children: e.map((e, t) => {
|
|
5283
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
5522
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? Dr[n] : void 0) : e.icon || "circle";
|
|
5284
5523
|
return /* @__PURE__ */ D("li", {
|
|
5285
5524
|
className: `timeline-item${r}${i}`,
|
|
5286
5525
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5350,8 +5589,8 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5350
5589
|
}
|
|
5351
5590
|
//#endregion
|
|
5352
5591
|
//#region src/components/AppTimePicker.jsx
|
|
5353
|
-
var
|
|
5354
|
-
|
|
5592
|
+
var kr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: p, size: m, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", ...y }, b) {
|
|
5593
|
+
W("AppTimePicker", y);
|
|
5355
5594
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5356
5595
|
ref: b,
|
|
5357
5596
|
value: e ?? "",
|
|
@@ -5395,35 +5634,35 @@ var hr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5395
5634
|
})
|
|
5396
5635
|
]
|
|
5397
5636
|
});
|
|
5398
|
-
}),
|
|
5399
|
-
function
|
|
5400
|
-
for (let e of
|
|
5637
|
+
}), Ar = 6, $ = [], jr = /* @__PURE__ */ new Set(), Mr = /* @__PURE__ */ new Map(), Nr = /* @__PURE__ */ new Set(), Pr = 0;
|
|
5638
|
+
function Fr() {
|
|
5639
|
+
for (let e of jr) e($);
|
|
5401
5640
|
}
|
|
5402
|
-
function
|
|
5403
|
-
let t =
|
|
5404
|
-
t !== void 0 && (clearTimeout(t),
|
|
5641
|
+
function Ir(e) {
|
|
5642
|
+
let t = Mr.get(e);
|
|
5643
|
+
t !== void 0 && (clearTimeout(t), Mr.delete(e));
|
|
5405
5644
|
}
|
|
5406
|
-
function
|
|
5407
|
-
if (e.length <=
|
|
5645
|
+
function Lr(e, t) {
|
|
5646
|
+
if (e.length <= Ar) return e;
|
|
5408
5647
|
let n = [...e], r = [];
|
|
5409
|
-
for (; n.length >
|
|
5648
|
+
for (; n.length > Ar;) {
|
|
5410
5649
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5411
5650
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5412
5651
|
}
|
|
5413
|
-
for (let e of r)
|
|
5652
|
+
for (let e of r) Ir(e.id), Nr.delete(e.id);
|
|
5414
5653
|
return n;
|
|
5415
5654
|
}
|
|
5416
|
-
function
|
|
5417
|
-
return
|
|
5418
|
-
if (
|
|
5655
|
+
function Rr(e) {
|
|
5656
|
+
return jr.add(e), e($), () => {
|
|
5657
|
+
if (jr.delete(e), jr.size === 0) for (let e of $) e.duration > 0 && !Mr.has(e.id) && (Nr.delete(e.id), Mr.set(e.id, setTimeout(() => Vr(e.id), e.duration)));
|
|
5419
5658
|
};
|
|
5420
5659
|
}
|
|
5421
|
-
function
|
|
5660
|
+
function zr(e, t, n = {}) {
|
|
5422
5661
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5423
5662
|
if (r) {
|
|
5424
5663
|
let i = $.find((e) => e.externalId === r);
|
|
5425
5664
|
if (i) {
|
|
5426
|
-
|
|
5665
|
+
Ir(i.id);
|
|
5427
5666
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5428
5667
|
$ = $.map((a) => a.id === i.id ? {
|
|
5429
5668
|
...a,
|
|
@@ -5436,12 +5675,12 @@ function Tr(e, t, n = {}) {
|
|
|
5436
5675
|
shape: n.shape,
|
|
5437
5676
|
surface: n.surface,
|
|
5438
5677
|
progress: n.progress
|
|
5439
|
-
} : a),
|
|
5678
|
+
} : a), Fr(), r > 0 && !Nr.has(i.id) && Mr.set(i.id, setTimeout(() => Vr(i.id), r));
|
|
5440
5679
|
return;
|
|
5441
5680
|
}
|
|
5442
5681
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5443
|
-
let a = ++
|
|
5444
|
-
$ =
|
|
5682
|
+
let a = ++Pr, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
5683
|
+
$ = Lr([...$, {
|
|
5445
5684
|
id: a,
|
|
5446
5685
|
externalId: r,
|
|
5447
5686
|
message: e,
|
|
@@ -5454,25 +5693,25 @@ function Tr(e, t, n = {}) {
|
|
|
5454
5693
|
surface: n.surface,
|
|
5455
5694
|
progress: n.progress,
|
|
5456
5695
|
key: i
|
|
5457
|
-
}], a),
|
|
5696
|
+
}], a), Fr(), o > 0 && Mr.set(a, setTimeout(() => Vr(a), o));
|
|
5458
5697
|
}
|
|
5459
|
-
function
|
|
5460
|
-
|
|
5698
|
+
function Br(e) {
|
|
5699
|
+
Ir(e), Nr.add(e);
|
|
5461
5700
|
}
|
|
5462
|
-
function
|
|
5463
|
-
|
|
5701
|
+
function Vr(e) {
|
|
5702
|
+
Ir(e), Nr.delete(e);
|
|
5464
5703
|
let t = $.filter((t) => t.id !== e);
|
|
5465
|
-
t.length !== $.length && ($ = t,
|
|
5704
|
+
t.length !== $.length && ($ = t, Fr());
|
|
5466
5705
|
}
|
|
5467
|
-
function
|
|
5468
|
-
if (!($.length === 0 &&
|
|
5469
|
-
for (let e of
|
|
5470
|
-
|
|
5706
|
+
function Hr() {
|
|
5707
|
+
if (!($.length === 0 && Mr.size === 0 && Nr.size === 0)) {
|
|
5708
|
+
for (let e of Mr.values()) clearTimeout(e);
|
|
5709
|
+
Mr.clear(), Nr.clear(), $.length !== 0 && ($ = [], Fr());
|
|
5471
5710
|
}
|
|
5472
5711
|
}
|
|
5473
5712
|
//#endregion
|
|
5474
5713
|
//#region src/components/AppToast.jsx
|
|
5475
|
-
var
|
|
5714
|
+
var Ur = {
|
|
5476
5715
|
success: {
|
|
5477
5716
|
icon: "check-circle",
|
|
5478
5717
|
assertive: !1
|
|
@@ -5489,7 +5728,7 @@ var kr = {
|
|
|
5489
5728
|
icon: "alert-circle",
|
|
5490
5729
|
assertive: !0
|
|
5491
5730
|
}
|
|
5492
|
-
},
|
|
5731
|
+
}, Wr = {
|
|
5493
5732
|
"top-start": "top-0 start-0",
|
|
5494
5733
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5495
5734
|
"top-end": "top-0 end-0",
|
|
@@ -5497,21 +5736,21 @@ var kr = {
|
|
|
5497
5736
|
"bottom-start": "bottom-0 start-0",
|
|
5498
5737
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5499
5738
|
"bottom-end": "bottom-0 end-0"
|
|
5500
|
-
},
|
|
5739
|
+
}, Gr = 64, Kr = /* @__PURE__ */ new Set([
|
|
5501
5740
|
"rise",
|
|
5502
5741
|
"organic",
|
|
5503
5742
|
"jelly",
|
|
5504
5743
|
"spring"
|
|
5505
|
-
]),
|
|
5744
|
+
]), qr = /* @__PURE__ */ new Set([
|
|
5506
5745
|
"rounded",
|
|
5507
5746
|
"pill",
|
|
5508
5747
|
"sharp"
|
|
5509
|
-
]),
|
|
5510
|
-
function
|
|
5511
|
-
|
|
5748
|
+
]), Jr = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
5749
|
+
function Yr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
5750
|
+
W("AppToast", s), G("AppToast", "position", e, Object.keys(Wr)), G("AppToast", "animation", n, Kr), G("AppToast", "shape", r, qr), G("AppToast", "surface", i, Jr);
|
|
5512
5751
|
let [c, l] = f([]);
|
|
5513
|
-
o(() =>
|
|
5514
|
-
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p =
|
|
5752
|
+
o(() => Rr(l), []);
|
|
5753
|
+
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p = Wr[e] ?? Wr["bottom-end"];
|
|
5515
5754
|
return /* @__PURE__ */ D("div", {
|
|
5516
5755
|
...s,
|
|
5517
5756
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5523,7 +5762,7 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5523
5762
|
u,
|
|
5524
5763
|
" more"
|
|
5525
5764
|
]
|
|
5526
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
5765
|
+
}), d.map((e) => /* @__PURE__ */ E(Xr, {
|
|
5527
5766
|
toast: e,
|
|
5528
5767
|
defaultAnimation: n,
|
|
5529
5768
|
defaultShape: r,
|
|
@@ -5531,14 +5770,14 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5531
5770
|
}, e.id))]
|
|
5532
5771
|
});
|
|
5533
5772
|
}
|
|
5534
|
-
function
|
|
5535
|
-
let i =
|
|
5773
|
+
function Xr({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
5774
|
+
let i = Ur[e.variant] ?? Ur.success, a = Kr.has(e.animation) ? e.animation : t, s = qr.has(e.shape) ? e.shape : n, c = Jr.has(e.surface) ? e.surface : r, l = (a !== "rise" && Kr.has(a) ? ` wui-toast--anim-${a}` : "") + (s !== "rounded" && qr.has(s) ? ` wui-toast--shape-${s}` : "") + (c === "inverse" ? " wui-toast--surface-inverse" : ""), u = e.duration === 0, [p, m] = f(0), [h, g] = f(!1), _ = d(null), v = () => Vr(e.id), y = d(null);
|
|
5536
5775
|
o(() => {
|
|
5537
5776
|
if (e.duration === 0) return;
|
|
5538
|
-
|
|
5777
|
+
Br(e.id);
|
|
5539
5778
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5540
5779
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5541
|
-
let r = setTimeout(() =>
|
|
5780
|
+
let r = setTimeout(() => Vr(e.id), e.duration);
|
|
5542
5781
|
return () => clearTimeout(r);
|
|
5543
5782
|
}, [e.id, e.duration]);
|
|
5544
5783
|
let b = (e) => {
|
|
@@ -5550,7 +5789,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5550
5789
|
}, C = (e) => {
|
|
5551
5790
|
if (_.current === null) return;
|
|
5552
5791
|
let t = e.clientX - _.current;
|
|
5553
|
-
if (Math.abs(t) >
|
|
5792
|
+
if (Math.abs(t) > Gr) {
|
|
5554
5793
|
v();
|
|
5555
5794
|
return;
|
|
5556
5795
|
}
|
|
@@ -5634,8 +5873,8 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5634
5873
|
}
|
|
5635
5874
|
//#endregion
|
|
5636
5875
|
//#region src/components/AppToolbar.jsx
|
|
5637
|
-
function
|
|
5638
|
-
|
|
5876
|
+
function Zr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
5877
|
+
W("AppToolbar", u);
|
|
5639
5878
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
5640
5879
|
return /* @__PURE__ */ D("div", {
|
|
5641
5880
|
className: [
|
|
@@ -5692,8 +5931,8 @@ function Lr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
5692
5931
|
}
|
|
5693
5932
|
//#endregion
|
|
5694
5933
|
//#region src/components/AppWizard.jsx
|
|
5695
|
-
var
|
|
5696
|
-
|
|
5934
|
+
var Qr = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: u, variant: f = "steps", tone: p, orientation: m = "horizontal", skippable: h = !1, nonLinear: g = !1, hideStepper: _ = !1, disabled: v = !1, label: y = "Progress", backLabel: b = "Back", nextLabel: x = "Next", skipLabel: S = "Skip", finishLabel: C = "Finish", className: w = "", ...T }, D) {
|
|
5935
|
+
W("AppWizard", T);
|
|
5697
5936
|
let O = d(null), k = (e) => {
|
|
5698
5937
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
5699
5938
|
}, A = e.toArray(n), j = [p && `wui-step-tone-${p}`, w].filter(Boolean).join(" ");
|
|
@@ -5744,15 +5983,15 @@ var Rr = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
5744
5983
|
children: A[t]
|
|
5745
5984
|
}, e.key ?? `${e.label}-${t}`))
|
|
5746
5985
|
});
|
|
5747
|
-
}),
|
|
5986
|
+
}), $r = /* @__PURE__ */ new Set([
|
|
5748
5987
|
"ArrowUp",
|
|
5749
5988
|
"ArrowDown",
|
|
5750
5989
|
"ArrowLeft",
|
|
5751
5990
|
"ArrowRight"
|
|
5752
5991
|
]);
|
|
5753
|
-
function
|
|
5992
|
+
function ei({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: l = !1, createLabel: p = "Create workspace", compact: m = !1, size: h = "md", ariaLabel: g, ..._ }) {
|
|
5754
5993
|
let { onToggle: y, ...b } = _;
|
|
5755
|
-
|
|
5994
|
+
W("AppWorkspaceSwitcher", b);
|
|
5756
5995
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
5757
5996
|
w(e), y?.(e, t);
|
|
5758
5997
|
}, k = e.find((e) => e.id === t) ?? e[0], A = u(() => {
|
|
@@ -5770,7 +6009,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5770
6009
|
let e = T.current;
|
|
5771
6010
|
if (!e) return;
|
|
5772
6011
|
let t = (e) => {
|
|
5773
|
-
if (
|
|
6012
|
+
if ($r.has(e.key)) {
|
|
5774
6013
|
e.stopPropagation();
|
|
5775
6014
|
return;
|
|
5776
6015
|
}
|
|
@@ -5788,7 +6027,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5788
6027
|
onToggle: O,
|
|
5789
6028
|
...b,
|
|
5790
6029
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
5791
|
-
as:
|
|
6030
|
+
as: ii,
|
|
5792
6031
|
compact: m,
|
|
5793
6032
|
tenant: k,
|
|
5794
6033
|
"aria-label": M
|
|
@@ -5823,7 +6062,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5823
6062
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
5824
6063
|
onClick: () => n?.(e),
|
|
5825
6064
|
children: [
|
|
5826
|
-
/* @__PURE__ */ E(
|
|
6065
|
+
/* @__PURE__ */ E(ni, { tenant: e }),
|
|
5827
6066
|
/* @__PURE__ */ E("span", {
|
|
5828
6067
|
className: "workspace-switcher-option-name",
|
|
5829
6068
|
children: e.name
|
|
@@ -5855,17 +6094,17 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5855
6094
|
}) : null,
|
|
5856
6095
|
i ? /* @__PURE__ */ E("div", {
|
|
5857
6096
|
className: "workspace-switcher-footer",
|
|
5858
|
-
children:
|
|
6097
|
+
children: ri(i, a)
|
|
5859
6098
|
}) : null
|
|
5860
6099
|
]
|
|
5861
6100
|
})]
|
|
5862
6101
|
});
|
|
5863
6102
|
}
|
|
5864
|
-
function
|
|
6103
|
+
function ti(e) {
|
|
5865
6104
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
5866
6105
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
5867
6106
|
}
|
|
5868
|
-
function
|
|
6107
|
+
function ni({ tenant: e }) {
|
|
5869
6108
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
5870
6109
|
className: "workspace-switcher-mark",
|
|
5871
6110
|
src: e.logoUrl,
|
|
@@ -5873,10 +6112,10 @@ function Hr({ tenant: e }) {
|
|
|
5873
6112
|
loading: "lazy"
|
|
5874
6113
|
}) : /* @__PURE__ */ E("span", {
|
|
5875
6114
|
className: "workspace-switcher-mark",
|
|
5876
|
-
children:
|
|
6115
|
+
children: ti(e?.name)
|
|
5877
6116
|
});
|
|
5878
6117
|
}
|
|
5879
|
-
function
|
|
6118
|
+
function ri(e, t) {
|
|
5880
6119
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
5881
6120
|
let { label: n, icon: r, href: i } = e;
|
|
5882
6121
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -5888,7 +6127,7 @@ function Ur(e, t) {
|
|
|
5888
6127
|
}) : null, n]
|
|
5889
6128
|
});
|
|
5890
6129
|
}
|
|
5891
|
-
var
|
|
6130
|
+
var ii = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
5892
6131
|
return /* @__PURE__ */ D("button", {
|
|
5893
6132
|
ref: a,
|
|
5894
6133
|
type: "button",
|
|
@@ -5896,7 +6135,7 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5896
6135
|
"aria-haspopup": "true",
|
|
5897
6136
|
"aria-label": n,
|
|
5898
6137
|
...i,
|
|
5899
|
-
children: [/* @__PURE__ */ E(
|
|
6138
|
+
children: [/* @__PURE__ */ E(ni, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
5900
6139
|
className: "workspace-switcher-trigger-name",
|
|
5901
6140
|
children: t?.name
|
|
5902
6141
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -5908,36 +6147,36 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5908
6147
|
});
|
|
5909
6148
|
//#endregion
|
|
5910
6149
|
//#region src/components/toast.js
|
|
5911
|
-
function
|
|
5912
|
-
|
|
6150
|
+
function ai() {
|
|
6151
|
+
Hr();
|
|
5913
6152
|
}
|
|
5914
|
-
var
|
|
6153
|
+
var oi = /* @__PURE__ */ new Set([
|
|
5915
6154
|
"success",
|
|
5916
6155
|
"info",
|
|
5917
6156
|
"warning",
|
|
5918
6157
|
"danger"
|
|
5919
6158
|
]);
|
|
5920
|
-
function
|
|
6159
|
+
function si(e, t = "info") {
|
|
5921
6160
|
let n = "info", r = {};
|
|
5922
|
-
typeof t == "string" ? n =
|
|
6161
|
+
typeof t == "string" ? n = oi.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = oi.has(r.variant) ? r.variant : "info"), zr(e, n, r);
|
|
5923
6162
|
}
|
|
5924
|
-
function
|
|
5925
|
-
|
|
6163
|
+
function ci(e, t = {}) {
|
|
6164
|
+
zr(e, "danger", t);
|
|
5926
6165
|
}
|
|
5927
|
-
|
|
6166
|
+
si.promise = (e, t, n = {}) => {
|
|
5928
6167
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
5929
|
-
return
|
|
6168
|
+
return si(t.loading || "Loading...", {
|
|
5930
6169
|
...n,
|
|
5931
6170
|
variant: "info",
|
|
5932
6171
|
id: r,
|
|
5933
6172
|
duration: 0
|
|
5934
|
-
}), e.then((e) => (
|
|
6173
|
+
}), e.then((e) => (si((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
5935
6174
|
...n,
|
|
5936
6175
|
variant: "success",
|
|
5937
6176
|
id: r,
|
|
5938
6177
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
5939
6178
|
}), e)).catch((e) => {
|
|
5940
|
-
throw
|
|
6179
|
+
throw si((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
5941
6180
|
...n,
|
|
5942
6181
|
variant: "danger",
|
|
5943
6182
|
id: r,
|
|
@@ -5946,8 +6185,21 @@ qr.promise = (e, t, n = {}) => {
|
|
|
5946
6185
|
});
|
|
5947
6186
|
};
|
|
5948
6187
|
//#endregion
|
|
6188
|
+
//#region src/lib/useCommandPaletteShortcut.js
|
|
6189
|
+
function li(e, { key: t = "k" } = {}) {
|
|
6190
|
+
let n = d(e);
|
|
6191
|
+
o(() => {
|
|
6192
|
+
n.current = e;
|
|
6193
|
+
}), o(() => {
|
|
6194
|
+
let e = String(t).toLowerCase(), r = (t) => {
|
|
6195
|
+
!(t.ctrlKey || t.metaKey) || t.altKey || t.shiftKey || t.repeat || String(t.key).toLowerCase() === e && (t.preventDefault(), n.current?.());
|
|
6196
|
+
};
|
|
6197
|
+
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
6198
|
+
}, [t]);
|
|
6199
|
+
}
|
|
6200
|
+
//#endregion
|
|
5949
6201
|
//#region src/lib/usePagination.js
|
|
5950
|
-
function
|
|
6202
|
+
function ui(e, t = 10) {
|
|
5951
6203
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
5952
6204
|
o(() => {
|
|
5953
6205
|
n > c && r(c);
|
|
@@ -5973,4 +6225,4 @@ function Yr(e, t = 10) {
|
|
|
5973
6225
|
};
|
|
5974
6226
|
}
|
|
5975
6227
|
//#endregion
|
|
5976
|
-
export {
|
|
6228
|
+
export { ke as AppAccordion, je as AppActionIcon, Ie as AppAlert, Ue as AppAsyncBlock, nt as AppAutocomplete, ct as AppAvatar, dt as AppAvatarGroup, ft as AppBadge, mt as AppBanner, ht as AppBreadcrumbs, Be as AppButton, _t as AppCard, yt as AppCheckbox, bt as AppChip, wt as AppChoiceCard, Tt as AppChoiceChip, Et as AppColorField, Nt as AppCommandPalette, Rt as AppCompareTable, Ht as AppConfirmDialog, Wt as AppConsentBanner, Kt as AppCopyButton, Jt as AppCountrySelect, an as AppDataTable, on as AppDatePicker, sn as AppDateRangePicker, cn as AppDescriptions, dn as AppDropdown, Ve as AppEmptyState, vn as AppFileAttachment, xn as AppFilePicker, Sn as AppFloatingDock, Cn as AppFormActions, wn as AppFormRow, Tn as AppFormSection, Y as AppIcon, En as AppInfoList, qe as AppInfoTip, zt as AppInput, jn as AppKpiTile, Fn as AppLink, Ln as AppLogoPicker, Vn as AppMeter, jt as AppModal, Hn as AppMultiSelect, Un as AppNumberInput, Wn as AppOtpInput, Gn as AppPageHeader, Kn as AppPagination, qn as AppPhoneNumberInput, Ge as AppPopover, Jn as AppPricingCard, Zn as AppProgress, Qn as AppRadio, $n as AppRepeater, Z as AppRequiredMark, er as AppResourceCard, nr as AppResult, rr as AppScrollbar, ir as AppSearch, or as AppSegmented, cr as AppSelect, $t as AppSelectMini, lr as AppShell, fr as AppSidebarMenu, Yt as AppSkeleton, Xt as AppSkeletonRows, pr as AppSlider, He as AppSpinner, hr as AppSplash, gr as AppStatusBadge, _r as AppStepper, yr as AppSwitch, br as AppTableEmptyState, tn as AppTablePagination, wr as AppTabs, Tr as AppTagInput, Er as AppTextarea, kr as AppTimePicker, Or as AppTimeline, Yr as AppToast, Zr as AppToolbar, ce as AppTooltip, Qr as AppWizard, ei as AppWorkspaceSwitcher, Vt as MODAL_ICONS, ai as dismissAll, ci as errorToast, Ee as iconNames, Oe as registerIcons, si as toast, li as useCommandPaletteShortcut, ui as usePagination };
|