@nubisco/ui 5.54.0 → 5.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AccordionItem--XeLRz2P.js → AccordionItem-BY-p8UkV.js} +1 -1
- package/dist/{AccordionItem-BYSH6dZK.cjs → AccordionItem-p0mYXIj8.cjs} +1 -1
- package/dist/{ActionGroup-Cn22xj1t.js → ActionGroup-CjRSKyOa.js} +1 -1
- package/dist/{ActionGroup-0rG92kFk.cjs → ActionGroup-DIMZhC7N.cjs} +1 -1
- package/dist/AiLabel-BDccQ2iQ.js +242 -0
- package/dist/AiLabel-jRrBTu6c.cjs +1 -0
- package/dist/{AiProvider-CLtCD_UR.cjs → AiProvider-CGB9EiSf.cjs} +1 -1
- package/dist/{AiProvider-gprbR5ts.js → AiProvider-CMbPWtU-.js} +2 -2
- package/dist/{BatchActions-Ckx8kyZt.js → BatchActions-Kr2S6CJI.js} +1 -1
- package/dist/{BatchActions-6IO5GRFm.cjs → BatchActions-jfvfpZeT.cjs} +1 -1
- package/dist/{Board-BdqGOVNF.js → Board-C3_cXRl6.js} +177 -176
- package/dist/Board-D6A-irdx.cjs +1 -0
- package/dist/{Breadcrumbs-BzyDVvEk.cjs → Breadcrumbs-0rRFiO31.cjs} +1 -1
- package/dist/{Breadcrumbs-Bc-acmPE.js → Breadcrumbs-DqagVknq.js} +1 -1
- package/dist/{Briefing-DwKWCOGm.cjs → Briefing-B-O-9bhN.cjs} +1 -1
- package/dist/{Briefing-BiEICh1u.js → Briefing-DNH-707q.js} +1 -1
- package/dist/{ChatMessage-1L_xCXZF.cjs → ChatMessage-B45Xhl8x.cjs} +1 -1
- package/dist/{ChatMessage-C2Ecm175.js → ChatMessage-BDOdvI4h.js} +1 -1
- package/dist/{ChatThread-B_F3xTdE.cjs → ChatThread-B7F1r4t4.cjs} +1 -1
- package/dist/{ChatThread-COdOb1rH.js → ChatThread-DqvsnVOr.js} +1 -1
- package/dist/CommandPalette-BaRqoURY.cjs +1 -0
- package/dist/CommandPalette-DWv1UV8r.js +294 -0
- package/dist/{Confirm-Baz2WG7b.cjs → Confirm-B5vMzPbN.cjs} +1 -1
- package/dist/{Confirm-CvMuXK9Q.js → Confirm-C4lT-6HD.js} +1 -1
- package/dist/{DataTable-B8THDBLS.js → DataTable-CcwD0PSJ.js} +2 -2
- package/dist/{DataTable-DeFzOlcP.cjs → DataTable-xEw-NvHM.cjs} +1 -1
- package/dist/{DatePicker-BrUXcNUj.js → DatePicker-3pCNky8d.js} +234 -230
- package/dist/DatePicker-BrMicYUx.cjs +1 -0
- package/dist/FloatingToolbar-BV-iGNxe.js +120 -0
- package/dist/FloatingToolbar-C8xB4BzH.cjs +1 -0
- package/dist/{ImagePicker-vhg7b-UL.cjs → ImagePicker-5qPI77Jo.cjs} +1 -1
- package/dist/{ImagePicker-LhpR7jjR.js → ImagePicker-BnHg403Q.js} +1 -1
- package/dist/InfoHint-CdluaJqE.cjs +1 -0
- package/dist/InfoHint-zMuSw_99.js +182 -0
- package/dist/{InlineLoading-CA0_IT29.cjs → InlineLoading-CqGrNWHf.cjs} +1 -1
- package/dist/{InlineLoading-Cknqq0vv.js → InlineLoading-_j2KKhNQ.js} +1 -1
- package/dist/Menu-CWxBEMC4.js +193 -0
- package/dist/Menu-D0TerdRm.cjs +1 -0
- package/dist/{MenuBarItem-yr5aizl3.js → MenuBarItem-BYh4YWR4.js} +1 -1
- package/dist/{MenuBarItem-DlnIAhRw.cjs → MenuBarItem-DTOqacvg.cjs} +1 -1
- package/dist/Modal-CmGFLEo4.cjs +1 -0
- package/dist/{Modal-CESCi2dE.js → Modal-DwL90AoV.js} +73 -69
- package/dist/NotificationCenter-EMlV-oPh.cjs +1 -0
- package/dist/{NotificationCenter-DkGc0ETD.js → NotificationCenter-YZnPMH7c.js} +217 -213
- package/dist/{OverflowMenu-BWZ7c8oI.js → OverflowMenu-DliuDrTK.js} +1 -1
- package/dist/{OverflowMenu-C8q28FrD.cjs → OverflowMenu-DuRgj1DU.cjs} +1 -1
- package/dist/{PageHeader-DElq_kdh.cjs → PageHeader-BoEdR_T5.cjs} +1 -1
- package/dist/{PageHeader-DOYN9sto.js → PageHeader-c6117xYf.js} +1 -1
- package/dist/{Pagination-9mPN8ych.cjs → Pagination-B3lmxggo.cjs} +1 -1
- package/dist/{Pagination-CxBHFwy0.js → Pagination-DwAc-4d9.js} +1 -1
- package/dist/Select-CDs-7QtW.js +619 -0
- package/dist/Select-CJqwMI69.cjs +1 -0
- package/dist/{SidebarCollapseToggle-DraqbhwM.js → SidebarCollapseToggle-C38R19gG.js} +1 -1
- package/dist/{SidebarCollapseToggle-CABmF-PC.cjs → SidebarCollapseToggle-DOck3Txy.cjs} +1 -1
- package/dist/SidebarMenuItem-DzJ_R2__.cjs +1 -0
- package/dist/SidebarMenuItem-E410HTei.js +302 -0
- package/dist/Spinner-BlzVODzE.js +161 -0
- package/dist/Spinner-Bpfgl-mN.cjs +1 -0
- package/dist/{Stat-BCvXYr-z.cjs → Stat-BByeMKkT.cjs} +1 -1
- package/dist/{Stat-No3RhGB3.js → Stat-DWliDbWE.js} +1 -1
- package/dist/Submenu-BkHGYo7X.js +168 -0
- package/dist/Submenu-CCQnBpln.cjs +1 -0
- package/dist/{SuggestionList-Cxy4jjjd.cjs → SuggestionList-C61Dj6en.cjs} +1 -1
- package/dist/{SuggestionList-Dv4yQAi-.js → SuggestionList-D48Ojcf3.js} +1 -1
- package/dist/Toaster-Dwjm0bsR.js +285 -0
- package/dist/Toaster-aJJvxlEr.cjs +1 -0
- package/dist/{UserMenu-CjmhyTwN.js → UserMenu-BTihjCKC.js} +94 -90
- package/dist/UserMenu-CHkbByFS.cjs +1 -0
- package/dist/{Walkthrough-DYYqtpwJ.js → Walkthrough-BqGB1yaX.js} +63 -59
- package/dist/Walkthrough-sGAypY5d.cjs +1 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +284 -283
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiLabel.vue.d.ts.map +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/BatchActions.cjs +1 -1
- package/dist/components/BatchActions.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- package/dist/components/Board.vue.d.ts.map +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Briefing.cjs +1 -1
- package/dist/components/Briefing.mjs +1 -1
- package/dist/components/ChatMessage.cjs +1 -1
- package/dist/components/ChatMessage.mjs +1 -1
- package/dist/components/ChatThread.cjs +1 -1
- package/dist/components/ChatThread.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.mjs +1 -1
- package/dist/components/InfoHint.cjs +1 -1
- package/dist/components/InfoHint.mjs +1 -1
- package/dist/components/InfoHint.vue.d.ts.map +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/OverflowMenu.cjs +1 -1
- package/dist/components/OverflowMenu.mjs +1 -1
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Spinner.vue.d.ts.map +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/Submenu.vue.d.ts.map +1 -1
- package/dist/components/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Toaster.vue.d.ts.map +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Walkthrough.vue.d.ts.map +1 -1
- package/dist/components/labs/Spreadsheet.d.ts +14 -0
- package/dist/components/labs/Spreadsheet.vue.d.ts +1 -0
- package/dist/components/labs/Spreadsheet.vue.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +2 -2
- package/dist/composables/useTeleportReady.composable.cjs +1 -0
- package/dist/composables/useTeleportReady.composable.d.ts +30 -0
- package/dist/composables/useTeleportReady.composable.d.ts.map +1 -0
- package/dist/composables/useTeleportReady.composable.mjs +11 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +152 -151
- package/dist/{main-D6qY7QeE.js → main-B-SiH7ks.js} +305 -237
- package/dist/main-CH_BN_4v.cjs +4 -0
- package/dist/main.d.ts +10 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AiLabel.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/styles/Spinner.css +1 -1
- package/dist/styles/Toaster.css +1 -1
- package/dist/styles/Walkthrough.css +1 -1
- package/dist/styles/main.css +1 -1
- package/dist/ui.css +9 -9
- package/package.json +1 -1
- package/dist/AiLabel-AGSSBanb.cjs +0 -1
- package/dist/AiLabel-D32aNf1F.js +0 -240
- package/dist/Board-DtOWyvKh.cjs +0 -1
- package/dist/CommandPalette-CC_Aj4Uh.cjs +0 -1
- package/dist/CommandPalette-zqTMjpm8.js +0 -290
- package/dist/DatePicker-B5YRb64p.cjs +0 -1
- package/dist/FloatingToolbar-BikX_AsP.js +0 -116
- package/dist/FloatingToolbar-DWVY8Fxo.cjs +0 -1
- package/dist/InfoHint-BEzkNQTM.cjs +0 -1
- package/dist/InfoHint-BlHxrTw6.js +0 -178
- package/dist/Menu-7EgnchVu.js +0 -189
- package/dist/Menu-Bs2Co1sl.cjs +0 -1
- package/dist/Modal-C_EWDvmH.cjs +0 -1
- package/dist/NotificationCenter-DxZgHQyt.cjs +0 -1
- package/dist/Select-7gJ3_fWh.js +0 -615
- package/dist/Select-Dg4HSHOu.cjs +0 -1
- package/dist/SidebarMenuItem-DQRQtqrp.js +0 -300
- package/dist/SidebarMenuItem-Dwk7vKN5.cjs +0 -1
- package/dist/Spinner-DYFhiTB1.js +0 -160
- package/dist/Spinner-j13gRoUF.cjs +0 -1
- package/dist/Submenu-BDs-yAqv.js +0 -164
- package/dist/Submenu-BLjx2kWl.cjs +0 -1
- package/dist/Toaster-ByObLDkk.js +0 -284
- package/dist/Toaster-CJAbZ9pv.cjs +0 -1
- package/dist/UserMenu-BjSO_Uml.cjs +0 -1
- package/dist/Walkthrough-DxAIdo3M.cjs +0 -1
- package/dist/main-Cs0FFBfV.cjs +0 -4
|
@@ -3,7 +3,7 @@ import { t } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
|
3
3
|
import { t as n } from "./Icon-B2tiGiqZ.js";
|
|
4
4
|
import { useStableId as r } from "./composables/useStableId.composable.mjs";
|
|
5
5
|
import { useNbStrings as i } from "./composables/useNbStrings.composable.mjs";
|
|
6
|
-
import { t as a } from "./InfoHint-
|
|
6
|
+
import { t as a } from "./InfoHint-zMuSw_99.js";
|
|
7
7
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeUnmount as _, openBlock as v, ref as y, renderSlot as b, toDisplayString as x, unref as S, useSlots as C } from "vue";
|
|
8
8
|
import { regular as w } from "@nubisco/ui/icons/caret-down";
|
|
9
9
|
//#region src/components/AccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Accordion.context-Cb_NKUtg.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./composables/useNbStrings.composable.cjs`),a=require(`./InfoHint-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Accordion.context-Cb_NKUtg.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./composables/useNbStrings.composable.cjs`),a=require(`./InfoHint-CdluaJqE.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/caret-down`);var c=[`aria-level`],l=[`id`,`aria-expanded`,`aria-controls`,`aria-describedby`,`disabled`],u={class:`nb-accordion-item__title`},d={key:1,class:`nb-accordion-item__meta`},f=[`id`],p={key:2,class:`nb-accordion-item__actions`},m=[`id`,`aria-labelledby`,`hidden`,`inert`],h={class:`nb-accordion-item__body`},g=(0,o.defineComponent)({__name:`AccordionItem`,props:{id:{default:void 0},title:{default:``},icon:{default:void 0},meta:{default:``},info:{default:void 0},disabled:{type:Boolean,default:!1}},setup(t){let g=i.useNbStrings(),_=t,v=(0,o.useSlots)(),y=(0,o.computed)(()=>!!_.meta||!!v.meta),b=(0,o.computed)(()=>!!_.info||!!v.actions),x=(0,o.inject)(e.t,null),S=r.useStableId(_),C=(0,o.computed)(()=>x?.headingLevel?.value??3),w=(0,o.computed)(()=>S),T=(0,o.ref)(null),E=(0,o.computed)(()=>x?.open.value.includes(w.value)??!1);x&&(0,o.onBeforeUnmount)(x.register(w.value,()=>T.value));function D(){_.disabled||x?.toggle(w.value)}let O={ArrowUp:`prev`,ArrowDown:`next`,Home:`first`,End:`last`};function k(e){let t=O[e.key];!t||!x||(e.preventDefault(),x.focusSibling(w.value,t))}return(e,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)([`nb-accordion-item`,{"nb-accordion-item--open":E.value,"nb-accordion-item--disabled":t.disabled}])},[(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)([`nb-accordion-item__heading`,{"nb-accordion-item__heading--aside":b.value}]),role:`heading`,"aria-level":C.value},[(0,o.createElementVNode)(`button`,{id:`${w.value}-header`,ref_key:`headerRef`,ref:T,type:`button`,class:`nb-accordion-item__header`,"aria-expanded":E.value,"aria-controls":`${w.value}-panel`,"aria-describedby":b.value&&y.value?`${w.value}-meta`:void 0,disabled:t.disabled,onClick:D,onKeydown:k},[(0,o.createVNode)(n.t,{class:`nb-accordion-item__chevron`,name:(0,o.unref)(s.regular),size:16,"aria-hidden":`true`},null,8,[`name`]),t.icon?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,name:t.icon,size:16},null,8,[`name`])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`span`,u,[(0,o.renderSlot)(e.$slots,`title`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.title),1)],!0)]),!b.value&&y.value?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,d,[(0,o.renderSlot)(e.$slots,`meta`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.meta),1)],!0)])):(0,o.createCommentVNode)(``,!0)],40,l),b.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[t.info?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:0,class:`nb-accordion-item__info`,text:t.info,size:16,label:(0,o.unref)(g).accordionAbout(t.title??``)},null,8,[`text`,`label`])):(0,o.createCommentVNode)(``,!0),r[0]||=(0,o.createElementVNode)(`span`,{class:`nb-accordion-item__spacer`,"aria-hidden":`true`},null,-1),y.value?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,{key:1,id:`${w.value}-meta`,class:`nb-accordion-item__meta nb-accordion-item__meta--raised`,onClick:D},[(0,o.renderSlot)(e.$slots,`meta`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.meta),1)],!0)],8,f)):(0,o.createCommentVNode)(``,!0),e.$slots.actions?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,p,[(0,o.renderSlot)(e.$slots,`actions`,{},void 0,!0)])):(0,o.createCommentVNode)(``,!0)],64)):(0,o.createCommentVNode)(``,!0)],10,c),(0,o.createElementVNode)(`div`,{id:`${w.value}-panel`,class:`nb-accordion-item__panel`,role:`region`,"aria-labelledby":`${w.value}-header`,hidden:!E.value,inert:!E.value||void 0},[(0,o.createElementVNode)(`div`,h,[(0,o.renderSlot)(e.$slots,`default`,{},void 0,!0)])],8,m)],2))}}),_=t.t(g,[[`__scopeId`,`data-v-ef81ad74`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./Button-DmJ_J3UO.js";
|
|
|
2
2
|
import { usePhoneLayout as t } from "./composables/usePhoneLayout.composable.mjs";
|
|
3
3
|
import { useNbStrings as n } from "./composables/useNbStrings.composable.mjs";
|
|
4
4
|
import { t as r } from "./Toolbar.context-Bli1SqM3.js";
|
|
5
|
-
import { t as i } from "./OverflowMenu-
|
|
5
|
+
import { t as i } from "./OverflowMenu-DliuDrTK.js";
|
|
6
6
|
import { hasSlotContent as a } from "./utils/slotContent.helper.mjs";
|
|
7
7
|
import { fitActions as o } from "./utils/actionFit.helper.mjs";
|
|
8
8
|
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createTextVNode as f, defineComponent as p, inject as m, nextTick as h, normalizeClass as g, onBeforeUnmount as _, onMounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, useSlots as w, watch as T, withCtx as E } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./composables/usePhoneLayout.composable.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),r=require(`./Toolbar.context-D3Uj5o0_.cjs`),i=require(`./OverflowMenu-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./composables/usePhoneLayout.composable.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),r=require(`./Toolbar.context-D3Uj5o0_.cjs`),i=require(`./OverflowMenu-DuRgj1DU.cjs`),a=require(`./utils/slotContent.helper.cjs`),o=require(`./utils/actionFit.helper.cjs`);let s=require(`vue`);var c=(0,s.defineComponent)({__name:`ActionGroup`,props:{items:{},size:{default:void 0},overflow:{default:`never`},overflowLabel:{default:void 0},phoneVisible:{default:1}},emits:[`select`],setup(c,{emit:l}){let u=c,d=l,f=(0,s.useSlots)(),{phone:p}=t.usePhoneLayout(),m=n.useNbStrings(),h=(0,s.inject)(r.t,null),g=(0,s.computed)(()=>u.size??(h?void 0:`sm`)),_=(0,s.computed)(()=>[`nb-action-group`,{"nb-action-group--in-toolbar":!!h,"nb-action-group--auto":u.overflow===`auto`&&!p.value}]),v=(0,s.ref)(null),y=(0,s.ref)(new Map),b=(0,s.ref)(null),x=(0,s.computed)(()=>u.overflow===`auto`&&!p.value&&b.value===null);function S(){let e=v.value;if(!e)return;let t=new Map;e.querySelectorAll(`[data-action-id]`).forEach(e=>t.set(e.dataset.actionId,e.offsetWidth)),y.value=t}function C(){let e=v.value;if(!e||u.overflow!==`auto`||p.value)return;b.value===null&&S();let t=u.items.map(e=>y.value.get(e.id)??0),n=getComputedStyle(e),r=parseFloat(n.columnGap)||0,i=e.querySelector(`.nb-button`)?.offsetHeight??0;b.value=o.fitActions(t,e.clientWidth,i,r)}let w;function T(){w?.disconnect(),w=void 0,!(u.overflow!==`auto`||!v.value||typeof ResizeObserver>`u`)&&(w=new ResizeObserver(()=>C()),w.observe(v.value))}(0,s.onMounted)(T),(0,s.onBeforeUnmount)(()=>w?.disconnect()),(0,s.watch)(()=>[u.overflow,p.value,u.items.map(e=>e.id).join()],async()=>{b.value=null,await(0,s.nextTick)(),T(),C()});let E=(0,s.computed)(()=>u.overflow===`never`?!1:u.overflow===`always`||p.value?!0:u.overflow===`auto`?b.value!==null&&b.value<u.items.length:!1),D=(0,s.computed)(()=>{if(u.overflow===`auto`&&!p.value)return u.items.slice(0,b.value??u.items.length);let e=Math.max(0,u.phoneVisible),t=u.items.filter(e=>e.priority===`primary`);return(t.length?t:u.items).slice(0,e)}),O=(0,s.computed)(()=>E.value?D.value:u.items),k=(0,s.computed)(()=>u.items.filter(e=>!D.value.includes(e))),A=(0,s.computed)(()=>k.value.length>0||a.hasSlotContent(f,`menu`)),j=(0,s.computed)(()=>u.overflowLabel??m.value.overflowMenuLabel);function M(e){return e.icon?!!e.iconOnly||E.value&&p.value:!1}function N(e){return e.variant??(e.danger?`danger`:void 0)}function P(e){e.disabled||e.loading||(e.onSelect?.(),d(`select`,e.id))}return(t,n)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{ref_key:`rootRef`,ref:v,class:(0,s.normalizeClass)(_.value)},[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(O.value,t=>((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:t.id},[M(t)?((0,s.openBlock)(),(0,s.createBlock)(e.t,{key:0,variant:N(t),outlined:t.outlined,size:g.value,disabled:t.disabled,loading:t.loading,icon:t.icon,label:t.label,"disabled-reason":t.disabledReason,pressed:t.pressed,"data-action-id":x.value?t.id:void 0,onClick:e=>P(t)},null,8,[`variant`,`outlined`,`size`,`disabled`,`loading`,`icon`,`label`,`disabled-reason`,`pressed`,`data-action-id`,`onClick`])):((0,s.openBlock)(),(0,s.createBlock)(e.t,{key:1,variant:N(t),outlined:t.outlined,size:g.value,disabled:t.disabled,loading:t.loading,icon:t.icon,"disabled-reason":t.disabledReason,pressed:t.pressed,"data-action-id":x.value?t.id:void 0,onClick:e=>P(t)},{default:(0,s.withCtx)(()=>[(0,s.createTextVNode)((0,s.toDisplayString)(t.label),1)]),_:2},1032,[`variant`,`outlined`,`size`,`disabled`,`loading`,`icon`,`disabled-reason`,`pressed`,`data-action-id`,`onClick`]))],64))),128)),E.value&&A.value?((0,s.openBlock)(),(0,s.createBlock)(i.t,{key:0,class:`nb-action-group__more`,items:k.value,label:j.value,size:g.value,onSelect:n[0]||=e=>d(`select`,e)},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(t.$slots,`menu`)]),_:3},8,[`items`,`label`,`size`])):(0,s.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
|
+
import { useTeleportReady as t } from "./composables/useTeleportReady.composable.mjs";
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
4
|
+
import { t as r } from "./Icon-B2tiGiqZ.js";
|
|
5
|
+
import { useStableId as i } from "./composables/useStableId.composable.mjs";
|
|
6
|
+
import { useSurfaceLayer as ee } from "./composables/useSurfaceLayer.composable.mjs";
|
|
7
|
+
import { usePhoneLayout as a } from "./composables/usePhoneLayout.composable.mjs";
|
|
8
|
+
import { placeAnchored as o, viewportSize as te } from "./utils/anchorPosition.helper.mjs";
|
|
9
|
+
import { Fragment as ne, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, defineComponent as m, mergeProps as h, nextTick as g, onBeforeUnmount as _, openBlock as v, ref as y, renderSlot as b, resolveDynamicComponent as re, toDisplayString as x, unref as S, useAttrs as ie, useSlots as ae, watch as C, withCtx as w } from "vue";
|
|
10
|
+
import * as oe from "@nubisco/ui/icons/arrow-counter-clockwise";
|
|
11
|
+
//#region src/components/AiLabel.d.ts
|
|
12
|
+
var T = /* @__PURE__ */ function(e) {
|
|
13
|
+
return e.Default = "default", e.Inline = "inline", e;
|
|
14
|
+
}(T || {}), E = /* @__PURE__ */ function(e) {
|
|
15
|
+
return e.Small = "sm", e.Medium = "md", e.Large = "lg", e;
|
|
16
|
+
}(E || {}), D = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "nb-ai-label--dot",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}, O = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "nb-ai-label--text",
|
|
23
|
+
"aria-hidden": "true"
|
|
24
|
+
}, se = {
|
|
25
|
+
key: 2,
|
|
26
|
+
class: "nb-ai-label--glyph",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
viewBox: "0 0 256 256",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}, ce = ["aria-label"], le = { class: "nb-ai-label--content" }, ue = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "nb-ai-label--actions"
|
|
33
|
+
}, de = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", k = /* @__PURE__ */ n(/* @__PURE__ */ m({
|
|
34
|
+
__name: "AiLabel",
|
|
35
|
+
props: {
|
|
36
|
+
variant: { default: T.Default },
|
|
37
|
+
size: { default: E.Medium },
|
|
38
|
+
static: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
label: { default: void 0 },
|
|
43
|
+
text: { default: void 0 },
|
|
44
|
+
explain: { default: void 0 },
|
|
45
|
+
placement: { default: "bottom" },
|
|
46
|
+
teleportTo: { default: "body" },
|
|
47
|
+
revertable: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
revertLabel: { default: void 0 },
|
|
52
|
+
plainAvailable: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
showPlainLabel: { default: void 0 }
|
|
57
|
+
},
|
|
58
|
+
emits: [
|
|
59
|
+
"open",
|
|
60
|
+
"close",
|
|
61
|
+
"revert",
|
|
62
|
+
"show-plain"
|
|
63
|
+
],
|
|
64
|
+
setup(n, { expose: m, emit: E }) {
|
|
65
|
+
let k = t(), A = n, j = E, M = ae(), N = ie(), P = {
|
|
66
|
+
control: "AI, show information",
|
|
67
|
+
mark: "Written by AI",
|
|
68
|
+
text: "AI",
|
|
69
|
+
dialog: "About this AI content",
|
|
70
|
+
revert: "Revert to AI input",
|
|
71
|
+
showPlain: "Show the plain version"
|
|
72
|
+
};
|
|
73
|
+
function F(e) {
|
|
74
|
+
return {
|
|
75
|
+
control: A.label,
|
|
76
|
+
mark: A.label,
|
|
77
|
+
text: A.text,
|
|
78
|
+
revert: A.revertLabel,
|
|
79
|
+
showPlain: A.showPlainLabel
|
|
80
|
+
}[e] ?? P[e];
|
|
81
|
+
}
|
|
82
|
+
let I = c(() => !A.static && !A.revertable && !!(M.explain || M.actions || A.explain || A.plainAvailable)), L = c(() => !A.static && A.revertable), R = c(() => I.value || L.value || !A.static && !!N.onClick), z = `${i({})}-explain`, B = c(() => R.value ? L.value ? {
|
|
83
|
+
type: "button",
|
|
84
|
+
"aria-label": F("revert")
|
|
85
|
+
} : {
|
|
86
|
+
type: "button",
|
|
87
|
+
"aria-label": F("control"),
|
|
88
|
+
...I.value && {
|
|
89
|
+
"aria-expanded": K.value ? "true" : "false",
|
|
90
|
+
"aria-controls": z
|
|
91
|
+
}
|
|
92
|
+
} : {
|
|
93
|
+
role: "img",
|
|
94
|
+
"aria-label": F("mark")
|
|
95
|
+
}), V = c(() => ({
|
|
96
|
+
"nb-ai-label": !0,
|
|
97
|
+
[`nb-ai-label__${A.variant}`]: !0,
|
|
98
|
+
[`nb-ai-label__${A.size}`]: !0,
|
|
99
|
+
"nb-ai-label__static": !R.value,
|
|
100
|
+
"nb-ai-label__reverting": L.value,
|
|
101
|
+
"nb-ai-label__open": K.value
|
|
102
|
+
})), H = c(() => ({
|
|
103
|
+
sm: 12,
|
|
104
|
+
md: 16,
|
|
105
|
+
lg: 20
|
|
106
|
+
})[A.size] ?? 16), { layerProps: fe } = ee({ overlay: !0 }), { phone: U } = a(), W = y(null), G = y(null), K = y(!1), q = y(A.placement), J = y({
|
|
107
|
+
top: 0,
|
|
108
|
+
left: 0
|
|
109
|
+
}), pe = c(() => ({
|
|
110
|
+
top: `${J.value.top}px`,
|
|
111
|
+
left: `${J.value.left}px`
|
|
112
|
+
}));
|
|
113
|
+
function Y() {
|
|
114
|
+
let e = W.value, t = G.value;
|
|
115
|
+
if (!e || !t || U.value) return;
|
|
116
|
+
let n = o(e.getBoundingClientRect(), {
|
|
117
|
+
width: t.offsetWidth,
|
|
118
|
+
height: t.offsetHeight
|
|
119
|
+
}, {
|
|
120
|
+
side: A.placement,
|
|
121
|
+
viewport: te()
|
|
122
|
+
});
|
|
123
|
+
q.value = n.side, J.value = {
|
|
124
|
+
top: n.top,
|
|
125
|
+
left: n.left
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function X() {
|
|
129
|
+
!I.value || K.value || (K.value = !0, j("open"), g(() => {
|
|
130
|
+
Y(), requestAnimationFrame(Y);
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
function Z(e = !1) {
|
|
134
|
+
K.value && (K.value = !1, j("close"), e && W.value?.focus());
|
|
135
|
+
}
|
|
136
|
+
function me() {
|
|
137
|
+
if (L.value) {
|
|
138
|
+
j("revert");
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
I.value && (K.value ? Z() : X());
|
|
142
|
+
}
|
|
143
|
+
function Q() {
|
|
144
|
+
return Array.from(G.value?.querySelectorAll(de) ?? []);
|
|
145
|
+
}
|
|
146
|
+
function he(e) {
|
|
147
|
+
if (K.value) {
|
|
148
|
+
if (e.key === "Escape") {
|
|
149
|
+
e.preventDefault(), Z(!0);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
e.key === "Tab" && !e.shiftKey && (e.preventDefault(), (Q()[0] ?? G.value)?.focus());
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function ge(e) {
|
|
156
|
+
if (e.key === "Escape") {
|
|
157
|
+
e.preventDefault(), e.stopPropagation(), Z(!0);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (e.key !== "Tab") return;
|
|
161
|
+
let t = Q(), n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
162
|
+
e.shiftKey && (i === n || i === G.value) ? (e.preventDefault(), W.value?.focus()) : !e.shiftKey && (i === r || !t.length) && (e.preventDefault(), Z(!0));
|
|
163
|
+
}
|
|
164
|
+
function _e(e) {
|
|
165
|
+
let t = e.relatedTarget;
|
|
166
|
+
t && (G.value?.contains(t) || W.value?.contains(t) || Z());
|
|
167
|
+
}
|
|
168
|
+
function ve() {
|
|
169
|
+
j("show-plain"), Z(!0);
|
|
170
|
+
}
|
|
171
|
+
function ye(e) {
|
|
172
|
+
let t = e.target;
|
|
173
|
+
t && (W.value?.contains(t) || G.value?.contains(t) || Z());
|
|
174
|
+
}
|
|
175
|
+
function be(e) {
|
|
176
|
+
U.value || G.value?.contains(e.target) || Y();
|
|
177
|
+
}
|
|
178
|
+
function $(e) {
|
|
179
|
+
if (typeof document > "u") return;
|
|
180
|
+
let t = e ? "addEventListener" : "removeEventListener";
|
|
181
|
+
document[t]("pointerdown", ye, !0), window[t]("resize", Y), window[t]("scroll", be, !0);
|
|
182
|
+
}
|
|
183
|
+
return C(K, (e) => $(e)), C(I, (e) => {
|
|
184
|
+
e || Z();
|
|
185
|
+
}), _(() => $(!1)), m({
|
|
186
|
+
open: X,
|
|
187
|
+
close: Z,
|
|
188
|
+
isOpen: K
|
|
189
|
+
}), (t, i) => (v(), l(re(R.value ? "button" : "span"), h({
|
|
190
|
+
ref_key: "rootRef",
|
|
191
|
+
ref: W,
|
|
192
|
+
class: V.value
|
|
193
|
+
}, B.value, {
|
|
194
|
+
onClick: me,
|
|
195
|
+
onKeydown: he
|
|
196
|
+
}), {
|
|
197
|
+
default: w(() => [L.value ? (v(), l(r, {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: "nb-ai-label--revert",
|
|
200
|
+
name: oe,
|
|
201
|
+
size: H.value,
|
|
202
|
+
weight: "regular"
|
|
203
|
+
}, null, 8, ["size"])) : (v(), d(ne, { key: 1 }, [n.variant === S(T).Inline ? (v(), d("span", D)) : u("", !0), n.variant === S(T).Inline && F("text") ? (v(), d("span", O, x(F("text")), 1)) : (v(), d("svg", se, [...i[1] ||= [f("path", {
|
|
204
|
+
d: "M 104.301 197.8 L 94.501 162.4 L 53.101 162.4 L 43.501 197.8 L 17.101 197.8 L 56.301 58.2 L 92.701 58.2 L 132.101 197.8 L 104.301 197.8 Z M 74.701 84 L 73.101 84 L 57.701 141 L 90.101 141 L 74.701 84 Z M 150.099 197.8 L 150.099 178.2 L 181.499 178.2 L 181.499 77.8 L 150.099 77.8 L 150.099 58.2 L 238.899 58.2 L 238.899 77.8 L 207.499 77.8 L 207.499 178.2 L 238.899 178.2 L 238.899 197.8 L 150.099 197.8 Z",
|
|
205
|
+
fill: "currentColor"
|
|
206
|
+
}, null, -1)]]))], 64)), I.value ? (v(), l(s, {
|
|
207
|
+
key: 2,
|
|
208
|
+
to: n.teleportTo,
|
|
209
|
+
disabled: !S(k)
|
|
210
|
+
}, [K.value && S(U) ? (v(), d("div", {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: "nb-ai-label--scrim",
|
|
213
|
+
"aria-hidden": "true",
|
|
214
|
+
onClick: i[0] ||= (e) => Z()
|
|
215
|
+
})) : u("", !0), K.value ? (v(), d("div", h({
|
|
216
|
+
key: 1,
|
|
217
|
+
id: z,
|
|
218
|
+
ref_key: "popoverRef",
|
|
219
|
+
ref: G,
|
|
220
|
+
role: "dialog",
|
|
221
|
+
"aria-label": F("dialog"),
|
|
222
|
+
tabindex: "-1",
|
|
223
|
+
class: ["nb-ai-label--popover", S(U) ? "nb-ai-label--popover-sheet" : `nb-ai-label--popover-${q.value}`]
|
|
224
|
+
}, S(fe), {
|
|
225
|
+
style: S(U) ? void 0 : pe.value,
|
|
226
|
+
onKeydown: ge,
|
|
227
|
+
onFocusout: _e
|
|
228
|
+
}), [f("div", le, [b(t.$slots, "explain", {}, () => [f("p", null, x(n.explain), 1)], !0)]), t.$slots.actions || n.plainAvailable ? (v(), d("div", ue, [b(t.$slots, "actions", {}, void 0, !0), n.plainAvailable ? (v(), l(e, {
|
|
229
|
+
key: 0,
|
|
230
|
+
variant: "ghost",
|
|
231
|
+
size: "sm",
|
|
232
|
+
onClick: ve
|
|
233
|
+
}, {
|
|
234
|
+
default: w(() => [p(x(F("showPlain")), 1)]),
|
|
235
|
+
_: 1
|
|
236
|
+
})) : u("", !0)])) : u("", !0)], 16, ce)) : u("", !0)], 8, ["to", "disabled"])) : u("", !0)]),
|
|
237
|
+
_: 3
|
|
238
|
+
}, 16, ["class"]));
|
|
239
|
+
}
|
|
240
|
+
}), [["__scopeId", "data-v-18743f01"]]);
|
|
241
|
+
//#endregion
|
|
242
|
+
export { E as n, T as r, k as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-CGIbF1e-.cjs`),n=require(`./composables/useTeleportReady.composable.cjs`),r=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),i=require(`./Icon-CssV4E2-.cjs`),a=require(`./composables/useStableId.composable.cjs`),o=require(`./composables/useSurfaceLayer.composable.cjs`),s=require(`./composables/usePhoneLayout.composable.cjs`),c=require(`./utils/anchorPosition.helper.cjs`);let l=require(`vue`),u=require(`@nubisco/ui/icons/arrow-counter-clockwise`);u=e.n(u);var d=function(e){return e.Default=`default`,e.Inline=`inline`,e}(d||{}),f=function(e){return e.Small=`sm`,e.Medium=`md`,e.Large=`lg`,e}(f||{}),p={key:0,class:`nb-ai-label--dot`,"aria-hidden":`true`},m={key:1,class:`nb-ai-label--text`,"aria-hidden":`true`},h={key:2,class:`nb-ai-label--glyph`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,"aria-hidden":`true`},g=[`aria-label`],_={class:`nb-ai-label--content`},v={key:0,class:`nb-ai-label--actions`},y=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,b=(0,l.defineComponent)({__name:`AiLabel`,props:{variant:{default:d.Default},size:{default:f.Medium},static:{type:Boolean,default:!1},label:{default:void 0},text:{default:void 0},explain:{default:void 0},placement:{default:`bottom`},teleportTo:{default:`body`},revertable:{type:Boolean,default:!1},revertLabel:{default:void 0},plainAvailable:{type:Boolean,default:!1},showPlainLabel:{default:void 0}},emits:[`open`,`close`,`revert`,`show-plain`],setup(e,{expose:r,emit:f}){let b=n.useTeleportReady(),x=e,S=f,C=(0,l.useSlots)(),w=(0,l.useAttrs)(),T={control:`AI, show information`,mark:`Written by AI`,text:`AI`,dialog:`About this AI content`,revert:`Revert to AI input`,showPlain:`Show the plain version`};function E(e){return{control:x.label,mark:x.label,text:x.text,revert:x.revertLabel,showPlain:x.showPlainLabel}[e]??T[e]}let D=(0,l.computed)(()=>!x.static&&!x.revertable&&!!(C.explain||C.actions||x.explain||x.plainAvailable)),O=(0,l.computed)(()=>!x.static&&x.revertable),k=(0,l.computed)(()=>D.value||O.value||!x.static&&!!w.onClick),A=`${a.useStableId({})}-explain`,j=(0,l.computed)(()=>k.value?O.value?{type:`button`,"aria-label":E(`revert`)}:{type:`button`,"aria-label":E(`control`),...D.value&&{"aria-expanded":R.value?`true`:`false`,"aria-controls":A}}:{role:`img`,"aria-label":E(`mark`)}),M=(0,l.computed)(()=>({"nb-ai-label":!0,[`nb-ai-label__${x.variant}`]:!0,[`nb-ai-label__${x.size}`]:!0,"nb-ai-label__static":!k.value,"nb-ai-label__reverting":O.value,"nb-ai-label__open":R.value})),N=(0,l.computed)(()=>({sm:12,md:16,lg:20})[x.size]??16),{layerProps:P}=o.useSurfaceLayer({overlay:!0}),{phone:F}=s.usePhoneLayout(),I=(0,l.ref)(null),L=(0,l.ref)(null),R=(0,l.ref)(!1),z=(0,l.ref)(x.placement),B=(0,l.ref)({top:0,left:0}),V=(0,l.computed)(()=>({top:`${B.value.top}px`,left:`${B.value.left}px`}));function H(){let e=I.value,t=L.value;if(!e||!t||F.value)return;let n=c.placeAnchored(e.getBoundingClientRect(),{width:t.offsetWidth,height:t.offsetHeight},{side:x.placement,viewport:c.viewportSize()});z.value=n.side,B.value={top:n.top,left:n.left}}function U(){!D.value||R.value||(R.value=!0,S(`open`),(0,l.nextTick)(()=>{H(),requestAnimationFrame(H)}))}function W(e=!1){R.value&&(R.value=!1,S(`close`),e&&I.value?.focus())}function G(){if(O.value){S(`revert`);return}D.value&&(R.value?W():U())}function K(){return Array.from(L.value?.querySelectorAll(y)??[])}function q(e){if(R.value){if(e.key===`Escape`){e.preventDefault(),W(!0);return}e.key===`Tab`&&!e.shiftKey&&(e.preventDefault(),(K()[0]??L.value)?.focus())}}function J(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),W(!0);return}if(e.key!==`Tab`)return;let t=K(),n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||i===L.value)?(e.preventDefault(),I.value?.focus()):!e.shiftKey&&(i===r||!t.length)&&(e.preventDefault(),W(!0))}function Y(e){let t=e.relatedTarget;t&&(L.value?.contains(t)||I.value?.contains(t)||W())}function X(){S(`show-plain`),W(!0)}function Z(e){let t=e.target;t&&(I.value?.contains(t)||L.value?.contains(t)||W())}function Q(e){F.value||L.value?.contains(e.target)||H()}function $(e){if(typeof document>`u`)return;let t=e?`addEventListener`:`removeEventListener`;document[t](`pointerdown`,Z,!0),window[t](`resize`,H),window[t](`scroll`,Q,!0)}return(0,l.watch)(R,e=>$(e)),(0,l.watch)(D,e=>{e||W()}),(0,l.onBeforeUnmount)(()=>$(!1)),r({open:U,close:W,isOpen:R}),(n,r)=>((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(k.value?`button`:`span`),(0,l.mergeProps)({ref_key:`rootRef`,ref:I,class:M.value},j.value,{onClick:G,onKeydown:q}),{default:(0,l.withCtx)(()=>[O.value?((0,l.openBlock)(),(0,l.createBlock)(i.t,{key:0,class:`nb-ai-label--revert`,name:u,size:N.value,weight:`regular`},null,8,[`size`])):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[e.variant===(0,l.unref)(d).Inline?((0,l.openBlock)(),(0,l.createElementBlock)(`span`,p)):(0,l.createCommentVNode)(``,!0),e.variant===(0,l.unref)(d).Inline&&E(`text`)?((0,l.openBlock)(),(0,l.createElementBlock)(`span`,m,(0,l.toDisplayString)(E(`text`)),1)):((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,h,[...r[1]||=[(0,l.createElementVNode)(`path`,{d:`M 104.301 197.8 L 94.501 162.4 L 53.101 162.4 L 43.501 197.8 L 17.101 197.8 L 56.301 58.2 L 92.701 58.2 L 132.101 197.8 L 104.301 197.8 Z M 74.701 84 L 73.101 84 L 57.701 141 L 90.101 141 L 74.701 84 Z M 150.099 197.8 L 150.099 178.2 L 181.499 178.2 L 181.499 77.8 L 150.099 77.8 L 150.099 58.2 L 238.899 58.2 L 238.899 77.8 L 207.499 77.8 L 207.499 178.2 L 238.899 178.2 L 238.899 197.8 L 150.099 197.8 Z`,fill:`currentColor`},null,-1)]]))],64)),D.value?((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{key:2,to:e.teleportTo,disabled:!(0,l.unref)(b)},[R.value&&(0,l.unref)(F)?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`nb-ai-label--scrim`,"aria-hidden":`true`,onClick:r[0]||=e=>W()})):(0,l.createCommentVNode)(``,!0),R.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,(0,l.mergeProps)({key:1,id:A,ref_key:`popoverRef`,ref:L,role:`dialog`,"aria-label":E(`dialog`),tabindex:`-1`,class:[`nb-ai-label--popover`,(0,l.unref)(F)?`nb-ai-label--popover-sheet`:`nb-ai-label--popover-${z.value}`]},(0,l.unref)(P),{style:(0,l.unref)(F)?void 0:V.value,onKeydown:J,onFocusout:Y}),[(0,l.createElementVNode)(`div`,_,[(0,l.renderSlot)(n.$slots,`explain`,{},()=>[(0,l.createElementVNode)(`p`,null,(0,l.toDisplayString)(e.explain),1)],!0)]),n.$slots.actions||e.plainAvailable?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,v,[(0,l.renderSlot)(n.$slots,`actions`,{},void 0,!0),e.plainAvailable?((0,l.openBlock)(),(0,l.createBlock)(t.t,{key:0,variant:`ghost`,size:`sm`,onClick:X},{default:(0,l.withCtx)(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(E(`showPlain`)),1)]),_:1})):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0)],16,g)):(0,l.createCommentVNode)(``,!0)],8,[`to`,`disabled`])):(0,l.createCommentVNode)(``,!0)]),_:3},16,[`class`]))}}),x=r.t(b,[[`__scopeId`,`data-v-18743f01`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./TextInput-SJ34hD2Y.cjs`),n=require(`./AiLabel-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./TextInput-SJ34hD2Y.cjs`),n=require(`./AiLabel-jRrBTu6c.cjs`),r=require(`./Field-AXSzk3l3.cjs`),i=require(`./Panel-BKASZF-B.cjs`),a=require(`./Select-CJqwMI69.cjs`);let o=require(`vue`);var s={class:`nb-ai-provider__header`},c={class:`nb-ai-provider__title`},l={key:0,class:`nb-ai-provider__description`},u={class:`nb-ai-provider__row`},d={class:`nb-ai-provider__actions`},f=(0,o.defineComponent)({__name:`AiProvider`,props:{title:{default:`AI briefings`},providers:{default:()=>[{label:`Anthropic (Claude)`,value:`anthropic`},{label:`OpenAI`,value:`openai`},{label:`Google Gemini`,value:`gemini`}]},provider:{default:`anthropic`},model:{default:``},apiKey:{default:``},defaultModels:{default:()=>({})},hasKey:{type:Boolean,default:!1},busy:{type:Boolean,default:!1}},emits:[`update:provider`,`update:model`,`update:apiKey`,`save`,`remove`],setup(f,{emit:p}){let m=p;return(p,h)=>((0,o.openBlock)(),(0,o.createBlock)(i.t,{class:`nb-ai-provider`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`header`,s,[(0,o.createElementVNode)(`h2`,c,[(0,o.createTextVNode)((0,o.toDisplayString)(f.title)+` `,1),(0,o.createVNode)(n.t,{static:``,size:`sm`})]),p.$slots.default?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,l,[(0,o.renderSlot)(p.$slots,`default`)])):(0,o.createCommentVNode)(``,!0)]),(0,o.createElementVNode)(`div`,u,[(0,o.createVNode)(r.t,{label:`Provider`,orientation:`stack`},{default:(0,o.withCtx)(({id:e})=>[(0,o.createVNode)(a.t,{id:e,"model-value":f.provider,options:f.providers,disabled:f.busy,"onUpdate:modelValue":h[0]||=e=>m(`update:provider`,String(e))},null,8,[`id`,`model-value`,`options`,`disabled`])]),_:1}),(0,o.createVNode)(r.t,{label:`Model`,hint:`Empty uses the provider's default.`,orientation:`stack`},{default:(0,o.withCtx)(({id:e})=>[(0,o.createVNode)(t.t,{id:e,"model-value":f.model,placeholder:f.defaultModels[f.provider]??``,disabled:f.busy,"onUpdate:modelValue":h[1]||=e=>m(`update:model`,String(e??``))},null,8,[`id`,`model-value`,`placeholder`,`disabled`])]),_:1})]),(0,o.createVNode)(r.t,{label:`API key`,hint:`Encrypted at rest and never sent back to the browser, so this field is always empty when the page loads.`,orientation:`stack`},{default:(0,o.withCtx)(({id:e})=>[(0,o.createVNode)(t.t,{id:e,"model-value":f.apiKey,type:`password`,autocomplete:`off`,placeholder:f.hasKey?`Stored. Type a new key to replace it.`:`sk-...`,disabled:f.busy,"onUpdate:modelValue":h[2]||=e=>m(`update:apiKey`,String(e??``))},null,8,[`id`,`model-value`,`placeholder`,`disabled`])]),_:1}),(0,o.createElementVNode)(`div`,d,[(0,o.createVNode)(e.t,{variant:`primary`,loading:f.busy,onClick:h[3]||=e=>m(`save`)},{default:(0,o.withCtx)(()=>[...h[5]||=[(0,o.createTextVNode)(` Save AI settings `,-1)]]),_:1},8,[`loading`]),f.hasKey?((0,o.openBlock)(),(0,o.createBlock)(e.t,{key:0,variant:`ghost`,disabled:f.busy,onClick:h[4]||=e=>m(`remove`)},{default:(0,o.withCtx)(()=>[...h[6]||=[(0,o.createTextVNode)(` Remove key `,-1)]]),_:1},8,[`disabled`])):(0,o.createCommentVNode)(``,!0)])]),_:3}))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { t } from "./TextInput-BeqDf1R7.js";
|
|
3
|
-
import { t as n } from "./AiLabel-
|
|
3
|
+
import { t as n } from "./AiLabel-BDccQ2iQ.js";
|
|
4
4
|
import { t as r } from "./Field-B8wNroAI.js";
|
|
5
5
|
import { t as i } from "./Panel-4itscCsS.js";
|
|
6
|
-
import { t as a } from "./Select-
|
|
6
|
+
import { t as a } from "./Select-CDs-7QtW.js";
|
|
7
7
|
import { createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, openBlock as p, renderSlot as m, toDisplayString as h, withCtx as g } from "vue";
|
|
8
8
|
//#region src/components/AiProvider.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var _ = { class: "nb-ai-provider__header" }, v = { class: "nb-ai-provider__title" }, y = {
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./Button-DmJ_J3UO.js";
|
|
|
2
2
|
import { usePhoneLayout as t } from "./composables/usePhoneLayout.composable.mjs";
|
|
3
3
|
import { useNbStrings as n } from "./composables/useNbStrings.composable.mjs";
|
|
4
4
|
import { t as r } from "./Toolbar.context-Bli1SqM3.js";
|
|
5
|
-
import { t as i } from "./OverflowMenu-
|
|
5
|
+
import { t as i } from "./OverflowMenu-DliuDrTK.js";
|
|
6
6
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, provide as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
7
7
|
import { regular as x } from "@nubisco/ui/icons/x";
|
|
8
8
|
//#region src/components/BatchActions.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./composables/usePhoneLayout.composable.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),r=require(`./Toolbar.context-D3Uj5o0_.cjs`),i=require(`./OverflowMenu-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./composables/usePhoneLayout.composable.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),r=require(`./Toolbar.context-D3Uj5o0_.cjs`),i=require(`./OverflowMenu-DuRgj1DU.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/x`);var s=[`aria-label`],c={class:`nb-batch-actions__count`,"aria-live":`polite`},l={class:`nb-batch-actions__actions`},u=(0,a.defineComponent)({__name:`BatchActions`,props:{count:{},items:{default:()=>[]},variant:{default:`overlay`},size:{default:void 0},cancelLabel:{default:void 0},label:{default:void 0}},emits:[`cancel`,`select`],setup(u,{emit:d}){let f=u,p=d,m=n.useNbStrings(),{phone:h}=t.usePhoneLayout(),g=(0,a.computed)(()=>f.cancelLabel??m.value.batchActionsCancel);(0,a.provide)(r.t,{size:(0,a.computed)(()=>f.size??(f.variant===`overlay`?`lg`:`sm`)),flush:(0,a.computed)(()=>f.variant===`overlay`)});function _(e){e.disabled||e.loading||(e.onSelect?.(),p(`select`,e.id))}return(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`nb-batch-actions`,`nb-batch-actions--${u.variant}`,{"nb-batch-actions--phone":(0,a.unref)(h)}]),role:`region`,"aria-label":u.label??(0,a.unref)(m).batchActionsLabel},[(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)((0,a.unref)(m).selectionCount(u.count)),1),(0,a.createElementVNode)(`div`,l,[u.items?.length?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:0},[(0,a.unref)(h)?((0,a.openBlock)(),(0,a.createBlock)(i.t,{key:0,class:`nb-batch-actions__more`,items:u.items,onSelect:n[0]||=e=>p(`select`,e)},null,8,[`items`])):((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,{key:1},(0,a.renderList)(u.items,t=>((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:t.id,variant:`ghost`,icon:t.icon,disabled:t.disabled,"disabled-reason":t.disabledReason,loading:t.loading,onClick:e=>_(t)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.label),1)]),_:2},1032,[`icon`,`disabled`,`disabled-reason`,`loading`,`onClick`]))),128))],64)):(0,a.createCommentVNode)(``,!0),(0,a.renderSlot)(t.$slots,`default`,{phone:(0,a.unref)(h)})]),(0,a.unref)(h)?((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:0,class:`nb-batch-actions__cancel`,variant:`ghost`,icon:(0,a.unref)(o.regular),label:g.value,"tooltip-position":`top`,onClick:n[1]||=e=>p(`cancel`)},null,8,[`icon`,`label`])):((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:1,class:`nb-batch-actions__cancel`,variant:`ghost`,onClick:n[2]||=e=>p(`cancel`)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(g.value),1)]),_:1}))],10,s))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|