@purpur/library 9.8.0 → 9.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +27 -0
- package/CHANGELOG.md +13 -1
- package/dist/{RichText-yobCUjTD.js → RichText-BAVZadzi.js} +2 -2
- package/dist/{RichText-yobCUjTD.js.map → RichText-BAVZadzi.js.map} +1 -1
- package/dist/{RichText-jZ-sHV-u.mjs → RichText-D4vznH1B.mjs} +2 -2
- package/dist/{RichText-jZ-sHV-u.mjs.map → RichText-D4vznH1B.mjs.map} +1 -1
- package/dist/{accordion-CIU4U8-4.mjs → accordion-B6OoQ4uZ.mjs} +2 -2
- package/dist/{accordion-CIU4U8-4.mjs.map → accordion-B6OoQ4uZ.mjs.map} +1 -1
- package/dist/{accordion-DyhOG54L.js → accordion-BfpN5h4C.js} +2 -2
- package/dist/{accordion-DyhOG54L.js.map → accordion-BfpN5h4C.js.map} +1 -1
- package/dist/accordion.cjs.js +1 -1
- package/dist/accordion.es.js +1 -1
- package/dist/{autocomplete-Bbth0nDG.js → autocomplete-CcVDJbwS.js} +2 -2
- package/dist/{autocomplete-Bbth0nDG.js.map → autocomplete-CcVDJbwS.js.map} +1 -1
- package/dist/{autocomplete-A9-Ni60G.mjs → autocomplete-DF17Zm7Q.mjs} +2 -2
- package/dist/{autocomplete-A9-Ni60G.mjs.map → autocomplete-DF17Zm7Q.mjs.map} +1 -1
- package/dist/autocomplete.cjs.js +1 -1
- package/dist/autocomplete.es.js +1 -1
- package/dist/avatar-BDF2KuEh.mjs +28 -0
- package/dist/avatar-BDF2KuEh.mjs.map +1 -0
- package/dist/avatar-nDQ8fk-2.js +2 -0
- package/dist/avatar-nDQ8fk-2.js.map +1 -0
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.es.js +1 -1
- package/dist/{card-DFdUs5RG.js → card-pdsBEJif.js} +2 -2
- package/dist/{card-DFdUs5RG.js.map → card-pdsBEJif.js.map} +1 -1
- package/dist/{card-C2mdp-ur.mjs → card-t2ZkZ82G.mjs} +2 -2
- package/dist/{card-C2mdp-ur.mjs.map → card-t2ZkZ82G.mjs.map} +1 -1
- package/dist/card.cjs.js +1 -1
- package/dist/card.es.js +1 -1
- package/dist/{checkbox-BHTx89JQ.mjs → checkbox-DaRtZXrE.mjs} +2 -2
- package/dist/{checkbox-BHTx89JQ.mjs.map → checkbox-DaRtZXrE.mjs.map} +1 -1
- package/dist/{checkbox-CDNcNv6d.js → checkbox-qjWQEoa5.js} +2 -2
- package/dist/{checkbox-CDNcNv6d.js.map → checkbox-qjWQEoa5.js.map} +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.es.js +1 -1
- package/dist/comparison-table-DHFpydbq.js +2 -0
- package/dist/comparison-table-DHFpydbq.js.map +1 -0
- package/dist/comparison-table-DQJL1IVC.mjs +293 -0
- package/dist/comparison-table-DQJL1IVC.mjs.map +1 -0
- package/dist/comparison-table.cjs.js +1 -1
- package/dist/comparison-table.es.js +1 -1
- package/dist/components/alert-badge/src/alert-badge.visual.fixtures.d.ts +15 -0
- package/dist/components/alert-badge/src/alert-badge.visual.fixtures.d.ts.map +1 -0
- package/dist/components/avatar/src/avatar.d.ts +2 -2
- package/dist/components/avatar/src/avatar.d.ts.map +1 -1
- package/dist/components/avatar/src/avatar.visual.fixtures.d.ts +14 -0
- package/dist/components/avatar/src/avatar.visual.fixtures.d.ts.map +1 -0
- package/dist/components/badge/src/badge.visual.fixtures.d.ts.map +1 -1
- package/dist/components/comparison-table/src/components/OptionCard/option-card.d.ts +1 -1
- package/dist/components/comparison-table/src/components/OptionCard/option-card.d.ts.map +1 -1
- package/dist/components/countdown/src/countdown.d.ts.map +1 -1
- package/dist/components/countdown/src/countdown.types.d.ts +10 -0
- package/dist/components/countdown/src/countdown.types.d.ts.map +1 -1
- package/dist/components/countdown/src/countdown.visual.fixtures.d.ts +13 -0
- package/dist/components/countdown/src/countdown.visual.fixtures.d.ts.map +1 -0
- package/dist/components/countdown/src/utils.d.ts +1 -1
- package/dist/components/countdown/src/utils.d.ts.map +1 -1
- package/dist/components/search-field/src/search-field.visual.fixtures.d.ts +14 -0
- package/dist/components/search-field/src/search-field.visual.fixtures.d.ts.map +1 -0
- package/dist/{content-block-CakKeJtN.mjs → content-block-CDMrz41K.mjs} +2 -2
- package/dist/{content-block-CakKeJtN.mjs.map → content-block-CDMrz41K.mjs.map} +1 -1
- package/dist/{content-block-CrekbIfe.js → content-block-DyYAnL2e.js} +2 -2
- package/dist/{content-block-CrekbIfe.js.map → content-block-DyYAnL2e.js.map} +1 -1
- package/dist/content-block.cjs.js +1 -1
- package/dist/content-block.es.js +1 -1
- package/dist/countdown-5Ni6OlVY.mjs +189 -0
- package/dist/countdown-5Ni6OlVY.mjs.map +1 -0
- package/dist/countdown-CGXJyzB2.js +2 -0
- package/dist/countdown-CGXJyzB2.js.map +1 -0
- package/dist/countdown.cjs.js +1 -1
- package/dist/countdown.es.js +1 -1
- package/dist/{dropdown-CMO_VD5e.mjs → dropdown-CDK_eRm3.mjs} +3 -3
- package/dist/{dropdown-CMO_VD5e.mjs.map → dropdown-CDK_eRm3.mjs.map} +1 -1
- package/dist/{dropdown-DJKNQnuo.js → dropdown-_FLHLyPL.js} +2 -2
- package/dist/{dropdown-DJKNQnuo.js.map → dropdown-_FLHLyPL.js.map} +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.es.js +1 -1
- package/dist/{footer-cet787Iq.js → footer-CS6ZfztM.js} +2 -2
- package/dist/{footer-cet787Iq.js.map → footer-CS6ZfztM.js.map} +1 -1
- package/dist/{footer-BMlXRro2.mjs → footer-OJXbTn1e.mjs} +2 -2
- package/dist/{footer-BMlXRro2.mjs.map → footer-OJXbTn1e.mjs.map} +1 -1
- package/dist/footer.cjs.js +1 -1
- package/dist/footer.es.js +1 -1
- package/dist/{hero-banner-D__doaU7.js → hero-banner--v-ezYMr.js} +2 -2
- package/dist/{hero-banner-D__doaU7.js.map → hero-banner--v-ezYMr.js.map} +1 -1
- package/dist/{hero-banner-B08jC0Sf.mjs → hero-banner-n9K-Jsdz.mjs} +2 -2
- package/dist/{hero-banner-B08jC0Sf.mjs.map → hero-banner-n9K-Jsdz.mjs.map} +1 -1
- package/dist/hero-banner.cjs.js +1 -1
- package/dist/hero-banner.es.js +1 -1
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +28 -28
- package/dist/{listbox-i6BQQ-NZ.mjs → listbox-CtV-Vcmy.mjs} +2 -2
- package/dist/{listbox-i6BQQ-NZ.mjs.map → listbox-CtV-Vcmy.mjs.map} +1 -1
- package/dist/{listbox-ATP4hOWF.js → listbox-lXO21cJV.js} +2 -2
- package/dist/{listbox-ATP4hOWF.js.map → listbox-lXO21cJV.js.map} +1 -1
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.es.js +1 -1
- package/dist/{loading-Dwtkjstg.js → loading-B_0NjCnh.js} +2 -2
- package/dist/{loading-Dwtkjstg.js.map → loading-B_0NjCnh.js.map} +1 -1
- package/dist/{loading-r23nxJSz.mjs → loading-DqZBpMaa.mjs} +2 -2
- package/dist/{loading-r23nxJSz.mjs.map → loading-DqZBpMaa.mjs.map} +1 -1
- package/dist/loading.cjs.js +1 -1
- package/dist/loading.es.js +1 -1
- package/dist/{message-D9CDwcw9.mjs → message-CeXuAhmb.mjs} +3 -3
- package/dist/{message-D9CDwcw9.mjs.map → message-CeXuAhmb.mjs.map} +1 -1
- package/dist/{message-0yTS5pOF.js → message-DsGB-JFh.js} +2 -2
- package/dist/{message-0yTS5pOF.js.map → message-DsGB-JFh.js.map} +1 -1
- package/dist/message.cjs.js +1 -1
- package/dist/message.es.js +1 -1
- package/dist/{modal-Evh8sCBO.mjs → modal-Bu1Zv5Ic.mjs} +2 -2
- package/dist/{modal-Evh8sCBO.mjs.map → modal-Bu1Zv5Ic.mjs.map} +1 -1
- package/dist/{modal-CmPPxJ7Y.js → modal-D0Qxrvx5.js} +2 -2
- package/dist/{modal-CmPPxJ7Y.js.map → modal-D0Qxrvx5.js.map} +1 -1
- package/dist/modal.cjs.js +1 -1
- package/dist/modal.es.js +1 -1
- package/dist/{notification-B5bNNq86.js → notification-D2oClkX2.js} +2 -2
- package/dist/{notification-B5bNNq86.js.map → notification-D2oClkX2.js.map} +1 -1
- package/dist/{notification-BbQCmsnY.mjs → notification-DiVdy6E_.mjs} +2 -2
- package/dist/{notification-BbQCmsnY.mjs.map → notification-DiVdy6E_.mjs.map} +1 -1
- package/dist/notification.cjs.js +1 -1
- package/dist/notification.es.js +1 -1
- package/dist/{pagination-rFRdkHII.js → pagination-BDfaybj3.js} +2 -2
- package/dist/{pagination-rFRdkHII.js.map → pagination-BDfaybj3.js.map} +1 -1
- package/dist/{pagination-Cc_4zCQA.mjs → pagination-Bm38GKga.mjs} +2 -2
- package/dist/{pagination-Cc_4zCQA.mjs.map → pagination-Bm38GKga.mjs.map} +1 -1
- package/dist/pagination.cjs.js +1 -1
- package/dist/pagination.es.js +1 -1
- package/dist/{paragraph-By4jMjnH.js → paragraph-B8HFdNne.js} +2 -2
- package/dist/{paragraph-By4jMjnH.js.map → paragraph-B8HFdNne.js.map} +1 -1
- package/dist/{paragraph-DSxXmX_0.mjs → paragraph-CwAdFoIm.mjs} +3 -3
- package/dist/{paragraph-DSxXmX_0.mjs.map → paragraph-CwAdFoIm.mjs.map} +1 -1
- package/dist/paragraph.cjs.js +1 -1
- package/dist/paragraph.es.js +1 -1
- package/dist/{popover-XJqF5DHT.js → popover-BFozkeS3.js} +2 -2
- package/dist/{popover-XJqF5DHT.js.map → popover-BFozkeS3.js.map} +1 -1
- package/dist/{popover-BSUdf0Ae.mjs → popover-DFPGkVJ6.mjs} +2 -2
- package/dist/{popover-BSUdf0Ae.mjs.map → popover-DFPGkVJ6.mjs.map} +1 -1
- package/dist/popover.cjs.js +1 -1
- package/dist/popover.es.js +1 -1
- package/dist/{product-card-Bt-F0wKr.mjs → product-card-CxfHfJVV.mjs} +3 -3
- package/dist/{product-card-Bt-F0wKr.mjs.map → product-card-CxfHfJVV.mjs.map} +1 -1
- package/dist/{product-card-8X-Ld2d_.js → product-card-XxBwuxM-.js} +2 -2
- package/dist/{product-card-8X-Ld2d_.js.map → product-card-XxBwuxM-.js.map} +1 -1
- package/dist/product-card.cjs.js +1 -1
- package/dist/product-card.es.js +1 -1
- package/dist/{promotion-card-BnXD2mkp.js → promotion-card-C1UoxzcV.js} +2 -2
- package/dist/{promotion-card-BnXD2mkp.js.map → promotion-card-C1UoxzcV.js.map} +1 -1
- package/dist/{promotion-card-DOO0VCI8.mjs → promotion-card-CooYPpFo.mjs} +37 -37
- package/dist/{promotion-card-DOO0VCI8.mjs.map → promotion-card-CooYPpFo.mjs.map} +1 -1
- package/dist/promotion-card.cjs.js +1 -1
- package/dist/promotion-card.es.js +1 -1
- package/dist/purpur.css +1 -1
- package/dist/{radio-card-group-nrDi5EPK.js → radio-card-group-BXwkIIEw.js} +2 -2
- package/dist/{radio-card-group-nrDi5EPK.js.map → radio-card-group-BXwkIIEw.js.map} +1 -1
- package/dist/{radio-card-group-ZBXjYcQs.mjs → radio-card-group-Bn6SK0Wc.mjs} +2 -2
- package/dist/{radio-card-group-ZBXjYcQs.mjs.map → radio-card-group-Bn6SK0Wc.mjs.map} +1 -1
- package/dist/radio-card-group.cjs.js +1 -1
- package/dist/radio-card-group.es.js +1 -1
- package/dist/rich-text.cjs.js +1 -1
- package/dist/rich-text.es.js +1 -1
- package/dist/{search-field-_h8xn-sj.mjs → search-field-BPLzy3RR.mjs} +2 -2
- package/dist/{search-field-_h8xn-sj.mjs.map → search-field-BPLzy3RR.mjs.map} +1 -1
- package/dist/{search-field-vh6uz5KV.js → search-field-Dx4qCcrh.js} +2 -2
- package/dist/{search-field-vh6uz5KV.js.map → search-field-Dx4qCcrh.js.map} +1 -1
- package/dist/search-field.cjs.js +1 -1
- package/dist/search-field.es.js +1 -1
- package/dist/{stepper-B-nCLs2D.mjs → stepper-DSl-YCMe.mjs} +2 -2
- package/dist/{stepper-B-nCLs2D.mjs.map → stepper-DSl-YCMe.mjs.map} +1 -1
- package/dist/{stepper-CTKlnH0q.js → stepper-eaxkBC7o.js} +2 -2
- package/dist/{stepper-CTKlnH0q.js.map → stepper-eaxkBC7o.js.map} +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.es.js +1 -1
- package/dist/{table-DOPXfD-s.mjs → table-D9MKkbPO.mjs} +5 -5
- package/dist/{table-DOPXfD-s.mjs.map → table-D9MKkbPO.mjs.map} +1 -1
- package/dist/{table-DTQe4nN8.js → table-rS3hITtj.js} +2 -2
- package/dist/{table-DTQe4nN8.js.map → table-rS3hITtj.js.map} +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.es.js +1 -1
- package/dist/{toggle-B8ZLUVar.js → toggle-BgrfdtmN.js} +2 -2
- package/dist/{toggle-B8ZLUVar.js.map → toggle-BgrfdtmN.js.map} +1 -1
- package/dist/{toggle-CY3J8BRX.mjs → toggle-Cg1KFa_2.mjs} +2 -2
- package/dist/{toggle-CY3J8BRX.mjs.map → toggle-Cg1KFa_2.mjs.map} +1 -1
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.es.js +1 -1
- package/dist/{tooltip-CDnJKoIA.js → tooltip-B-11qk-0.js} +2 -2
- package/dist/{tooltip-CDnJKoIA.js.map → tooltip-B-11qk-0.js.map} +1 -1
- package/dist/{tooltip-pwJMEBBP.mjs → tooltip-DngYHn5W.mjs} +2 -2
- package/dist/{tooltip-pwJMEBBP.mjs.map → tooltip-DngYHn5W.mjs.map} +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.es.js +1 -1
- package/package.json +25 -25
- package/dist/avatar-CYnD57o4.js +0 -2
- package/dist/avatar-CYnD57o4.js.map +0 -1
- package/dist/avatar-CzbDD1MK.mjs +0 -27
- package/dist/avatar-CzbDD1MK.mjs.map +0 -1
- package/dist/comparison-table-0UDB2BTU.js +0 -2
- package/dist/comparison-table-0UDB2BTU.js.map +0 -1
- package/dist/comparison-table-CjTE-fHN.mjs +0 -292
- package/dist/comparison-table-CjTE-fHN.mjs.map +0 -1
- package/dist/countdown-BsLsEZBv.mjs +0 -179
- package/dist/countdown-BsLsEZBv.mjs.map +0 -1
- package/dist/countdown-hYrFLmRg.js +0 -2
- package/dist/countdown-hYrFLmRg.js.map +0 -1
package/dist/library.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { A as p, a as e } from "./accordion-
|
|
2
|
+
import { A as p, a as e } from "./accordion-B6OoQ4uZ.mjs";
|
|
3
3
|
import { A as s, a as t, b as i } from "./alert-badge-DR8cigWu.mjs";
|
|
4
|
-
import { A as l, u as c } from "./autocomplete-
|
|
5
|
-
import { A as g } from "./avatar-
|
|
4
|
+
import { A as l, u as c } from "./autocomplete-DF17Zm7Q.mjs";
|
|
5
|
+
import { A as g } from "./avatar-BDF2KuEh.mjs";
|
|
6
6
|
import { B as T, a as B, b as v } from "./badge-DalD-yqG.mjs";
|
|
7
7
|
import { B as m, I as x } from "./breadcrumbs-BtA7VLmX.mjs";
|
|
8
8
|
import { B as I, a as k, b, c as f } from "./button-4-yWOgtD.mjs";
|
|
9
9
|
import { C as N } from "./calendar-d53vgYqR.mjs";
|
|
10
|
-
import { C as A } from "./card-
|
|
10
|
+
import { C as A } from "./card-t2ZkZ82G.mjs";
|
|
11
11
|
import { C as E } from "./carousel-BIKcwvYz.mjs";
|
|
12
12
|
import { C as R } from "./chat-field-CVF4DooY.mjs";
|
|
13
|
-
import { C as L, c as M } from "./checkbox-
|
|
13
|
+
import { C as L, c as M } from "./checkbox-DaRtZXrE.mjs";
|
|
14
14
|
import { C as H } from "./chip-group-xuOe7nL3.mjs";
|
|
15
15
|
import { B as _, C as V, S as z } from "./color-dot-Dz9yzVX3.mjs";
|
|
16
|
-
import { C as w } from "./comparison-table-
|
|
16
|
+
import { C as w } from "./comparison-table-DQJL1IVC.mjs";
|
|
17
17
|
import { C as X, a as q, W as j } from "./container-DLjBTB_w.mjs";
|
|
18
|
-
import { C as K } from "./content-block-
|
|
19
|
-
import { C as J } from "./countdown-
|
|
18
|
+
import { C as K } from "./content-block-CDMrz41K.mjs";
|
|
19
|
+
import { C as J } from "./countdown-5Ni6OlVY.mjs";
|
|
20
20
|
import { C as rr } from "./counter-badge-C6yuD7se.mjs";
|
|
21
21
|
import { C as or, c as pr } from "./cta-link-pwva2f2r.mjs";
|
|
22
22
|
import { D as ur } from "./date-field-HEFdHIxk.mjs";
|
|
@@ -24,44 +24,44 @@ import { D as tr } from "./date-picker-cQewKIMN.mjs";
|
|
|
24
24
|
import { D as nr } from "./date-range-field-_WctWD29.mjs";
|
|
25
25
|
import { D as cr, a as Cr, b as gr, c as dr, s as Tr } from "./dismissable-chip-group-Cfs2s2BH.mjs";
|
|
26
26
|
import { D as vr } from "./drawer-cIUx6WSZ.mjs";
|
|
27
|
-
import { D as mr, u as xr } from "./dropdown-
|
|
27
|
+
import { D as mr, u as xr } from "./dropdown-CDK_eRm3.mjs";
|
|
28
28
|
import { F as Ir, a as kr } from "./field-error-text-CBSX8dGx.mjs";
|
|
29
29
|
import { F as fr } from "./field-helper-text-C5ee4SFV.mjs";
|
|
30
|
-
import { F as Nr } from "./footer-
|
|
30
|
+
import { F as Nr } from "./footer-OJXbTn1e.mjs";
|
|
31
31
|
import { G as Ar } from "./grid-DGnCQgwf.mjs";
|
|
32
32
|
import { D as Er, H as Gr, a as Rr, T as Dr } from "./heading-xwBuT_-9.mjs";
|
|
33
|
-
import { H as Mr, T as Wr } from "./hero-banner-
|
|
33
|
+
import { H as Mr, T as Wr } from "./hero-banner-n9K-Jsdz.mjs";
|
|
34
34
|
import { L as Fr } from "./label-7sJe5-pX.mjs";
|
|
35
35
|
import { L as Vr, a as zr, l as Ur } from "./link-DY5WLpyc.mjs";
|
|
36
|
-
import { L as Zr, a as Xr } from "./listbox-
|
|
37
|
-
import { L as jr } from "./loading-
|
|
38
|
-
import { M as Kr } from "./message-
|
|
39
|
-
import { M as Jr } from "./modal-
|
|
40
|
-
import { N as ra, a as aa, b as oa, c as pa, n as ea, d as ua, e as sa } from "./notification-
|
|
36
|
+
import { L as Zr, a as Xr } from "./listbox-CtV-Vcmy.mjs";
|
|
37
|
+
import { L as jr } from "./loading-DqZBpMaa.mjs";
|
|
38
|
+
import { M as Kr } from "./message-CeXuAhmb.mjs";
|
|
39
|
+
import { M as Jr } from "./modal-Bu1Zv5Ic.mjs";
|
|
40
|
+
import { N as ra, a as aa, b as oa, c as pa, n as ea, d as ua, e as sa } from "./notification-DiVdy6E_.mjs";
|
|
41
41
|
import { N as ia } from "./notification-banner-CZTQZ5Le.mjs";
|
|
42
|
-
import { P as la } from "./pagination-
|
|
43
|
-
import { P as Ca, a as ga } from "./paragraph-
|
|
44
|
-
import { P as Ta } from "./popover-
|
|
45
|
-
import { P as va } from "./product-card-
|
|
46
|
-
import { P as ma, p as xa } from "./promotion-card-
|
|
42
|
+
import { P as la } from "./pagination-Bm38GKga.mjs";
|
|
43
|
+
import { P as Ca, a as ga } from "./paragraph-CwAdFoIm.mjs";
|
|
44
|
+
import { P as Ta } from "./popover-DFPGkVJ6.mjs";
|
|
45
|
+
import { P as va } from "./product-card-CxfHfJVV.mjs";
|
|
46
|
+
import { P as ma, p as xa } from "./promotion-card-CooYPpFo.mjs";
|
|
47
47
|
import { Q as Ia, q as ka, a as ba } from "./quantity-selector-B4YnfmNb.mjs";
|
|
48
48
|
import { R as ha, a as Na, b as Pa } from "./radio-button-group-CFqPsu5A.mjs";
|
|
49
|
-
import { R as Oa, a as Ea } from "./radio-card-group-
|
|
50
|
-
import { R as Ra, r as Da } from "./RichText-
|
|
51
|
-
import { S as Ma, a as Wa, s as Ha } from "./search-field-
|
|
49
|
+
import { R as Oa, a as Ea } from "./radio-card-group-Bn6SK0Wc.mjs";
|
|
50
|
+
import { R as Ra, r as Da } from "./RichText-D4vznH1B.mjs";
|
|
51
|
+
import { S as Ma, a as Wa, s as Ha } from "./search-field-BPLzy3RR.mjs";
|
|
52
52
|
import { S as _a } from "./select-BEmu_fh9.mjs";
|
|
53
53
|
import { S as za, r as Ua } from "./skeleton-CDGzLI-T.mjs";
|
|
54
54
|
import { S as Za, a as Xa } from "./slider-CDOrFmK-.mjs";
|
|
55
55
|
import { S as ja, a as Qa } from "./spacer-4im7q6p0.mjs";
|
|
56
56
|
import { S as Ya, a as Ja, s as $a } from "./spinner-DRQN6YdK.mjs";
|
|
57
|
-
import { S as ao } from "./stepper-
|
|
58
|
-
import { T as po, c as eo } from "./table-
|
|
57
|
+
import { S as ao } from "./stepper-DSl-YCMe.mjs";
|
|
58
|
+
import { T as po, c as eo } from "./table-D9MKkbPO.mjs";
|
|
59
59
|
import { T as so, c as to, t as io } from "./tabs-Bye5lgZ1.mjs";
|
|
60
60
|
import { R as lo, T as co } from "./text-area-C58aZEPa.mjs";
|
|
61
61
|
import { T as go, i as To, t as Bo } from "./text-field-D8MMa6ij.mjs";
|
|
62
62
|
import { E as So, T as mo } from "./text-spacing-BU0mkEf9.mjs";
|
|
63
|
-
import { T as yo } from "./toggle-
|
|
64
|
-
import { T as ko, a as bo, b as fo } from "./tooltip-
|
|
63
|
+
import { T as yo } from "./toggle-Cg1KFa_2.mjs";
|
|
64
|
+
import { T as ko, a as bo, b as fo } from "./tooltip-DngYHn5W.mjs";
|
|
65
65
|
import { V as No } from "./visually-hidden-BYFkJEp1.mjs";
|
|
66
66
|
import { purpurBorderRadiusFull as Ao, purpurBorderRadiusLg as Oo, purpurBorderRadiusMd as Eo, purpurBorderRadiusSm as Go, purpurBorderRadiusXl as Ro, purpurBorderRadiusXs as Do, purpurBorderWidthLg as Lo, purpurBorderWidthMd as Mo, purpurBorderWidthSm as Wo, purpurBorderWidthXs as Ho, purpurFilterBlurOnImage as Fo, purpurGradientAiBackgroundInteractiveExpressive as _o, purpurGradientAiBackgroundInteractiveExpressiveNegative as Vo, purpurGradientAiBackgroundInteractivePrimary as zo, purpurGradientAiBackgroundInteractivePrimaryNegative as Uo, purpurGradientAiBackgroundPrimaryNegative as wo, purpurGradientAiBorderInteractivePrimary as Zo, purpurGradientAiBorderInteractivePrimaryNegative as Xo, purpurGradientAiTextInteractivePrimary as qo, purpurGradientAiTextInteractivePrimaryNegative as jo, purpurShadowLg as Qo, purpurShadowMd as Ko, purpurShadowNone as Yo, purpurShadowSm as Jo, purpurSpacing0 as $o, purpurSpacing10 as rp, purpurSpacing100 as ap, purpurSpacing1000 as op, purpurSpacing1200 as pp, purpurSpacing150 as ep, purpurSpacing1600 as up, purpurSpacing200 as sp, purpurSpacing25 as tp, purpurSpacing250 as ip, purpurSpacing300 as np, purpurSpacing400 as lp, purpurSpacing50 as cp, purpurSpacing600 as Cp, purpurSpacing800 as gp, purpurSpacingGutterLg as dp, purpurSpacingGutterMd as Tp, purpurSpacingGutterSm as Bp, purpurSpacingGutterXl as vp, purpurSpacingPagePaddingLg as Sp, purpurSpacingPagePaddingMd as mp, purpurSpacingPagePaddingSm as xp, purpurSpacingPagePaddingXl as yp, purpurTypographyFamilyDefault as Ip, purpurTypographyFamilyDisplay as kp, purpurTypographyLineHeightDefault as bp, purpurTypographyLineHeightLoose as fp, purpurTypographyLineHeightLooser as hp, purpurTypographyLineHeightSnug as Np, purpurTypographyLineHeightTight as Pp, purpurTypographyScale100 as Ap, purpurTypographyScale1000 as Op, purpurTypographyScale1100 as Ep, purpurTypographyScale150 as Gp, purpurTypographyScale200 as Rp, purpurTypographyScale300 as Dp, purpurTypographyScale400 as Lp, purpurTypographyScale50 as Mp, purpurTypographyScale500 as Wp, purpurTypographyScale600 as Hp, purpurTypographyScale650 as Fp, purpurTypographyScale700 as _p, purpurTypographyScale75 as Vp, purpurTypographyScale800 as zp, purpurTypographyScale850 as Up, purpurTypographyScale900 as wp, purpurTypographyWeightBold as Zp, purpurTypographyWeightMedium as Xp, purpurTypographyWeightNormal as qp } from "./tokens.es.js";
|
|
67
67
|
import { p as Qp, a as Kp, b as Yp, c as Jp, d as $p, e as re, f as ae, g as oe } from "./variables-DkCN2x27.mjs";
|
|
@@ -2,7 +2,7 @@ import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as m, useContext as I, createContext as P } from "react";
|
|
3
3
|
import { c as u } from "./bind-CU-R61T-.mjs";
|
|
4
4
|
import { a as j } from "./checkmark.es-DdgIZN2R.mjs";
|
|
5
|
-
import { P as B } from "./paragraph-
|
|
5
|
+
import { P as B } from "./paragraph-CwAdFoIm.mjs";
|
|
6
6
|
const x = {
|
|
7
7
|
"purpur-listbox": "_purpur-listbox_xi2co_1",
|
|
8
8
|
"purpur-listbox--negative": "_purpur-listbox--negative_xi2co_15",
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
b as L,
|
|
71
71
|
_ as a
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=listbox-
|
|
73
|
+
//# sourceMappingURL=listbox-CtV-Vcmy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-
|
|
1
|
+
{"version":3,"file":"listbox-CtV-Vcmy.mjs","sources":["../../../components/listbox/src/listbox-item.tsx","../../../components/listbox/src/listbox.tsx"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport { ListboxNegativeContext } from \"./listbox\";\nimport styles from \"./listbox.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-listbox\";\n\nexport type ListboxItemProps = Omit<BaseProps<\"li\">, \"role\"> & {\n highlighted?: boolean;\n hovered?: boolean;\n key?: string;\n selected?: boolean;\n disabled?: boolean;\n noninteractive?: boolean;\n negative?: boolean;\n /** When true, hides the built-in checkmark icon while preserving `aria-selected`. */\n hideSelectedIcon?: boolean;\n};\n\nexport const ListboxItem = forwardRef<HTMLLIElement, ListboxItemProps>((props, ref) => {\n const listboxNegative = useContext(ListboxNegativeContext);\n const {\n disabled,\n highlighted,\n hovered,\n selected,\n children,\n className,\n noninteractive,\n negative,\n hideSelectedIcon,\n ...liProps\n } = props;\n const resolvedNegative = listboxNegative ?? negative;\n\n const classes = cx(`${rootClassName}-item`, className, {\n [`${rootClassName}-item--highlighted`]: highlighted,\n [`${rootClassName}-item--selected`]: selected,\n [`${rootClassName}-item--hovered`]: hovered,\n [`${rootClassName}-item--disabled`]: disabled,\n [`${rootClassName}-item--noninteractive`]: noninteractive,\n [`${rootClassName}-item--negative`]: resolvedNegative,\n });\n\n return (\n <li\n {...liProps}\n ref={ref}\n className={classes}\n aria-selected={!!selected}\n role=\"option\"\n aria-disabled={!!disabled}\n >\n {typeof children === \"string\" ? (\n <Paragraph disabled={disabled} negative={resolvedNegative}>\n {children}\n </Paragraph>\n ) : (\n children\n )}\n {selected && !hideSelectedIcon && (\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}-item__icon`)} />\n )}\n </li>\n );\n});\n\nListboxItem.displayName = \"ListBoxItem\";\n","import React, {\n createContext,\n forwardRef,\n type ForwardRefExoticComponent,\n type PropsWithoutRef,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./listbox.module.scss\";\nimport { ListboxItem } from \"./listbox-item\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-listbox\";\n\nexport const ListboxNegativeContext = createContext<boolean | undefined>(undefined);\n\nexport type ListboxProps = Omit<BaseProps<\"ul\">, \"role\"> & {\n \"aria-label\": NonNullable<BaseProps<\"ul\">[\"aria-label\"]>;\n \"aria-expanded\": NonNullable<BaseProps<\"ul\">[\"aria-expanded\"]>;\n /** When true, renders the Listbox for use on dark or colored backgrounds. */\n negative?: boolean;\n};\n\ntype ListboxStatic = {\n Item: typeof ListboxItem;\n};\n\ntype ListboxComponent = ForwardRefExoticComponent<PropsWithoutRef<ListboxProps>> & ListboxStatic;\n\nexport const Listbox = forwardRef<HTMLUListElement, ListboxProps>(\n ({ children, negative = false, ...listboxProps }, ref) => (\n <ul\n {...listboxProps}\n ref={ref}\n className={cx(rootClassName, listboxProps.className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role=\"listbox\"\n >\n <ListboxNegativeContext.Provider value={negative}>{children}</ListboxNegativeContext.Provider>\n </ul>\n )\n) as ListboxComponent;\n\nexport type { ListboxItemProps } from \"./listbox-item\";\nListbox.Item = ListboxItem;\nListbox.displayName = \"ListBox\";\n"],"names":["cx","c","styles","rootClassName","ListboxItem","forwardRef","props","ref","listboxNegative","useContext","ListboxNegativeContext","disabled","highlighted","hovered","selected","children","className","noninteractive","negative","hideSelectedIcon","liProps","resolvedNegative","classes","jsxs","jsx","Paragraph","IconCheckmark","createContext","Listbox","listboxProps"],"mappings":";;;;;;;;;;;;;;;GASMA,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,kBAcTC,IAAcC,EAA4C,CAACC,GAAOC,MAAQ;AACrF,QAAMC,IAAkBC,EAAWC,CAAsB,GACnD;AAAA,IACJ,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDd,GACEe,IAAmBb,KAAmBU,GAEtCI,IAAUtB,EAAG,GAAGG,CAAa,SAASa,GAAW;AAAA,IACrD,CAAC,GAAGb,CAAa,oBAAoB,GAAGS;AAAA,IACxC,CAAC,GAAGT,CAAa,iBAAiB,GAAGW;AAAA,IACrC,CAAC,GAAGX,CAAa,gBAAgB,GAAGU;AAAA,IACpC,CAAC,GAAGV,CAAa,iBAAiB,GAAGQ;AAAA,IACrC,CAAC,GAAGR,CAAa,uBAAuB,GAAGc;AAAA,IAC3C,CAAC,GAAGd,CAAa,iBAAiB,GAAGkB;AAAA,EAAA,CACtC;AAED,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGH;AAAA,MACJ,KAAAb;AAAA,MACA,WAAWe;AAAA,MACX,iBAAe,CAAC,CAACR;AAAA,MACjB,MAAK;AAAA,MACL,iBAAe,CAAC,CAACH;AAAA,MAEhB,UAAA;AAAA,QAAA,OAAOI,KAAa,WACnB,gBAAAS,EAACC,GAAA,EAAU,UAAAd,GAAoB,UAAUU,GACtC,UAAAN,GACH,IAEAA;AAAA,QAEDD,KAAY,CAACK,KACZ,gBAAAK,EAACE,GAAA,EAAc,MAAK,MAAK,WAAW1B,EAAG,GAAGG,CAAa,aAAa,EAAA,CAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAI/E,CAAC;AAEDC,EAAY,cAAc;AC7D1B,MAAMJ,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,kBAETO,IAAyBiB,EAAmC,MAAS,GAerEC,IAAUvB;AAAA,EACrB,CAAC,EAAE,UAAAU,GAAU,UAAAG,IAAW,IAAO,GAAGW,EAAA,GAAgBtB,MAChD,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGK;AAAA,MACJ,KAAAtB;AAAA,MACA,WAAWP,EAAGG,GAAe0B,EAAa,WAAW;AAAA,QACnD,CAAC,GAAG1B,CAAa,YAAY,GAAGe;AAAA,MAAA,CACjC;AAAA,MACD,MAAK;AAAA,MAEL,4BAACR,EAAuB,UAAvB,EAAgC,OAAOQ,GAAW,UAAAH,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGlE;AAGAa,EAAQ,OAAOxB;AACfwB,EAAQ,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("react"),m=require("./bind-DeUYJ6m9.js"),C=require("./checkmark.es-lYntWFA3.js"),q=require("./paragraph-
|
|
2
|
-
//# sourceMappingURL=listbox-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("react"),m=require("./bind-DeUYJ6m9.js"),C=require("./checkmark.es-lYntWFA3.js"),q=require("./paragraph-B8HFdNne.js"),b={"purpur-listbox":"_purpur-listbox_xi2co_1","purpur-listbox--negative":"_purpur-listbox--negative_xi2co_15","purpur-listbox-item":"_purpur-listbox-item_xi2co_20","purpur-listbox-item--hovered":"_purpur-listbox-item--hovered_xi2co_34","purpur-listbox-item--highlighted":"_purpur-listbox-item--highlighted_xi2co_42","purpur-listbox-item--noninteractive":"_purpur-listbox-item--noninteractive_xi2co_46","purpur-listbox-item--disabled":"_purpur-listbox-item--disabled_xi2co_49","purpur-listbox-item--negative":"_purpur-listbox-item--negative_xi2co_53","purpur-listbox-item__icon":"_purpur-listbox-item__icon_xi2co_70"},p=m.c.bind(b),e="purpur-listbox",_=r.forwardRef((a,s)=>{const o=r.useContext(n),{disabled:i,highlighted:h,hovered:v,selected:c,children:l,className:g,noninteractive:N,negative:$,hideSelectedIcon:L,...f}=a,x=o??$,j=p(`${e}-item`,g,{[`${e}-item--highlighted`]:h,[`${e}-item--selected`]:c,[`${e}-item--hovered`]:v,[`${e}-item--disabled`]:i,[`${e}-item--noninteractive`]:N,[`${e}-item--negative`]:x});return t.jsxs("li",{...f,ref:s,className:j,"aria-selected":!!c,role:"option","aria-disabled":!!i,children:[typeof l=="string"?t.jsx(q.Paragraph,{disabled:i,negative:x,children:l}):l,c&&!L&&t.jsx(C.a,{size:"xs",className:p(`${e}-item__icon`)})]})});_.displayName="ListBoxItem";const y=m.c.bind(b),d="purpur-listbox",n=r.createContext(void 0),u=r.forwardRef(({children:a,negative:s=!1,...o},i)=>t.jsx("ul",{...o,ref:i,className:y(d,o.className,{[`${d}--negative`]:s}),role:"listbox",children:t.jsx(n.Provider,{value:s,children:a})}));u.Item=_;u.displayName="ListBox";exports.Listbox=u;exports.ListboxNegativeContext=n;
|
|
2
|
+
//# sourceMappingURL=listbox-lXO21cJV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-
|
|
1
|
+
{"version":3,"file":"listbox-lXO21cJV.js","sources":["../../../components/listbox/src/listbox-item.tsx","../../../components/listbox/src/listbox.tsx"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport { ListboxNegativeContext } from \"./listbox\";\nimport styles from \"./listbox.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-listbox\";\n\nexport type ListboxItemProps = Omit<BaseProps<\"li\">, \"role\"> & {\n highlighted?: boolean;\n hovered?: boolean;\n key?: string;\n selected?: boolean;\n disabled?: boolean;\n noninteractive?: boolean;\n negative?: boolean;\n /** When true, hides the built-in checkmark icon while preserving `aria-selected`. */\n hideSelectedIcon?: boolean;\n};\n\nexport const ListboxItem = forwardRef<HTMLLIElement, ListboxItemProps>((props, ref) => {\n const listboxNegative = useContext(ListboxNegativeContext);\n const {\n disabled,\n highlighted,\n hovered,\n selected,\n children,\n className,\n noninteractive,\n negative,\n hideSelectedIcon,\n ...liProps\n } = props;\n const resolvedNegative = listboxNegative ?? negative;\n\n const classes = cx(`${rootClassName}-item`, className, {\n [`${rootClassName}-item--highlighted`]: highlighted,\n [`${rootClassName}-item--selected`]: selected,\n [`${rootClassName}-item--hovered`]: hovered,\n [`${rootClassName}-item--disabled`]: disabled,\n [`${rootClassName}-item--noninteractive`]: noninteractive,\n [`${rootClassName}-item--negative`]: resolvedNegative,\n });\n\n return (\n <li\n {...liProps}\n ref={ref}\n className={classes}\n aria-selected={!!selected}\n role=\"option\"\n aria-disabled={!!disabled}\n >\n {typeof children === \"string\" ? (\n <Paragraph disabled={disabled} negative={resolvedNegative}>\n {children}\n </Paragraph>\n ) : (\n children\n )}\n {selected && !hideSelectedIcon && (\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}-item__icon`)} />\n )}\n </li>\n );\n});\n\nListboxItem.displayName = \"ListBoxItem\";\n","import React, {\n createContext,\n forwardRef,\n type ForwardRefExoticComponent,\n type PropsWithoutRef,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./listbox.module.scss\";\nimport { ListboxItem } from \"./listbox-item\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-listbox\";\n\nexport const ListboxNegativeContext = createContext<boolean | undefined>(undefined);\n\nexport type ListboxProps = Omit<BaseProps<\"ul\">, \"role\"> & {\n \"aria-label\": NonNullable<BaseProps<\"ul\">[\"aria-label\"]>;\n \"aria-expanded\": NonNullable<BaseProps<\"ul\">[\"aria-expanded\"]>;\n /** When true, renders the Listbox for use on dark or colored backgrounds. */\n negative?: boolean;\n};\n\ntype ListboxStatic = {\n Item: typeof ListboxItem;\n};\n\ntype ListboxComponent = ForwardRefExoticComponent<PropsWithoutRef<ListboxProps>> & ListboxStatic;\n\nexport const Listbox = forwardRef<HTMLUListElement, ListboxProps>(\n ({ children, negative = false, ...listboxProps }, ref) => (\n <ul\n {...listboxProps}\n ref={ref}\n className={cx(rootClassName, listboxProps.className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role=\"listbox\"\n >\n <ListboxNegativeContext.Provider value={negative}>{children}</ListboxNegativeContext.Provider>\n </ul>\n )\n) as ListboxComponent;\n\nexport type { ListboxItemProps } from \"./listbox-item\";\nListbox.Item = ListboxItem;\nListbox.displayName = \"ListBox\";\n"],"names":["cx","c","styles","rootClassName","ListboxItem","forwardRef","props","ref","listboxNegative","useContext","ListboxNegativeContext","disabled","highlighted","hovered","selected","children","className","noninteractive","negative","hideSelectedIcon","liProps","resolvedNegative","classes","jsxs","jsx","Paragraph","IconCheckmark","createContext","Listbox","listboxProps"],"mappings":"2xBASMA,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAElBC,EAAgB,iBAcTC,EAAcC,EAAAA,WAA4C,CAACC,EAAOC,IAAQ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a,YAAY,EAAGe,CAAA,CACjC,EACD,KAAK,UAEL,eAACR,EAAuB,SAAvB,CAAgC,MAAOQ,EAAW,SAAAH,CAAA,CAAS,CAAA,CAAA,CAGlE,EAGAa,EAAQ,KAAOxB,EACfwB,EAAQ,YAAc"}
|
package/dist/listbox.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./listbox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./listbox-lXO21cJV.js");exports.Listbox=t.Listbox;exports.ListboxNegativeContext=t.ListboxNegativeContext;
|
|
2
2
|
//# sourceMappingURL=listbox.cjs.js.map
|
package/dist/listbox.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),d=require("react"),y=require("./visually-hidden-C2CKovZx.js"),x=require("./bind-DeUYJ6m9.js"),m=require("./paragraph-
|
|
2
|
-
//# sourceMappingURL=loading-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),d=require("react"),y=require("./visually-hidden-C2CKovZx.js"),x=require("./bind-DeUYJ6m9.js"),m=require("./paragraph-B8HFdNne.js"),N={"purpur-loading-dots":"_purpur-loading-dots_kw4ys_1","purpur-loading-dots__dot":"_purpur-loading-dots__dot_kw4ys_7","purpur-loading-dots-bounce":"_purpur-loading-dots-bounce_kw4ys_1","purpur-loading-dots__dot--left":"_purpur-loading-dots__dot--left_kw4ys_22","purpur-loading-dots__dot--middle":"_purpur-loading-dots__dot--middle_kw4ys_25","purpur-loading-dots__dot--right":"_purpur-loading-dots__dot--right_kw4ys_28","purpur-loading-dots--negative":"_purpur-loading-dots--negative_kw4ys_31"},n=x.c.bind(N),a="purpur-loading-dots",w=({className:s,negative:r=!1,"aria-label":e,role:u="status","aria-atomic":p="true","aria-live":_="polite"})=>{const[l,i]=d.useState("");return d.useEffect(()=>{const c=window.setTimeout(()=>{i(e)},0);return()=>window.clearTimeout(c)},[e]),t.jsxs("div",{className:n(a,s,{[`${a}--negative`]:r}),role:u,"aria-atomic":p,"aria-live":_,children:[t.jsx(y.VisuallyHidden,{children:l}),t.jsx("span",{"aria-hidden":"true",className:n(`${a}__dot`,`${a}__dot--left`)}),t.jsx("span",{"aria-hidden":"true",className:n(`${a}__dot`,`${a}__dot--middle`)}),t.jsx("span",{"aria-hidden":"true",className:n(`${a}__dot`,`${a}__dot--right`)})]})};w.displayName="Loading.Dots";const b={"purpur-loading":"_purpur-loading_ugc3y_1","purpur-loading--deep-thinking":"_purpur-loading--deep-thinking_ugc3y_5","purpur-loading__deep-thinking-text":"_purpur-loading__deep-thinking-text_ugc3y_8","purpur-loading-shimmer":"_purpur-loading-shimmer_ugc3y_1","purpur-paragraph":"_purpur-paragraph_ugc3y_29","purpur-loading--negative":"_purpur-loading--negative_ugc3y_33"},h=x.c.bind(b),o="purpur-loading",k=({className:s,negative:r=!1,label:e,"aria-label":u,role:p="status","aria-atomic":_="true","aria-live":l="polite"})=>{const i=u??e,[c,v]=d.useState("");return d.useEffect(()=>{const $=window.setTimeout(()=>{v(i)},0);return()=>window.clearTimeout($)},[i]),t.jsxs("div",{className:h(o,`${o}--deep-thinking`,s,{[`${o}--negative`]:r}),role:p,"aria-atomic":_,"aria-live":l,children:[t.jsx(y.VisuallyHidden,{children:c}),t.jsx(m.Paragraph,{"aria-hidden":"true",className:h(`${o}__deep-thinking-text`),negative:r,variant:m.ParagraphVariant.PARAGRAPH100MEDIUM,children:e})]})};k.displayName="Loading.Text";const g={};g.Dots=w;g.Text=k;exports.Loading=g;
|
|
2
|
+
//# sourceMappingURL=loading-B_0NjCnh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-
|
|
1
|
+
{"version":3,"file":"loading-B_0NjCnh.js","sources":["../../../components/loading/src/loading-dots.tsx","../../../components/loading/src/loading-text.tsx","../../../components/loading/src/loading.tsx"],"sourcesContent":["import React, { type AriaAttributes, type AriaRole, useEffect, useState } from \"react\";\nimport { VisuallyHidden } from \"@purpur/visually-hidden\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./loading-dots.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-loading-dots\";\n\nexport type LoadingDotsProps = {\n className?: string;\n negative?: boolean;\n /** Optional ARIA role for the live region. Defaults to `status`. */\n role?: AriaRole;\n /** Optional ARIA atomic setting for the live region. Defaults to `true`. */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n /** Optional ARIA live politeness setting. Defaults to `polite`. */\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n /** Accessible label announced by assistive technologies for the typing indicator. */\n \"aria-label\": string;\n};\n\nconst LoadingDots = ({\n className,\n negative = false,\n \"aria-label\": ariaLabel,\n role = \"status\",\n \"aria-atomic\": ariaAtomic = \"true\",\n \"aria-live\": ariaLive = \"polite\",\n}: LoadingDotsProps) => {\n // Defer label text by one frame so the live region wrapper is already in the\n // accessibility tree when content appears. VoiceOver only announces content\n // that mutates an existing live region, not content present at mount time.\n const [announcedLabel, setAnnouncedLabel] = useState(\"\");\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n setAnnouncedLabel(ariaLabel);\n }, 0);\n return () => window.clearTimeout(timer);\n }, [ariaLabel]);\n\n return (\n <div\n className={cx(rootClassName, className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role={role}\n aria-atomic={ariaAtomic}\n aria-live={ariaLive}\n >\n <VisuallyHidden>{announcedLabel}</VisuallyHidden>\n <span aria-hidden=\"true\" className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--left`)} />\n <span\n aria-hidden=\"true\"\n className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--middle`)}\n />\n <span aria-hidden=\"true\" className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--right`)} />\n </div>\n );\n};\n\nLoadingDots.displayName = \"Loading.Dots\";\n\nexport { LoadingDots };\n","import React, { type AriaAttributes, type AriaRole, useEffect, useState } from \"react\";\nimport { Paragraph, ParagraphVariant } from \"@purpur/paragraph\";\nimport { VisuallyHidden } from \"@purpur/visually-hidden\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./loading-text.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-loading\";\n\nexport type LoadingTextProps = {\n className?: string;\n negative?: boolean;\n /** Visible label displayed during the deep-thinking state. */\n label: string;\n /** Optional accessible label for deep-thinking. Falls back to `label` when omitted. */\n \"aria-label\"?: string;\n /** Optional ARIA role for the live region. Defaults to `status`. */\n role?: AriaRole;\n /** Optional ARIA atomic setting for the live region. Defaults to `true`. */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n /** Optional ARIA live politeness setting. Defaults to `polite`. */\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n};\n\nconst LoadingText = ({\n className,\n negative = false,\n label,\n \"aria-label\": ariaLabel,\n role = \"status\",\n \"aria-atomic\": ariaAtomic = \"true\",\n \"aria-live\": ariaLive = \"polite\",\n}: LoadingTextProps) => {\n // Defer the announced label by one frame so the live region wrapper is\n // already in the accessibility tree when the text node appears.\n // VoiceOver only announces content that mutates an existing live region,\n // not content present at mount time.\n const announcement = ariaLabel ?? label;\n const [announcedLabel, setAnnouncedLabel] = useState(\"\");\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n setAnnouncedLabel(announcement);\n }, 0);\n return () => window.clearTimeout(timer);\n }, [announcement]);\n\n return (\n <div\n className={cx(rootClassName, `${rootClassName}--deep-thinking`, className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role={role}\n aria-atomic={ariaAtomic}\n aria-live={ariaLive}\n >\n <VisuallyHidden>{announcedLabel}</VisuallyHidden>\n <Paragraph\n aria-hidden=\"true\"\n className={cx(`${rootClassName}__deep-thinking-text`)}\n negative={negative}\n variant={ParagraphVariant.PARAGRAPH100MEDIUM}\n >\n {label}\n </Paragraph>\n </div>\n );\n};\n\nLoadingText.displayName = \"Loading.Text\";\n\nexport { LoadingText };\n","import { LoadingDots, type LoadingDotsProps } from \"./loading-dots\";\nimport { LoadingText, type LoadingTextProps } from \"./loading-text\";\n\n// Root namespace component\ntype LoadingComponent = {\n Dots: typeof LoadingDots;\n Text: typeof LoadingText;\n};\n\nconst Loading = {} as LoadingComponent;\nLoading.Dots = LoadingDots;\nLoading.Text = LoadingText;\n\nexport { Loading };\nexport type { LoadingDotsProps, LoadingTextProps };\n"],"names":["cx","c","styles","rootClassName","LoadingDots","className","negative","ariaLabel","role","ariaAtomic","ariaLive","announcedLabel","setAnnouncedLabel","useState","useEffect","timer","jsxs","jsx","VisuallyHidden","LoadingText","label","announcement","Paragraph","ParagraphVariant","Loading"],"mappings":"oqBAMMA,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAClBC,EAAgB,sBAehBC,EAAc,CAAC,CACnB,UAAAC,EACA,SAAAC,EAAW,GACX,aAAcC,EACd,KAAAC,EAAO,SACP,cAAeC,EAAa,OAC5B,YAAaC,EAAW,QAC1B,IAAwB,CAItB,KAAM,CAACC,EAAgBC,CAAiB,EAAIC,EAAAA,SAAS,EAAE,EAEvDC,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAQ,OAAO,WAAW,IAAM,CACpCH,EAAkBL,CAAS,CAC7B,EAAG,CAAC,EACJ,MAAO,IAAM,OAAO,aAAaQ,CAAK,CACxC,EAAG,CAACR,CAAS,CAAC,EAGZS,EAAAA,KAAC,MAAA,CACC,UAAWhB,EAAGG,EAAeE,EAAW,CACtC,CAAC,GAAGF,CAAa,YAAY,EAAGG,CAAA,CACjC,EACD,KAAAE,EACA,cAAaC,EACb,YAAWC,EAEX,SAAA,CAAAO,EAAAA,IAACC,EAAAA,gBAAgB,SAAAP,CAAA,CAAe,EAChCM,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,UAAWjB,EAAG,GAAGG,CAAa,QAAS,GAAGA,CAAa,aAAa,CAAA,CAAG,EAChGc,EAAAA,IAAC,OA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7 +2,7 @@ import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m, useEffect as h } from "react";
|
|
3
3
|
import { V as y } from "./visually-hidden-BYFkJEp1.mjs";
|
|
4
4
|
import { c as w } from "./bind-CU-R61T-.mjs";
|
|
5
|
-
import { P as N, a as L } from "./paragraph-
|
|
5
|
+
import { P as N, a as L } from "./paragraph-CwAdFoIm.mjs";
|
|
6
6
|
const b = {
|
|
7
7
|
"purpur-loading-dots": "_purpur-loading-dots_kw4ys_1",
|
|
8
8
|
"purpur-loading-dots__dot": "_purpur-loading-dots__dot_kw4ys_7",
|
|
@@ -104,4 +104,4 @@ f.Text = $;
|
|
|
104
104
|
export {
|
|
105
105
|
f as L
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=loading-
|
|
107
|
+
//# sourceMappingURL=loading-DqZBpMaa.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-
|
|
1
|
+
{"version":3,"file":"loading-DqZBpMaa.mjs","sources":["../../../components/loading/src/loading-dots.tsx","../../../components/loading/src/loading-text.tsx","../../../components/loading/src/loading.tsx"],"sourcesContent":["import React, { type AriaAttributes, type AriaRole, useEffect, useState } from \"react\";\nimport { VisuallyHidden } from \"@purpur/visually-hidden\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./loading-dots.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-loading-dots\";\n\nexport type LoadingDotsProps = {\n className?: string;\n negative?: boolean;\n /** Optional ARIA role for the live region. Defaults to `status`. */\n role?: AriaRole;\n /** Optional ARIA atomic setting for the live region. Defaults to `true`. */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n /** Optional ARIA live politeness setting. Defaults to `polite`. */\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n /** Accessible label announced by assistive technologies for the typing indicator. */\n \"aria-label\": string;\n};\n\nconst LoadingDots = ({\n className,\n negative = false,\n \"aria-label\": ariaLabel,\n role = \"status\",\n \"aria-atomic\": ariaAtomic = \"true\",\n \"aria-live\": ariaLive = \"polite\",\n}: LoadingDotsProps) => {\n // Defer label text by one frame so the live region wrapper is already in the\n // accessibility tree when content appears. VoiceOver only announces content\n // that mutates an existing live region, not content present at mount time.\n const [announcedLabel, setAnnouncedLabel] = useState(\"\");\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n setAnnouncedLabel(ariaLabel);\n }, 0);\n return () => window.clearTimeout(timer);\n }, [ariaLabel]);\n\n return (\n <div\n className={cx(rootClassName, className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role={role}\n aria-atomic={ariaAtomic}\n aria-live={ariaLive}\n >\n <VisuallyHidden>{announcedLabel}</VisuallyHidden>\n <span aria-hidden=\"true\" className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--left`)} />\n <span\n aria-hidden=\"true\"\n className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--middle`)}\n />\n <span aria-hidden=\"true\" className={cx(`${rootClassName}__dot`, `${rootClassName}__dot--right`)} />\n </div>\n );\n};\n\nLoadingDots.displayName = \"Loading.Dots\";\n\nexport { LoadingDots };\n","import React, { type AriaAttributes, type AriaRole, useEffect, useState } from \"react\";\nimport { Paragraph, ParagraphVariant } from \"@purpur/paragraph\";\nimport { VisuallyHidden } from \"@purpur/visually-hidden\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./loading-text.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-loading\";\n\nexport type LoadingTextProps = {\n className?: string;\n negative?: boolean;\n /** Visible label displayed during the deep-thinking state. */\n label: string;\n /** Optional accessible label for deep-thinking. Falls back to `label` when omitted. */\n \"aria-label\"?: string;\n /** Optional ARIA role for the live region. Defaults to `status`. */\n role?: AriaRole;\n /** Optional ARIA atomic setting for the live region. Defaults to `true`. */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n /** Optional ARIA live politeness setting. Defaults to `polite`. */\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n};\n\nconst LoadingText = ({\n className,\n negative = false,\n label,\n \"aria-label\": ariaLabel,\n role = \"status\",\n \"aria-atomic\": ariaAtomic = \"true\",\n \"aria-live\": ariaLive = \"polite\",\n}: LoadingTextProps) => {\n // Defer the announced label by one frame so the live region wrapper is\n // already in the accessibility tree when the text node appears.\n // VoiceOver only announces content that mutates an existing live region,\n // not content present at mount time.\n const announcement = ariaLabel ?? label;\n const [announcedLabel, setAnnouncedLabel] = useState(\"\");\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n setAnnouncedLabel(announcement);\n }, 0);\n return () => window.clearTimeout(timer);\n }, [announcement]);\n\n return (\n <div\n className={cx(rootClassName, `${rootClassName}--deep-thinking`, className, {\n [`${rootClassName}--negative`]: negative,\n })}\n role={role}\n aria-atomic={ariaAtomic}\n aria-live={ariaLive}\n >\n <VisuallyHidden>{announcedLabel}</VisuallyHidden>\n <Paragraph\n aria-hidden=\"true\"\n className={cx(`${rootClassName}__deep-thinking-text`)}\n negative={negative}\n variant={ParagraphVariant.PARAGRAPH100MEDIUM}\n >\n {label}\n </Paragraph>\n </div>\n );\n};\n\nLoadingText.displayName = \"Loading.Text\";\n\nexport { LoadingText };\n","import { LoadingDots, type LoadingDotsProps } from \"./loading-dots\";\nimport { LoadingText, type LoadingTextProps } from \"./loading-text\";\n\n// Root namespace component\ntype LoadingComponent = {\n Dots: typeof LoadingDots;\n Text: typeof LoadingText;\n};\n\nconst Loading = {} as LoadingComponent;\nLoading.Dots = LoadingDots;\nLoading.Text = LoadingText;\n\nexport { Loading };\nexport type { LoadingDotsProps, LoadingTextProps };\n"],"names":["cx","c","styles","rootClassName","LoadingDots","className","negative","ariaLabel","role","ariaAtomic","ariaLive","announcedLabel","setAnnouncedLabel","useState","useEffect","timer","jsxs","jsx","VisuallyHidden","LoadingText","label","announcement","Paragraph","ParagraphVariant","Loading"],"mappings":";;;;;;;;;;;;;GAMMA,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAA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;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAc;AAAA,EACA,cAAcb;AAAA,EACd,MAAAC,IAAO;AAAA,EACP,eAAeC,IAAa;AAAA,EAC5B,aAAaC,IAAW;AAC1B,MAAwB;AAKtB,QAAMW,IAAed,KAAaa,GAC5B,CAACT,GAAgBC,CAAiB,IAAIC,EAAS,EAAE;AAEvD,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAQ,OAAO,WAAW,MAAM;AACpC,MAAAH,EAAkBS,CAAY;AAAA,IAChC,GAAG,CAAC;AACJ,WAAO,MAAM,OAAO,aAAaN,CAAK;AAAA,EACxC,GAAG,CAACM,CAAY,CAAC,GAGf,gBAAAL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWhB,EAAGG,GAAe,GAAGA,CAAa,mBAAmBE,GAAW;AAAA,QACzE,CAAC,GAAGF,CAAa,YAAY,GAAGG;AAAA,MAAA,CACjC;AAAA,MACD,MAAAE;AAAA,MACA,eAAaC;AAAA,MACb,aAAWC;AAAA,MAEX,UAAA;AAAA,QAAA,gBAAAO,EAACC,KAAgB,UAAAP,EAAA,CAAe;AAAA,QAChC,gBAAAM;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAWtB,EAAG,GAAGG,CAAa,sBAAsB;AAAA,YACpD,UAAAG;AAAA,YACA,SAASiB,EAAiB;AAAA,YAEzB,UAAAH;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAD,EAAY,cAAc;AC7D1B,MAAMK,IAAU,CAAA;AAChBA,EAAQ,OAAOpB;AACfoB,EAAQ,OAAOL;"}
|
package/dist/loading.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./loading-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./loading-B_0NjCnh.js");exports.Loading=e.Loading;
|
|
2
2
|
//# sourceMappingURL=loading.cjs.js.map
|
package/dist/loading.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { P as p } from "./paragraph-
|
|
2
|
+
import { P as p } from "./paragraph-CwAdFoIm.mjs";
|
|
3
3
|
import { c } from "./bind-CU-R61T-.mjs";
|
|
4
|
-
import { A as $ } from "./avatar-
|
|
4
|
+
import { A as $ } from "./avatar-BDF2KuEh.mjs";
|
|
5
5
|
const A = "_fadeIn_14a0h_1", h = {
|
|
6
6
|
"purpur-message--incoming": "_purpur-message--incoming_14a0h_1",
|
|
7
7
|
"purpur-message--with-avatar": "_purpur-message--with-avatar_14a0h_1",
|
|
@@ -129,4 +129,4 @@ T.Stamp = y;
|
|
|
129
129
|
export {
|
|
130
130
|
T as M
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=message-
|
|
132
|
+
//# sourceMappingURL=message-CeXuAhmb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-D9CDwcw9.mjs","sources":["../../../components/message/src/message-bubble.tsx","../../../components/message/src/message-stamp.tsx","../../../components/message/src/message-utils.ts","../../../components/message/src/message.tsx"],"sourcesContent":["import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type MessageBubbleProps = {\n /**\n * String message content.\n *\n * Real newline characters (`\\n`) are preserved as-is.\n * Escaped newline sequences (`\\\\n` — the two-character literal backslash-n) are\n * converted to real newlines, so API responses that serialize newlines as `\\\\n`\n * are rendered correctly without pre-processing by the caller.\n */\n text: string;\n /** Enables the entry animation. Defaults to true. */\n animate?: boolean;\n /** Optional class name for the bubble element. */\n className?: string;\n};\n\nconst MessageBubble = ({ text, animate = true, className }: MessageBubbleProps) => {\n const content = text.replace(/\\\\n/g, \"\\n\");\n\n return (\n <div\n className={cx(\"purpur-message__bubble\", className, {\n \"purpur-message__bubble--no-animation\": animate === false,\n })}\n >\n <Paragraph className={cx(\"purpur-message__text\")}>{content}</Paragraph>\n </div>\n );\n};\n\nMessageBubble.displayName = \"Message.Bubble\";\n\nexport { MessageBubble };\n","import React, { type ReactNode } from \"react\";\nimport { Avatar } from \"@purpur/avatar\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\ntype MessageStampBaseProps = {\n /** Optional class name for the stamp element. */\n className?: string;\n /** Enables negative color tokens for dark surfaces. */\n negative?: boolean;\n /** Text content centered in the divider. */\n text: ReactNode;\n};\n\ntype MessageStampAvatarProps = MessageStampBaseProps & {\n variant: \"avatar\";\n /** Accessible label for the avatar. When omitted, avatar is rendered as decorative. */\n avatarAriaLabel?: string;\n /** Label content rendered inside the avatar, typically initials. */\n avatarLabel: ReactNode;\n};\n\ntype MessageStampTextProps = MessageStampBaseProps & {\n variant: \"text\";\n};\n\nexport type MessageStampProps = MessageStampAvatarProps | MessageStampTextProps;\n\nconst MessageStamp = (props: MessageStampProps) => {\n const { className, negative, text, variant } = props;\n\n if (variant === \"avatar\") {\n return (\n <div\n className={cx(\"purpur-message__stamp\", \"purpur-message__stamp--avatar\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n {props.avatarAriaLabel ? (\n <Avatar aria-label={props.avatarAriaLabel} label={props.avatarLabel} size=\"sm\" />\n ) : (\n <Avatar decorative label={props.avatarLabel} size=\"sm\" />\n )}\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n </div>\n );\n }\n\n return (\n <div\n className={cx(\"purpur-message__stamp\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n </div>\n );\n};\n\nMessageStamp.displayName = \"Message.Stamp\";\n\nexport { MessageStamp };\n","export const toValidDate = (value: Date | string | number) => {\n const nextDate = new Date(value);\n if (Number.isNaN(nextDate.getTime())) {\n return null;\n }\n return nextDate;\n};\n\nexport const formatTimestamp = (sentAtDate: Date) => {\n if (Number.isNaN(sentAtDate.getTime())) {\n return null;\n }\n\n const now = new Date();\n const diffInMs = now.getTime() - sentAtDate.getTime();\n if (diffInMs < 0) return null;\n\n if (diffInMs < 24 * 60 * 60 * 1000) {\n return sentAtDate.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n }\n\n return sentAtDate.toLocaleDateString();\n};\n","import React, { type ReactNode } from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\nimport { MessageBubble, type MessageBubbleProps } from \"./message-bubble\";\nimport { MessageStamp, type MessageStampProps } from \"./message-stamp\";\nimport { formatTimestamp, toValidDate } from \"./message-utils\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-message\";\n\nexport type { MessageBubbleProps, MessageStampProps };\n\ntype MessageBaseProps = {\n /** Enables negative color tokens for dark surfaces. Applied to the header name and timestamp. */\n negative?: boolean;\n /** Optional class name for the message root element. */\n className?: string;\n /** Message content - can include Message.Bubble and Message.Stamp subcomponents. */\n children?: ReactNode;\n /** Timestamp source used for automatic time/date formatting. When provided, the timestamp is displayed. */\n sentAt?: Date | string | number;\n};\n\nexport type IncomingMessageProps = MessageBaseProps & {\n /** Message variant for incoming messages (assistant/employee). */\n variant: \"incoming\";\n /** Optional sender name displayed as a header above the bubbles. */\n senderName?: string;\n /** Optional avatar element rendered on the left. */\n avatar?: ReactNode;\n};\n\nexport type OutgoingMessageProps = MessageBaseProps & {\n /** Message variant for outgoing messages (user). */\n variant: \"outgoing\";\n /** Outgoing messages do not support sender metadata. */\n senderName?: never;\n /** Outgoing messages do not support avatars. */\n avatar?: never;\n};\n\n// Root Message component\nexport type MessageProps = IncomingMessageProps | OutgoingMessageProps;\n\nconst Message = ({ variant, negative, className, children, ...variantProps }: MessageProps) => {\n const isIncoming = variant === \"incoming\";\n const senderName = isIncoming ? variantProps.senderName : undefined;\n const avatar = isIncoming ? variantProps.avatar : undefined;\n const sentAt = variantProps.sentAt;\n\n const hasHeader = isIncoming && senderName !== undefined;\n const hasAvatar = avatar !== undefined;\n\n const sentAtDate = sentAt === undefined ? null : toValidDate(sentAt);\n const resolvedTimestamp = sentAtDate ? formatTimestamp(sentAtDate) : null;\n\n const footer =\n sentAtDate !== null && resolvedTimestamp !== null ? (\n <div className={cx(`${rootClassName}__footer-container`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-timestamp`, `${rootClassName}__header--bottom`)}\n negative={negative}\n variant=\"additional-100\"\n >\n <time dateTime={sentAtDate.toISOString()}>{resolvedTimestamp}</time>\n </Paragraph>\n </div>\n ) : null;\n\n const header = hasHeader ? (\n <div className={cx(`${rootClassName}__header-container`)}>\n <div className={cx(`${rootClassName}__header`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-name`)}\n negative={negative}\n variant=\"additional-100-medium\"\n >\n {senderName}\n </Paragraph>\n </div>\n </div>\n ) : null;\n\n const needsContentWrapper = hasHeader || hasAvatar;\n\n return (\n <div\n className={cx(\n rootClassName,\n variant === \"incoming\" ? `${rootClassName}--incoming` : `${rootClassName}--outgoing`,\n {\n [`${rootClassName}--with-avatar`]: hasAvatar,\n [`${rootClassName}--with-avatar-header-layout`]: hasHeader && hasAvatar,\n [`${rootClassName}--incoming-header-layout`]: hasHeader && !hasAvatar,\n },\n className\n )}\n >\n {header}\n {hasAvatar && <div className={cx(`${rootClassName}__avatar`)}>{avatar}</div>}\n {needsContentWrapper ? (\n <div className={cx(`${rootClassName}__content`)}>{children}</div>\n ) : (\n children\n )}\n {footer}\n </div>\n );\n};\n\nMessage.displayName = \"Message\";\n\ntype MessageComponent = typeof Message & {\n Bubble: typeof MessageBubble;\n Stamp: typeof MessageStamp;\n};\n\nconst MessageNamespace = Message as MessageComponent;\nMessageNamespace.Bubble = MessageBubble;\nMessageNamespace.Stamp = MessageStamp;\n\nexport { MessageNamespace as Message };\n"],"names":["cx","styles","MessageBubble","text","animate","className","content","jsx","Paragraph","MessageStamp","props","negative","variant","jsxs","Avatar","toValidDate","value","nextDate","formatTimestamp","sentAtDate","diffInMs","rootClassName","Message","children","variantProps","isIncoming","senderName","avatar","sentAt","hasHeader","hasAvatar","resolvedTimestamp","footer","header","needsContentWrapper","MessageNamespace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAMMA,IAAK,EAAE,KAAKC,CAAM,GAkBlBC,IAAgB,CAAC,EAAE,MAAAC,GAAM,SAAAC,IAAU,IAAM,WAAAC,QAAoC;AACjF,QAAMC,IAAUH,EAAK,QAAQ,QAAQ;AAAA,CAAI;AAEzC,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWP,EAAG,0BAA0BK,GAAW;AAAA,QACjD,wCAAwCD,MAAY;AAAA,MAAA,CACrD;AAAA,MAED,4BAACI,GAAA,EAAU,WAAWR,EAAG,sBAAsB,GAAI,UAAAM,EAAA,CAAQ;AAAA,IAAA;AAAA,EAAA;AAGjE;AAEAJ,EAAc,cAAc;AC/B5B,MAAMF,IAAK,EAAE,KAAKC,CAAM,GAyBlBQ,IAAe,CAACC,MAA6B;AACjD,QAAM,EAAE,WAAAL,GAAW,UAAAM,GAAU,MAAAR,GAAM,SAAAS,MAAYF;AAE/C,SAAIE,MAAY,WAEZ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWb,EAAG,yBAAyB,iCAAiCK,GAAW;AAAA,QACjF,mCAAmCM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AA;AAAA,MACC,WAAWR,EAAG,GAAGqB,CAAa,eAAe;AAAA,MAC7C,UAAAV;AAAA,MACA,SAAQ;AAAA,MAEP,UAAAe;AAAA,IAAA;AAAA,EAAA,EACH,CACF,GACF,IACE,MAEEQ,IAAsBL,KAAaC;AAEzC,SACE,gBAAAjB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWb;AAAA,QACTqB;AAAA,QACAT,MAAY,aAAa,GAAGS,CAAa,eAAe,GAAGA,CAAa;AAAA,QACxE;AAAA,UACE,CAAC,GAAGA,CAAa,eAAe,GAAGS;AAAA,UACnC,CAAC,GAAGT,CAAa,6BAA6B,GAAGQ,KAAaC;AAAA,UAC9D,CAAC,GAAGT,CAAa,0BAA0B,GAAGQ,KAAa,CAACC;AAAA,QAAA;AAAA,QAE9DzB;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAA4B;AAAA,QACAH,uBAAc,OAAA,EAAI,WAAW9B,EAAG,GAAGqB,CAAa,UAAU,GAAI,UAAAM,EAAA,CAAO;AAAA,QACrEO,IACC,gBAAA3B,EAAC,OAAA,EAAI,WAAWP,EAAG,GAAGqB,CAAa,WAAW,GAAI,UAAAE,EAAA,CAAS,IAE3DA;AAAA,QAEDS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAEAV,EAAQ,cAAc;AAOtB,MAAMa,IAAmBb;AACzBa,EAAiB,SAASjC;AAC1BiC,EAAiB,QAAQ1B;"}
|
|
1
|
+
{"version":3,"file":"message-CeXuAhmb.mjs","sources":["../../../components/message/src/message-bubble.tsx","../../../components/message/src/message-stamp.tsx","../../../components/message/src/message-utils.ts","../../../components/message/src/message.tsx"],"sourcesContent":["import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type MessageBubbleProps = {\n /**\n * String message content.\n *\n * Real newline characters (`\\n`) are preserved as-is.\n * Escaped newline sequences (`\\\\n` — the two-character literal backslash-n) are\n * converted to real newlines, so API responses that serialize newlines as `\\\\n`\n * are rendered correctly without pre-processing by the caller.\n */\n text: string;\n /** Enables the entry animation. Defaults to true. */\n animate?: boolean;\n /** Optional class name for the bubble element. */\n className?: string;\n};\n\nconst MessageBubble = ({ text, animate = true, className }: MessageBubbleProps) => {\n const content = text.replace(/\\\\n/g, \"\\n\");\n\n return (\n <div\n className={cx(\"purpur-message__bubble\", className, {\n \"purpur-message__bubble--no-animation\": animate === false,\n })}\n >\n <Paragraph className={cx(\"purpur-message__text\")}>{content}</Paragraph>\n </div>\n );\n};\n\nMessageBubble.displayName = \"Message.Bubble\";\n\nexport { MessageBubble };\n","import React, { type ReactNode } from \"react\";\nimport { Avatar } from \"@purpur/avatar\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\ntype MessageStampBaseProps = {\n /** Optional class name for the stamp element. */\n className?: string;\n /** Enables negative color tokens for dark surfaces. */\n negative?: boolean;\n /** Text content centered in the divider. */\n text: ReactNode;\n};\n\ntype MessageStampAvatarProps = MessageStampBaseProps & {\n variant: \"avatar\";\n /** Accessible label for the avatar. When omitted, avatar is rendered as decorative. */\n avatarAriaLabel?: string;\n /** Label content rendered inside the avatar, typically initials. */\n avatarLabel: ReactNode;\n};\n\ntype MessageStampTextProps = MessageStampBaseProps & {\n variant: \"text\";\n};\n\nexport type MessageStampProps = MessageStampAvatarProps | MessageStampTextProps;\n\nconst MessageStamp = (props: MessageStampProps) => {\n const { className, negative, text, variant } = props;\n\n if (variant === \"avatar\") {\n return (\n <div\n className={cx(\"purpur-message__stamp\", \"purpur-message__stamp--avatar\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n {props.avatarAriaLabel ? (\n <Avatar aria-label={props.avatarAriaLabel} label={props.avatarLabel} size=\"sm\" />\n ) : (\n <Avatar decorative label={props.avatarLabel} size=\"sm\" />\n )}\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n </div>\n );\n }\n\n return (\n <div\n className={cx(\"purpur-message__stamp\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n </div>\n );\n};\n\nMessageStamp.displayName = \"Message.Stamp\";\n\nexport { MessageStamp };\n","export const toValidDate = (value: Date | string | number) => {\n const nextDate = new Date(value);\n if (Number.isNaN(nextDate.getTime())) {\n return null;\n }\n return nextDate;\n};\n\nexport const formatTimestamp = (sentAtDate: Date) => {\n if (Number.isNaN(sentAtDate.getTime())) {\n return null;\n }\n\n const now = new Date();\n const diffInMs = now.getTime() - sentAtDate.getTime();\n if (diffInMs < 0) return null;\n\n if (diffInMs < 24 * 60 * 60 * 1000) {\n return sentAtDate.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n }\n\n return sentAtDate.toLocaleDateString();\n};\n","import React, { type ReactNode } from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\nimport { MessageBubble, type MessageBubbleProps } from \"./message-bubble\";\nimport { MessageStamp, type MessageStampProps } from \"./message-stamp\";\nimport { formatTimestamp, toValidDate } from \"./message-utils\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-message\";\n\nexport type { MessageBubbleProps, MessageStampProps };\n\ntype MessageBaseProps = {\n /** Enables negative color tokens for dark surfaces. Applied to the header name and timestamp. */\n negative?: boolean;\n /** Optional class name for the message root element. */\n className?: string;\n /** Message content - can include Message.Bubble and Message.Stamp subcomponents. */\n children?: ReactNode;\n /** Timestamp source used for automatic time/date formatting. When provided, the timestamp is displayed. */\n sentAt?: Date | string | number;\n};\n\nexport type IncomingMessageProps = MessageBaseProps & {\n /** Message variant for incoming messages (assistant/employee). */\n variant: \"incoming\";\n /** Optional sender name displayed as a header above the bubbles. */\n senderName?: string;\n /** Optional avatar element rendered on the left. */\n avatar?: ReactNode;\n};\n\nexport type OutgoingMessageProps = MessageBaseProps & {\n /** Message variant for outgoing messages (user). */\n variant: \"outgoing\";\n /** Outgoing messages do not support sender metadata. */\n senderName?: never;\n /** Outgoing messages do not support avatars. */\n avatar?: never;\n};\n\n// Root Message component\nexport type MessageProps = IncomingMessageProps | OutgoingMessageProps;\n\nconst Message = ({ variant, negative, className, children, ...variantProps }: MessageProps) => {\n const isIncoming = variant === \"incoming\";\n const senderName = isIncoming ? variantProps.senderName : undefined;\n const avatar = isIncoming ? variantProps.avatar : undefined;\n const sentAt = variantProps.sentAt;\n\n const hasHeader = isIncoming && senderName !== undefined;\n const hasAvatar = avatar !== undefined;\n\n const sentAtDate = sentAt === undefined ? null : toValidDate(sentAt);\n const resolvedTimestamp = sentAtDate ? formatTimestamp(sentAtDate) : null;\n\n const footer =\n sentAtDate !== null && resolvedTimestamp !== null ? (\n <div className={cx(`${rootClassName}__footer-container`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-timestamp`, `${rootClassName}__header--bottom`)}\n negative={negative}\n variant=\"additional-100\"\n >\n <time dateTime={sentAtDate.toISOString()}>{resolvedTimestamp}</time>\n </Paragraph>\n </div>\n ) : null;\n\n const header = hasHeader ? (\n <div className={cx(`${rootClassName}__header-container`)}>\n <div className={cx(`${rootClassName}__header`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-name`)}\n negative={negative}\n variant=\"additional-100-medium\"\n >\n {senderName}\n </Paragraph>\n </div>\n </div>\n ) : null;\n\n const needsContentWrapper = hasHeader || hasAvatar;\n\n return (\n <div\n className={cx(\n rootClassName,\n variant === \"incoming\" ? `${rootClassName}--incoming` : `${rootClassName}--outgoing`,\n {\n [`${rootClassName}--with-avatar`]: hasAvatar,\n [`${rootClassName}--with-avatar-header-layout`]: hasHeader && hasAvatar,\n [`${rootClassName}--incoming-header-layout`]: hasHeader && !hasAvatar,\n },\n className\n )}\n >\n {header}\n {hasAvatar && <div className={cx(`${rootClassName}__avatar`)}>{avatar}</div>}\n {needsContentWrapper ? (\n <div className={cx(`${rootClassName}__content`)}>{children}</div>\n ) : (\n children\n )}\n {footer}\n </div>\n );\n};\n\nMessage.displayName = \"Message\";\n\ntype MessageComponent = typeof Message & {\n Bubble: typeof MessageBubble;\n Stamp: typeof MessageStamp;\n};\n\nconst MessageNamespace = Message as MessageComponent;\nMessageNamespace.Bubble = MessageBubble;\nMessageNamespace.Stamp = MessageStamp;\n\nexport { MessageNamespace as Message };\n"],"names":["cx","styles","MessageBubble","text","animate","className","content","jsx","Paragraph","MessageStamp","props","negative","variant","jsxs","Avatar","toValidDate","value","nextDate","formatTimestamp","sentAtDate","diffInMs","rootClassName","Message","children","variantProps","isIncoming","senderName","avatar","sentAt","hasHeader","hasAvatar","resolvedTimestamp","footer","header","needsContentWrapper","MessageNamespace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAMMA,IAAK,EAAE,KAAKC,CAAM,GAkBlBC,IAAgB,CAAC,EAAE,MAAAC,GAAM,SAAAC,IAAU,IAAM,WAAAC,QAAoC;AACjF,QAAMC,IAAUH,EAAK,QAAQ,QAAQ;AAAA,CAAI;AAEzC,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWP,EAAG,0BAA0BK,GAAW;AAAA,QACjD,wCAAwCD,MAAY;AAAA,MAAA,CACrD;AAAA,MAED,4BAACI,GAAA,EAAU,WAAWR,EAAG,sBAAsB,GAAI,UAAAM,EAAA,CAAQ;AAAA,IAAA;AAAA,EAAA;AAGjE;AAEAJ,EAAc,cAAc;AC/B5B,MAAMF,IAAK,EAAE,KAAK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+
"use strict";const e=require("react/jsx-runtime"),p=require("./paragraph-B8HFdNne.js"),c=require("./bind-DeUYJ6m9.js"),j=require("./avatar-nDQ8fk-2.js"),I="_fadeIn_14a0h_1",l={"purpur-message--incoming":"_purpur-message--incoming_14a0h_1","purpur-message--with-avatar":"_purpur-message--with-avatar_14a0h_1","purpur-message__avatar":"_purpur-message__avatar_14a0h_6","purpur-message__content":"_purpur-message__content_14a0h_10","purpur-message--with-avatar-header-layout":"_purpur-message--with-avatar-header-layout_14a0h_15","purpur-message__header-container":"_purpur-message__header-container_14a0h_21","purpur-message__footer-container":"_purpur-message__footer-container_14a0h_35","purpur-message__header--bottom":"_purpur-message__header--bottom_14a0h_38","purpur-message--incoming-header-layout":"_purpur-message--incoming-header-layout_14a0h_41","purpur-message__bubble":"_purpur-message__bubble_14a0h_54","purpur-message--outgoing":"_purpur-message--outgoing_14a0h_58",fadeIn:I,"purpur-message__bubble--no-animation":"_purpur-message__bubble--no-animation_14a0h_75","purpur-message__stamp":"_purpur-message__stamp_14a0h_80","purpur-message__stamp--avatar":"_purpur-message__stamp--avatar_14a0h_83","purpur-message__stamp--text":"_purpur-message__stamp--text_14a0h_89","purpur-message__stamp--negative":"_purpur-message__stamp--negative_14a0h_94","purpur-message__stamp-divider":"_purpur-message__stamp-divider_14a0h_94","purpur-message__stamp-divider-row":"_purpur-message__stamp-divider-row_14a0h_97","purpur-message__header":"_purpur-message__header_14a0h_21","purpur-message__header-name":"_purpur-message__header-name_14a0h_113","purpur-message__header-timestamp":"_purpur-message__header-timestamp_14a0h_116"},f=c.c.bind(l),$=({text:a,animate:r=!0,className:t})=>{const i=a.replace(/\\n/g,`
|
|
2
2
|
`);return e.jsx("div",{className:f("purpur-message__bubble",t,{"purpur-message__bubble--no-animation":r===!1}),children:e.jsx(p.Paragraph,{className:f("purpur-message__text"),children:i})})};$.displayName="Message.Bubble";const _=c.c.bind(l),w=a=>{const{className:r,negative:t,text:i,variant:m}=a;return m==="avatar"?e.jsxs("div",{className:_("purpur-message__stamp","purpur-message__stamp--avatar",r,{"purpur-message__stamp--negative":t}),children:[e.jsxs("div",{className:_("purpur-message__stamp-divider-row"),children:[e.jsx("div",{className:_("purpur-message__stamp-divider")}),a.avatarAriaLabel?e.jsx(j.Avatar,{"aria-label":a.avatarAriaLabel,label:a.avatarLabel,size:"sm"}):e.jsx(j.Avatar,{decorative:!0,label:a.avatarLabel,size:"sm"}),e.jsx("div",{className:_("purpur-message__stamp-divider")})]}),e.jsx(p.Paragraph,{variant:"additional-100",negative:t,children:i})]}):e.jsx("div",{className:_("purpur-message__stamp",r,{"purpur-message__stamp--negative":t}),children:e.jsxs("div",{className:_("purpur-message__stamp-divider-row"),children:[e.jsx("div",{className:_("purpur-message__stamp-divider")}),e.jsx(p.Paragraph,{variant:"additional-100",negative:t,children:i}),e.jsx("div",{className:_("purpur-message__stamp-divider")})]})})};w.displayName="Message.Stamp";const L=a=>{const r=new Date(a);return Number.isNaN(r.getTime())?null:r},A=a=>{if(Number.isNaN(a.getTime()))return null;const t=new Date().getTime()-a.getTime();return t<0?null:t<1440*60*1e3?a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):a.toLocaleDateString()},u=c.c.bind(l),s="purpur-message",y=({variant:a,negative:r,className:t,children:i,...m})=>{const g=a==="incoming",v=g?m.senderName:void 0,b=g?m.avatar:void 0,N=m.sentAt,d=g&&v!==void 0,n=b!==void 0,o=N===void 0?null:L(N),x=o?A(o):null,M=o!==null&&x!==null?e.jsx("div",{className:u(`${s}__footer-container`),children:e.jsx(p.Paragraph,{className:u(`${s}__header-timestamp`,`${s}__header--bottom`),negative:r,variant:"additional-100",children:e.jsx("time",{dateTime:o.toISOString(),children:x})})}):null,T=d?e.jsx("div",{className:u(`${s}__header-container`),children:e.jsx("div",{className:u(`${s}__header`),children:e.jsx(p.Paragraph,{className:u(`${s}__header-name`),negative:r,variant:"additional-100-medium",children:v})})}):null,S=d||n;return e.jsxs("div",{className:u(s,a==="incoming"?`${s}--incoming`:`${s}--outgoing`,{[`${s}--with-avatar`]:n,[`${s}--with-avatar-header-layout`]:d&&n,[`${s}--incoming-header-layout`]:d&&!n},t),children:[T,n&&e.jsx("div",{className:u(`${s}__avatar`),children:b}),S?e.jsx("div",{className:u(`${s}__content`),children:i}):i,M]})};y.displayName="Message";const h=y;h.Bubble=$;h.Stamp=w;exports.MessageNamespace=h;
|
|
3
|
-
//# sourceMappingURL=message-
|
|
3
|
+
//# sourceMappingURL=message-DsGB-JFh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-0yTS5pOF.js","sources":["../../../components/message/src/message-bubble.tsx","../../../components/message/src/message-stamp.tsx","../../../components/message/src/message-utils.ts","../../../components/message/src/message.tsx"],"sourcesContent":["import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type MessageBubbleProps = {\n /**\n * String message content.\n *\n * Real newline characters (`\\n`) are preserved as-is.\n * Escaped newline sequences (`\\\\n` — the two-character literal backslash-n) are\n * converted to real newlines, so API responses that serialize newlines as `\\\\n`\n * are rendered correctly without pre-processing by the caller.\n */\n text: string;\n /** Enables the entry animation. Defaults to true. */\n animate?: boolean;\n /** Optional class name for the bubble element. */\n className?: string;\n};\n\nconst MessageBubble = ({ text, animate = true, className }: MessageBubbleProps) => {\n const content = text.replace(/\\\\n/g, \"\\n\");\n\n return (\n <div\n className={cx(\"purpur-message__bubble\", className, {\n \"purpur-message__bubble--no-animation\": animate === false,\n })}\n >\n <Paragraph className={cx(\"purpur-message__text\")}>{content}</Paragraph>\n </div>\n );\n};\n\nMessageBubble.displayName = \"Message.Bubble\";\n\nexport { MessageBubble };\n","import React, { type ReactNode } from \"react\";\nimport { Avatar } from \"@purpur/avatar\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\ntype MessageStampBaseProps = {\n /** Optional class name for the stamp element. */\n className?: string;\n /** Enables negative color tokens for dark surfaces. */\n negative?: boolean;\n /** Text content centered in the divider. */\n text: ReactNode;\n};\n\ntype MessageStampAvatarProps = MessageStampBaseProps & {\n variant: \"avatar\";\n /** Accessible label for the avatar. When omitted, avatar is rendered as decorative. */\n avatarAriaLabel?: string;\n /** Label content rendered inside the avatar, typically initials. */\n avatarLabel: ReactNode;\n};\n\ntype MessageStampTextProps = MessageStampBaseProps & {\n variant: \"text\";\n};\n\nexport type MessageStampProps = MessageStampAvatarProps | MessageStampTextProps;\n\nconst MessageStamp = (props: MessageStampProps) => {\n const { className, negative, text, variant } = props;\n\n if (variant === \"avatar\") {\n return (\n <div\n className={cx(\"purpur-message__stamp\", \"purpur-message__stamp--avatar\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n {props.avatarAriaLabel ? (\n <Avatar aria-label={props.avatarAriaLabel} label={props.avatarLabel} size=\"sm\" />\n ) : (\n <Avatar decorative label={props.avatarLabel} size=\"sm\" />\n )}\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n </div>\n );\n }\n\n return (\n <div\n className={cx(\"purpur-message__stamp\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n </div>\n );\n};\n\nMessageStamp.displayName = \"Message.Stamp\";\n\nexport { MessageStamp };\n","export const toValidDate = (value: Date | string | number) => {\n const nextDate = new Date(value);\n if (Number.isNaN(nextDate.getTime())) {\n return null;\n }\n return nextDate;\n};\n\nexport const formatTimestamp = (sentAtDate: Date) => {\n if (Number.isNaN(sentAtDate.getTime())) {\n return null;\n }\n\n const now = new Date();\n const diffInMs = now.getTime() - sentAtDate.getTime();\n if (diffInMs < 0) return null;\n\n if (diffInMs < 24 * 60 * 60 * 1000) {\n return sentAtDate.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n }\n\n return sentAtDate.toLocaleDateString();\n};\n","import React, { type ReactNode } from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\nimport { MessageBubble, type MessageBubbleProps } from \"./message-bubble\";\nimport { MessageStamp, type MessageStampProps } from \"./message-stamp\";\nimport { formatTimestamp, toValidDate } from \"./message-utils\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-message\";\n\nexport type { MessageBubbleProps, MessageStampProps };\n\ntype MessageBaseProps = {\n /** Enables negative color tokens for dark surfaces. Applied to the header name and timestamp. */\n negative?: boolean;\n /** Optional class name for the message root element. */\n className?: string;\n /** Message content - can include Message.Bubble and Message.Stamp subcomponents. */\n children?: ReactNode;\n /** Timestamp source used for automatic time/date formatting. When provided, the timestamp is displayed. */\n sentAt?: Date | string | number;\n};\n\nexport type IncomingMessageProps = MessageBaseProps & {\n /** Message variant for incoming messages (assistant/employee). */\n variant: \"incoming\";\n /** Optional sender name displayed as a header above the bubbles. */\n senderName?: string;\n /** Optional avatar element rendered on the left. */\n avatar?: ReactNode;\n};\n\nexport type OutgoingMessageProps = MessageBaseProps & {\n /** Message variant for outgoing messages (user). */\n variant: \"outgoing\";\n /** Outgoing messages do not support sender metadata. */\n senderName?: never;\n /** Outgoing messages do not support avatars. */\n avatar?: never;\n};\n\n// Root Message component\nexport type MessageProps = IncomingMessageProps | OutgoingMessageProps;\n\nconst Message = ({ variant, negative, className, children, ...variantProps }: MessageProps) => {\n const isIncoming = variant === \"incoming\";\n const senderName = isIncoming ? variantProps.senderName : undefined;\n const avatar = isIncoming ? variantProps.avatar : undefined;\n const sentAt = variantProps.sentAt;\n\n const hasHeader = isIncoming && senderName !== undefined;\n const hasAvatar = avatar !== undefined;\n\n const sentAtDate = sentAt === undefined ? null : toValidDate(sentAt);\n const resolvedTimestamp = sentAtDate ? formatTimestamp(sentAtDate) : null;\n\n const footer =\n sentAtDate !== null && resolvedTimestamp !== null ? (\n <div className={cx(`${rootClassName}__footer-container`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-timestamp`, `${rootClassName}__header--bottom`)}\n negative={negative}\n variant=\"additional-100\"\n >\n <time dateTime={sentAtDate.toISOString()}>{resolvedTimestamp}</time>\n </Paragraph>\n </div>\n ) : null;\n\n const header = hasHeader ? (\n <div className={cx(`${rootClassName}__header-container`)}>\n <div className={cx(`${rootClassName}__header`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-name`)}\n negative={negative}\n variant=\"additional-100-medium\"\n >\n {senderName}\n </Paragraph>\n </div>\n </div>\n ) : null;\n\n const needsContentWrapper = hasHeader || hasAvatar;\n\n return (\n <div\n className={cx(\n rootClassName,\n variant === \"incoming\" ? `${rootClassName}--incoming` : `${rootClassName}--outgoing`,\n {\n [`${rootClassName}--with-avatar`]: hasAvatar,\n [`${rootClassName}--with-avatar-header-layout`]: hasHeader && hasAvatar,\n [`${rootClassName}--incoming-header-layout`]: hasHeader && !hasAvatar,\n },\n className\n )}\n >\n {header}\n {hasAvatar && <div className={cx(`${rootClassName}__avatar`)}>{avatar}</div>}\n {needsContentWrapper ? (\n <div className={cx(`${rootClassName}__content`)}>{children}</div>\n ) : (\n children\n )}\n {footer}\n </div>\n );\n};\n\nMessage.displayName = \"Message\";\n\ntype MessageComponent = typeof Message & {\n Bubble: typeof MessageBubble;\n Stamp: typeof MessageStamp;\n};\n\nconst MessageNamespace = Message as MessageComponent;\nMessageNamespace.Bubble = MessageBubble;\nMessageNamespace.Stamp = MessageStamp;\n\nexport { MessageNamespace as Message };\n"],"names":["cx","c","styles","MessageBubble","text","animate","className","content","jsx","Paragraph","MessageStamp","props","negative","variant","jsxs","Avatar","toValidDate","value","nextDate","formatTimestamp","sentAtDate","diffInMs","rootClassName","Message","children","variantProps","isIncoming","senderName","avatar","sentAt","hasHeader","hasAvatar","resolvedTimestamp","footer","header","needsContentWrapper","MessageNamespace"],"mappings":"6rDAMMA,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAkBlBC,EAAgB,CAAC,CAAE,KAAAC,EAAM,QAAAC,EAAU,GAAM,UAAAC,KAAoC,CACjF,MAAMC,EAAUH,EAAK,QAAQ,OAAQ;AAAA,CAAI,EAEzC,OACEI,EAAAA,IAAC,MAAA,CACC,UAAWR,EAAG,yBAA0BM,EAAW,CACjD,uCAAwCD,IAAY,EAAA,CACrD,EAED,eAACI,EAAAA,UAAA,CAAU,UAAWT,EAAG,sBAAsB,EAAI,SAAAO,CAAA,CAAQ,CAAA,CAAA,CAGjE,EAEAJ,EAAc,YAAc,iBC/B5B,MAAMH,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAyBlBQ,EAAgBC,GAA6B,CACjD,KAAM,CAAE,UAAAL,EAAW,SAAAM,EAAU,KAAAR,EAAM,QAAAS,GAAYF,EAE/C,OAAIE,IAAY,SAEZC,EAAAA,KAAC,MAAA,CACC,UAAWd,EAAG,wBAAyB,gCAAiCM,EAAW,CACjF,kCAAmCM,CAAA,CACpC,EAED,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAWd,EAAG,mCAAmC,EACpD,SAAA,CAAAQ,EAAAA,IAAC,MAAA,CAAI,UAAWR,EAAG,+BAA+B,CAAA,CAAG,EACpDW,EAAM,gBACLH,MAACO,EAAAA,OAAA,CAAO,aAAYJ,EAAM,gBAAiB,MAAOA,EAAM,YAAa,KAAK,IAAA,CAAK,QAE9EI,SAAA,CAAO,WAAU,GAAC,MAAOJ,EAAM,YAAa,KAAK,IAAA,CAAK,EAEzDH,EAAAA,IAAC,MAAA,CAAI,UAAWR,EAAG,+BAA+B,CAAA,CAAG,CAAA,EACvD,EACAQ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,CAAS,EAE3DA,EAEDS,CAAA,CAAA,CAAA,CAGP,EAEAV,EAAQ,YAAc,UAOtB,MAAMa,EAAmBb,EACzBa,EAAiB,OAASjC,EAC1BiC,EAAiB,MAAQ1B"}
|
|
1
|
+
{"version":3,"file":"message-DsGB-JFh.js","sources":["../../../components/message/src/message-bubble.tsx","../../../components/message/src/message-stamp.tsx","../../../components/message/src/message-utils.ts","../../../components/message/src/message.tsx"],"sourcesContent":["import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type MessageBubbleProps = {\n /**\n * String message content.\n *\n * Real newline characters (`\\n`) are preserved as-is.\n * Escaped newline sequences (`\\\\n` — the two-character literal backslash-n) are\n * converted to real newlines, so API responses that serialize newlines as `\\\\n`\n * are rendered correctly without pre-processing by the caller.\n */\n text: string;\n /** Enables the entry animation. Defaults to true. */\n animate?: boolean;\n /** Optional class name for the bubble element. */\n className?: string;\n};\n\nconst MessageBubble = ({ text, animate = true, className }: MessageBubbleProps) => {\n const content = text.replace(/\\\\n/g, \"\\n\");\n\n return (\n <div\n className={cx(\"purpur-message__bubble\", className, {\n \"purpur-message__bubble--no-animation\": animate === false,\n })}\n >\n <Paragraph className={cx(\"purpur-message__text\")}>{content}</Paragraph>\n </div>\n );\n};\n\nMessageBubble.displayName = \"Message.Bubble\";\n\nexport { MessageBubble };\n","import React, { type ReactNode } from \"react\";\nimport { Avatar } from \"@purpur/avatar\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\n\nconst cx = c.bind(styles);\n\ntype MessageStampBaseProps = {\n /** Optional class name for the stamp element. */\n className?: string;\n /** Enables negative color tokens for dark surfaces. */\n negative?: boolean;\n /** Text content centered in the divider. */\n text: ReactNode;\n};\n\ntype MessageStampAvatarProps = MessageStampBaseProps & {\n variant: \"avatar\";\n /** Accessible label for the avatar. When omitted, avatar is rendered as decorative. */\n avatarAriaLabel?: string;\n /** Label content rendered inside the avatar, typically initials. */\n avatarLabel: ReactNode;\n};\n\ntype MessageStampTextProps = MessageStampBaseProps & {\n variant: \"text\";\n};\n\nexport type MessageStampProps = MessageStampAvatarProps | MessageStampTextProps;\n\nconst MessageStamp = (props: MessageStampProps) => {\n const { className, negative, text, variant } = props;\n\n if (variant === \"avatar\") {\n return (\n <div\n className={cx(\"purpur-message__stamp\", \"purpur-message__stamp--avatar\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n {props.avatarAriaLabel ? (\n <Avatar aria-label={props.avatarAriaLabel} label={props.avatarLabel} size=\"sm\" />\n ) : (\n <Avatar decorative label={props.avatarLabel} size=\"sm\" />\n )}\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n </div>\n );\n }\n\n return (\n <div\n className={cx(\"purpur-message__stamp\", className, {\n \"purpur-message__stamp--negative\": negative,\n })}\n >\n <div className={cx(\"purpur-message__stamp-divider-row\")}>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n <Paragraph variant=\"additional-100\" negative={negative}>\n {text}\n </Paragraph>\n <div className={cx(\"purpur-message__stamp-divider\")} />\n </div>\n </div>\n );\n};\n\nMessageStamp.displayName = \"Message.Stamp\";\n\nexport { MessageStamp };\n","export const toValidDate = (value: Date | string | number) => {\n const nextDate = new Date(value);\n if (Number.isNaN(nextDate.getTime())) {\n return null;\n }\n return nextDate;\n};\n\nexport const formatTimestamp = (sentAtDate: Date) => {\n if (Number.isNaN(sentAtDate.getTime())) {\n return null;\n }\n\n const now = new Date();\n const diffInMs = now.getTime() - sentAtDate.getTime();\n if (diffInMs < 0) return null;\n\n if (diffInMs < 24 * 60 * 60 * 1000) {\n return sentAtDate.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n }\n\n return sentAtDate.toLocaleDateString();\n};\n","import React, { type ReactNode } from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./message.module.scss\";\nimport { MessageBubble, type MessageBubbleProps } from \"./message-bubble\";\nimport { MessageStamp, type MessageStampProps } from \"./message-stamp\";\nimport { formatTimestamp, toValidDate } from \"./message-utils\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-message\";\n\nexport type { MessageBubbleProps, MessageStampProps };\n\ntype MessageBaseProps = {\n /** Enables negative color tokens for dark surfaces. Applied to the header name and timestamp. */\n negative?: boolean;\n /** Optional class name for the message root element. */\n className?: string;\n /** Message content - can include Message.Bubble and Message.Stamp subcomponents. */\n children?: ReactNode;\n /** Timestamp source used for automatic time/date formatting. When provided, the timestamp is displayed. */\n sentAt?: Date | string | number;\n};\n\nexport type IncomingMessageProps = MessageBaseProps & {\n /** Message variant for incoming messages (assistant/employee). */\n variant: \"incoming\";\n /** Optional sender name displayed as a header above the bubbles. */\n senderName?: string;\n /** Optional avatar element rendered on the left. */\n avatar?: ReactNode;\n};\n\nexport type OutgoingMessageProps = MessageBaseProps & {\n /** Message variant for outgoing messages (user). */\n variant: \"outgoing\";\n /** Outgoing messages do not support sender metadata. */\n senderName?: never;\n /** Outgoing messages do not support avatars. */\n avatar?: never;\n};\n\n// Root Message component\nexport type MessageProps = IncomingMessageProps | OutgoingMessageProps;\n\nconst Message = ({ variant, negative, className, children, ...variantProps }: MessageProps) => {\n const isIncoming = variant === \"incoming\";\n const senderName = isIncoming ? variantProps.senderName : undefined;\n const avatar = isIncoming ? variantProps.avatar : undefined;\n const sentAt = variantProps.sentAt;\n\n const hasHeader = isIncoming && senderName !== undefined;\n const hasAvatar = avatar !== undefined;\n\n const sentAtDate = sentAt === undefined ? null : toValidDate(sentAt);\n const resolvedTimestamp = sentAtDate ? formatTimestamp(sentAtDate) : null;\n\n const footer =\n sentAtDate !== null && resolvedTimestamp !== null ? (\n <div className={cx(`${rootClassName}__footer-container`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-timestamp`, `${rootClassName}__header--bottom`)}\n negative={negative}\n variant=\"additional-100\"\n >\n <time dateTime={sentAtDate.toISOString()}>{resolvedTimestamp}</time>\n </Paragraph>\n </div>\n ) : null;\n\n const header = hasHeader ? (\n <div className={cx(`${rootClassName}__header-container`)}>\n <div className={cx(`${rootClassName}__header`)}>\n <Paragraph\n className={cx(`${rootClassName}__header-name`)}\n negative={negative}\n variant=\"additional-100-medium\"\n >\n {senderName}\n </Paragraph>\n </div>\n </div>\n ) : null;\n\n const needsContentWrapper = hasHeader || hasAvatar;\n\n return (\n <div\n className={cx(\n rootClassName,\n variant === \"incoming\" ? `${rootClassName}--incoming` : `${rootClassName}--outgoing`,\n {\n [`${rootClassName}--with-avatar`]: hasAvatar,\n [`${rootClassName}--with-avatar-header-layout`]: hasHeader && hasAvatar,\n [`${rootClassName}--incoming-header-layout`]: hasHeader && !hasAvatar,\n },\n className\n )}\n >\n {header}\n {hasAvatar && <div className={cx(`${rootClassName}__avatar`)}>{avatar}</div>}\n {needsContentWrapper ? (\n <div className={cx(`${rootClassName}__content`)}>{children}</div>\n ) : (\n children\n )}\n {footer}\n </div>\n );\n};\n\nMessage.displayName = \"Message\";\n\ntype MessageComponent = typeof Message & {\n Bubble: typeof MessageBubble;\n Stamp: typeof MessageStamp;\n};\n\nconst MessageNamespace = Message as MessageComponent;\nMessageNamespace.Bubble = MessageBubble;\nMessageNamespace.Stamp = MessageStamp;\n\nexport { MessageNamespace as Message };\n"],"names":["cx","c","styles","MessageBubble","text","animate","className","content","jsx","Paragraph","MessageStamp","props","negative","variant","jsxs","Avatar","toValidDate","value","nextDate","formatTimestamp","sentAtDate","diffInMs","rootClassName","Message","children","variantProps","isIncoming","senderName","avatar","sentAt","hasHeader","hasAvatar","resolvedTimestamp","footer","header","needsContentWrapper","MessageNamespace"],"mappings":"6rDAMMA,EAAKC,E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|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./message-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./message-DsGB-JFh.js");exports.Message=e.MessageNamespace;
|
|
2
2
|
//# sourceMappingURL=message.cjs.js.map
|
package/dist/message.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef as I, useState as P, useRef as b, useCallback as rt, useEffe
|
|
|
4
4
|
import { b as nt } from "./button-4-yWOgtD.mjs";
|
|
5
5
|
import { H as ot } from "./heading-xwBuT_-9.mjs";
|
|
6
6
|
import { r as at } from "./close.es-BPmk2wkU.mjs";
|
|
7
|
-
import { P as st } from "./paragraph-
|
|
7
|
+
import { P as st } from "./paragraph-CwAdFoIm.mjs";
|
|
8
8
|
import "./ThemeProvider-BJ25_asg.mjs";
|
|
9
9
|
import { u as lt } from "./useThemePortalContainer-D13Xx24N.mjs";
|
|
10
10
|
import { V as _t } from "./visually-hidden-BYFkJEp1.mjs";
|
|
@@ -211,4 +211,4 @@ j.displayName = "Modal";
|
|
|
211
211
|
export {
|
|
212
212
|
j as M
|
|
213
213
|
};
|
|
214
|
-
//# sourceMappingURL=modal-
|
|
214
|
+
//# sourceMappingURL=modal-Bu1Zv5Ic.mjs.map
|