@televet/kibble-ui 4.0.1 → 5.0.0-beta.hotfix.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/dist/chunks/alert.types-BKSqs9qY.js +2 -0
- package/dist/chunks/alert.types-BKSqs9qY.js.map +1 -0
- package/dist/chunks/alert.types-C_ygg7fh.js +141 -0
- package/dist/chunks/alert.types-C_ygg7fh.js.map +1 -0
- package/dist/chunks/anatomy-BkGk10kB.js +2 -0
- package/dist/chunks/anatomy-BkGk10kB.js.map +1 -0
- package/dist/chunks/anatomy-zd4ecEFD.js +280 -0
- package/dist/chunks/anatomy-zd4ecEFD.js.map +1 -0
- package/dist/chunks/avatar.component-B1HGlwVW.js +2 -0
- package/dist/chunks/avatar.component-B1HGlwVW.js.map +1 -0
- package/dist/chunks/avatar.component-C-365mx3.js +404 -0
- package/dist/chunks/avatar.component-C-365mx3.js.map +1 -0
- package/dist/chunks/avatar.records-CxLCvZfG.js +2 -0
- package/dist/chunks/avatar.records-CxLCvZfG.js.map +1 -0
- package/dist/chunks/{index-Cv06PsSJ.js → avatar.records-EoZmO3VR.js} +21 -13
- package/dist/chunks/avatar.records-EoZmO3VR.js.map +1 -0
- package/dist/chunks/avatarGroup.component-B-ZOhj7i.js +75 -0
- package/dist/chunks/avatarGroup.component-B-ZOhj7i.js.map +1 -0
- package/dist/chunks/avatarGroup.component-CTBfGiSm.js +2 -0
- package/dist/chunks/avatarGroup.component-CTBfGiSm.js.map +1 -0
- package/dist/chunks/button.component-BO6oee_V.js +69 -0
- package/dist/chunks/button.component-BO6oee_V.js.map +1 -0
- package/dist/chunks/button.component-DjdgBXDC.js +2 -0
- package/dist/chunks/button.component-DjdgBXDC.js.map +1 -0
- package/dist/chunks/button.recipe-Bb0lptGi.js +613 -0
- package/dist/chunks/button.recipe-Bb0lptGi.js.map +1 -0
- package/dist/chunks/button.recipe-flk0XJTS.js +2 -0
- package/dist/chunks/button.recipe-flk0XJTS.js.map +1 -0
- package/dist/chunks/button.types-3lHElsln.js +2 -0
- package/dist/chunks/button.types-3lHElsln.js.map +1 -0
- package/dist/chunks/{button.types-BKXZNvN1.js → button.types-C9PpvmYR.js} +14 -9
- package/dist/chunks/button.types-C9PpvmYR.js.map +1 -0
- package/dist/chunks/buttonGroup.component-CowJsbr7.js +2 -0
- package/dist/chunks/buttonGroup.component-CowJsbr7.js.map +1 -0
- package/dist/chunks/buttonGroup.component-DUK2FgFn.js +70 -0
- package/dist/chunks/buttonGroup.component-DUK2FgFn.js.map +1 -0
- package/dist/chunks/calendar.component-CHIhplfO.js +18 -0
- package/dist/chunks/calendar.component-CHIhplfO.js.map +1 -0
- package/dist/chunks/calendar.component-tOoK1NrU.js +2 -0
- package/dist/chunks/calendar.component-tOoK1NrU.js.map +1 -0
- package/dist/chunks/card.component-B1AznjWF.js +55 -0
- package/dist/chunks/card.component-B1AznjWF.js.map +1 -0
- package/dist/chunks/card.component-BmBiYbMV.js +2 -0
- package/dist/chunks/card.component-BmBiYbMV.js.map +1 -0
- package/dist/chunks/center-Dmlzv1BW.js +20 -0
- package/dist/chunks/center-Dmlzv1BW.js.map +1 -0
- package/dist/chunks/center-kk61ArhQ.js +2 -0
- package/dist/chunks/center-kk61ArhQ.js.map +1 -0
- package/dist/chunks/characterCounter.component-CKDigkoD.js +2 -0
- package/dist/chunks/characterCounter.component-CKDigkoD.js.map +1 -0
- package/dist/chunks/characterCounter.component-Ch3P3GqC.js +82 -0
- package/dist/chunks/characterCounter.component-Ch3P3GqC.js.map +1 -0
- package/dist/chunks/{checkbox.anatomy-DC8fJdkY.js → checkbox.anatomy-BzZ0IkUF.js} +22 -22
- package/dist/chunks/{checkbox.anatomy-DC8fJdkY.js.map → checkbox.anatomy-BzZ0IkUF.js.map} +1 -1
- package/dist/chunks/{checkbox.anatomy-BNdLT4Qf.js → checkbox.anatomy-DM39E2Q9.js} +2 -2
- package/dist/chunks/{checkbox.anatomy-BNdLT4Qf.js.map → checkbox.anatomy-DM39E2Q9.js.map} +1 -1
- package/dist/chunks/checkbox.component-CiA3Z1zR.js +2 -0
- package/dist/chunks/{checkbox.component-DNOkXggb.js.map → checkbox.component-CiA3Z1zR.js.map} +1 -1
- package/dist/chunks/checkbox.component-DE35wBj-.js +269 -0
- package/dist/chunks/{checkbox.component-Dhjcu89D.js.map → checkbox.component-DE35wBj-.js.map} +1 -1
- package/dist/chunks/checkboxGroup.component-BGBd-roJ.js +2 -0
- package/dist/chunks/checkboxGroup.component-BGBd-roJ.js.map +1 -0
- package/dist/chunks/checkboxGroup.component-CYwGlktu.js +53 -0
- package/dist/chunks/checkboxGroup.component-CYwGlktu.js.map +1 -0
- package/dist/chunks/{config-B3QABP1-.js → config-Djkl1N81.js} +4 -4
- package/dist/chunks/{config-B3QABP1-.js.map → config-Djkl1N81.js.map} +1 -1
- package/dist/chunks/conversationCard.component-BrDGshOG.js +2 -0
- package/dist/chunks/conversationCard.component-BrDGshOG.js.map +1 -0
- package/dist/chunks/conversationCard.component-CMdqD3yN.js +331 -0
- package/dist/chunks/conversationCard.component-CMdqD3yN.js.map +1 -0
- package/dist/chunks/{create-recipe-context-CrEKmpj8.js → create-recipe-context-DfQ-MTih.js} +9 -9
- package/dist/chunks/{create-recipe-context-CrEKmpj8.js.map → create-recipe-context-DfQ-MTih.js.map} +1 -1
- package/dist/chunks/create-slot-recipe-context-D_FXDJGp.js +104 -0
- package/dist/chunks/create-slot-recipe-context-D_FXDJGp.js.map +1 -0
- package/dist/chunks/create-slot-recipe-context-HXE1VazG.js +2 -0
- package/dist/chunks/create-slot-recipe-context-HXE1VazG.js.map +1 -0
- package/dist/chunks/datePicker.component-C6cD1_HR.js +2 -0
- package/dist/chunks/datePicker.component-C6cD1_HR.js.map +1 -0
- package/dist/chunks/datePicker.component-eHU7IZgC.js +166 -0
- package/dist/chunks/datePicker.component-eHU7IZgC.js.map +1 -0
- package/dist/chunks/datePicker.provider-BWHE-9FA.js +3009 -0
- package/dist/chunks/datePicker.provider-BWHE-9FA.js.map +1 -0
- package/dist/chunks/datePicker.provider-DgarjPPd.js +15 -0
- package/dist/chunks/datePicker.provider-DgarjPPd.js.map +1 -0
- package/dist/chunks/dateTimePicker.component-Byjxg2lJ.js +317 -0
- package/dist/chunks/dateTimePicker.component-Byjxg2lJ.js.map +1 -0
- package/dist/chunks/dateTimePicker.component-REz9iX4S.js +2 -0
- package/dist/chunks/dateTimePicker.component-REz9iX4S.js.map +1 -0
- package/dist/chunks/{dialog-C51vaoYf.js → dialog-B9jifvV4.js} +37 -36
- package/dist/chunks/{dialog-C51vaoYf.js.map → dialog-B9jifvV4.js.map} +1 -1
- package/dist/chunks/dialog-CZFwddWp.js +2 -0
- package/dist/chunks/{dialog-BPhjKQkb.js.map → dialog-CZFwddWp.js.map} +1 -1
- package/dist/chunks/divider.component-BX3zyB7O.js +2 -0
- package/dist/chunks/divider.component-BX3zyB7O.js.map +1 -0
- package/dist/chunks/divider.component-CFOh4Nw3.js +45 -0
- package/dist/chunks/divider.component-CFOh4Nw3.js.map +1 -0
- package/dist/chunks/divider.types-6MEkMNbx.js +7 -0
- package/dist/chunks/divider.types-6MEkMNbx.js.map +1 -0
- package/dist/chunks/divider.types-DBNcs0IR.js +2 -0
- package/dist/chunks/divider.types-DBNcs0IR.js.map +1 -0
- package/dist/chunks/{empty-BU2EAux9.js → empty-DNH84khx.js} +3 -3
- package/dist/chunks/{empty-BU2EAux9.js.map → empty-DNH84khx.js.map} +1 -1
- package/dist/chunks/field.anatomy-Bhj7Mlr7.js +2 -0
- package/dist/chunks/field.anatomy-Bhj7Mlr7.js.map +1 -0
- package/dist/chunks/field.anatomy-C37GEr2p.js +16 -0
- package/dist/chunks/field.anatomy-C37GEr2p.js.map +1 -0
- package/dist/chunks/{format-BRt-TIiQ.js → format-CK7Imh-5.js} +2 -2
- package/dist/chunks/{format-BRt-TIiQ.js.map → format-CK7Imh-5.js.map} +1 -1
- package/dist/chunks/{format-DgHM6wFr.js → format-CqTHHSak.js} +3 -1
- package/dist/chunks/{format-DgHM6wFr.js.map → format-CqTHHSak.js.map} +1 -1
- package/dist/chunks/grid-item-BmCSQ38y.js +78 -0
- package/dist/chunks/grid-item-BmCSQ38y.js.map +1 -0
- package/dist/chunks/grid-item-CH3dbZHL.js +2 -0
- package/dist/chunks/grid-item-CH3dbZHL.js.map +1 -0
- package/dist/chunks/heading.component-7ikcgDco.js +18 -0
- package/dist/chunks/heading.component-7ikcgDco.js.map +1 -0
- package/dist/chunks/heading.component-DMAQO_-m.js +2 -0
- package/dist/chunks/heading.component-DMAQO_-m.js.map +1 -0
- package/dist/chunks/{icon-button-5UcFiA_W.js → icon-button-CcZMCNUJ.js} +3 -3
- package/dist/chunks/{icon-button-5UcFiA_W.js.map → icon-button-CcZMCNUJ.js.map} +1 -1
- package/dist/chunks/icon.component-B1hr5lLa.js +2 -0
- package/dist/chunks/icon.component-B1hr5lLa.js.map +1 -0
- package/dist/chunks/icon.component-PV_nHBId.js +32 -0
- package/dist/chunks/icon.component-PV_nHBId.js.map +1 -0
- package/dist/chunks/{icons-DQ5FafZQ.js → icons-CoSqruIn.js} +5 -5
- package/dist/chunks/{icons-DQ5FafZQ.js.map → icons-CoSqruIn.js.map} +1 -1
- package/dist/chunks/index-B-OGBT0w.js +2 -0
- package/dist/chunks/{index-BEfEzWJx.js.map → index-B-OGBT0w.js.map} +1 -1
- package/dist/chunks/index-B3xJnxjd.js +371 -0
- package/dist/chunks/index-B3xJnxjd.js.map +1 -0
- package/dist/chunks/index-BFUdiDZp.js +2 -0
- package/dist/chunks/{index-2glJ2faJ.js.map → index-BFUdiDZp.js.map} +1 -1
- package/dist/chunks/{index-CVJXrcei.js → index-BGd_2-DY.js} +29 -27
- package/dist/chunks/{index-CVJXrcei.js.map → index-BGd_2-DY.js.map} +1 -1
- package/dist/chunks/index-BXv9lkZC.js +4 -0
- package/dist/chunks/index-BXv9lkZC.js.map +1 -0
- package/dist/chunks/index-BbZjRFzg.js +265 -0
- package/dist/chunks/index-BbZjRFzg.js.map +1 -0
- package/dist/chunks/{index-CYXurbh4.js → index-BgFImxxe.js} +27 -25
- package/dist/chunks/{index-CYXurbh4.js.map → index-BgFImxxe.js.map} +1 -1
- package/dist/chunks/index-BoulS5Zg.js +2 -0
- package/dist/chunks/index-BoulS5Zg.js.map +1 -0
- package/dist/chunks/index-BrJtqTzN.js +4115 -0
- package/dist/chunks/index-BrJtqTzN.js.map +1 -0
- package/dist/chunks/index-C9UYIjEB.js +1584 -0
- package/dist/chunks/index-C9UYIjEB.js.map +1 -0
- package/dist/chunks/index-CQURjLlA.js +3 -0
- package/dist/chunks/index-CQURjLlA.js.map +1 -0
- package/dist/chunks/{index-BXJJKHzT.js → index-CbVKVxMW.js} +54 -52
- package/dist/chunks/{index-BXJJKHzT.js.map → index-CbVKVxMW.js.map} +1 -1
- package/dist/chunks/{index-CWhDtS-n.js → index-Cxrrsmf-.js} +17 -16
- package/dist/chunks/{index-CWhDtS-n.js.map → index-Cxrrsmf-.js.map} +1 -1
- package/dist/chunks/{index-BZBgTxer.js → index-D0DKQnEK.js} +11 -11
- package/dist/chunks/{index-BZBgTxer.js.map → index-D0DKQnEK.js.map} +1 -1
- package/dist/chunks/index-D1RhzPVz.js +984 -0
- package/dist/chunks/index-D1RhzPVz.js.map +1 -0
- package/dist/chunks/index-D3Q0mQNf.js +325 -0
- package/dist/chunks/index-D3Q0mQNf.js.map +1 -0
- package/dist/chunks/index-D6HBfqAu.js +2 -0
- package/dist/chunks/index-D6HBfqAu.js.map +1 -0
- package/dist/chunks/index-D6c4fMjg.js +2 -0
- package/dist/chunks/index-D6c4fMjg.js.map +1 -0
- package/dist/chunks/{index-CfqoBQoP.js → index-D7QT9KIZ.js} +9 -9
- package/dist/chunks/{index-CfqoBQoP.js.map → index-D7QT9KIZ.js.map} +1 -1
- package/dist/chunks/{index-WYcfOUFA.js → index-DIszpWqO.js} +2 -2
- package/dist/chunks/{index-WYcfOUFA.js.map → index-DIszpWqO.js.map} +1 -1
- package/dist/chunks/{index-D0HCo_Ly.js → index-DLe40do7.js} +2 -2
- package/dist/chunks/{index-D0HCo_Ly.js.map → index-DLe40do7.js.map} +1 -1
- package/dist/chunks/index-DS4KlAkI.js +371 -0
- package/dist/chunks/index-DS4KlAkI.js.map +1 -0
- package/dist/chunks/{index-nNZWP0FQ.js → index-DTVestnf.js} +2 -2
- package/dist/chunks/{index-nNZWP0FQ.js.map → index-DTVestnf.js.map} +1 -1
- package/dist/chunks/index-DVyODQn6.js +8 -0
- package/dist/chunks/index-DVyODQn6.js.map +1 -0
- package/dist/chunks/index-D_vndwae.js +3 -0
- package/dist/chunks/index-D_vndwae.js.map +1 -0
- package/dist/chunks/index-DfzXSlq1.js +2477 -0
- package/dist/chunks/index-DfzXSlq1.js.map +1 -0
- package/dist/chunks/{index-BhSvtzbY.js → index-QVc_GVoE.js} +13 -13
- package/dist/chunks/{index-BhSvtzbY.js.map → index-QVc_GVoE.js.map} +1 -1
- package/dist/chunks/index-Ts8g8jZd.js +2 -0
- package/dist/chunks/index-Ts8g8jZd.js.map +1 -0
- package/dist/chunks/index-_913FPya.js +2 -0
- package/dist/chunks/{index-A_vmTNU7.js.map → index-_913FPya.js.map} +1 -1
- package/dist/chunks/index-fHSGm2nC.js +1044 -0
- package/dist/chunks/index-fHSGm2nC.js.map +1 -0
- package/dist/chunks/{index-eNFIsSpE.js → index-kpOEHtZZ.js} +2 -2
- package/dist/chunks/{index-eNFIsSpE.js.map → index-kpOEHtZZ.js.map} +1 -1
- package/dist/chunks/index-rSq6Bry6.js +2 -0
- package/dist/chunks/{index-DAI6_P9H.js.map → index-rSq6Bry6.js.map} +1 -1
- package/dist/chunks/{index-BhPrz8Zu.js → index-wV4hG2vI.js} +19 -19
- package/dist/chunks/{index-BhPrz8Zu.js.map → index-wV4hG2vI.js.map} +1 -1
- package/dist/chunks/index-yh2QitBe.js +2 -0
- package/dist/chunks/index-yh2QitBe.js.map +1 -0
- package/dist/chunks/input-group-CFelIL63.js +78 -0
- package/dist/chunks/input-group-CFelIL63.js.map +1 -0
- package/dist/chunks/input-group-DUdSDk4o.js +2 -0
- package/dist/chunks/input-group-DUdSDk4o.js.map +1 -0
- package/dist/chunks/isToday-BgNkHh5t.js +2 -0
- package/dist/chunks/isToday-BgNkHh5t.js.map +1 -0
- package/dist/chunks/isToday-iCYsPDMT.js +23 -0
- package/dist/chunks/isToday-iCYsPDMT.js.map +1 -0
- package/dist/chunks/link.component--URNKuK2.js +44 -0
- package/dist/chunks/link.component--URNKuK2.js.map +1 -0
- package/dist/chunks/link.component-_YXG8MDq.js +2 -0
- package/dist/chunks/link.component-_YXG8MDq.js.map +1 -0
- package/dist/chunks/{list-D22V_L58.js → list-DTRn3TmT.js} +2 -2
- package/dist/chunks/{list-D22V_L58.js.map → list-DTRn3TmT.js.map} +1 -1
- package/dist/chunks/{list-DwRM9eA_.js → list-v83ZN2MC.js} +2 -2
- package/dist/chunks/{list-DwRM9eA_.js.map → list-v83ZN2MC.js.map} +1 -1
- package/dist/chunks/logo.types-88a31xCx.js +2 -0
- package/dist/chunks/logo.types-88a31xCx.js.map +1 -0
- package/dist/chunks/logo.types-C5GwpHjM.js +51 -0
- package/dist/chunks/logo.types-C5GwpHjM.js.map +1 -0
- package/dist/chunks/menu.component-D4-4xRDj.js +2 -0
- package/dist/chunks/menu.component-D4-4xRDj.js.map +1 -0
- package/dist/chunks/menu.component-DwTen8Uv.js +704 -0
- package/dist/chunks/menu.component-DwTen8Uv.js.map +1 -0
- package/dist/chunks/modal.types-74os4Bqi.js +2 -0
- package/dist/chunks/modal.types-74os4Bqi.js.map +1 -0
- package/dist/chunks/modal.types-B0rK6xJy.js +115 -0
- package/dist/chunks/modal.types-B0rK6xJy.js.map +1 -0
- package/dist/chunks/{notificationCounter.component-Lu4_Owvr.js → notificationCounter.component-BexkISUl.js} +37 -18
- package/dist/chunks/notificationCounter.component-BexkISUl.js.map +1 -0
- package/dist/chunks/notificationCounter.component-DJpUXeXm.js +2 -0
- package/dist/chunks/notificationCounter.component-DJpUXeXm.js.map +1 -0
- package/dist/chunks/numberInput.component-DIABzNV6.js +2 -0
- package/dist/chunks/numberInput.component-DIABzNV6.js.map +1 -0
- package/dist/chunks/numberInput.component-RCwUUzmH.js +227 -0
- package/dist/chunks/numberInput.component-RCwUUzmH.js.map +1 -0
- package/dist/chunks/picture.component-BA2hgdZy.js +2 -0
- package/dist/chunks/picture.component-BA2hgdZy.js.map +1 -0
- package/dist/chunks/picture.component-DzdHIFN_.js +28 -0
- package/dist/chunks/picture.component-DzdHIFN_.js.map +1 -0
- package/dist/chunks/pinInput.types-BCzsoF9r.js +2 -0
- package/dist/chunks/{pinInput.types-Cqm1Px5l.js.map → pinInput.types-BCzsoF9r.js.map} +1 -1
- package/dist/chunks/pinInput.types-CcaAN6P2.js +155 -0
- package/dist/chunks/{pinInput.types-CcN0aX_i.js.map → pinInput.types-CcaAN6P2.js.map} +1 -1
- package/dist/chunks/popover-C7aj8Iwj.js +2 -0
- package/dist/chunks/popover-C7aj8Iwj.js.map +1 -0
- package/dist/chunks/popover-pd70xkY_.js +111 -0
- package/dist/chunks/popover-pd70xkY_.js.map +1 -0
- package/dist/chunks/popover-root-provider-CZDbUJ2K.js +2 -0
- package/dist/chunks/{popover-root-provider-ZB5BcrXn.js.map → popover-root-provider-CZDbUJ2K.js.map} +1 -1
- package/dist/chunks/popover-root-provider-DR0Iuda1.js +44 -0
- package/dist/chunks/{popover-root-provider-CkW1eCBQ.js.map → popover-root-provider-DR0Iuda1.js.map} +1 -1
- package/dist/chunks/popover.component-BBp_5m8e.js +2 -0
- package/dist/chunks/popover.component-BBp_5m8e.js.map +1 -0
- package/dist/chunks/popover.component-DEOUdSu3.js +220 -0
- package/dist/chunks/popover.component-DEOUdSu3.js.map +1 -0
- package/dist/chunks/popover.recipe-B9bkpDfc.js +126 -0
- package/dist/chunks/popover.recipe-B9bkpDfc.js.map +1 -0
- package/dist/chunks/popover.recipe-Czy8Aeft.js +2 -0
- package/dist/chunks/popover.recipe-Czy8Aeft.js.map +1 -0
- package/dist/chunks/popover.types-CQJj3uOX.js +7 -0
- package/dist/chunks/popover.types-CQJj3uOX.js.map +1 -0
- package/dist/chunks/popover.types-ChA9ccQ2.js +2 -0
- package/dist/chunks/popover.types-ChA9ccQ2.js.map +1 -0
- package/dist/chunks/progress-value-text-CFVhPKYk.js +2 -0
- package/dist/chunks/progress-value-text-CFVhPKYk.js.map +1 -0
- package/dist/chunks/progress-value-text-DZkUF2cO.js +58 -0
- package/dist/chunks/progress-value-text-DZkUF2cO.js.map +1 -0
- package/dist/chunks/radioGroup.types-C7A8mLMz.js +2 -0
- package/dist/chunks/radioGroup.types-C7A8mLMz.js.map +1 -0
- package/dist/chunks/radioGroup.types-DJ68ERdO.js +228 -0
- package/dist/chunks/radioGroup.types-DJ68ERdO.js.map +1 -0
- package/dist/chunks/radiomark-Cj0NEJeE.js +2 -0
- package/dist/chunks/radiomark-Cj0NEJeE.js.map +1 -0
- package/dist/chunks/radiomark-DdwVpBDT.js +22 -0
- package/dist/chunks/radiomark-DdwVpBDT.js.map +1 -0
- package/dist/chunks/radiomark.component-D_7wT5VA.js +11 -0
- package/dist/chunks/radiomark.component-D_7wT5VA.js.map +1 -0
- package/dist/chunks/radiomark.component-YJNr68s7.js +2 -0
- package/dist/chunks/radiomark.component-YJNr68s7.js.map +1 -0
- package/dist/chunks/rating-group-CfwdAW9a.js +133 -0
- package/dist/chunks/rating-group-CfwdAW9a.js.map +1 -0
- package/dist/chunks/rating-group-D8QA23q6.js +2 -0
- package/dist/chunks/rating-group-D8QA23q6.js.map +1 -0
- package/dist/chunks/rating.component-BsuGbcxP.js +2 -0
- package/dist/chunks/rating.component-BsuGbcxP.js.map +1 -0
- package/dist/chunks/rating.component-ChzcvUl6.js +70 -0
- package/dist/chunks/rating.component-ChzcvUl6.js.map +1 -0
- package/dist/chunks/ratingDots.component-CVjSZ9JJ.js +2 -0
- package/dist/chunks/ratingDots.component-CVjSZ9JJ.js.map +1 -0
- package/dist/chunks/ratingDots.component-D9WQGVcj.js +147 -0
- package/dist/chunks/ratingDots.component-D9WQGVcj.js.map +1 -0
- package/dist/chunks/{render-strategy-CfHUEDVm.js → render-strategy-kPh1pd2U.js} +2 -2
- package/dist/chunks/{render-strategy-CfHUEDVm.js.map → render-strategy-kPh1pd2U.js.map} +1 -1
- package/dist/chunks/{render-strategy-Dr73HbQf.js → render-strategy-munDZLwL.js} +2 -2
- package/dist/chunks/{render-strategy-Dr73HbQf.js.map → render-strategy-munDZLwL.js.map} +1 -1
- package/dist/chunks/select.component-B4mAPqzN.js +1099 -0
- package/dist/chunks/select.component-B4mAPqzN.js.map +1 -0
- package/dist/chunks/select.component-CCNxMGvb.js +2 -0
- package/dist/chunks/select.component-CCNxMGvb.js.map +1 -0
- package/dist/chunks/{sortableList.component-vxiA7bvr.js → sortableList.component-BlwtnxVj.js} +3 -3
- package/dist/chunks/{sortableList.component-vxiA7bvr.js.map → sortableList.component-BlwtnxVj.js.map} +1 -1
- package/dist/chunks/{sortableList.component-i4dJ9oHN.js → sortableList.component-XfURY7C2.js} +384 -379
- package/dist/chunks/{sortableList.component-i4dJ9oHN.js.map → sortableList.component-XfURY7C2.js.map} +1 -1
- package/dist/chunks/spinner-B9ytCKVs.js +8 -0
- package/dist/chunks/{spinner-C31ZWQmA.js.map → spinner-B9ytCKVs.js.map} +1 -1
- package/dist/chunks/{spinner.component-DPYj17HK.js → spinner.component-B3dkvoO9.js} +53 -45
- package/dist/chunks/spinner.component-B3dkvoO9.js.map +1 -0
- package/dist/chunks/spinner.component-DuW1_IWM.js +2 -0
- package/dist/chunks/spinner.component-DuW1_IWM.js.map +1 -0
- package/dist/chunks/styledAvatar.types-CcP-Vl9c.js +2 -0
- package/dist/chunks/styledAvatar.types-CcP-Vl9c.js.map +1 -0
- package/dist/chunks/styledAvatar.types-cR6PNPxA.js +69 -0
- package/dist/chunks/styledAvatar.types-cR6PNPxA.js.map +1 -0
- package/dist/chunks/swatch.types-AZLB8OWG.js +2 -0
- package/dist/chunks/swatch.types-AZLB8OWG.js.map +1 -0
- package/dist/chunks/{swatch.types-CXlghcLw.js → swatch.types-CkrkMi11.js} +21 -20
- package/dist/chunks/swatch.types-CkrkMi11.js.map +1 -0
- package/dist/chunks/switch.component-CgzCLoTB.js +2 -0
- package/dist/chunks/{switch.component-Cke7O8gk.js.map → switch.component-CgzCLoTB.js.map} +1 -1
- package/dist/chunks/switch.component-CpV7mnhR.js +155 -0
- package/dist/chunks/{switch.component-C88jBbo_.js.map → switch.component-CpV7mnhR.js.map} +1 -1
- package/dist/chunks/{tab.types-DCkus0y2.js → tab.types-DaJfFBvr.js} +136 -117
- package/dist/chunks/{tab.types-DCkus0y2.js.map → tab.types-DaJfFBvr.js.map} +1 -1
- package/dist/chunks/tab.types-DwPEP_5N.js +2 -0
- package/dist/chunks/{tab.types-DpmXyw5C.js.map → tab.types-DwPEP_5N.js.map} +1 -1
- package/dist/chunks/tag.component-B7V76XfM.js +84 -0
- package/dist/chunks/tag.component-B7V76XfM.js.map +1 -0
- package/dist/chunks/tag.component-C98Wf07v.js +2 -0
- package/dist/chunks/tag.component-C98Wf07v.js.map +1 -0
- package/dist/chunks/tagBlock.component-BGEvRu81.js +2 -0
- package/dist/chunks/tagBlock.component-BGEvRu81.js.map +1 -0
- package/dist/chunks/tagBlock.component-Cor6eakc.js +170 -0
- package/dist/chunks/tagBlock.component-Cor6eakc.js.map +1 -0
- package/dist/chunks/text.component-CdTyTFds.js +12 -0
- package/dist/chunks/text.component-CdTyTFds.js.map +1 -0
- package/dist/chunks/text.component-CeioUl0G.js +2 -0
- package/dist/chunks/text.component-CeioUl0G.js.map +1 -0
- package/dist/chunks/textInput.component-BC0Hi8R_.js +108 -0
- package/dist/chunks/textInput.component-BC0Hi8R_.js.map +1 -0
- package/dist/chunks/textInput.component-C1vwy6pL.js +2 -0
- package/dist/chunks/textInput.component-C1vwy6pL.js.map +1 -0
- package/dist/chunks/textarea.component-D15hA9Jb.js +2 -0
- package/dist/chunks/{textarea.component-Dk2IMKkr.js.map → textarea.component-D15hA9Jb.js.map} +1 -1
- package/dist/chunks/textarea.component-axjxiv82.js +96 -0
- package/dist/chunks/{textarea.component-BYexywy1.js.map → textarea.component-axjxiv82.js.map} +1 -1
- package/dist/chunks/{theme.provider-w_I9S10D.js → theme.provider-BD7qyu-B.js} +1405 -1339
- package/dist/chunks/theme.provider-BD7qyu-B.js.map +1 -0
- package/dist/chunks/theme.provider-DFwAy7tr.js +28 -0
- package/dist/chunks/theme.provider-DFwAy7tr.js.map +1 -0
- package/dist/chunks/timePicker.component-Cz2XxVL6.js +2 -0
- package/dist/chunks/timePicker.component-Cz2XxVL6.js.map +1 -0
- package/dist/chunks/timePicker.component-u34pHrzr.js +220 -0
- package/dist/chunks/timePicker.component-u34pHrzr.js.map +1 -0
- package/dist/chunks/timeRange.component-BiA1VWQ8.js +19 -0
- package/dist/chunks/timeRange.component-BiA1VWQ8.js.map +1 -0
- package/dist/chunks/timeRange.component-tU_nCTmS.js +2 -0
- package/dist/chunks/timeRange.component-tU_nCTmS.js.map +1 -0
- package/dist/chunks/timestamp.component-DBmc7D23.js +36 -0
- package/dist/chunks/timestamp.component-DBmc7D23.js.map +1 -0
- package/dist/chunks/timestamp.component-DYZHgaas.js +2 -0
- package/dist/chunks/timestamp.component-DYZHgaas.js.map +1 -0
- package/dist/chunks/toaster.records-CDSkoMuU.js +2 -0
- package/dist/chunks/{toaster.records-eCXbM85Z.js.map → toaster.records-CDSkoMuU.js.map} +1 -1
- package/dist/chunks/{toaster.records-oryzm5Go.js → toaster.records-Cb3hbtuY.js} +103 -102
- package/dist/chunks/{toaster.records-oryzm5Go.js.map → toaster.records-Cb3hbtuY.js.map} +1 -1
- package/dist/chunks/tooltip.component-BkFDi5yK.js +2 -0
- package/dist/chunks/{tooltip.component-CATpCSkf.js.map → tooltip.component-BkFDi5yK.js.map} +1 -1
- package/dist/chunks/{tooltip.component-mjdP7nPN.js → tooltip.component-C_NS-AoH.js} +126 -103
- package/dist/chunks/{tooltip.component-mjdP7nPN.js.map → tooltip.component-C_NS-AoH.js.map} +1 -1
- package/dist/chunks/{typography.records-CpYV1kns.js → typography.records-BEd2lI_g.js} +10 -22
- package/dist/chunks/typography.records-BEd2lI_g.js.map +1 -0
- package/dist/chunks/typography.records-Cg_lT1Z3.js +2 -0
- package/dist/chunks/typography.records-Cg_lT1Z3.js.map +1 -0
- package/dist/chunks/{use-field-context-BTxME29X.js → use-field-context-Cm29IQ7H.js} +2 -2
- package/dist/chunks/{use-field-context-BTxME29X.js.map → use-field-context-Cm29IQ7H.js.map} +1 -1
- package/dist/chunks/{use-field-context-RQeEcNpb.js → use-field-context-DrC9mrDd.js} +2 -2
- package/dist/chunks/{use-field-context-RQeEcNpb.js.map → use-field-context-DrC9mrDd.js.map} +1 -1
- package/dist/chunks/use-locale-context-Bw4Gg9Z0.js +738 -0
- package/dist/chunks/use-locale-context-Bw4Gg9Z0.js.map +1 -0
- package/dist/chunks/use-locale-context-ym21RUxU.js +22 -0
- package/dist/chunks/use-locale-context-ym21RUxU.js.map +1 -0
- package/dist/chunks/useIconTextSizeMap-BK-pUrQv.js.map +1 -1
- package/dist/chunks/useIconTextSizeMap-BXmABb54.js.map +1 -1
- package/dist/chunks/withFormControl-DePFf9SY.js +367 -0
- package/dist/chunks/withFormControl-DePFf9SY.js.map +1 -0
- package/dist/chunks/withFormControl-wZA87Sd4.js +2 -0
- package/dist/chunks/withFormControl-wZA87Sd4.js.map +1 -0
- package/dist/chunks/withTruncation-DE3FFPE7.js +2 -0
- package/dist/chunks/withTruncation-DE3FFPE7.js.map +1 -0
- package/dist/chunks/withTruncation-DTCfQ2yk.js +92 -0
- package/dist/chunks/withTruncation-DTCfQ2yk.js.map +1 -0
- package/dist/chunks/{wrap-CRNL4bE6.js → wrap-Cu5ZEseD.js} +2 -2
- package/dist/chunks/{wrap-CRNL4bE6.js.map → wrap-Cu5ZEseD.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +2 -2
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/Alert/index.cjs +1 -1
- package/dist/cjs/components/Avatar/index.cjs +1 -1
- package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
- package/dist/cjs/components/Button/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/Calendar/index.cjs +2 -0
- package/dist/cjs/components/Calendar/index.cjs.map +1 -0
- package/dist/cjs/components/Card/index.cjs +1 -1
- package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/DateTimePicker/index.cjs +2 -0
- package/dist/cjs/components/DateTimePicker/index.cjs.map +1 -0
- package/dist/cjs/components/Divider/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/Icon/generated/index.cjs +1 -1
- package/dist/cjs/components/Icon/generated/index.cjs.map +1 -1
- package/dist/cjs/components/Icon/index.cjs +1 -1
- package/dist/cjs/components/Link/index.cjs +1 -1
- package/dist/cjs/components/Logo/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/NotificationCounter/index.cjs +1 -1
- package/dist/cjs/components/NumberInput/index.cjs +2 -0
- package/dist/cjs/components/NumberInput/index.cjs.map +1 -0
- package/dist/cjs/components/Picture/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/Popover/index.cjs +1 -1
- package/dist/cjs/components/Progress/index.cjs +2 -0
- package/dist/cjs/components/Progress/index.cjs.map +1 -0
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/Radiomark/index.cjs +2 -0
- package/dist/cjs/components/Radiomark/index.cjs.map +1 -0
- package/dist/cjs/components/Rating/index.cjs +2 -0
- package/dist/cjs/components/Rating/index.cjs.map +1 -0
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/SortableList/index.cjs +1 -1
- package/dist/cjs/components/Spinner/index.cjs +1 -1
- package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
- package/dist/cjs/components/Swatch/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/Tabs/index.cjs +1 -1
- package/dist/cjs/components/Tag/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/Text/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/Timestamp/index.cjs +1 -1
- package/dist/cjs/components/Toast/index.cjs +1 -1
- package/dist/cjs/components/Toast/index.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/hooks/useBreakpoint/index.cjs.map +1 -1
- package/dist/cjs/hooks/useColorMode/index.cjs.map +1 -1
- package/dist/cjs/hooks/useColorModeValue/index.cjs.map +1 -1
- package/dist/cjs/hooks/useDeviceType/index.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs.map +1 -1
- package/dist/esm/chakra/index.js +1682 -1997
- package/dist/esm/chakra/index.js.map +1 -1
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/Button/index.js +2 -2
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/Calendar/index.js +5 -0
- package/dist/esm/components/Calendar/index.js.map +1 -0
- package/dist/esm/components/Card/index.js +1 -1
- package/dist/esm/components/CharacterCounter/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +4 -3
- package/dist/esm/components/DatePicker/index.js.map +1 -1
- package/dist/esm/components/DateTimePicker/index.js +7 -0
- package/dist/esm/components/DateTimePicker/index.js.map +1 -0
- package/dist/esm/components/Divider/index.js +6 -5
- package/dist/esm/components/Divider/index.js.map +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Icon/generated/index.js +556 -342
- package/dist/esm/components/Icon/generated/index.js.map +1 -1
- package/dist/esm/components/Icon/index.js +1 -1
- package/dist/esm/components/Link/index.js +1 -1
- package/dist/esm/components/Logo/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/NotificationCounter/index.js +1 -1
- package/dist/esm/components/NumberInput/index.js +5 -0
- package/dist/esm/components/NumberInput/index.js.map +1 -0
- package/dist/esm/components/Picture/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/Popover/index.js +2 -2
- package/dist/esm/components/Progress/index.js +57 -0
- package/dist/esm/components/Progress/index.js.map +1 -0
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/Radiomark/index.js +5 -0
- package/dist/esm/components/Radiomark/index.js.map +1 -0
- package/dist/esm/components/Rating/index.js +5 -0
- package/dist/esm/components/Rating/index.js.map +1 -0
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/SortableList/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/StyledAvatar/index.js +1 -1
- package/dist/esm/components/Swatch/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/Tag/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/Text/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/Timestamp/index.js +1 -1
- package/dist/esm/components/Toast/index.js +26 -23
- package/dist/esm/components/Toast/index.js.map +1 -1
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/components/index.js +131 -117
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/useBreakpoint/index.js.map +1 -1
- package/dist/esm/hooks/useColorMode/index.js.map +1 -1
- package/dist/esm/hooks/useColorModeValue/index.js.map +1 -1
- package/dist/esm/hooks/useDeviceType/index.js.map +1 -1
- package/dist/esm/index.js +148 -134
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/semanticTokens/index.js +4 -4
- package/dist/esm/theme/semanticTokens/index.js.map +1 -1
- package/dist/types/chakra/index.d.ts +2 -4
- package/dist/types/components/Alert/alert.component.d.ts +28 -1
- package/dist/types/components/Alert/alert.recipe.d.ts +3 -2
- package/dist/types/components/Alert/components/AlertButton/alertButton.component.d.ts +12 -1
- package/dist/types/components/Avatar/avatar.component.d.ts +30 -2
- package/dist/types/components/Avatar/avatar.recipe.d.ts +3 -2
- package/dist/types/components/Avatar/avatar.records.d.ts +2 -0
- package/dist/types/components/Avatar/components/AvatarBadge/avatarBadge.component.d.ts +9 -1
- package/dist/types/components/Avatar/components/AvatarRemoveButton/avatarRemoveButton.component.d.ts +15 -6
- package/dist/types/components/Avatar/components/AvatarTooltipTriggerWrapper/avatarTooltipTriggerWrapper.component.d.ts +2 -0
- package/dist/types/components/AvatarGroup/avatarGroup.component.d.ts +27 -3
- package/dist/types/components/Button/button.component.d.ts +14 -1
- package/dist/types/components/Button/button.recipe.d.ts +3 -1
- package/dist/types/components/Button/button.types.d.ts +2 -2
- package/dist/types/components/ButtonGroup/buttonGroup.component.d.ts +12 -1
- package/dist/types/components/Calendar/calendar.component.d.ts +19 -0
- package/dist/types/components/Calendar/index.d.ts +1 -0
- package/dist/types/components/Card/card.component.d.ts +41 -1
- package/dist/types/components/CharacterCounter/characterCounter.component.d.ts +9 -1
- package/dist/types/components/Checkbox/checkbox.component.d.ts +19 -2
- package/dist/types/components/Checkbox/checkbox.recipe.d.ts +3 -2
- package/dist/types/components/Checkbox/checkbox.types.d.ts +4 -0
- package/dist/types/components/Checkbox/index.d.ts +1 -0
- package/dist/types/components/CheckboxGroup/checkboxGroup.component.d.ts +12 -2
- package/dist/types/components/ConversationCard/components/ConversationCardAvatarGroup/conversationCardAvatarGroup.component.d.ts +11 -1
- package/dist/types/components/ConversationCard/components/ConversationCardButtons/conversationCardButtons.component.d.ts +22 -1
- package/dist/types/components/ConversationCard/components/ConversationCardContent/conversationCardContent.component.d.ts +8 -1
- package/dist/types/components/ConversationCard/components/ConversationCardFooter/conversationCardFooter.component.d.ts +8 -1
- package/dist/types/components/ConversationCard/components/ConversationCardHeader/conversationCardHeader.component.d.ts +12 -1
- package/dist/types/components/ConversationCard/components/ConversationCardTags/conversationCardTags.component.d.ts +7 -1
- package/dist/types/components/ConversationCard/conversationCard.component.d.ts +29 -1
- package/dist/types/components/DatePicker/components/DatePickerCalendar/datePickerCalendar.component.d.ts +10 -1
- package/dist/types/components/DatePicker/components/DatePickerDay/datePickerCalendarDay.component.d.ts +11 -1
- package/dist/types/components/DatePicker/components/DatePickerDay/datePickerCalendarDay.recipe.d.ts +5 -4
- package/dist/types/components/DatePicker/components/DatePickerDay/datePickerCalendarDay.types.d.ts +1 -1
- package/dist/types/components/DatePicker/components/DatePickerFooter/datePickerFooter.component.d.ts +9 -0
- package/dist/types/components/DatePicker/components/DatePickerHeader/datePickerHeader.component.d.ts +15 -1
- package/dist/types/components/DatePicker/components/DatePickerInput/datePickerInput.component.d.ts +6 -1
- package/dist/types/components/DatePicker/components/DatePickerMonth/datePickerCalendarMonth.component.d.ts +11 -1
- package/dist/types/components/DatePicker/context/datePicker.context.d.ts +3 -0
- package/dist/types/components/DatePicker/context/datePicker.provider.d.ts +10 -1
- package/dist/types/components/DatePicker/datePicker.component.d.ts +25 -11
- package/dist/types/components/DatePicker/datePicker.types.d.ts +18 -0
- package/dist/types/components/DatePicker/hooks/useComputeCornerRoundingFlags.d.ts +10 -0
- package/dist/types/components/DatePicker/utils/getDayVariant.d.ts +12 -0
- package/dist/types/components/DateTimePicker/components/DateTimePickerCustomView/dateTimePickerCustomView.component.d.ts +7 -0
- package/dist/types/components/DateTimePicker/components/DateTimePickerQuickOptions/dateTimePickerQuickOptions.component.d.ts +14 -0
- package/dist/types/components/DateTimePicker/components/DateTimePickerRangeSelector/dateTimePickerRangeSelector.component.d.ts +10 -0
- package/dist/types/components/DateTimePicker/dateTimePicker.component.d.ts +33 -0
- package/dist/types/components/DateTimePicker/dateTimePicker.records.d.ts +8 -0
- package/dist/types/components/DateTimePicker/dateTimePicker.types.d.ts +11 -0
- package/dist/types/components/DateTimePicker/index.d.ts +2 -0
- package/dist/types/components/DateTimePicker/utils/quickOptions.d.ts +13 -0
- package/dist/types/components/Divider/divider.component.d.ts +7 -2
- package/dist/types/components/Heading/heading.component.d.ts +12 -0
- package/dist/types/components/Icon/generated/Backspace.d.ts +10 -0
- package/dist/types/components/Icon/generated/CaretLeft.d.ts +10 -0
- package/dist/types/components/Icon/generated/CheckList.d.ts +10 -0
- package/dist/types/components/Icon/generated/Globe.d.ts +10 -0
- package/dist/types/components/Icon/generated/InputAlt.d.ts +10 -0
- package/dist/types/components/Icon/generated/LightBulb.d.ts +10 -0
- package/dist/types/components/Icon/generated/SelectDropDown.d.ts +10 -0
- package/dist/types/components/Icon/generated/TextArea.d.ts +10 -0
- package/dist/types/components/Icon/generated/TextBlock.d.ts +10 -0
- package/dist/types/components/Icon/generated/index.d.ts +1 -1
- package/dist/types/components/Icon/icon.component.d.ts +10 -0
- package/dist/types/components/Link/components/LinkIcon/linkIcon.component.d.ts +7 -0
- package/dist/types/components/Link/link.component.d.ts +19 -0
- package/dist/types/components/Logo/logo.component.d.ts +14 -1
- package/dist/types/components/Menu/components/MenuButton/menuButton.component.d.ts +22 -0
- package/dist/types/components/Menu/components/MenuItem/menuItem.component.d.ts +34 -5
- package/dist/types/components/Menu/components/MenuList/menuList.types.d.ts +18 -0
- package/dist/types/components/Menu/components/MenuToggleButtons/menuToggleButtons.component.d.ts +17 -0
- package/dist/types/components/Menu/index.d.ts +4 -0
- package/dist/types/components/Menu/menu.component.d.ts +22 -19
- package/dist/types/components/Menu/menu.recipe.d.ts +1 -1
- package/dist/types/components/Menu/menu.types.d.ts +17 -0
- package/dist/types/components/Modal/components/ModalFooter/modalFooter.component.d.ts +24 -1
- package/dist/types/components/Modal/modal.component.d.ts +46 -1
- package/dist/types/components/Modal/modal.recipe.d.ts +2 -2
- package/dist/types/components/NotificationCounter/notificationCounter.component.d.ts +19 -1
- package/dist/types/components/NotificationCounter/notificationCounter.records.d.ts +5 -0
- package/dist/types/components/NumberInput/index.d.ts +2 -0
- package/dist/types/components/NumberInput/numberInput.component.d.ts +40 -0
- package/dist/types/components/NumberInput/numberInput.recipe.d.ts +21 -0
- package/dist/types/components/NumberInput/numberInput.types.d.ts +4 -0
- package/dist/types/components/Picture/picture.component.d.ts +9 -1
- package/dist/types/components/PinInput/pinInput.component.d.ts +19 -1
- package/dist/types/components/PinInput/pinInput.recipe.d.ts +1 -1
- package/dist/types/components/Popover/components/PopoverFooter/popoverFooter.component.d.ts +26 -1
- package/dist/types/components/Popover/components/PopoverHeader/popoverHeader.component.d.ts +19 -1
- package/dist/types/components/Popover/popover.component.d.ts +45 -2
- package/dist/types/components/Popover/popover.recipe.d.ts +4 -3
- package/dist/types/components/Popover/popover.types.d.ts +1 -1
- package/dist/types/components/Progress/index.d.ts +2 -0
- package/dist/types/components/Progress/progress.component.d.ts +26 -0
- package/dist/types/components/Progress/progress.recipe.d.ts +38 -0
- package/dist/types/components/Progress/progress.types.d.ts +9 -0
- package/dist/types/components/RadioGroup/components/Radio/radio.component.d.ts +15 -0
- package/dist/types/components/RadioGroup/radioGroup.component.d.ts +22 -2
- package/dist/types/components/RadioGroup/radioGroup.recipe.d.ts +4 -2
- package/dist/types/components/Radiomark/index.d.ts +1 -0
- package/dist/types/components/Radiomark/radiomark.component.d.ts +12 -0
- package/dist/types/components/Radiomark/radiomark.recipe.d.ts +2 -0
- package/dist/types/components/Rating/index.d.ts +1 -0
- package/dist/types/components/Rating/rating.component.d.ts +37 -0
- package/dist/types/components/Rating/rating.recipe.d.ts +10 -0
- package/dist/types/components/RatingDots/components/RatingDot/ratingDot.component.d.ts +10 -1
- package/dist/types/components/RatingDots/ratingDots.component.d.ts +12 -0
- package/dist/types/components/Select/components/SelectItemContent/selectItemContent.component.d.ts +6 -0
- package/dist/types/components/Select/components/SelectTrigger/selectTrigger.component.d.ts +7 -2
- package/dist/types/components/Select/select.component.d.ts +53 -3
- package/dist/types/components/Select/select.types.d.ts +3 -0
- package/dist/types/components/SortableList/components/SortableListDragHandle/sortableListDragHandle.component.d.ts +1 -1
- package/dist/types/components/SortableList/components/SortableListItem/sortableListItem.component.d.ts +13 -1
- package/dist/types/components/SortableList/sortableList.component.d.ts +13 -1
- package/dist/types/components/Spinner/spinner.component.d.ts +28 -2
- package/dist/types/components/Spinner/spinner.recipe.d.ts +16 -1
- package/dist/types/components/StyledAvatar/styledAvatar.component.d.ts +10 -1
- package/dist/types/components/StyledAvatar/styledAvatar.types.d.ts +1 -1
- package/dist/types/components/Swatch/swatch.component.d.ts +10 -1
- package/dist/types/components/Switch/switch.component.d.ts +15 -0
- package/dist/types/components/Switch/switch.recipe.d.ts +3 -2
- package/dist/types/components/Tabs/components/Tab/tab.component.d.ts +14 -1
- package/dist/types/components/Tabs/tabs.component.d.ts +17 -2
- package/dist/types/components/Tabs/tabs.recipe.d.ts +3 -2
- package/dist/types/components/Tag/tag.component.d.ts +31 -0
- package/dist/types/components/Tag/tag.recipe.d.ts +3 -2
- package/dist/types/components/TagBlock/tagBlock.component.d.ts +34 -1
- package/dist/types/components/Text/text.component.d.ts +13 -0
- package/dist/types/components/TextInput/textInput.component.d.ts +28 -0
- package/dist/types/components/Textarea/textarea.component.d.ts +13 -0
- package/dist/types/components/TimePicker/components/TimeList/timeList.component.d.ts +10 -1
- package/dist/types/components/TimePicker/components/TimeOption/timeOption.component.d.ts +9 -1
- package/dist/types/components/TimePicker/timePicker.component.d.ts +19 -1
- package/dist/types/components/TimeRange/timeRange.component.d.ts +12 -1
- package/dist/types/components/Timestamp/timestamp.component.d.ts +18 -1
- package/dist/types/components/Toast/components/ToastAction/toastAction.component.d.ts +12 -1
- package/dist/types/components/Toast/components/Toaster/toaster.component.d.ts +6 -1
- package/dist/types/components/Toast/toast.component.d.ts +19 -1
- package/dist/types/components/Toast/toast.recipe.d.ts +3 -2
- package/dist/types/components/Toast/toast.types.d.ts +13 -0
- package/dist/types/components/Toast/useToast.d.ts +5 -0
- package/dist/types/components/Tooltip/tooltip.component.d.ts +26 -0
- package/dist/types/components/Tooltip/tooltip.recipe.d.ts +10 -1
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/hocs/withFormControl/withFormControl.d.ts +44 -0
- package/dist/types/hocs/withTruncation.d.ts +8 -0
- package/dist/types/hooks/useBreakpoint/index.d.ts +4 -0
- package/dist/types/hooks/useColorMode/index.d.ts +39 -0
- package/dist/types/hooks/useColorModeValue/index.d.ts +6 -0
- package/dist/types/hooks/useDeviceType/index.d.ts +4 -0
- package/dist/types/hooks/useIconTextSizeMap.d.ts +5 -0
- package/dist/types/shared/components/withVariantStory.d.ts +6 -0
- package/dist/types/shared/types/index.d.ts +1 -0
- package/dist/types/theme/providers/theme.provider.d.ts +1 -0
- package/dist/types/theme/recipes/List/list.recipe.d.ts +14 -0
- package/dist/types/theme/recipes/Table/table.recipe.d.ts +29 -0
- package/dist/types/theme/semanticTokens/semanticTokens.config.d.ts +91 -82
- package/dist/types/theme/semanticTokens/semanticTokens.records.d.ts +182 -164
- package/dist/types/theme/semanticTokens/semanticTokens.types.d.ts +4 -3
- package/dist/types/theme/tokens/sizes/sizes.config.d.ts +2 -2
- package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +10 -10
- package/package.json +21 -18
- package/dist/chunks/alert.types-De_IDZNV.js +0 -2
- package/dist/chunks/alert.types-De_IDZNV.js.map +0 -1
- package/dist/chunks/alert.types-NkOwCG0-.js +0 -139
- package/dist/chunks/alert.types-NkOwCG0-.js.map +0 -1
- package/dist/chunks/avatar.component-CqFsGMt6.js +0 -2
- package/dist/chunks/avatar.component-CqFsGMt6.js.map +0 -1
- package/dist/chunks/avatar.component-lHszPWEi.js +0 -394
- package/dist/chunks/avatar.component-lHszPWEi.js.map +0 -1
- package/dist/chunks/avatarGroup.component-BPYIE5NT.js +0 -2
- package/dist/chunks/avatarGroup.component-BPYIE5NT.js.map +0 -1
- package/dist/chunks/avatarGroup.component-EFxRAKiJ.js +0 -67
- package/dist/chunks/avatarGroup.component-EFxRAKiJ.js.map +0 -1
- package/dist/chunks/button.component-BE20YKDd.js +0 -67
- package/dist/chunks/button.component-BE20YKDd.js.map +0 -1
- package/dist/chunks/button.component-DAv5WxDc.js +0 -2
- package/dist/chunks/button.component-DAv5WxDc.js.map +0 -1
- package/dist/chunks/button.recipe-7PSQJbyz.js +0 -2
- package/dist/chunks/button.recipe-7PSQJbyz.js.map +0 -1
- package/dist/chunks/button.recipe-ClmsjdZI.js +0 -910
- package/dist/chunks/button.recipe-ClmsjdZI.js.map +0 -1
- package/dist/chunks/button.types-BKXZNvN1.js.map +0 -1
- package/dist/chunks/button.types-Bl1awbi0.js +0 -2
- package/dist/chunks/button.types-Bl1awbi0.js.map +0 -1
- package/dist/chunks/buttonGroup.component-CQBXYOhq.js +0 -2
- package/dist/chunks/buttonGroup.component-CQBXYOhq.js.map +0 -1
- package/dist/chunks/buttonGroup.component-CheBkHw6.js +0 -68
- package/dist/chunks/buttonGroup.component-CheBkHw6.js.map +0 -1
- package/dist/chunks/card.component-BZxC19F_.js +0 -2
- package/dist/chunks/card.component-BZxC19F_.js.map +0 -1
- package/dist/chunks/card.component-DJcYzMX1.js +0 -58
- package/dist/chunks/card.component-DJcYzMX1.js.map +0 -1
- package/dist/chunks/characterCounter.component-C6ZwdIiA.js +0 -84
- package/dist/chunks/characterCounter.component-C6ZwdIiA.js.map +0 -1
- package/dist/chunks/characterCounter.component-D0ccCiBG.js +0 -2
- package/dist/chunks/characterCounter.component-D0ccCiBG.js.map +0 -1
- package/dist/chunks/checkbox.component-DNOkXggb.js +0 -260
- package/dist/chunks/checkbox.component-Dhjcu89D.js +0 -2
- package/dist/chunks/checkboxGroup.component-BNKJqMKi.js +0 -52
- package/dist/chunks/checkboxGroup.component-BNKJqMKi.js.map +0 -1
- package/dist/chunks/checkboxGroup.component-M-nvlAbK.js +0 -2
- package/dist/chunks/checkboxGroup.component-M-nvlAbK.js.map +0 -1
- package/dist/chunks/conversationCard.component-BRJbMpwH.js +0 -2
- package/dist/chunks/conversationCard.component-BRJbMpwH.js.map +0 -1
- package/dist/chunks/conversationCard.component-DmSuBQ4_.js +0 -330
- package/dist/chunks/conversationCard.component-DmSuBQ4_.js.map +0 -1
- package/dist/chunks/create-slot-recipe-context-CViypfwB.js +0 -2
- package/dist/chunks/create-slot-recipe-context-CViypfwB.js.map +0 -1
- package/dist/chunks/create-slot-recipe-context-CrlT_nGQ.js +0 -97
- package/dist/chunks/create-slot-recipe-context-CrlT_nGQ.js.map +0 -1
- package/dist/chunks/datePicker.component-BOsFZiDy.js +0 -15
- package/dist/chunks/datePicker.component-BOsFZiDy.js.map +0 -1
- package/dist/chunks/datePicker.component-Dzh4WccC.js +0 -3019
- package/dist/chunks/datePicker.component-Dzh4WccC.js.map +0 -1
- package/dist/chunks/dialog-BPhjKQkb.js +0 -2
- package/dist/chunks/divider.types-Dht8eAh4.js +0 -2
- package/dist/chunks/divider.types-Dht8eAh4.js.map +0 -1
- package/dist/chunks/divider.types-ZN_wlva7.js +0 -47
- package/dist/chunks/divider.types-ZN_wlva7.js.map +0 -1
- package/dist/chunks/grid-item-DPdTp_nI.js +0 -94
- package/dist/chunks/grid-item-DPdTp_nI.js.map +0 -1
- package/dist/chunks/grid-item-qnuioQmr.js +0 -2
- package/dist/chunks/grid-item-qnuioQmr.js.map +0 -1
- package/dist/chunks/heading.component-C_cdAGTd.js +0 -2
- package/dist/chunks/heading.component-C_cdAGTd.js.map +0 -1
- package/dist/chunks/heading.component-SiJnYLOw.js +0 -12
- package/dist/chunks/heading.component-SiJnYLOw.js.map +0 -1
- package/dist/chunks/icon.component-Bhnf2n1O.js +0 -2
- package/dist/chunks/icon.component-Bhnf2n1O.js.map +0 -1
- package/dist/chunks/icon.component-C5bgxAD2.js +0 -32
- package/dist/chunks/icon.component-C5bgxAD2.js.map +0 -1
- package/dist/chunks/index-2glJ2faJ.js +0 -2
- package/dist/chunks/index-7Jpijbq_.js +0 -3
- package/dist/chunks/index-7Jpijbq_.js.map +0 -1
- package/dist/chunks/index-A_vmTNU7.js +0 -2
- package/dist/chunks/index-BEfEzWJx.js +0 -2
- package/dist/chunks/index-Bm5QBNWR.js +0 -8190
- package/dist/chunks/index-Bm5QBNWR.js.map +0 -1
- package/dist/chunks/index-Cv06PsSJ.js.map +0 -1
- package/dist/chunks/index-DA90Dqf9.js +0 -1362
- package/dist/chunks/index-DA90Dqf9.js.map +0 -1
- package/dist/chunks/index-DAI6_P9H.js +0 -2
- package/dist/chunks/index-DMcwHRZ5.js +0 -11
- package/dist/chunks/index-DMcwHRZ5.js.map +0 -1
- package/dist/chunks/index-jnwdAJ25.js +0 -2
- package/dist/chunks/index-jnwdAJ25.js.map +0 -1
- package/dist/chunks/link.component-CvR5CbiT.js +0 -36
- package/dist/chunks/link.component-CvR5CbiT.js.map +0 -1
- package/dist/chunks/link.component-yUJIJbIP.js +0 -2
- package/dist/chunks/link.component-yUJIJbIP.js.map +0 -1
- package/dist/chunks/logo.types-DF4eLSR9.js +0 -45
- package/dist/chunks/logo.types-DF4eLSR9.js.map +0 -1
- package/dist/chunks/logo.types-Zt-yfFAQ.js +0 -2
- package/dist/chunks/logo.types-Zt-yfFAQ.js.map +0 -1
- package/dist/chunks/menu.component-DylZiPAE.js +0 -2
- package/dist/chunks/menu.component-DylZiPAE.js.map +0 -1
- package/dist/chunks/menu.component-xhHsHlGT.js +0 -599
- package/dist/chunks/menu.component-xhHsHlGT.js.map +0 -1
- package/dist/chunks/modal.types-CBos7aXO.js +0 -2
- package/dist/chunks/modal.types-CBos7aXO.js.map +0 -1
- package/dist/chunks/modal.types-CkQIOPTa.js +0 -95
- package/dist/chunks/modal.types-CkQIOPTa.js.map +0 -1
- package/dist/chunks/notificationCounter.component-Lu4_Owvr.js.map +0 -1
- package/dist/chunks/notificationCounter.component-gp2ULnY_.js +0 -2
- package/dist/chunks/notificationCounter.component-gp2ULnY_.js.map +0 -1
- package/dist/chunks/picture.component-CKK-SMvr.js +0 -22
- package/dist/chunks/picture.component-CKK-SMvr.js.map +0 -1
- package/dist/chunks/picture.component-CR6e0wRG.js +0 -2
- package/dist/chunks/picture.component-CR6e0wRG.js.map +0 -1
- package/dist/chunks/pinInput.types-CcN0aX_i.js +0 -145
- package/dist/chunks/pinInput.types-Cqm1Px5l.js +0 -2
- package/dist/chunks/popover-root-provider-CkW1eCBQ.js +0 -43
- package/dist/chunks/popover-root-provider-ZB5BcrXn.js +0 -2
- package/dist/chunks/popover.component-BjS13k9K.js +0 -2
- package/dist/chunks/popover.component-BjS13k9K.js.map +0 -1
- package/dist/chunks/popover.component-C4WKxh4d.js +0 -196
- package/dist/chunks/popover.component-C4WKxh4d.js.map +0 -1
- package/dist/chunks/popover.recipe-Bx25Jhgs.js +0 -2
- package/dist/chunks/popover.recipe-Bx25Jhgs.js.map +0 -1
- package/dist/chunks/popover.recipe-C2nbfvL6.js +0 -241
- package/dist/chunks/popover.recipe-C2nbfvL6.js.map +0 -1
- package/dist/chunks/popover.types-BF2KRf_I.js +0 -2
- package/dist/chunks/popover.types-BF2KRf_I.js.map +0 -1
- package/dist/chunks/popover.types-D1O-Ehsz.js +0 -7
- package/dist/chunks/popover.types-D1O-Ehsz.js.map +0 -1
- package/dist/chunks/radioGroup.types-CZA7RcAn.js +0 -2
- package/dist/chunks/radioGroup.types-CZA7RcAn.js.map +0 -1
- package/dist/chunks/radioGroup.types-Dld5lmgo.js +0 -231
- package/dist/chunks/radioGroup.types-Dld5lmgo.js.map +0 -1
- package/dist/chunks/ratingDots.component-DcrCudac.js +0 -2
- package/dist/chunks/ratingDots.component-DcrCudac.js.map +0 -1
- package/dist/chunks/ratingDots.component-G4GMWvFy.js +0 -138
- package/dist/chunks/ratingDots.component-G4GMWvFy.js.map +0 -1
- package/dist/chunks/select.component-BTWHWvZV.js +0 -1058
- package/dist/chunks/select.component-BTWHWvZV.js.map +0 -1
- package/dist/chunks/select.component-Dyc1yQPO.js +0 -2
- package/dist/chunks/select.component-Dyc1yQPO.js.map +0 -1
- package/dist/chunks/spinner-C31ZWQmA.js +0 -8
- package/dist/chunks/spinner.component-CVVOuFka.js +0 -2
- package/dist/chunks/spinner.component-CVVOuFka.js.map +0 -1
- package/dist/chunks/spinner.component-DPYj17HK.js.map +0 -1
- package/dist/chunks/styledAvatar.types-CMpyDxAM.js +0 -2
- package/dist/chunks/styledAvatar.types-CMpyDxAM.js.map +0 -1
- package/dist/chunks/styledAvatar.types-CS07Zk7c.js +0 -51
- package/dist/chunks/styledAvatar.types-CS07Zk7c.js.map +0 -1
- package/dist/chunks/swatch.types-CXlghcLw.js.map +0 -1
- package/dist/chunks/swatch.types-jaI0KFHU.js +0 -2
- package/dist/chunks/swatch.types-jaI0KFHU.js.map +0 -1
- package/dist/chunks/switch.component-C88jBbo_.js +0 -2
- package/dist/chunks/switch.component-Cke7O8gk.js +0 -154
- package/dist/chunks/tab.types-DpmXyw5C.js +0 -2
- package/dist/chunks/tag.component-79aRVI7u.js +0 -82
- package/dist/chunks/tag.component-79aRVI7u.js.map +0 -1
- package/dist/chunks/tag.component-CAWh9OYa.js +0 -2
- package/dist/chunks/tag.component-CAWh9OYa.js.map +0 -1
- package/dist/chunks/tagBlock.component-Dn7coOgp.js +0 -2
- package/dist/chunks/tagBlock.component-Dn7coOgp.js.map +0 -1
- package/dist/chunks/tagBlock.component-vLA90b5S.js +0 -169
- package/dist/chunks/tagBlock.component-vLA90b5S.js.map +0 -1
- package/dist/chunks/text.component-CHpMvCFa.js +0 -2
- package/dist/chunks/text.component-CHpMvCFa.js.map +0 -1
- package/dist/chunks/text.component-D9w-u_dB.js +0 -12
- package/dist/chunks/text.component-D9w-u_dB.js.map +0 -1
- package/dist/chunks/textInput.component-Dpxb2RI-.js +0 -169
- package/dist/chunks/textInput.component-Dpxb2RI-.js.map +0 -1
- package/dist/chunks/textInput.component-Dx_Ktcmr.js +0 -2
- package/dist/chunks/textInput.component-Dx_Ktcmr.js.map +0 -1
- package/dist/chunks/textarea.component-BYexywy1.js +0 -2
- package/dist/chunks/textarea.component-Dk2IMKkr.js +0 -79
- package/dist/chunks/theme.provider-XYBMZJTB.js +0 -28
- package/dist/chunks/theme.provider-XYBMZJTB.js.map +0 -1
- package/dist/chunks/theme.provider-w_I9S10D.js.map +0 -1
- package/dist/chunks/timePicker.component-Bbd3BOA6.js +0 -209
- package/dist/chunks/timePicker.component-Bbd3BOA6.js.map +0 -1
- package/dist/chunks/timePicker.component-DcNgUFGj.js +0 -2
- package/dist/chunks/timePicker.component-DcNgUFGj.js.map +0 -1
- package/dist/chunks/timeRange.component-BBhPc2LP.js +0 -18
- package/dist/chunks/timeRange.component-BBhPc2LP.js.map +0 -1
- package/dist/chunks/timeRange.component-Bb-xDHWT.js +0 -2
- package/dist/chunks/timeRange.component-Bb-xDHWT.js.map +0 -1
- package/dist/chunks/timestamp.component-CrY5t68x.js +0 -2
- package/dist/chunks/timestamp.component-CrY5t68x.js.map +0 -1
- package/dist/chunks/timestamp.component-m0FTjlAi.js +0 -51
- package/dist/chunks/timestamp.component-m0FTjlAi.js.map +0 -1
- package/dist/chunks/toaster.records-eCXbM85Z.js +0 -2
- package/dist/chunks/tooltip.component-CATpCSkf.js +0 -2
- package/dist/chunks/typography.records-CpYV1kns.js.map +0 -1
- package/dist/chunks/typography.records-Dbw3sz4i.js +0 -2
- package/dist/chunks/typography.records-Dbw3sz4i.js.map +0 -1
- package/dist/chunks/use-locale-context-CazVZ4Kg.js +0 -2315
- package/dist/chunks/use-locale-context-CazVZ4Kg.js.map +0 -1
- package/dist/chunks/use-locale-context-Dv7DQ_mn.js +0 -22
- package/dist/chunks/use-locale-context-Dv7DQ_mn.js.map +0 -1
- package/dist/chunks/use-slot-recipe-8liupslO.js +0 -2
- package/dist/chunks/use-slot-recipe-8liupslO.js.map +0 -1
- package/dist/chunks/use-slot-recipe-DhtQ1j_5.js +0 -13
- package/dist/chunks/use-slot-recipe-DhtQ1j_5.js.map +0 -1
- package/dist/chunks/withFormControl-BdiccBy5.js +0 -2
- package/dist/chunks/withFormControl-BdiccBy5.js.map +0 -1
- package/dist/chunks/withFormControl-CRXVopOk.js +0 -361
- package/dist/chunks/withFormControl-CRXVopOk.js.map +0 -1
- package/dist/chunks/withTruncation-C9XLf_j6.js +0 -67
- package/dist/chunks/withTruncation-C9XLf_j6.js.map +0 -1
- package/dist/chunks/withTruncation-Ddr3jvAO.js +0 -2
- package/dist/chunks/withTruncation-Ddr3jvAO.js.map +0 -1
- package/dist/types/components/Menu/components/MenuButton/menuButton.components.d.ts +0 -9
- package/dist/types/components/Menu/components/MenuToggleButtons/menuToggleButtons.d.ts +0 -10
- package/dist/types/shared/utils/argTypes.d.ts +0 -6
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { c as T } from "./create-slot-recipe-context-D_FXDJGp.js";
|
|
4
|
+
import { C as b } from "./icons-CoSqruIn.js";
|
|
5
|
+
const {
|
|
6
|
+
withProvider: f,
|
|
7
|
+
withContext: r
|
|
8
|
+
} = T({ key: "tag" }), h = f(
|
|
9
|
+
"div",
|
|
10
|
+
"root"
|
|
11
|
+
), j = r(
|
|
12
|
+
"span",
|
|
13
|
+
"label"
|
|
14
|
+
), v = r("button", "closeTrigger", { defaultProps: { children: /* @__PURE__ */ e.jsx(b, {}) } });
|
|
15
|
+
r("span", "startElement");
|
|
16
|
+
r(
|
|
17
|
+
"span",
|
|
18
|
+
"endElement"
|
|
19
|
+
);
|
|
20
|
+
const n = {
|
|
21
|
+
sm: 0,
|
|
22
|
+
md: 0.5,
|
|
23
|
+
lg: 1
|
|
24
|
+
}, C = x(
|
|
25
|
+
({
|
|
26
|
+
leftElement: s,
|
|
27
|
+
rightElement: g,
|
|
28
|
+
onClose: i,
|
|
29
|
+
label: d,
|
|
30
|
+
closeButtonDisplay: a = "never",
|
|
31
|
+
size: t = "md",
|
|
32
|
+
variant: c = "default",
|
|
33
|
+
["data-testid"]: o = "kibble-tag",
|
|
34
|
+
...m
|
|
35
|
+
}, p) => {
|
|
36
|
+
const l = !!i && a !== "never";
|
|
37
|
+
return /* @__PURE__ */ e.jsxs(
|
|
38
|
+
h,
|
|
39
|
+
{
|
|
40
|
+
className: "Tag group",
|
|
41
|
+
"data-testid": o,
|
|
42
|
+
ref: p,
|
|
43
|
+
variant: c,
|
|
44
|
+
size: t,
|
|
45
|
+
closeButtonDisplay: a,
|
|
46
|
+
...l && a === "always" && {
|
|
47
|
+
pr: n[t]
|
|
48
|
+
},
|
|
49
|
+
...m,
|
|
50
|
+
children: [
|
|
51
|
+
s,
|
|
52
|
+
/* @__PURE__ */ e.jsx(
|
|
53
|
+
j,
|
|
54
|
+
{
|
|
55
|
+
className: "Tag__Label",
|
|
56
|
+
"data-testid": `${o}-label`,
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
...!!s && { ml: 1 },
|
|
59
|
+
...!!g && { mr: 1 },
|
|
60
|
+
children: d
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
g,
|
|
64
|
+
l && /* @__PURE__ */ e.jsx(
|
|
65
|
+
v,
|
|
66
|
+
{
|
|
67
|
+
className: "Tag__CloseTrigger",
|
|
68
|
+
"data-testid": `${o}-close-trigger`,
|
|
69
|
+
onClick: i,
|
|
70
|
+
...a === "hover" && {
|
|
71
|
+
px: n[t]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
C.displayName = "Tag";
|
|
81
|
+
export {
|
|
82
|
+
C as T
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=tag.component-B7V76XfM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.component-B7V76XfM.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/tag/tag.js","../../src/components/Tag/tag.records.ts","../../src/components/Tag/tag.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useTagStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"tag\" });\nconst TagRoot = withProvider(\n \"div\",\n \"root\"\n);\nconst TagRootPropsProvider = PropsProvider;\nconst TagLabel = withContext(\n \"span\",\n \"label\"\n);\nconst TagCloseTrigger = withContext(\"button\", \"closeTrigger\", { defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, {}) } });\nconst TagStartElement = withContext(\"span\", \"startElement\");\nconst TagEndElement = withContext(\n \"span\",\n \"endElement\"\n);\n\nexport { TagCloseTrigger, TagEndElement, TagLabel, TagRoot, TagRootPropsProvider, TagStartElement, useTagStyles };\n","import { TagSize } from './tag.types';\n\nexport const tagPaddingBySize: Record<TagSize, number> = {\n sm: 0,\n md: 0.5,\n lg: 1,\n};\n","import React, { forwardRef } from 'react';\nimport { Tag as CTag } from '@chakra-ui/react/tag';\nimport { CloseButtonDisplay, TagSize } from './tag.types';\nimport { Status } from 'shared/types/status';\nimport { tagPaddingBySize } from './tag.records';\n\nexport interface BaseTagProps extends Omit<CTag.RootProps, 'children'> {\n /** Left element for the tag, typically used for icons. */\n leftElement?: React.ReactNode;\n /** Right element for the tag, typically used for icons. */\n rightElement?: React.ReactNode;\n /** The text content of the tag. */\n label: string;\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay?: CloseButtonDisplay;\n /**\n * The size of the tag.\n * @default md\n */\n size?: TagSize;\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to 'always' or 'hover'. */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The color variant of the tag. This determines the background and text color.\n * @default default\n */\n variant?: Status;\n /**\n * Data test id for the tag.\n * @default kibble-tag\n */\n 'data-testid'?: string;\n}\n\ninterface ClosableTagProps extends BaseTagProps {\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay: 'always' | 'hover';\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to always or hover. */\n onClose: React.MouseEventHandler<HTMLButtonElement>;\n}\n\ninterface NonClosableTagProps extends BaseTagProps {\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay?: 'never';\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to always or hover. */\n onClose?: never;\n}\n\nexport type TagProps = ClosableTagProps | NonClosableTagProps;\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n leftElement,\n rightElement,\n onClose,\n label,\n closeButtonDisplay = 'never',\n size = 'md',\n variant = 'default',\n ['data-testid']: dataTestId = 'kibble-tag',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const closable = !!onClose && closeButtonDisplay !== 'never';\n\n return (\n <CTag.Root\n className=\"Tag group\"\n data-testid={dataTestId}\n ref={ref}\n variant={variant}\n size={size}\n closeButtonDisplay={closeButtonDisplay}\n {...(closable &&\n closeButtonDisplay === 'always' && {\n pr: tagPaddingBySize[size],\n })}\n {...rest}\n >\n {leftElement}\n <CTag.Label\n className=\"Tag__Label\"\n data-testid={`${dataTestId}-label`}\n overflow=\"hidden\"\n {...(!!leftElement && { ml: 1 })}\n {...(!!rightElement && { mr: 1 })}\n >\n {label}\n </CTag.Label>\n {rightElement}\n {closable && (\n <CTag.CloseTrigger\n className=\"Tag__CloseTrigger\"\n data-testid={`${dataTestId}-close-trigger`}\n onClick={onClose}\n {...(closeButtonDisplay === 'hover' && {\n px: tagPaddingBySize[size],\n })}\n />\n )}\n </CTag.Root>\n );\n },\n);\n\nTag.displayName = 'Tag';\n"],"names":["withProvider","withContext","createSlotRecipeContext","TagRoot","TagLabel","TagCloseTrigger","jsx","CloseIcon","tagPaddingBySize","Tag","forwardRef","leftElement","rightElement","onClose","label","closeButtonDisplay","size","variant","dataTestId","rest","ref","closable","jsxs","CTag.Root","CTag.Label","CTag.CloseTrigger"],"mappings":";;;;AAMA,MAAM;AAAA,EACJ,cAAAA;AAAA,EACA,aAAAC;AAGF,IAAIC,EAAwB,EAAE,KAAK,MAAK,CAAE,GACpCC,IAAUH;AAAA,EACd;AAAA,EACA;AACF,GAEMI,IAAWH;AAAA,EACf;AAAA,EACA;AACF,GACMI,IAAkBJ,EAAY,UAAU,gBAAgB,EAAE,cAAc,EAAE,UAA0BK,gBAAAA,MAAIC,GAAW,CAAE,CAAA,EAAG,EAAA,CAAE;AACxGN,EAAY,QAAQ,cAAc;AACpCA;AAAA,EACpB;AAAA,EACA;AACF;ACxBO,MAAMO,IAA4C;AAAA,EACvD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GCqDaC,IAAMC;AAAA,EACjB,CACE;AAAA,IACE,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,MAAAC,IAAO;AAAA,IACP,SAAAC,IAAU;AAAA,IACV,CAAC,gBAAgBC,IAAa;AAAA,IAC9B,GAAGC;AAAA,KAELC,MACsB;AACtB,UAAMC,IAAW,CAAC,CAACR,KAAWE,MAAuB;AAGnD,WAAAO,gBAAAA,EAAA;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAaL;AAAA,QACb,KAAAE;AAAA,QACA,SAAAH;AAAA,QACA,MAAAD;AAAA,QACA,oBAAAD;AAAA,QACC,GAAIM,KACHN,MAAuB,YAAY;AAAA,UACjC,IAAIP,EAAiBQ,CAAI;AAAA,QAC3B;AAAA,QACD,GAAGG;AAAA,QAEH,UAAA;AAAA,UAAAR;AAAA,UACDL,gBAAAA,EAAA;AAAA,YAACkB;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGN,CAAU;AAAA,cAC1B,UAAS;AAAA,cACR,GAAI,CAAC,CAACP,KAAe,EAAE,IAAI,EAAE;AAAA,cAC7B,GAAI,CAAC,CAACC,KAAgB,EAAE,IAAI,EAAE;AAAA,cAE9B,UAAAE;AAAA,YAAA;AAAA,UACH;AAAA,UACCF;AAAA,UACAS,KACCf,gBAAAA,EAAA;AAAA,YAACmB;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGP,CAAU;AAAA,cAC1B,SAASL;AAAA,cACR,GAAIE,MAAuB,WAAW;AAAA,gBACrC,IAAIP,EAAiBQ,CAAI;AAAA,cAAA;AAAA,YAC3B;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;AAEAP,EAAI,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BjDatQAs.js"),p=require("react"),R=require("./create-slot-recipe-context-HXE1VazG.js"),T=require("./icons-B6Nwr9di.js"),{withProvider:j,withContext:r}=R.createSlotRecipeContext({key:"tag"}),b=j("div","root"),h=r("span","label"),v=r("button","closeTrigger",{defaultProps:{children:t.jsxRuntimeExports.jsx(T.CloseIcon,{})}});r("span","startElement");r("span","endElement");const g={sm:0,md:.5,lg:1},l=p.forwardRef(({leftElement:o,rightElement:n,onClose:i,label:d,closeButtonDisplay:e="never",size:s="md",variant:x="default",["data-testid"]:a="kibble-tag",...m},u)=>{const c=!!i&&e!=="never";return t.jsxRuntimeExports.jsxs(b,{className:"Tag group","data-testid":a,ref:u,variant:x,size:s,closeButtonDisplay:e,...c&&e==="always"&&{pr:g[s]},...m,children:[o,t.jsxRuntimeExports.jsx(h,{className:"Tag__Label","data-testid":`${a}-label`,overflow:"hidden",...!!o&&{ml:1},...!!n&&{mr:1},children:d}),n,c&&t.jsxRuntimeExports.jsx(v,{className:"Tag__CloseTrigger","data-testid":`${a}-close-trigger`,onClick:i,...e==="hover"&&{px:g[s]}})]})});l.displayName="Tag";exports.Tag=l;
|
|
2
|
+
//# sourceMappingURL=tag.component-C98Wf07v.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.component-C98Wf07v.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/tag/tag.js","../../src/components/Tag/tag.records.ts","../../src/components/Tag/tag.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useTagStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"tag\" });\nconst TagRoot = withProvider(\n \"div\",\n \"root\"\n);\nconst TagRootPropsProvider = PropsProvider;\nconst TagLabel = withContext(\n \"span\",\n \"label\"\n);\nconst TagCloseTrigger = withContext(\"button\", \"closeTrigger\", { defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, {}) } });\nconst TagStartElement = withContext(\"span\", \"startElement\");\nconst TagEndElement = withContext(\n \"span\",\n \"endElement\"\n);\n\nexport { TagCloseTrigger, TagEndElement, TagLabel, TagRoot, TagRootPropsProvider, TagStartElement, useTagStyles };\n","import { TagSize } from './tag.types';\n\nexport const tagPaddingBySize: Record<TagSize, number> = {\n sm: 0,\n md: 0.5,\n lg: 1,\n};\n","import React, { forwardRef } from 'react';\nimport { Tag as CTag } from '@chakra-ui/react/tag';\nimport { CloseButtonDisplay, TagSize } from './tag.types';\nimport { Status } from 'shared/types/status';\nimport { tagPaddingBySize } from './tag.records';\n\nexport interface BaseTagProps extends Omit<CTag.RootProps, 'children'> {\n /** Left element for the tag, typically used for icons. */\n leftElement?: React.ReactNode;\n /** Right element for the tag, typically used for icons. */\n rightElement?: React.ReactNode;\n /** The text content of the tag. */\n label: string;\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay?: CloseButtonDisplay;\n /**\n * The size of the tag.\n * @default md\n */\n size?: TagSize;\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to 'always' or 'hover'. */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The color variant of the tag. This determines the background and text color.\n * @default default\n */\n variant?: Status;\n /**\n * Data test id for the tag.\n * @default kibble-tag\n */\n 'data-testid'?: string;\n}\n\ninterface ClosableTagProps extends BaseTagProps {\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay: 'always' | 'hover';\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to always or hover. */\n onClose: React.MouseEventHandler<HTMLButtonElement>;\n}\n\ninterface NonClosableTagProps extends BaseTagProps {\n /**\n * The display behavior of the close button.\n * @default never\n */\n closeButtonDisplay?: 'never';\n /** Callback function triggered when the close button is clicked. This is only applicable when `closeButtonDisplay` is set to always or hover. */\n onClose?: never;\n}\n\nexport type TagProps = ClosableTagProps | NonClosableTagProps;\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n leftElement,\n rightElement,\n onClose,\n label,\n closeButtonDisplay = 'never',\n size = 'md',\n variant = 'default',\n ['data-testid']: dataTestId = 'kibble-tag',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const closable = !!onClose && closeButtonDisplay !== 'never';\n\n return (\n <CTag.Root\n className=\"Tag group\"\n data-testid={dataTestId}\n ref={ref}\n variant={variant}\n size={size}\n closeButtonDisplay={closeButtonDisplay}\n {...(closable &&\n closeButtonDisplay === 'always' && {\n pr: tagPaddingBySize[size],\n })}\n {...rest}\n >\n {leftElement}\n <CTag.Label\n className=\"Tag__Label\"\n data-testid={`${dataTestId}-label`}\n overflow=\"hidden\"\n {...(!!leftElement && { ml: 1 })}\n {...(!!rightElement && { mr: 1 })}\n >\n {label}\n </CTag.Label>\n {rightElement}\n {closable && (\n <CTag.CloseTrigger\n className=\"Tag__CloseTrigger\"\n data-testid={`${dataTestId}-close-trigger`}\n onClick={onClose}\n {...(closeButtonDisplay === 'hover' && {\n px: tagPaddingBySize[size],\n })}\n />\n )}\n </CTag.Root>\n );\n },\n);\n\nTag.displayName = 'Tag';\n"],"names":["withProvider","withContext","createSlotRecipeContext","TagRoot","TagLabel","TagCloseTrigger","jsx","CloseIcon","tagPaddingBySize","Tag","forwardRef","leftElement","rightElement","onClose","label","closeButtonDisplay","size","variant","dataTestId","rest","ref","closable","jsxs","CTag.Root","CTag.Label","CTag.CloseTrigger"],"mappings":"oKAMM,CACJ,aAAAA,EACA,YAAAC,CAGF,EAAIC,EAAuB,wBAAC,CAAE,IAAK,KAAK,CAAE,EACpCC,EAAUH,EACd,MACA,MACF,EAEMI,EAAWH,EACf,OACA,OACF,EACMI,EAAkBJ,EAAY,SAAU,eAAgB,CAAE,aAAc,CAAE,SAA0BK,wBAAIC,EAAAA,UAAW,CAAE,CAAA,CAAG,CAAA,CAAE,EACxGN,EAAY,OAAQ,cAAc,EACpCA,EACpB,OACA,YACF,ECxBO,MAAMO,EAA4C,CACvD,GAAI,EACJ,GAAI,GACJ,GAAI,CACN,ECqDaC,EAAMC,EAAA,WACjB,CACE,CACE,YAAAC,EACA,aAAAC,EACA,QAAAC,EACA,MAAAC,EACA,mBAAAC,EAAqB,QACrB,KAAAC,EAAO,KACP,QAAAC,EAAU,UACV,CAAC,eAAgBC,EAAa,aAC9B,GAAGC,GAELC,IACsB,CACtB,MAAMC,EAAW,CAAC,CAACR,GAAWE,IAAuB,QAGnD,OAAAO,EAAA,kBAAA,KAACC,EAAA,CACC,UAAU,YACV,cAAaL,EACb,IAAAE,EACA,QAAAH,EACA,KAAAD,EACA,mBAAAD,EACC,GAAIM,GACHN,IAAuB,UAAY,CACjC,GAAIP,EAAiBQ,CAAI,CAC3B,EACD,GAAGG,EAEH,SAAA,CAAAR,EACDL,EAAA,kBAAA,IAACkB,EAAA,CACC,UAAU,aACV,cAAa,GAAGN,CAAU,SAC1B,SAAS,SACR,GAAI,CAAC,CAACP,GAAe,CAAE,GAAI,CAAE,EAC7B,GAAI,CAAC,CAACC,GAAgB,CAAE,GAAI,CAAE,EAE9B,SAAAE,CAAA,CACH,EACCF,EACAS,GACCf,EAAA,kBAAA,IAACmB,EAAA,CACC,UAAU,oBACV,cAAa,GAAGP,CAAU,iBAC1B,QAASL,EACR,GAAIE,IAAuB,SAAW,CACrC,GAAIP,EAAiBQ,CAAI,CAAA,CAC3B,CAAA,CACF,CAAA,CAEJ,CAAA,CAGN,EAEAP,EAAI,YAAc","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),d=require("react"),a=require("./index-BQRnVsAg.js"),h=require("./button.component-DjdgBXDC.js"),E=require("./heading.component-DMAQO_-m.js"),N=require("./menu.component-D4-4xRDj.js"),v=require("./spinner.component-DuW1_IWM.js"),q=require("./tag.component-C98Wf07v.js"),_=require("./text.component-CeioUl0G.js"),i=require("./flex-BOU6tYUd.js"),w=require("./h-stack-D4MnHHRc.js"),T=n=>n&&n.__esModule?n:{default:n},$=T(d);var c=(n=>(n.Inactive="Inactive",n.Deleted="Deleted",n))(c||{});const y={size:"sm",variant:"secondarySubtle",iconName:"plus",text:"Add",hideCaret:!0},D=({title:n,menuProps:p,tags:o,canBeDeleted:B=!1,onClearAll:k,onRemoveTag:u,onDelete:R,hasError:m=!1,errorText:C="This field contains an error",displayTagsInGroups:x,loading:j=!1,["data-testid"]:r="kibble-tag-block"})=>{const b=d.useCallback(s=>{u&&u(s,o)},[u,o]),f=$.default.useMemo(()=>{if(!x)return[];const s={};for(const t of o){const l=t.groupLabel||"-";s[l]||(s[l]=[]),s[l].push(t)}return Object.entries(s).map(([t,l])=>({groupLabel:t,tags:l}))},[o,x]),g=d.useCallback(s=>s.map(t=>{const l=t.label.includes(c.Inactive)||t.label.includes(c.Deleted);return e.jsxRuntimeExports.jsx(q.Tag,{className:"TagBlock__Tag","data-testid":`${r}-tag`,mr:1,mb:1,label:t.label,onClose:()=>b(t.value),closeButtonDisplay:"always",fontWeight:"normal",color:l?"text.placeholder":"text",size:"md"},t.value)}),[b,r]);return e.jsxRuntimeExports.jsxs(a.Box,{className:"TagBlock","data-testid":r,position:"relative",mb:3,py:2,pl:4,pr:2,bg:"background.subtle",borderRadius:"lg",boxShadow:m?"0 0 0 2px var(--chakra-colors-border-danger)":"",border:"1px",borderColor:"border",overflow:j?"hidden":void 0,children:[e.jsxRuntimeExports.jsxs(i.Flex,{className:"TagBlock__ButtonContainer","data-testid":`${r}-button-container`,justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(w.HStack,{gap:1,minH:10,children:[n&&e.jsxRuntimeExports.jsx(_.WrappedText,{className:"TagBlock__Title",mr:2,fontWeight:"bold",children:n}),e.jsxRuntimeExports.jsx(N.Menu,{"data-testid":`${r}-menu`,...p,buttonProps:p?.buttonProps||y}),e.jsxRuntimeExports.jsx(h.Button,{className:"TagBlock__Button--ClearAll","data-testid":`${r}-clear-all-button`,size:"sm",iconName:"arrowCircle",variant:"ghostNeutral",onClick:k,disabled:o.length<=0,children:"Clear All"})]}),B&&e.jsxRuntimeExports.jsx(a.Box,{children:e.jsxRuntimeExports.jsx(h.Button,{className:"TagBlock__Button--Delete","data-testid":`${r}-delete-button`,iconName:"trashcan",variant:"ghostNeutral",onClick:R,justifySelf:"flex-end"})})]}),!!o.length&&e.jsxRuntimeExports.jsx(i.Flex,{className:"TagBlock__TagContainer","data-testid":`${r}-tag-container`,mt:2,pb:1,alignContent:"space-between",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",children:x&&f.length?e.jsxRuntimeExports.jsx(i.Flex,{direction:"column",children:f.map(({groupLabel:s,tags:t})=>e.jsxRuntimeExports.jsxs(a.Box,{mb:2,children:[e.jsxRuntimeExports.jsx(a.Box,{className:"TagBlock__GroupTitle","data-testid":`${r}-group-title`,children:e.jsxRuntimeExports.jsx(E.WrappedHeading,{size:"xs",pb:2,children:s})}),e.jsxRuntimeExports.jsx(i.Flex,{alignContent:"space-between",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",children:g(t)})]},s))}):g(o)}),j&&e.jsxRuntimeExports.jsx(v.Spinner,{fullScreen:!0}),m&&e.jsxRuntimeExports.jsx(_.WrappedText,{className:"TagBlock__Error","data-testid":`${r}-error`,mt:2,size:"xs",variant:"danger",children:C})]})};exports.TagBlock=D;exports.TagDisabledState=c;
|
|
2
|
+
//# sourceMappingURL=tagBlock.component-BGEvRu81.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagBlock.component-BGEvRu81.js","sources":["../../src/components/TagBlock/tagBlock.types.ts","../../src/components/TagBlock/tagBlock.component.tsx"],"sourcesContent":["export enum TagDisabledState {\n Inactive = 'Inactive',\n Deleted = 'Deleted',\n}\n\nexport interface TagBlockTag {\n label: string;\n value: string;\n groupLabel?: string;\n}\n","import React, { useCallback } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { HStack } from '@chakra-ui/react/stack';\nimport { Button } from 'components/Button/button.component';\nimport { Heading } from 'components/Heading/heading.component';\nimport { Menu, MenuProps } from 'components/Menu/menu.component';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Tag } from 'components/Tag/tag.component';\nimport { Text } from 'components/Text/text.component';\nimport { TagBlockTag, TagDisabledState } from './tagBlock.types';\nimport { MenuButtonProps } from 'components/Menu/components/MenuButton/menuButton.component';\n\ninterface BaseTagBlockProps {\n /**\n * If true, tags will be grouped by the `groupName` property of the tag object. If false, tags will be displayed in a single group.\n * @default false\n */\n displayTagsInGroups?: boolean;\n /**\n * The error message to be displayed if the `hasError` prop is set to true.\n * @default This field contains an error\n */\n errorText?: string;\n /**\n * If true, the tag block will show an error message and have error styling. You can customize the error message with the `errorText` prop.\n * @default false\n */\n hasError?: boolean;\n /**\n * If true, a loading spinner will cover the tag block preventing users from making further selections.\n * @default false\n */\n loading?: boolean;\n /** Configuration for the Menu component. See `Menu` stories for more information. */\n menuProps?: MenuProps;\n /** Callback function fired when user clicks the clear all button which unselects all items in the menu and removes all tags from the tag block. */\n onClearAll?: () => void;\n /** Callback function fired when user clicks the close button on an individual tag to remove the tag from the tag block. Args include the tag id of the deleted tag and an array of the remaining selected tags. */\n onRemoveTag?: (tag: string, selectedTags: TagBlockTag[]) => void;\n /** The selected items to be shown as tags in the tag block. */\n tags: TagBlockTag[];\n /** The title of the tag block, if provided, will be shown next to the add new menu button. */\n title?: string;\n /** Data test id for the tag block. */\n 'data-testid'?: string;\n}\n\ninterface DefaultTagBlockProps extends BaseTagBlockProps {\n /**\n * If true, a delete button will be shown so that the block can be removed. If set to true the `handleDelete` prop should also be specified.\n * @default false\n */\n canBeDeleted?: false;\n /** Function passed to be called when clicking the delete button on the tag block. Only relevant if the `canBeDeleted` prop is true. */\n onDelete?: never;\n}\n\ninterface DeletableTagBlockProps extends BaseTagBlockProps {\n /**\n * If true, a delete button will be shown so that the block can be removed. If set to true the `handleDelete` prop should also be specified.\n * @default false\n */\n canBeDeleted: true;\n /** Function passed to be called when clicking the delete button on the tag block. Only relevant if the `canBeDeleted` prop is true. */\n onDelete: () => void;\n}\n\nexport type TagBlockProps = DefaultTagBlockProps | DeletableTagBlockProps;\n\nconst defaultMenuButtonProps: MenuButtonProps = {\n size: 'sm',\n variant: 'secondarySubtle',\n iconName: 'plus',\n text: 'Add',\n hideCaret: true,\n};\n\nexport const TagBlock = ({\n title,\n menuProps,\n tags,\n canBeDeleted = false,\n onClearAll,\n onRemoveTag,\n onDelete,\n hasError = false,\n errorText = 'This field contains an error',\n displayTagsInGroups,\n loading = false,\n ['data-testid']: dataTestId = 'kibble-tag-block',\n}: TagBlockProps): React.JSX.Element => {\n const handleRemoveTag = useCallback(\n (value: string): void => {\n if (onRemoveTag) {\n onRemoveTag(value, tags);\n }\n },\n [onRemoveTag, tags],\n );\n\n const tagsByGroup = React.useMemo(() => {\n if (!displayTagsInGroups) {\n return [];\n }\n const grouped = {} as Record<string, TagBlockTag[]>;\n for (const tag of tags) {\n const group = tag.groupLabel || '-';\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(tag);\n }\n return Object.entries(grouped).map(([groupLabel, tags]) => ({\n groupLabel,\n tags,\n }));\n }, [tags, displayTagsInGroups]);\n\n const renderTags = useCallback(\n (tags: TagBlockTag[]) => {\n return tags.map((tag) => {\n const isDisabled =\n tag.label.includes(TagDisabledState.Inactive) || tag.label.includes(TagDisabledState.Deleted);\n\n return (\n <Tag\n className=\"TagBlock__Tag\"\n data-testid={`${dataTestId}-tag`}\n mr={1}\n mb={1}\n key={tag.value}\n label={tag.label}\n onClose={(): void => handleRemoveTag(tag.value)}\n closeButtonDisplay=\"always\"\n fontWeight=\"normal\"\n color={isDisabled ? 'text.placeholder' : 'text'}\n size=\"md\"\n />\n );\n });\n },\n [handleRemoveTag, dataTestId],\n );\n\n return (\n <Box\n className=\"TagBlock\"\n data-testid={dataTestId}\n position=\"relative\"\n mb={3}\n py={2}\n pl={4}\n pr={2}\n bg=\"background.subtle\"\n borderRadius=\"lg\"\n boxShadow={hasError ? `0 0 0 2px var(--chakra-colors-border-danger)` : ''}\n border=\"1px\"\n borderColor=\"border\"\n overflow={loading ? 'hidden' : undefined}\n >\n <Flex\n className=\"TagBlock__ButtonContainer\"\n data-testid={`${dataTestId}-button-container`}\n justifyContent=\"space-between\"\n >\n <HStack gap={1} minH={10}>\n {title && (\n <Text className=\"TagBlock__Title\" mr={2} fontWeight=\"bold\">\n {title}\n </Text>\n )}\n <Menu\n data-testid={`${dataTestId}-menu`}\n {...menuProps}\n buttonProps={menuProps?.buttonProps || defaultMenuButtonProps}\n />\n <Button\n className=\"TagBlock__Button--ClearAll\"\n data-testid={`${dataTestId}-clear-all-button`}\n size=\"sm\"\n iconName=\"arrowCircle\"\n variant=\"ghostNeutral\"\n onClick={onClearAll}\n disabled={tags.length <= 0}\n >\n Clear All\n </Button>\n </HStack>\n {canBeDeleted && (\n <Box>\n <Button\n className=\"TagBlock__Button--Delete\"\n data-testid={`${dataTestId}-delete-button`}\n iconName=\"trashcan\"\n variant=\"ghostNeutral\"\n onClick={onDelete}\n justifySelf=\"flex-end\"\n />\n </Box>\n )}\n </Flex>\n {Boolean(tags.length) && (\n <Flex\n className=\"TagBlock__TagContainer\"\n data-testid={`${dataTestId}-tag-container`}\n mt={2}\n pb={1}\n alignContent=\"space-between\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {displayTagsInGroups && tagsByGroup.length ? (\n <Flex direction=\"column\">\n {tagsByGroup.map(({ groupLabel, tags }) => (\n <Box key={groupLabel} mb={2}>\n <Box className=\"TagBlock__GroupTitle\" data-testid={`${dataTestId}-group-title`}>\n <Heading size=\"xs\" pb={2}>\n {groupLabel}\n </Heading>\n </Box>\n <Flex\n alignContent=\"space-between\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {renderTags(tags)}\n </Flex>\n </Box>\n ))}\n </Flex>\n ) : (\n renderTags(tags)\n )}\n </Flex>\n )}\n {loading && <Spinner fullScreen />}\n {hasError && (\n <Text className=\"TagBlock__Error\" data-testid={`${dataTestId}-error`} mt={2} size=\"xs\" variant=\"danger\">\n {errorText}\n </Text>\n )}\n </Box>\n );\n};\n"],"names":["TagDisabledState","defaultMenuButtonProps","TagBlock","title","menuProps","tags","canBeDeleted","onClearAll","onRemoveTag","onDelete","hasError","errorText","displayTagsInGroups","loading","dataTestId","handleRemoveTag","useCallback","value","tagsByGroup","React","grouped","tag","group","groupLabel","renderTags","isDisabled","jsx","Tag","jsxs","Box","Flex","HStack","Text","Menu","Button","Heading","Spinner"],"mappings":"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"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import v, { useCallback as g } from "react";
|
|
3
|
+
import { B as s } from "./index-9BerxEcw.js";
|
|
4
|
+
import { B as j } from "./button.component-BO6oee_V.js";
|
|
5
|
+
import { W as w } from "./heading.component-7ikcgDco.js";
|
|
6
|
+
import { M as W } from "./menu.component-DwTen8Uv.js";
|
|
7
|
+
import { S as $ } from "./spinner.component-B3dkvoO9.js";
|
|
8
|
+
import { T as y } from "./tag.component-B7V76XfM.js";
|
|
9
|
+
import { W as B } from "./text.component-CdTyTFds.js";
|
|
10
|
+
import { F as i } from "./flex-CX-8gE9T.js";
|
|
11
|
+
import { H as T } from "./h-stack-8q5nAOg0.js";
|
|
12
|
+
var d = /* @__PURE__ */ ((n) => (n.Inactive = "Inactive", n.Deleted = "Deleted", n))(d || {});
|
|
13
|
+
const S = {
|
|
14
|
+
size: "sm",
|
|
15
|
+
variant: "secondarySubtle",
|
|
16
|
+
iconName: "plus",
|
|
17
|
+
text: "Add",
|
|
18
|
+
hideCaret: !0
|
|
19
|
+
}, G = ({
|
|
20
|
+
title: n,
|
|
21
|
+
menuProps: u,
|
|
22
|
+
tags: l,
|
|
23
|
+
canBeDeleted: k = !1,
|
|
24
|
+
onClearAll: _,
|
|
25
|
+
onRemoveTag: c,
|
|
26
|
+
onDelete: C,
|
|
27
|
+
hasError: p = !1,
|
|
28
|
+
errorText: N = "This field contains an error",
|
|
29
|
+
displayTagsInGroups: m,
|
|
30
|
+
loading: f = !1,
|
|
31
|
+
["data-testid"]: a = "kibble-tag-block"
|
|
32
|
+
}) => {
|
|
33
|
+
const x = g(
|
|
34
|
+
(r) => {
|
|
35
|
+
c && c(r, l);
|
|
36
|
+
},
|
|
37
|
+
[c, l]
|
|
38
|
+
), b = v.useMemo(() => {
|
|
39
|
+
if (!m)
|
|
40
|
+
return [];
|
|
41
|
+
const r = {};
|
|
42
|
+
for (const t of l) {
|
|
43
|
+
const o = t.groupLabel || "-";
|
|
44
|
+
r[o] || (r[o] = []), r[o].push(t);
|
|
45
|
+
}
|
|
46
|
+
return Object.entries(r).map(([t, o]) => ({
|
|
47
|
+
groupLabel: t,
|
|
48
|
+
tags: o
|
|
49
|
+
}));
|
|
50
|
+
}, [l, m]), h = g(
|
|
51
|
+
(r) => r.map((t) => {
|
|
52
|
+
const o = t.label.includes(d.Inactive) || t.label.includes(d.Deleted);
|
|
53
|
+
return /* @__PURE__ */ e.jsx(
|
|
54
|
+
y,
|
|
55
|
+
{
|
|
56
|
+
className: "TagBlock__Tag",
|
|
57
|
+
"data-testid": `${a}-tag`,
|
|
58
|
+
mr: 1,
|
|
59
|
+
mb: 1,
|
|
60
|
+
label: t.label,
|
|
61
|
+
onClose: () => x(t.value),
|
|
62
|
+
closeButtonDisplay: "always",
|
|
63
|
+
fontWeight: "normal",
|
|
64
|
+
color: o ? "text.placeholder" : "text",
|
|
65
|
+
size: "md"
|
|
66
|
+
},
|
|
67
|
+
t.value
|
|
68
|
+
);
|
|
69
|
+
}),
|
|
70
|
+
[x, a]
|
|
71
|
+
);
|
|
72
|
+
return /* @__PURE__ */ e.jsxs(
|
|
73
|
+
s,
|
|
74
|
+
{
|
|
75
|
+
className: "TagBlock",
|
|
76
|
+
"data-testid": a,
|
|
77
|
+
position: "relative",
|
|
78
|
+
mb: 3,
|
|
79
|
+
py: 2,
|
|
80
|
+
pl: 4,
|
|
81
|
+
pr: 2,
|
|
82
|
+
bg: "background.subtle",
|
|
83
|
+
borderRadius: "lg",
|
|
84
|
+
boxShadow: p ? "0 0 0 2px var(--chakra-colors-border-danger)" : "",
|
|
85
|
+
border: "1px",
|
|
86
|
+
borderColor: "border",
|
|
87
|
+
overflow: f ? "hidden" : void 0,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ e.jsxs(
|
|
90
|
+
i,
|
|
91
|
+
{
|
|
92
|
+
className: "TagBlock__ButtonContainer",
|
|
93
|
+
"data-testid": `${a}-button-container`,
|
|
94
|
+
justifyContent: "space-between",
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ e.jsxs(T, { gap: 1, minH: 10, children: [
|
|
97
|
+
n && /* @__PURE__ */ e.jsx(B, { className: "TagBlock__Title", mr: 2, fontWeight: "bold", children: n }),
|
|
98
|
+
/* @__PURE__ */ e.jsx(
|
|
99
|
+
W,
|
|
100
|
+
{
|
|
101
|
+
"data-testid": `${a}-menu`,
|
|
102
|
+
...u,
|
|
103
|
+
buttonProps: u?.buttonProps || S
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ e.jsx(
|
|
107
|
+
j,
|
|
108
|
+
{
|
|
109
|
+
className: "TagBlock__Button--ClearAll",
|
|
110
|
+
"data-testid": `${a}-clear-all-button`,
|
|
111
|
+
size: "sm",
|
|
112
|
+
iconName: "arrowCircle",
|
|
113
|
+
variant: "ghostNeutral",
|
|
114
|
+
onClick: _,
|
|
115
|
+
disabled: l.length <= 0,
|
|
116
|
+
children: "Clear All"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }),
|
|
120
|
+
k && /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx(
|
|
121
|
+
j,
|
|
122
|
+
{
|
|
123
|
+
className: "TagBlock__Button--Delete",
|
|
124
|
+
"data-testid": `${a}-delete-button`,
|
|
125
|
+
iconName: "trashcan",
|
|
126
|
+
variant: "ghostNeutral",
|
|
127
|
+
onClick: C,
|
|
128
|
+
justifySelf: "flex-end"
|
|
129
|
+
}
|
|
130
|
+
) })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
!!l.length && /* @__PURE__ */ e.jsx(
|
|
135
|
+
i,
|
|
136
|
+
{
|
|
137
|
+
className: "TagBlock__TagContainer",
|
|
138
|
+
"data-testid": `${a}-tag-container`,
|
|
139
|
+
mt: 2,
|
|
140
|
+
pb: 1,
|
|
141
|
+
alignContent: "space-between",
|
|
142
|
+
flexWrap: "wrap",
|
|
143
|
+
justifyContent: "flex-start",
|
|
144
|
+
alignItems: "flex-start",
|
|
145
|
+
children: m && b.length ? /* @__PURE__ */ e.jsx(i, { direction: "column", children: b.map(({ groupLabel: r, tags: t }) => /* @__PURE__ */ e.jsxs(s, { mb: 2, children: [
|
|
146
|
+
/* @__PURE__ */ e.jsx(s, { className: "TagBlock__GroupTitle", "data-testid": `${a}-group-title`, children: /* @__PURE__ */ e.jsx(w, { size: "xs", pb: 2, children: r }) }),
|
|
147
|
+
/* @__PURE__ */ e.jsx(
|
|
148
|
+
i,
|
|
149
|
+
{
|
|
150
|
+
alignContent: "space-between",
|
|
151
|
+
flexWrap: "wrap",
|
|
152
|
+
justifyContent: "flex-start",
|
|
153
|
+
alignItems: "flex-start",
|
|
154
|
+
children: h(t)
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }, r)) }) : h(l)
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
f && /* @__PURE__ */ e.jsx($, { fullScreen: !0 }),
|
|
161
|
+
p && /* @__PURE__ */ e.jsx(B, { className: "TagBlock__Error", "data-testid": `${a}-error`, mt: 2, size: "xs", variant: "danger", children: N })
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
export {
|
|
167
|
+
G as T,
|
|
168
|
+
d as a
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=tagBlock.component-Cor6eakc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagBlock.component-Cor6eakc.js","sources":["../../src/components/TagBlock/tagBlock.types.ts","../../src/components/TagBlock/tagBlock.component.tsx"],"sourcesContent":["export enum TagDisabledState {\n Inactive = 'Inactive',\n Deleted = 'Deleted',\n}\n\nexport interface TagBlockTag {\n label: string;\n value: string;\n groupLabel?: string;\n}\n","import React, { useCallback } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { HStack } from '@chakra-ui/react/stack';\nimport { Button } from 'components/Button/button.component';\nimport { Heading } from 'components/Heading/heading.component';\nimport { Menu, MenuProps } from 'components/Menu/menu.component';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Tag } from 'components/Tag/tag.component';\nimport { Text } from 'components/Text/text.component';\nimport { TagBlockTag, TagDisabledState } from './tagBlock.types';\nimport { MenuButtonProps } from 'components/Menu/components/MenuButton/menuButton.component';\n\ninterface BaseTagBlockProps {\n /**\n * If true, tags will be grouped by the `groupName` property of the tag object. If false, tags will be displayed in a single group.\n * @default false\n */\n displayTagsInGroups?: boolean;\n /**\n * The error message to be displayed if the `hasError` prop is set to true.\n * @default This field contains an error\n */\n errorText?: string;\n /**\n * If true, the tag block will show an error message and have error styling. You can customize the error message with the `errorText` prop.\n * @default false\n */\n hasError?: boolean;\n /**\n * If true, a loading spinner will cover the tag block preventing users from making further selections.\n * @default false\n */\n loading?: boolean;\n /** Configuration for the Menu component. See `Menu` stories for more information. */\n menuProps?: MenuProps;\n /** Callback function fired when user clicks the clear all button which unselects all items in the menu and removes all tags from the tag block. */\n onClearAll?: () => void;\n /** Callback function fired when user clicks the close button on an individual tag to remove the tag from the tag block. Args include the tag id of the deleted tag and an array of the remaining selected tags. */\n onRemoveTag?: (tag: string, selectedTags: TagBlockTag[]) => void;\n /** The selected items to be shown as tags in the tag block. */\n tags: TagBlockTag[];\n /** The title of the tag block, if provided, will be shown next to the add new menu button. */\n title?: string;\n /** Data test id for the tag block. */\n 'data-testid'?: string;\n}\n\ninterface DefaultTagBlockProps extends BaseTagBlockProps {\n /**\n * If true, a delete button will be shown so that the block can be removed. If set to true the `handleDelete` prop should also be specified.\n * @default false\n */\n canBeDeleted?: false;\n /** Function passed to be called when clicking the delete button on the tag block. Only relevant if the `canBeDeleted` prop is true. */\n onDelete?: never;\n}\n\ninterface DeletableTagBlockProps extends BaseTagBlockProps {\n /**\n * If true, a delete button will be shown so that the block can be removed. If set to true the `handleDelete` prop should also be specified.\n * @default false\n */\n canBeDeleted: true;\n /** Function passed to be called when clicking the delete button on the tag block. Only relevant if the `canBeDeleted` prop is true. */\n onDelete: () => void;\n}\n\nexport type TagBlockProps = DefaultTagBlockProps | DeletableTagBlockProps;\n\nconst defaultMenuButtonProps: MenuButtonProps = {\n size: 'sm',\n variant: 'secondarySubtle',\n iconName: 'plus',\n text: 'Add',\n hideCaret: true,\n};\n\nexport const TagBlock = ({\n title,\n menuProps,\n tags,\n canBeDeleted = false,\n onClearAll,\n onRemoveTag,\n onDelete,\n hasError = false,\n errorText = 'This field contains an error',\n displayTagsInGroups,\n loading = false,\n ['data-testid']: dataTestId = 'kibble-tag-block',\n}: TagBlockProps): React.JSX.Element => {\n const handleRemoveTag = useCallback(\n (value: string): void => {\n if (onRemoveTag) {\n onRemoveTag(value, tags);\n }\n },\n [onRemoveTag, tags],\n );\n\n const tagsByGroup = React.useMemo(() => {\n if (!displayTagsInGroups) {\n return [];\n }\n const grouped = {} as Record<string, TagBlockTag[]>;\n for (const tag of tags) {\n const group = tag.groupLabel || '-';\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(tag);\n }\n return Object.entries(grouped).map(([groupLabel, tags]) => ({\n groupLabel,\n tags,\n }));\n }, [tags, displayTagsInGroups]);\n\n const renderTags = useCallback(\n (tags: TagBlockTag[]) => {\n return tags.map((tag) => {\n const isDisabled =\n tag.label.includes(TagDisabledState.Inactive) || tag.label.includes(TagDisabledState.Deleted);\n\n return (\n <Tag\n className=\"TagBlock__Tag\"\n data-testid={`${dataTestId}-tag`}\n mr={1}\n mb={1}\n key={tag.value}\n label={tag.label}\n onClose={(): void => handleRemoveTag(tag.value)}\n closeButtonDisplay=\"always\"\n fontWeight=\"normal\"\n color={isDisabled ? 'text.placeholder' : 'text'}\n size=\"md\"\n />\n );\n });\n },\n [handleRemoveTag, dataTestId],\n );\n\n return (\n <Box\n className=\"TagBlock\"\n data-testid={dataTestId}\n position=\"relative\"\n mb={3}\n py={2}\n pl={4}\n pr={2}\n bg=\"background.subtle\"\n borderRadius=\"lg\"\n boxShadow={hasError ? `0 0 0 2px var(--chakra-colors-border-danger)` : ''}\n border=\"1px\"\n borderColor=\"border\"\n overflow={loading ? 'hidden' : undefined}\n >\n <Flex\n className=\"TagBlock__ButtonContainer\"\n data-testid={`${dataTestId}-button-container`}\n justifyContent=\"space-between\"\n >\n <HStack gap={1} minH={10}>\n {title && (\n <Text className=\"TagBlock__Title\" mr={2} fontWeight=\"bold\">\n {title}\n </Text>\n )}\n <Menu\n data-testid={`${dataTestId}-menu`}\n {...menuProps}\n buttonProps={menuProps?.buttonProps || defaultMenuButtonProps}\n />\n <Button\n className=\"TagBlock__Button--ClearAll\"\n data-testid={`${dataTestId}-clear-all-button`}\n size=\"sm\"\n iconName=\"arrowCircle\"\n variant=\"ghostNeutral\"\n onClick={onClearAll}\n disabled={tags.length <= 0}\n >\n Clear All\n </Button>\n </HStack>\n {canBeDeleted && (\n <Box>\n <Button\n className=\"TagBlock__Button--Delete\"\n data-testid={`${dataTestId}-delete-button`}\n iconName=\"trashcan\"\n variant=\"ghostNeutral\"\n onClick={onDelete}\n justifySelf=\"flex-end\"\n />\n </Box>\n )}\n </Flex>\n {Boolean(tags.length) && (\n <Flex\n className=\"TagBlock__TagContainer\"\n data-testid={`${dataTestId}-tag-container`}\n mt={2}\n pb={1}\n alignContent=\"space-between\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {displayTagsInGroups && tagsByGroup.length ? (\n <Flex direction=\"column\">\n {tagsByGroup.map(({ groupLabel, tags }) => (\n <Box key={groupLabel} mb={2}>\n <Box className=\"TagBlock__GroupTitle\" data-testid={`${dataTestId}-group-title`}>\n <Heading size=\"xs\" pb={2}>\n {groupLabel}\n </Heading>\n </Box>\n <Flex\n alignContent=\"space-between\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {renderTags(tags)}\n </Flex>\n </Box>\n ))}\n </Flex>\n ) : (\n renderTags(tags)\n )}\n </Flex>\n )}\n {loading && <Spinner fullScreen />}\n {hasError && (\n <Text className=\"TagBlock__Error\" data-testid={`${dataTestId}-error`} mt={2} size=\"xs\" variant=\"danger\">\n {errorText}\n </Text>\n )}\n </Box>\n );\n};\n"],"names":["TagDisabledState","defaultMenuButtonProps","TagBlock","title","menuProps","tags","canBeDeleted","onClearAll","onRemoveTag","onDelete","hasError","errorText","displayTagsInGroups","loading","dataTestId","handleRemoveTag","useCallback","value","tagsByGroup","React","grouped","tag","group","groupLabel","renderTags","isDisabled","jsx","Tag","jsxs","Box","Flex","HStack","Text","Menu","Button","Heading","Spinner"],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { c as r } from "./create-recipe-context-DfQ-MTih.js";
|
|
3
|
+
import { w as x } from "./withTruncation-DTCfQ2yk.js";
|
|
4
|
+
const { withContext: i } = r({
|
|
5
|
+
key: "text"
|
|
6
|
+
}), n = i("p"), t = ({ children: e, ["data-testid"]: s = "kibble-text", ...a }) => /* @__PURE__ */ o.jsx(n, { className: "Text", "data-testid": s, ...a, children: e });
|
|
7
|
+
t.displayName = "Text";
|
|
8
|
+
const d = x(t);
|
|
9
|
+
export {
|
|
10
|
+
d as W
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=text.component-CdTyTFds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.component-CdTyTFds.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/text/index.js","../../src/components/Text/text.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"text\"\n});\nconst Text = withContext(\"p\");\nconst TextPropsProvider = PropsProvider;\n\nexport { Text, TextPropsProvider };\n","import React from 'react';\nimport { Text as CText, TextProps as CTextProps } from '@chakra-ui/react/text';\nimport { withTruncation, WithTruncationProps } from 'hocs/withTruncation';\nimport { TextSize } from './text.types';\nimport { TypographyVariant } from 'shared/types/typography';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\n\nexport interface TextProps extends WithTruncationProps, Omit<CTextProps, 'truncate'> {\n /**\n * Size of the text.\n * @default md\n */\n size?: ConditionalValue<TextSize>;\n /**\n * Color variant of the text.\n * @default default\n */\n variant?: TypographyVariant;\n /**\n * Data test id for the text.\n * @default kibble-text\n */\n 'data-testid'?: string;\n}\n\nconst Text = ({ children, ['data-testid']: dataTestId = 'kibble-text', ...rest }: TextProps): React.JSX.Element => {\n return (\n <CText className=\"Text\" data-testid={dataTestId} {...rest}>\n {children}\n </CText>\n );\n};\n\nText.displayName = 'Text';\n\nconst WrappedText = withTruncation(Text);\n\nexport { WrappedText as Text };\n"],"names":["withContext","createRecipeContext","Text","children","dataTestId","rest","jsx","CText","WrappedText","withTruncation"],"mappings":";;;AAIA,MAAM,EAAE,aAAAA,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAOF,EAAY,GAAG,GCkBtBE,IAAO,CAAC,EAAE,UAAAC,GAAU,CAAC,gBAAgBC,IAAa,eAAe,GAAGC,QAEtEC,gBAAAA,EAAA,IAACC,KAAM,WAAU,QAAO,eAAaH,GAAa,GAAGC,GAClD,UAAAF,GACH;AAIJD,EAAK,cAAc;AAEb,MAAAM,IAAcC,EAAeP,CAAI;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const n=require("./jsx-runtime-BjDatQAs.js"),r=require("./create-recipe-context-CDw-39SC.js"),c=require("./withTruncation-DE3FFPE7.js"),{withContext:x}=r.createRecipeContext({key:"text"}),a=x("p"),t=({children:e,["data-testid"]:s="kibble-text",...i})=>n.jsxRuntimeExports.jsx(a,{className:"Text","data-testid":s,...i,children:e});t.displayName="Text";const o=c.withTruncation(t);exports.WrappedText=o;
|
|
2
|
+
//# sourceMappingURL=text.component-CeioUl0G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.component-CeioUl0G.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/text/index.js","../../src/components/Text/text.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"text\"\n});\nconst Text = withContext(\"p\");\nconst TextPropsProvider = PropsProvider;\n\nexport { Text, TextPropsProvider };\n","import React from 'react';\nimport { Text as CText, TextProps as CTextProps } from '@chakra-ui/react/text';\nimport { withTruncation, WithTruncationProps } from 'hocs/withTruncation';\nimport { TextSize } from './text.types';\nimport { TypographyVariant } from 'shared/types/typography';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\n\nexport interface TextProps extends WithTruncationProps, Omit<CTextProps, 'truncate'> {\n /**\n * Size of the text.\n * @default md\n */\n size?: ConditionalValue<TextSize>;\n /**\n * Color variant of the text.\n * @default default\n */\n variant?: TypographyVariant;\n /**\n * Data test id for the text.\n * @default kibble-text\n */\n 'data-testid'?: string;\n}\n\nconst Text = ({ children, ['data-testid']: dataTestId = 'kibble-text', ...rest }: TextProps): React.JSX.Element => {\n return (\n <CText className=\"Text\" data-testid={dataTestId} {...rest}>\n {children}\n </CText>\n );\n};\n\nText.displayName = 'Text';\n\nconst WrappedText = withTruncation(Text);\n\nexport { WrappedText as Text };\n"],"names":["withContext","createRecipeContext","Text","children","dataTestId","rest","jsx","CText","WrappedText","withTruncation"],"mappings":"qJAIM,CAAE,YAAAA,CAA2B,EAAIC,sBAAoB,CACzD,IAAK,MACP,CAAC,EACKC,EAAOF,EAAY,GAAG,ECkBtBE,EAAO,CAAC,CAAE,SAAAC,EAAU,CAAC,eAAgBC,EAAa,cAAe,GAAGC,KAEtEC,EAAA,kBAAA,IAACC,GAAM,UAAU,OAAO,cAAaH,EAAa,GAAGC,EAClD,SAAAF,EACH,EAIJD,EAAK,YAAc,OAEb,MAAAM,EAAcC,iBAAeP,CAAI","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import j, { forwardRef as N, useMemo as w } from "react";
|
|
3
|
+
import { w as F } from "./withFormControl-DePFf9SY.js";
|
|
4
|
+
import { B as y } from "./button.component-BO6oee_V.js";
|
|
5
|
+
import { C as P } from "./characterCounter.component-Ch3P3GqC.js";
|
|
6
|
+
import { F as R } from "./flex-CX-8gE9T.js";
|
|
7
|
+
import { I as b } from "./input-group-CFelIL63.js";
|
|
8
|
+
import { c as k } from "./create-recipe-context-DfQ-MTih.js";
|
|
9
|
+
import { d as B } from "./use-locale-context-Bw4Gg9Z0.js";
|
|
10
|
+
import { u as E } from "./use-field-context-DrC9mrDd.js";
|
|
11
|
+
import { a6 as T } from "./index-fHSGm2nC.js";
|
|
12
|
+
const u = N((r, s) => {
|
|
13
|
+
const o = E(), a = T(o?.getInputProps(), r);
|
|
14
|
+
return /* @__PURE__ */ t.jsx(B.input, { ...a, ref: s });
|
|
15
|
+
});
|
|
16
|
+
u.displayName = "FieldInput";
|
|
17
|
+
const { withContext: D } = k({
|
|
18
|
+
key: "input"
|
|
19
|
+
}), W = D(u), $ = {
|
|
20
|
+
sm: "xs",
|
|
21
|
+
md: "sm",
|
|
22
|
+
lg: "md"
|
|
23
|
+
}, l = j.forwardRef(
|
|
24
|
+
({
|
|
25
|
+
charLimit: r = void 0,
|
|
26
|
+
clearable: s = !1,
|
|
27
|
+
disabled: o = !1,
|
|
28
|
+
inputRef: a,
|
|
29
|
+
invalid: c,
|
|
30
|
+
leftAddon: d,
|
|
31
|
+
leftElement: f,
|
|
32
|
+
onClear: i,
|
|
33
|
+
onContrast: x,
|
|
34
|
+
rightAddon: C,
|
|
35
|
+
rightElement: p,
|
|
36
|
+
size: m = "md",
|
|
37
|
+
value: e,
|
|
38
|
+
["data-testid"]: n = "kibble-text-input",
|
|
39
|
+
...I
|
|
40
|
+
}, g) => {
|
|
41
|
+
const h = () => {
|
|
42
|
+
i && i(e || "");
|
|
43
|
+
};
|
|
44
|
+
s && e && !o && (p = /* @__PURE__ */ t.jsx(
|
|
45
|
+
y,
|
|
46
|
+
{
|
|
47
|
+
className: "TextInput__ClearButton",
|
|
48
|
+
"data-testid": `${n}-clear-button`,
|
|
49
|
+
size: $[m],
|
|
50
|
+
variant: "ghostNeutral",
|
|
51
|
+
onClick: h,
|
|
52
|
+
iconName: "close"
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
const _ = w(() => e?.toString()?.length || 0, [e]);
|
|
56
|
+
return /* @__PURE__ */ t.jsxs(R, { className: "TextInput__Wrapper", w: "100%", flexDirection: "column", gap: 1, alignItems: "flex-end", children: [
|
|
57
|
+
/* @__PURE__ */ t.jsx(
|
|
58
|
+
b,
|
|
59
|
+
{
|
|
60
|
+
className: "TextInput__InputGroup",
|
|
61
|
+
"data-testid": `${n}-input-group`,
|
|
62
|
+
startElement: f,
|
|
63
|
+
startElementProps: {
|
|
64
|
+
color: "inherit",
|
|
65
|
+
_groupDisabled: { opacity: 0.6 }
|
|
66
|
+
},
|
|
67
|
+
endElement: p,
|
|
68
|
+
endElementProps: {
|
|
69
|
+
color: "inherit",
|
|
70
|
+
paddingInline: 1.5,
|
|
71
|
+
_groupDisabled: { opacity: 0.6 }
|
|
72
|
+
},
|
|
73
|
+
startAddon: d,
|
|
74
|
+
endAddon: C,
|
|
75
|
+
children: /* @__PURE__ */ t.jsx(
|
|
76
|
+
W,
|
|
77
|
+
{
|
|
78
|
+
"data-testid": n,
|
|
79
|
+
className: "TextInput",
|
|
80
|
+
ref: a || g,
|
|
81
|
+
value: e,
|
|
82
|
+
size: m,
|
|
83
|
+
disabled: o,
|
|
84
|
+
...c && { "aria-invalid": !0 },
|
|
85
|
+
variant: x ? "onContrast" : "default",
|
|
86
|
+
...I
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
!!r && /* @__PURE__ */ t.jsx(
|
|
92
|
+
P,
|
|
93
|
+
{
|
|
94
|
+
"data-testid": `${n}-character-counter`,
|
|
95
|
+
withLimit: !0,
|
|
96
|
+
limit: r,
|
|
97
|
+
currentCount: _
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
l.displayName = "TextInput";
|
|
104
|
+
const O = F(l);
|
|
105
|
+
export {
|
|
106
|
+
O as W
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=textInput.component-BC0Hi8R_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInput.component-BC0Hi8R_.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","import { ButtonSize } from 'components/Button/button.types';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: 'xs',\n md: 'sm',\n lg: 'md',\n};\n","import React, { useMemo } from 'react';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { Input as CInput, InputProps as CInputProps } from '@chakra-ui/react/input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Button } from 'components/Button/button.component';\nimport { CharacterCounter } from 'components/CharacterCounter/characterCounter.component';\nimport { closeButtonSizeMap } from './textInput.records';\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n /** The maximum number of characters that can be entered into the input. */\n charLimit?: number;\n /** Ref to the input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /** The size of the input. */\n size?: FormControlSize;\n /**\n * Data test id for the text input.\n * @default kibble-text-input\n */\n 'data-testid'?: string;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: never;\n /** Callback function when the clear button is clicked. */\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: boolean;\n /** Callback function when the clear button is clicked. */\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-text-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || '');\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid={`${dataTestId}-clear-button`}\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"TextInput__Wrapper\" w=\"100%\" flexDirection=\"column\" gap={1} alignItems=\"flex-end\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid={`${dataTestId}-input-group`}\n startElement={leftElement}\n startElementProps={{\n color: 'inherit',\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: 'inherit',\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid={dataTestId}\n className=\"TextInput\"\n ref={inputRef || ref}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { 'aria-invalid': true })}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\nconst WrappedTextInput = withFormControl<TextInputProps>(TextInput);\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","closeButtonSizeMap","TextInput","React","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","dataTestId","rest","handleClear","Button","currentCharCount","useMemo","jsxs","Flex","InputGroup","CInput","CharacterCounter","WrappedTextInput","withFormControl"],"mappings":";;;;;;;;;;;AAOA,MAAMA,IAAaC,EAAW,CAACC,GAAOC,MAAQ;AAC5C,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,cAAa,GAAIF,CAAK;AAC5D,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,OAAO,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC/D,CAAC;AACDH,EAAW,cAAc;ACPzB,MAAM,EAAE,aAAAU,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAQF,EAAYG,CAAW,GCLxBC,IAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GCwDMC,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,CAAC,gBAAgBC,IAAa;AAAA,IAC9B,GAAGC;AAAA,KAEL5B,MACsB;AACtB,UAAM6B,IAAc,MAAY;AAC9B,MAAIR,KACFA,EAAQK,KAAS,EAAE;AAAA,IAEvB;AAEA,IAAIX,KAAeW,KAAS,CAACV,MAEzBQ,IAAAnB,gBAAAA,EAAA;AAAA,MAACyB;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAa,GAAGH,CAAU;AAAA,QAC1B,MAAMhB,EAAmBc,CAAuB;AAAA,QAChD,SAAQ;AAAA,QACR,SAASI;AAAA,QACT,UAAS;AAAA,MAAA;AAAA,IACX;AAIE,UAAAE,IAAmBC,EAAQ,MAAMN,GAAO,YAAY,UAAU,GAAG,CAACA,CAAK,CAAC;AAG5E,WAAAO,gBAAAA,EAAA,KAACC,GAAK,EAAA,WAAU,sBAAqB,GAAE,QAAO,eAAc,UAAS,KAAK,GAAG,YAAW,YACtF,UAAA;AAAA,MAAA7B,gBAAAA,EAAA;AAAA,QAAC8B;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAa,GAAGR,CAAU;AAAA,UAC1B,cAAcP;AAAA,UACd,mBAAmB;AAAA,YACjB,OAAO;AAAA,YACP,gBAAgB,EAAE,SAAS,IAAI;AAAA,UACjC;AAAA,UACA,YAAYI;AAAA,UACZ,iBAAiB;AAAA,YACf,OAAO;AAAA,YACP,eAAe;AAAA,YACf,gBAAgB,EAAE,SAAS,IAAI;AAAA,UACjC;AAAA,UACA,YAAYL;AAAA,UACZ,UAAUI;AAAA,UAEV,UAAAlB,gBAAAA,EAAA;AAAA,YAAC+B;AAAAA,YAAA;AAAA,cACC,eAAaT;AAAA,cACb,WAAU;AAAA,cACV,KAAKV,KAAYjB;AAAA,cACjB,OAAA0B;AAAA,cACA,MAAAD;AAAA,cACA,UAAAT;AAAA,cACC,GAAIE,KAAW,EAAE,gBAAgB,GAAK;AAAA,cACvC,SAASI,IAAa,eAAe;AAAA,cACpC,GAAGM;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MACF;AAAA,MACC,CAAC,CAACd,KACDT,gBAAAA,EAAA;AAAA,QAACgC;AAAA,QAAA;AAAA,UACC,eAAa,GAAGV,CAAU;AAAA,UAC1B,WAAW;AAAA,UACX,OAAOb;AAAA,UACP,cAAciB;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAnB,EAAU,cAAc;AAClB,MAAA0B,IAAmBC,EAAgC3B,CAAS;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),u=require("react"),g=require("./withFormControl-wZA87Sd4.js"),q=require("./button.component-DjdgBXDC.js"),E=require("./characterCounter.component-CKDigkoD.js"),N=require("./flex-BOU6tYUd.js"),w=require("./input-group-DUdSDk4o.js"),F=require("./create-recipe-context-CDw-39SC.js"),b=require("./use-locale-context-ym21RUxU.js"),y=require("./use-field-context-Cm29IQ7H.js"),P=require("./index-CQURjLlA.js"),T=t=>t&&t.__esModule?t:{default:t},k=T(u),l=u.forwardRef((t,s)=>{const r=y.useFieldContext(),i=P.mergeProps(r?.getInputProps(),t);return e.jsxRuntimeExports.jsx(b.ark.input,{...i,ref:s})});l.displayName="FieldInput";const{withContext:D}=F.createRecipeContext({key:"input"}),B=D(l),G={sm:"xs",md:"sm",lg:"md"},d=k.default.forwardRef(({charLimit:t=void 0,clearable:s=!1,disabled:r=!1,inputRef:i,invalid:x,leftAddon:m,leftElement:f,onClear:a,onContrast:C,rightAddon:_,rightElement:c,size:p="md",value:n,["data-testid"]:o="kibble-text-input",...h},j)=>{const I=()=>{a&&a(n||"")};s&&n&&!r&&(c=e.jsxRuntimeExports.jsx(q.Button,{className:"TextInput__ClearButton","data-testid":`${o}-clear-button`,size:G[p],variant:"ghostNeutral",onClick:I,iconName:"close"}));const R=u.useMemo(()=>n?.toString()?.length||0,[n]);return e.jsxRuntimeExports.jsxs(N.Flex,{className:"TextInput__Wrapper",w:"100%",flexDirection:"column",gap:1,alignItems:"flex-end",children:[e.jsxRuntimeExports.jsx(w.InputGroup,{className:"TextInput__InputGroup","data-testid":`${o}-input-group`,startElement:f,startElementProps:{color:"inherit",_groupDisabled:{opacity:.6}},endElement:c,endElementProps:{color:"inherit",paddingInline:1.5,_groupDisabled:{opacity:.6}},startAddon:m,endAddon:_,children:e.jsxRuntimeExports.jsx(B,{"data-testid":o,className:"TextInput",ref:i||j,value:n,size:p,disabled:r,...x&&{"aria-invalid":!0},variant:C?"onContrast":"default",...h})}),!!t&&e.jsxRuntimeExports.jsx(E.CharacterCounter,{"data-testid":`${o}-character-counter`,withLimit:!0,limit:t,currentCount:R})]})});d.displayName="TextInput";const M=g.withFormControl(d);exports.WrappedTextInput=M;
|
|
2
|
+
//# sourceMappingURL=textInput.component-C1vwy6pL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInput.component-C1vwy6pL.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","import { ButtonSize } from 'components/Button/button.types';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: 'xs',\n md: 'sm',\n lg: 'md',\n};\n","import React, { useMemo } from 'react';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { Input as CInput, InputProps as CInputProps } from '@chakra-ui/react/input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Button } from 'components/Button/button.component';\nimport { CharacterCounter } from 'components/CharacterCounter/characterCounter.component';\nimport { closeButtonSizeMap } from './textInput.records';\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n /** The maximum number of characters that can be entered into the input. */\n charLimit?: number;\n /** Ref to the input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /** The size of the input. */\n size?: FormControlSize;\n /**\n * Data test id for the text input.\n * @default kibble-text-input\n */\n 'data-testid'?: string;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: never;\n /** Callback function when the clear button is clicked. */\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: boolean;\n /** Callback function when the clear button is clicked. */\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-text-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || '');\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid={`${dataTestId}-clear-button`}\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"TextInput__Wrapper\" w=\"100%\" flexDirection=\"column\" gap={1} alignItems=\"flex-end\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid={`${dataTestId}-input-group`}\n startElement={leftElement}\n startElementProps={{\n color: 'inherit',\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: 'inherit',\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid={dataTestId}\n className=\"TextInput\"\n ref={inputRef || ref}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { 'aria-invalid': true })}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\nconst WrappedTextInput = withFormControl<TextInputProps>(TextInput);\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","closeButtonSizeMap","TextInput","React","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","dataTestId","rest","handleClear","Button","currentCharCount","useMemo","jsxs","Flex","InputGroup","CInput","CharacterCounter","WrappedTextInput","withFormControl"],"mappings":"wfAOMA,EAAaC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,cAAa,EAAIF,CAAK,EAC5D,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,MAAO,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC/D,CAAC,EACDH,EAAW,YAAc,aCPzB,KAAM,CAAE,YAAAU,CAA2B,EAAIC,sBAAoB,CACzD,IAAK,OACP,CAAC,EACKC,EAAQF,EAAYG,CAAW,ECLxBC,EAA0D,CACrE,GAAI,KACJ,GAAI,KACJ,GAAI,IACN,ECwDMC,EAAYC,EAAM,QAAA,WACtB,CACE,CACE,UAAAC,EAAY,OACZ,UAAAC,EAAY,GACZ,SAAAC,EAAW,GACX,SAAAC,EACA,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,QAAAC,EACA,WAAAC,EACA,WAAAC,EACA,aAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EACA,CAAC,eAAgBC,EAAa,oBAC9B,GAAGC,GAEL5B,IACsB,CACtB,MAAM6B,EAAc,IAAY,CAC1BR,GACFA,EAAQK,GAAS,EAAE,CAEvB,EAEIX,GAAeW,GAAS,CAACV,IAEzBQ,EAAAnB,EAAA,kBAAA,IAACyB,EAAA,OAAA,CACC,UAAU,yBACV,cAAa,GAAGH,CAAU,gBAC1B,KAAMhB,EAAmBc,CAAuB,EAChD,QAAQ,eACR,QAASI,EACT,SAAS,OAAA,CACX,GAIE,MAAAE,EAAmBC,UAAQ,IAAMN,GAAO,YAAY,QAAU,EAAG,CAACA,CAAK,CAAC,EAG5E,OAAAO,EAAA,kBAAA,KAACC,EAAK,KAAA,CAAA,UAAU,qBAAqB,EAAE,OAAO,cAAc,SAAS,IAAK,EAAG,WAAW,WACtF,SAAA,CAAA7B,EAAA,kBAAA,IAAC8B,EAAA,WAAA,CACC,UAAU,wBACV,cAAa,GAAGR,CAAU,eAC1B,aAAcP,EACd,kBAAmB,CACjB,MAAO,UACP,eAAgB,CAAE,QAAS,EAAI,CACjC,EACA,WAAYI,EACZ,gBAAiB,CACf,MAAO,UACP,cAAe,IACf,eAAgB,CAAE,QAAS,EAAI,CACjC,EACA,WAAYL,EACZ,SAAUI,EAEV,SAAAlB,EAAA,kBAAA,IAAC+B,EAAA,CACC,cAAaT,EACb,UAAU,YACV,IAAKV,GAAYjB,EACjB,MAAA0B,EACA,KAAAD,EACA,SAAAT,EACC,GAAIE,GAAW,CAAE,eAAgB,EAAK,EACvC,QAASI,EAAa,aAAe,UACpC,GAAGM,CAAA,CAAA,CACN,CACF,EACC,CAAC,CAACd,GACDT,EAAA,kBAAA,IAACgC,EAAA,iBAAA,CACC,cAAa,GAAGV,CAAU,qBAC1B,UAAW,GACX,MAAOb,EACP,aAAciB,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEAnB,EAAU,YAAc,YAClB,MAAA0B,EAAmBC,kBAAgC3B,CAAS","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const l=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),h=require("./withFormControl-wZA87Sd4.js"),v=require("./characterCounter.component-CKDigkoD.js"),w=require("./flex-BOU6tYUd.js"),b=require("./create-recipe-context-CDw-39SC.js"),p=require("./index-CQURjLlA.js"),x=require("./use-locale-context-ym21RUxU.js"),C=require("./use-field-context-Cm29IQ7H.js"),F=e=>e&&e.__esModule?e:{default:e},y=F(c);var R=e=>{if(!e)return;const t=p.getComputedStyle(e),o=p.getWindow(e),i=p.getDocument(e),r=()=>{requestAnimationFrame(()=>{e.style.height="auto";let a;t.boxSizing==="content-box"?a=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):a=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&a>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),a=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${a}px`})};e.addEventListener("input",r),e.form?.addEventListener("reset",r);const n=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(n,"value");Object.defineProperty(e,"value",{...s,set(){s?.set?.apply(this,arguments),r()}});const d=new o.ResizeObserver(()=>{requestAnimationFrame(()=>r())});d.observe(e);const u=new o.MutationObserver(()=>r());return u.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),i.fonts?.addEventListener("loadingdone",r),()=>{e.removeEventListener("input",r),e.form?.removeEventListener("reset",r),i.fonts?.removeEventListener("loadingdone",r),d.disconnect(),u.disconnect()}};const m=c.forwardRef((e,t)=>{const{autoresize:o,...i}=e,r=c.useRef(null),n=C.useFieldContext(),s=p.mergeProps(n?.getTextareaProps(),{style:{resize:o?"none":void 0}},i);return c.useEffect(()=>{if(o)return R(r.current)},[o]),l.jsxRuntimeExports.jsx(x.ark.textarea,{...s,ref:x.composeRefs(t,r)})});m.displayName="FieldTextarea";const{withContext:j}=b.createRecipeContext({key:"textarea"}),T=j(m),f=y.default.forwardRef(({charLimit:e=void 0,invalid:t,onContrast:o,resize:i="none",textareaRef:r,value:n,["data-testid"]:s="kibble-textarea",...d},u)=>{const a=o?"onContrast":"default",g=c.useMemo(()=>n?.toString()?.length||0,[n]);return l.jsxRuntimeExports.jsxs(w.Flex,{className:"Textarea__Wrapper",flexDirection:"column",w:"100%",gap:1,alignItems:"flex-end",children:[l.jsxRuntimeExports.jsx(T,{className:"Textarea","data-testid":s,ref:r||u,resize:i,variant:a,value:n,...t&&{"aria-invalid":!0},minH:"140px",...d}),!!e&&l.jsxRuntimeExports.jsx(v.CharacterCounter,{"data-testid":`${s}-character-counter`,withLimit:!0,limit:e,currentCount:g})]})});f.displayName="Textarea";const q=h.withFormControl(f);exports.WrappedTextarea=q;
|
|
2
|
+
//# sourceMappingURL=textarea.component-D15hA9Jb.js.map
|