@adyen/bento-vue3 1.52.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/index.d.ts +474 -75
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/dashed-underline.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-with-views.css +1 -0
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid-item-custom.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.eo5EXYmg.js → action-bar.PIz6tShf.js} +4 -4
- package/dist/chunks/{action-bar.eo5EXYmg.js.map → action-bar.PIz6tShf.js.map} +1 -1
- package/dist/chunks/{base-modal.BlC6TZNz.js → base-modal.D4INiJGX.js} +3 -3
- package/dist/chunks/{base-modal.BlC6TZNz.js.map → base-modal.D4INiJGX.js.map} +1 -1
- package/dist/chunks/bin.CA6UQCNZ.js +37 -0
- package/dist/chunks/bin.CA6UQCNZ.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.DQaq1bkf.js → button-actions-with-menu.DFD7gbdT.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.DQaq1bkf.js.map → button-actions-with-menu.DFD7gbdT.js.map} +1 -1
- package/dist/chunks/{calendar.D2X834TU.js → calendar.DKHNrb9_.js} +2 -2
- package/dist/chunks/{calendar.D2X834TU.js.map → calendar.DKHNrb9_.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BVJfN48k.js → checkbox-group.X2fi2jkS.js} +4 -4
- package/dist/chunks/{checkbox-group.BVJfN48k.js.map → checkbox-group.X2fi2jkS.js.map} +1 -1
- package/dist/chunks/{checkbox.erdZ58Kk.js → checkbox.CXZQtFhM.js} +81 -74
- package/dist/chunks/checkbox.CXZQtFhM.js.map +1 -0
- package/dist/chunks/{click-outside.DSszkIvs.js → click-outside.C1Ud8AA2.js} +2 -2
- package/dist/chunks/{click-outside.DSszkIvs.js.map → click-outside.C1Ud8AA2.js.map} +1 -1
- package/dist/chunks/{code-snippet.Bb4_r0C8.js → code-snippet.CcdsPxT7.js} +5 -5
- package/dist/chunks/{code-snippet.Bb4_r0C8.js.map → code-snippet.CcdsPxT7.js.map} +1 -1
- package/dist/chunks/{controls-group.BaDhGB9H.js → controls-group.ClMNznTz.js} +2 -2
- package/dist/chunks/{controls-group.BaDhGB9H.js.map → controls-group.ClMNznTz.js.map} +1 -1
- package/dist/chunks/{copy.gmSTAqHY.js → copy.BYG9aoNO.js} +2 -2
- package/dist/chunks/{copy.gmSTAqHY.js.map → copy.BYG9aoNO.js.map} +1 -1
- package/dist/chunks/{dashboard-section.MAHmbUDG.js → dashboard-section.Dz9GpOvy.js} +3 -3
- package/dist/chunks/{dashboard-section.MAHmbUDG.js.map → dashboard-section.Dz9GpOvy.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DY8xR9GH.js → dashed-underline.BuCIjMch.js} +11 -11
- package/dist/chunks/{dashed-underline.DY8xR9GH.js.map → dashed-underline.BuCIjMch.js.map} +1 -1
- package/dist/chunks/{data-grid-template.Dievz913.js → data-grid-template.B4jxtwoW.js} +2 -2
- package/dist/chunks/{data-grid-template.Dievz913.js.map → data-grid-template.B4jxtwoW.js.map} +1 -1
- package/dist/chunks/{data-grid.KZqjmRvk.js → data-grid.CLu8mvil.js} +29 -17
- package/dist/chunks/data-grid.CLu8mvil.js.map +1 -0
- package/dist/chunks/{date-picker.BWJYkSmo.js → date-picker.CA2i6QxD.js} +17 -17
- package/dist/chunks/{date-picker.BWJYkSmo.js.map → date-picker.CA2i6QxD.js.map} +1 -1
- package/dist/chunks/{date-range-picker.1Vbf9Zk8.js → date-range-picker.DVQ-j-JX.js} +25 -25
- package/dist/chunks/{date-range-picker.1Vbf9Zk8.js.map → date-range-picker.DVQ-j-JX.js.map} +1 -1
- package/dist/chunks/{directive.O3yEdalv.js → directive.Cbdox5VL.js} +2 -2
- package/dist/chunks/{directive.O3yEdalv.js.map → directive.Cbdox5VL.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.C9nM0YHC.js → dropdown-tag.DFWV7Zj_.js} +3 -3
- package/dist/chunks/{dropdown-tag.C9nM0YHC.js.map → dropdown-tag.DFWV7Zj_.js.map} +1 -1
- package/dist/chunks/{dropdown.qw5oXFYs.js → dropdown.RVt9T6j5.js} +115 -105
- package/dist/chunks/dropdown.RVt9T6j5.js.map +1 -0
- package/dist/chunks/{error-message.DAjisbU1.js → error-message.BQ5MlnLg.js} +2 -2
- package/dist/chunks/{error-message.DAjisbU1.js.map → error-message.BQ5MlnLg.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.BLJpDgAZ.js → file-uploader.DJLGEmtF.js} +464 -475
- package/dist/chunks/file-uploader.DJLGEmtF.js.map +1 -0
- package/dist/chunks/{filter-bar.DYrXBQDF.js → filter-bar.GGHRoo6O.js} +492 -486
- package/dist/chunks/filter-bar.GGHRoo6O.js.map +1 -0
- package/dist/chunks/{focus-trap.DMgm-9f7.js → focus-trap.D-HSKa_Q.js} +2 -2
- package/dist/chunks/{focus-trap.DMgm-9f7.js.map → focus-trap.D-HSKa_Q.js.map} +1 -1
- package/dist/chunks/header-with-views.BkcFu7QW.js +2354 -0
- package/dist/chunks/header-with-views.BkcFu7QW.js.map +1 -0
- package/dist/chunks/{header.BASKzNwu.js → header.CyTcPWF4.js} +3 -3
- package/dist/chunks/{header.BASKzNwu.js.map → header.CyTcPWF4.js.map} +1 -1
- package/dist/chunks/index.C5sL_d0I.js +386 -0
- package/dist/chunks/{index.CMGT-6mh.js.map → index.C5sL_d0I.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.BJccyOFx.js → info-icon-with-popover.DgZh2mnN.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.BJccyOFx.js.map → info-icon-with-popover.DgZh2mnN.js.map} +1 -1
- package/dist/chunks/{info-icon.L8AexnZg.js → info-icon.DxOAiUg4.js} +2 -2
- package/dist/chunks/{info-icon.L8AexnZg.js.map → info-icon.DxOAiUg4.js.map} +1 -1
- package/dist/chunks/{input-field-password.CZNUHo6s.js → input-field-password.BSJMbPHf.js} +94 -90
- package/dist/chunks/input-field-password.BSJMbPHf.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.D1zlBh3R.js → input-field-phone-number.BtRMkC84.js} +3 -3
- package/dist/chunks/{input-field-phone-number.D1zlBh3R.js.map → input-field-phone-number.BtRMkC84.js.map} +1 -1
- package/dist/chunks/{input-field.DqMdqM2u.js → input-field.CRlXtS3z.js} +3 -3
- package/dist/chunks/{input-field.DqMdqM2u.js.map → input-field.CRlXtS3z.js.map} +1 -1
- package/dist/chunks/{inspector.types.Dwt3V80X.js → inspector.types.s0va--Nn.js} +3 -3
- package/dist/chunks/{inspector.types.Dwt3V80X.js.map → inspector.types.s0va--Nn.js.map} +1 -1
- package/dist/chunks/{layout-row.Drm_y8e3.js → layout-row.CwwbWO7s.js} +2 -2
- package/dist/chunks/{layout-row.Drm_y8e3.js.map → layout-row.CwwbWO7s.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.YSvtcy4P.js → listbox-option-tag.2k0hRv0z.js} +2 -2
- package/dist/chunks/{listbox-option-tag.YSvtcy4P.js.map → listbox-option-tag.2k0hRv0z.js.map} +1 -1
- package/dist/chunks/{menu.DfzP2nRU.js → menu.DBRBVdsd.js} +106 -105
- package/dist/chunks/menu.DBRBVdsd.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.T1x_vroe.js → modal-fullscreen.POY-6qYC.js} +2 -2
- package/dist/chunks/{modal-fullscreen.T1x_vroe.js.map → modal-fullscreen.POY-6qYC.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js → modal.vue_vue_type_script_setup_true_lang.CGV0E6eK.js} +2 -2
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js.map → modal.vue_vue_type_script_setup_true_lang.CGV0E6eK.js.map} +1 -1
- package/dist/chunks/{on-click-outside.MUWbmGDn.js → on-click-outside.D9aY9g8G.js} +3 -2
- package/dist/chunks/{on-click-outside.MUWbmGDn.js.map → on-click-outside.D9aY9g8G.js.map} +1 -1
- package/dist/chunks/{pagination.Bt8DNme-.js → pagination.TWtayPVy.js} +2 -2
- package/dist/chunks/{pagination.Bt8DNme-.js.map → pagination.TWtayPVy.js.map} +1 -1
- package/dist/chunks/{popover.COzLcAET.js → popover.BBnUL5Y_.js} +2 -2
- package/dist/chunks/{popover.COzLcAET.js.map → popover.BBnUL5Y_.js.map} +1 -1
- package/dist/chunks/{popper-container.CEtaux25.js → popper-container.Be3h7X17.js} +2 -2
- package/dist/chunks/{popper-container.CEtaux25.js.map → popper-container.Be3h7X17.js.map} +1 -1
- package/dist/chunks/{promo-banner.BCpw2tDD.js → promo-banner.BdaUFMsl.js} +2 -2
- package/dist/chunks/{promo-banner.BCpw2tDD.js.map → promo-banner.BdaUFMsl.js.map} +1 -1
- package/dist/chunks/{radio-group.rxg-4rF_.js → radio-group.BUazlUAi.js} +4 -4
- package/dist/chunks/{radio-group.rxg-4rF_.js.map → radio-group.BUazlUAi.js.map} +1 -1
- package/dist/chunks/{search-bar.DlihXfPt.js → search-bar.21CWuOHb.js} +3 -3
- package/dist/chunks/{search-bar.DlihXfPt.js.map → search-bar.21CWuOHb.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D2loVonk.js → secondary-nav.CUQi4Ybt.js} +3 -3
- package/dist/chunks/{secondary-nav.D2loVonk.js.map → secondary-nav.CUQi4Ybt.js.map} +1 -1
- package/dist/chunks/{segmented-control.Wn-miTIl.js → segmented-control.BZJ9DzRF.js} +2 -2
- package/dist/chunks/{segmented-control.Wn-miTIl.js.map → segmented-control.BZJ9DzRF.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CtQaeZFM.js → selection-card-group.Bdrx1b6M.js} +4 -4
- package/dist/chunks/{selection-card-group.CtQaeZFM.js.map → selection-card-group.Bdrx1b6M.js.map} +1 -1
- package/dist/chunks/{sidepanel.CjaHQEin.js → sidepanel.D_bGUcyi.js} +3 -3
- package/dist/chunks/{sidepanel.CjaHQEin.js.map → sidepanel.D_bGUcyi.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DAwADFpI.js → structured-list-item.r1jYiX6Y.js} +4 -4
- package/dist/chunks/{structured-list-item.DAwADFpI.js.map → structured-list-item.r1jYiX6Y.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.DTCzOBBy.js → summary-grid-item-custom.ACP0RH0N.js} +299 -198
- package/dist/chunks/summary-grid-item-custom.ACP0RH0N.js.map +1 -0
- package/dist/chunks/{tag.B1hW92hG.js → tag.DVkBzXMx.js} +2 -2
- package/dist/chunks/{tag.B1hW92hG.js.map → tag.DVkBzXMx.js.map} +1 -1
- package/dist/chunks/{teleport.B1NhF5-O.js → teleport.DfTpEQBR.js} +2 -2
- package/dist/chunks/{teleport.B1NhF5-O.js.map → teleport.DfTpEQBR.js.map} +1 -1
- package/dist/chunks/{textarea.DMA29yQA.js → textarea.C8R71Q4l.js} +2 -2
- package/dist/chunks/{textarea.DMA29yQA.js.map → textarea.C8R71Q4l.js.map} +1 -1
- package/dist/chunks/{timeline-item.kWg3dTy1.js → timeline-item.DBeAlt3N.js} +4 -4
- package/dist/chunks/{timeline-item.kWg3dTy1.js.map → timeline-item.DBeAlt3N.js.map} +1 -1
- package/dist/chunks/{tooltip.Y730-n-n.js → tooltip.Cbs_YIap.js} +2 -2
- package/dist/chunks/{tooltip.Y730-n-n.js.map → tooltip.Cbs_YIap.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js → tutorial.vue_vue_type_script_setup_true_lang.4smMvopK.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js.map → tutorial.vue_vue_type_script_setup_true_lang.4smMvopK.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DDP7LJoI.js → use-cached-selected-values.Chb18cq_.js} +145 -136
- package/dist/chunks/{use-cached-selected-values.DDP7LJoI.js.map → use-cached-selected-values.Chb18cq_.js.map} +1 -1
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +2 -2
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +5 -0
- package/dist/header-with-views.js.map +1 -0
- package/dist/header.js +1 -1
- package/dist/index.js +196 -194
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +10 -10
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +47 -1
- package/dist/styles/bento-light.css +47 -1
- package/dist/styles/bento.css +47 -1
- package/dist/styles/legacy.css +47 -1
- package/dist/styles/styleguide.css +47 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js +8300 -0
- package/dist/use-form-v4.js.map +1 -0
- package/dist/web-types.json +1 -1
- package/package.json +7 -6
- package/dist/chunks/checkbox.erdZ58Kk.js.map +0 -1
- package/dist/chunks/data-grid.KZqjmRvk.js.map +0 -1
- package/dist/chunks/dropdown.qw5oXFYs.js.map +0 -1
- package/dist/chunks/file-uploader.BLJpDgAZ.js.map +0 -1
- package/dist/chunks/filter-bar.DYrXBQDF.js.map +0 -1
- package/dist/chunks/index.CMGT-6mh.js +0 -369
- package/dist/chunks/input-field-password.CZNUHo6s.js.map +0 -1
- package/dist/chunks/menu.DfzP2nRU.js.map +0 -1
- package/dist/chunks/summary-grid-item-custom.DTCzOBBy.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as B, toRef as I, computed as l, watch as y, ref as T, resolveComponent as m, createElementBlock as v, openBlock as n, createVNode as N, createBlock as E, createCommentVNode as V, normalizeClass as w, withCtx as s, Fragment as O, renderList as A, createSlots as G, createTextVNode as k, toDisplayString as S, renderSlot as L, mergeProps as _ } from "vue";
|
|
2
|
-
import { a as d, B as U } from "./checkbox.
|
|
2
|
+
import { a as d, B as U } from "./checkbox.CXZQtFhM.js";
|
|
3
3
|
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
4
4
|
import { d as R } from "./typography.DN5eC5ch.js";
|
|
5
5
|
import { u as q } from "./use-form-layout-loading.D3lALhtC.js";
|
|
6
|
-
import { E as $ } from "./error-message.
|
|
7
|
-
import { C as z } from "./controls-group.
|
|
6
|
+
import { E as $ } from "./error-message.BQ5MlnLg.js";
|
|
7
|
+
import { C as z } from "./controls-group.ClMNznTz.js";
|
|
8
8
|
import { _ as D } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
9
|
import "../assets/checkbox-group.css";
|
|
10
10
|
var i = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(i || {});
|
|
@@ -189,4 +189,4 @@ export {
|
|
|
189
189
|
i as B,
|
|
190
190
|
ee as c
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=checkbox-group.
|
|
192
|
+
//# sourceMappingURL=checkbox-group.X2fi2jkS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.BVJfN48k.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA,EAAA,MAAA,aAAA;AAAA,EAC7B,OAAA;AAAA;AAAA;AAAA;AAAA,IACrB,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAIwC,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKD,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,QAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAOI,WAAA,EAAA,MAAA,SAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,OAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKgC,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKpC,YAAA,EAAA,MAAA,OAAA,SAAA,MAAA,CAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAM+B,UAAA,EAAA,MAAA,SAAA,SAAA,GA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vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA,EAAA,MAAA,aAAA;AAAA,EAC7B,OAAA;AAAA;AAAA;AAAA;AAAA,IAC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AA,cA/BpBG,EAAAf,EAAA,QAAA,WAAAgB,EAAA,EAAA,SAAA,GAAA,GAAAT,CAAA,GAAA,QAAA,EAAA;AAAA,YAAA,CAAA;AAAA,YAAA,KAAA;AAAA,UAAA,IAAA;AAAA,gIAAA,GAAA,GAAA;AAAA,MAAA,CAAA;AAAA,MAoCkBrB,GAAAA;AAAAA,IAAAA,GAAAA,GAAAA,CAAAA,oBAAAA,kBAAAA,SAAAA,eAAAA,YAAAA,QAAAA,cAAAA,SAAAA,YAAAA,YAAAA,cAAAA,CAAAA;AAAAA,IAIRc,EAAA,+BAAAH,EAAA,GAAAW,EAAAS,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAjB,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA,MAvClB,OAAA;AAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAkB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { a as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
1
|
+
import { defineComponent as X, toRefs as C, computed as a, ref as D, onMounted as Z, useAttrs as G, resolveComponent as f, createElementBlock as U, openBlock as o, mergeProps as A, createVNode as x, createCommentVNode as r, createBlock as l, withCtx as d, createElementVNode as ee, renderSlot as E, createTextVNode as q, toDisplayString as L } from "vue";
|
|
2
|
+
import { B as ae } from "./typography.DN5eC5ch.js";
|
|
3
|
+
import { a as oe, C as M } from "./checkbox-input.CgbJsFXD.js";
|
|
4
|
+
import { u as te } from "./use-default-slot-validator.O02rzsob.js";
|
|
5
|
+
import { u as re } from "./use-has-slot.B7eQSabc.js";
|
|
6
6
|
import { g as N } from "./generate-uid.NJ8tVoha.js";
|
|
7
|
-
import { g as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { B as
|
|
11
|
-
import { E as
|
|
12
|
-
import { _ as
|
|
7
|
+
import { g as P } from "./get-slot-text.DQlZEsId.js";
|
|
8
|
+
import { u as le } from "./i18n.D9azDLPe.js";
|
|
9
|
+
import { u as ne } from "./aria-label.CaUURpnB.js";
|
|
10
|
+
import { B as se } from "./tag.DVkBzXMx.js";
|
|
11
|
+
import { E as de } from "./error-message.BQ5MlnLg.js";
|
|
12
|
+
import { _ as ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import "../assets/checkbox.css";
|
|
14
14
|
var i = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(i || {});
|
|
15
|
-
const
|
|
15
|
+
const w = {
|
|
16
16
|
"en-US": {
|
|
17
17
|
checkbox: "Checkbox",
|
|
18
18
|
optional: "optional",
|
|
@@ -28,14 +28,14 @@ const M = {
|
|
|
28
28
|
optional: "opcional",
|
|
29
29
|
required: "obrigatório"
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, ue = X({
|
|
32
32
|
name: "bento-checkbox",
|
|
33
|
-
i18n: { messages:
|
|
33
|
+
i18n: { messages: w },
|
|
34
34
|
components: {
|
|
35
|
-
BentoTag:
|
|
36
|
-
BentoTypography:
|
|
37
|
-
CheckboxInput:
|
|
38
|
-
ErrorMessage:
|
|
35
|
+
BentoTag: se,
|
|
36
|
+
BentoTypography: ae,
|
|
37
|
+
CheckboxInput: oe,
|
|
38
|
+
ErrorMessage: de
|
|
39
39
|
},
|
|
40
40
|
inheritAttrs: !1,
|
|
41
41
|
model: { prop: "modelValue" },
|
|
@@ -103,64 +103,71 @@ const M = {
|
|
|
103
103
|
value: { type: [String, Number], default: null }
|
|
104
104
|
},
|
|
105
105
|
emits: [i.UPDATE, i.INPUT],
|
|
106
|
-
setup(e, { attrs: V, emit: h, slots:
|
|
107
|
-
const { t: y } =
|
|
108
|
-
|
|
109
|
-
const b = a(() => Array.isArray(k.value)), S = a(() => b.value ? k.value.some((s) => s ===
|
|
106
|
+
setup(e, { attrs: V, emit: h, slots: n }) {
|
|
107
|
+
const { t: y } = le({ messages: w }), v = N("description"), u = N("error"), t = re(n), { disabled: c, indeterminate: g, modelValue: k, readonly: R, value: j } = C(e), _ = P(n)("default"), $ = P(n)("description");
|
|
108
|
+
te("bento-checkbox", n.default, n.description);
|
|
109
|
+
const b = a(() => Array.isArray(k.value)), S = a(() => b.value ? k.value.some((s) => s === j.value) : k.value), p = a(() => g.value), F = a(
|
|
110
110
|
() => !e.disabled && !e.readonly && (e.hasError || !!e.errorMessage)
|
|
111
|
-
),
|
|
111
|
+
), I = a(() => !e.disabled && !e.readonly && !!e.errorMessage), m = a(() => t("content")), B = a(() => (p == null ? void 0 : p.value) || (S == null ? void 0 : S.value)), H = a(
|
|
112
112
|
() => (m == null ? void 0 : m.value) && (b == null ? void 0 : b.value) && (B == null ? void 0 : B.value)
|
|
113
|
-
),
|
|
114
|
-
() => `${
|
|
115
|
-
),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
), J = a(
|
|
114
|
+
() => `${I.value ? u : ""} ${_ && $ ? v : ""}`.trim() || null
|
|
115
|
+
), O = D(V["aria-label"]), { ariaLabel: Y } = C(e), T = D();
|
|
116
|
+
Z(() => {
|
|
117
|
+
T.value = y("checkbox");
|
|
118
|
+
});
|
|
119
|
+
const z = a(
|
|
120
|
+
() => ne({
|
|
121
|
+
ariaLabel: O.value,
|
|
122
|
+
// TODO: take this line away when the aria-label props is removed
|
|
123
|
+
label: Y,
|
|
124
|
+
defaultFallback: T.value
|
|
125
|
+
}).value
|
|
126
|
+
), K = a(() => {
|
|
127
|
+
const { style: s, class: W } = G();
|
|
122
128
|
return {
|
|
123
|
-
class:
|
|
129
|
+
class: W,
|
|
124
130
|
style: s
|
|
125
131
|
};
|
|
126
|
-
}),
|
|
127
|
-
[`b-checkbox--${
|
|
128
|
-
[`b-checkbox--${
|
|
132
|
+
}), Q = a(() => ({
|
|
133
|
+
[`b-checkbox--${M.DISABLED}`]: c.value,
|
|
134
|
+
[`b-checkbox--${M.READONLY}`]: R.value
|
|
129
135
|
}));
|
|
130
136
|
return {
|
|
131
137
|
// Values
|
|
132
|
-
descriptionId:
|
|
138
|
+
descriptionId: v,
|
|
133
139
|
errorId: u,
|
|
134
|
-
ariaDescribedBy:
|
|
135
|
-
computedAriaLabel:
|
|
136
|
-
conditionalClass:
|
|
137
|
-
defaultSlotValue:
|
|
138
|
-
descriptionSlotValue:
|
|
140
|
+
ariaDescribedBy: J,
|
|
141
|
+
computedAriaLabel: z,
|
|
142
|
+
conditionalClass: Q,
|
|
143
|
+
defaultSlotValue: _,
|
|
144
|
+
descriptionSlotValue: $,
|
|
139
145
|
isIndeterminate: p,
|
|
140
|
-
shouldShowError:
|
|
141
|
-
shouldShowErrorMessage:
|
|
142
|
-
contentSlotAvailable:
|
|
146
|
+
shouldShowError: F,
|
|
147
|
+
shouldShowErrorMessage: I,
|
|
148
|
+
contentSlotAvailable: H,
|
|
143
149
|
hasContentSlot: m,
|
|
144
|
-
styleAttrs:
|
|
150
|
+
styleAttrs: K,
|
|
145
151
|
// Methods
|
|
146
|
-
hasSlot:
|
|
152
|
+
hasSlot: t,
|
|
147
153
|
onChange: (s) => {
|
|
148
154
|
c.value || (h(i.UPDATE, s), h(i.INPUT, s));
|
|
149
155
|
},
|
|
150
156
|
t: y
|
|
151
157
|
};
|
|
152
158
|
}
|
|
153
|
-
}),
|
|
159
|
+
}), ce = {
|
|
154
160
|
key: 0,
|
|
155
161
|
class: "b-checkbox__text"
|
|
156
162
|
};
|
|
157
|
-
function
|
|
158
|
-
const u = f("checkbox-input"),
|
|
159
|
-
return
|
|
163
|
+
function be(e, V, h, n, y, v) {
|
|
164
|
+
const u = f("checkbox-input"), t = f("bento-typography"), c = f("bento-tag"), g = f("error-message");
|
|
165
|
+
return o(), U("label", A({
|
|
160
166
|
class: ["b-checkbox", e.conditionalClass]
|
|
161
167
|
}, e.styleAttrs), [
|
|
162
|
-
|
|
163
|
-
"
|
|
168
|
+
x(u, A(e.$attrs, {
|
|
169
|
+
ref: "input",
|
|
170
|
+
"aria-label": e.hasSlot("default") ? void 0 : e.computedAriaLabel,
|
|
164
171
|
"aria-describedby": e.ariaDescribedBy,
|
|
165
172
|
disabled: e.disabled,
|
|
166
173
|
"has-error": e.shouldShowError,
|
|
@@ -170,44 +177,44 @@ function ue(e, V, h, t, y, g) {
|
|
|
170
177
|
readonly: e.readonly,
|
|
171
178
|
"onUpdate:modelValue": e.onChange
|
|
172
179
|
}), null, 16, ["aria-label", "aria-describedby", "disabled", "has-error", "indeterminate", "value", "model-value", "readonly", "onUpdate:modelValue"]),
|
|
173
|
-
e.hasSlot("default") || e.shouldShowErrorMessage ? (
|
|
174
|
-
e.hasSlot("default") ? (
|
|
180
|
+
e.hasSlot("default") || e.shouldShowErrorMessage ? (o(), U("span", ce, [
|
|
181
|
+
e.hasSlot("default") ? (o(), l(t, {
|
|
175
182
|
key: 0,
|
|
176
183
|
class: "b-checkbox__label",
|
|
177
184
|
el: "span",
|
|
178
185
|
variant: "body"
|
|
179
186
|
}, {
|
|
180
187
|
default: d(() => [
|
|
181
|
-
|
|
188
|
+
ee("span", null, [
|
|
182
189
|
E(e.$slots, "default", {}, void 0, !0)
|
|
183
190
|
]),
|
|
184
|
-
e.optional ? (
|
|
191
|
+
e.optional ? (o(), l(t, {
|
|
185
192
|
key: 0,
|
|
186
193
|
class: "b-checkbox__label-requirement",
|
|
187
194
|
el: "span"
|
|
188
195
|
}, {
|
|
189
196
|
default: d(() => [
|
|
190
|
-
|
|
197
|
+
q("(" + L(e.t("optional")) + ")", 1)
|
|
191
198
|
]),
|
|
192
199
|
_: 1
|
|
193
|
-
})) : e.required ? (
|
|
200
|
+
})) : e.required ? (o(), l(t, {
|
|
194
201
|
key: 1,
|
|
195
202
|
class: "b-checkbox__label-requirement",
|
|
196
203
|
el: "span"
|
|
197
204
|
}, {
|
|
198
205
|
default: d(() => [
|
|
199
|
-
|
|
206
|
+
q("(" + L(e.t("required")) + ")", 1)
|
|
200
207
|
]),
|
|
201
208
|
_: 1
|
|
202
|
-
})) :
|
|
203
|
-
e.tag ? (
|
|
209
|
+
})) : r("", !0),
|
|
210
|
+
e.tag ? (o(), l(c, A({
|
|
204
211
|
key: 2,
|
|
205
212
|
class: "b-checkbox__label-tag"
|
|
206
|
-
}, e.tag), null, 16)) :
|
|
213
|
+
}, e.tag), null, 16)) : r("", !0)
|
|
207
214
|
]),
|
|
208
215
|
_: 3
|
|
209
|
-
})) :
|
|
210
|
-
e.hasSlot("default") && e.hasSlot("description") ? (
|
|
216
|
+
})) : r("", !0),
|
|
217
|
+
e.hasSlot("default") && e.hasSlot("description") ? (o(), l(t, {
|
|
211
218
|
key: 1,
|
|
212
219
|
id: e.descriptionId,
|
|
213
220
|
class: "b-checkbox__description",
|
|
@@ -218,13 +225,13 @@ function ue(e, V, h, t, y, g) {
|
|
|
218
225
|
E(e.$slots, "description", {}, void 0, !0)
|
|
219
226
|
]),
|
|
220
227
|
_: 3
|
|
221
|
-
}, 8, ["id"])) :
|
|
222
|
-
e.shouldShowErrorMessage ? (
|
|
228
|
+
}, 8, ["id"])) : r("", !0),
|
|
229
|
+
e.shouldShowErrorMessage ? (o(), l(g, {
|
|
223
230
|
key: 2,
|
|
224
231
|
id: e.errorId,
|
|
225
232
|
"error-message": e.errorMessage
|
|
226
|
-
}, null, 8, ["id", "error-message"])) :
|
|
227
|
-
e.contentSlotAvailable ? (
|
|
233
|
+
}, null, 8, ["id", "error-message"])) : r("", !0),
|
|
234
|
+
e.contentSlotAvailable ? (o(), l(t, {
|
|
228
235
|
key: 3,
|
|
229
236
|
class: "b-checkbox__content",
|
|
230
237
|
el: "span",
|
|
@@ -234,13 +241,13 @@ function ue(e, V, h, t, y, g) {
|
|
|
234
241
|
E(e.$slots, "content", {}, void 0, !0)
|
|
235
242
|
]),
|
|
236
243
|
_: 3
|
|
237
|
-
})) :
|
|
238
|
-
])) :
|
|
244
|
+
})) : r("", !0)
|
|
245
|
+
])) : r("", !0)
|
|
239
246
|
], 16);
|
|
240
247
|
}
|
|
241
|
-
const
|
|
248
|
+
const _e = /* @__PURE__ */ ie(ue, [["render", be], ["__scopeId", "data-v-d1a71116"]]);
|
|
242
249
|
export {
|
|
243
|
-
|
|
250
|
+
_e as B,
|
|
244
251
|
i as a
|
|
245
252
|
};
|
|
246
|
-
//# sourceMappingURL=checkbox.
|
|
253
|
+
//# sourceMappingURL=checkbox.CXZQtFhM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.CXZQtFhM.js","sources":["../../../core/src/components/checkbox/checkbox.types.ts","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '@/core/components/tag/tag.types';\nimport type {\n CheckboxInputType as BentoCheckboxType,\n MultiCheckboxInputType as BentoMultiCheckboxType,\n} from '@/core/components/internal/checkbox-input/checkbox-input.types';\nimport { CheckboxInputState as BentoCheckboxState } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n\nexport { BentoCheckboxState, BentoCheckboxType, BentoMultiCheckboxType };\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n\nexport type BentoCheckboxTag = BentoTagProps;\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\" v-bind=\"styleAttrs\">\n <checkbox-input\n v-bind=\"$attrs\"\n ref=\"input\"\n :aria-label=\"hasSlot('default') ? undefined : computedAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :has-error=\"shouldShowError\"\n :indeterminate=\"isIndeterminate\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :readonly=\"readonly\"\n @update:model-value=\"onChange\"\n />\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <span><slot /></span>\n <bento-typography v-if=\"optional\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n <bento-typography v-else-if=\"required\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-tag v-if=\"tag\" class=\"b-checkbox__label-tag\" v-bind=\"tag\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"contentSlotAvailable\" class=\"b-checkbox__content\" el=\"span\" variant=\"body\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, toRefs, useAttrs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxTag,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from '@/core/components/checkbox/checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { CheckboxInput } from '@/components/internal/checkbox-input';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoTag } from '@/components/tag';\n import { BentoCheckboxGroupItems } from '@/core/components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CheckboxInput,\n ErrorMessage,\n },\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Highlights the checkbox is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the checkbox is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoCheckboxTag>, default: undefined },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // Content slot logic\n const hasContentSlot = computed(() => hasSlot('content'));\n const isCheckedOrIntermediate = computed(() => isIndeterminate?.value || isChecked?.value);\n const contentSlotAvailable = computed(\n () => hasContentSlot?.value && isCheckboxGroup?.value && isCheckedOrIntermediate?.value\n );\n\n // ARIA fields\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const checkboxTranslation = ref();\n // Translations used in the script tag need to be inside onMounted otherwise they fail in Vue 3\n onMounted(() => {\n checkboxTranslation.value = t('checkbox');\n });\n // Only add aria-label if no label slot is present\n const computedAriaLabel = computed(\n () =>\n useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: checkboxTranslation.value,\n }).value\n );\n\n const styleAttrs = computed(() => {\n const { style, class: cls } = useAttrs();\n return {\n class: cls as HTMLAttributes['class'],\n style: style as HTMLAttributes['style'],\n };\n });\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n const onChange = (newValue: BentoCheckboxType | BentoCheckboxGroupItems) => {\n if (disabled.value) {\n return;\n }\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaDescribedBy,\n computedAriaLabel,\n conditionalClass,\n defaultSlotValue,\n descriptionSlotValue,\n isIndeterminate,\n shouldShowError,\n shouldShowErrorMessage,\n contentSlotAvailable,\n hasContentSlot,\n styleAttrs,\n\n // Methods\n hasSlot,\n onChange,\n\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox/checkbox.scss\" />\n"],"names":["BentoCheckboxEvent","BentoCheckboxEvent2","_sfc_main","defineComponent","messages","BentoTag","BentoTypography","CheckboxInput","ErrorMessage","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","hasContentSlot","isCheckedOrIntermediate","contentSlotAvailable","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","checkboxTranslation","onMounted","computedAriaLabel","useAriaLabel","styleAttrs","style","cls","useAttrs","conditionalClass","CheckboxInputState","newValue","_ctx","createVNode","_component_checkbox_input","mergeProps","openBlock","createElementBlock","_hoisted_1","createBlock","_component_bento_typography","createElementVNode","createTextVNode","toDisplayString","required","createCommentVNode","_component_bento_tag","tag","renderSlot","_component_error_message"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,QArCvG,SAAA;AAAA,MAAA,GAAA;AAAA;UAAAQ,EAAAhB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,CAAA,KAAAa,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA,KAAAA,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, ref as d, h as a } from "vue";
|
|
2
|
-
import { o as p } from "./on-click-outside.
|
|
2
|
+
import { o as p } from "./on-click-outside.D9aY9g8G.js";
|
|
3
3
|
const l = /* @__PURE__ */ o({
|
|
4
4
|
name: "bento-click-outside",
|
|
5
5
|
props: {
|
|
@@ -20,4 +20,4 @@ const l = /* @__PURE__ */ o({
|
|
|
20
20
|
export {
|
|
21
21
|
l as B
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=click-outside.
|
|
23
|
+
//# sourceMappingURL=click-outside.C1Ud8AA2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click-outside.
|
|
1
|
+
{"version":3,"file":"click-outside.C1Ud8AA2.js","sources":["../../../vue2/src/components/click-outside/click-outside.ts"],"sourcesContent":["import { defineComponent, h, ref } from 'vue';\nimport { onClickOutside } from '@/directives/click-outside/on-click-outside';\n\nexport const BentoClickOutside = /* #__PURE__ */ defineComponent({\n name: 'bento-click-outside',\n props: {\n /**\n * Sets the HTML DOM element.\n */\n el: { type: String, default: 'div' },\n },\n emits: ['handler'],\n setup(props, { emit, slots }) {\n const target = ref(null);\n\n onClickOutside(target, event => emit('handler', event));\n\n return () => h(props.el, { ref: target }, slots.default?.());\n },\n});\n"],"names":["BentoClickOutside","defineComponent","props","emit","slots","target","ref","onClickOutside","event","h","_a"],"mappings":";;AAGO,MAAMA,IAAoD,gBAAAC,EAAA;AAAA,EAC7D,MAAM;AAAA,EACN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIH,IAAI,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,EACvC;AAAA,EACA,OAAO,CAAC,SAAS;AAAA,EACjB,MAAMC,GAAO,EAAE,MAAAC,GAAM,OAAAC,KAAS;AACpB,UAAAC,IAASC,EAAI,IAAI;AAEvB,WAAAC,EAAeF,GAAQ,CAAAG,MAASL,EAAK,WAAWK,CAAK,CAAC,GAE/C,MAAM;;AAAA,aAAAC,EAAEP,EAAM,IAAI,EAAE,KAAKG,EAAO,IAAGK,IAAAN,EAAM,YAAN,gBAAAM,EAAA,KAAAN,EAAiB;AAAA;AAAA,EAAA;AAEnE,CAAC;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as z, ref as y, computed as h, shallowRef as M, onMounted as G, watch as X, watchEffect as F, resolveComponent as i, createElementBlock as v, openBlock as o, normalizeClass as Q, createCommentVNode as c, createBlock as g, createElementVNode as C, createVNode as S, mergeProps as K, withCtx as b, createTextVNode as Y, toDisplayString as $, renderSlot as q, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
2
|
import { s as ne, H as ae, t, L as oe, a as se, b as ie, c as le, p as re, j as ce, d as de, x as ge, e as pe, E as ue, h as me, k as fe, C as w, f as H, i as he, g as D, l as be, m as Oe } from "./codemirror.Zv80n3Z2.js";
|
|
3
3
|
import { b as ye, c as ve, d as Ce, e as Se } from "./es6.BtaxuP0b.js";
|
|
4
|
-
import { B as _e } from "./dropdown.
|
|
4
|
+
import { B as _e } from "./dropdown.RVt9T6j5.js";
|
|
5
5
|
import { B as Le } from "./button.6HMG0xEY.js";
|
|
6
6
|
import { B as Ne } from "./typography.DN5eC5ch.js";
|
|
7
7
|
import "./events.FNmSWp_P.js";
|
|
8
|
-
import { B as Pe } from "./tooltip.
|
|
8
|
+
import { B as Pe } from "./tooltip.Cbs_YIap.js";
|
|
9
9
|
import { B as Te } from "./loading-indicator.DEepb9Wl.js";
|
|
10
10
|
import { u as ke } from "./i18n.D9azDLPe.js";
|
|
11
11
|
import { E as Ee } from "./expand.DusW7F7p.js";
|
|
12
|
-
import { h as Ie } from "./base-modal.
|
|
13
|
-
import { C as Ae } from "./copy.
|
|
12
|
+
import { h as Ie } from "./base-modal.D4INiJGX.js";
|
|
13
|
+
import { C as Ae } from "./copy.BYG9aoNO.js";
|
|
14
14
|
import { _ as Re } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
15
15
|
import "../assets/code-snippet.css";
|
|
16
16
|
const $e = {
|
|
@@ -419,4 +419,4 @@ export {
|
|
|
419
419
|
O as b,
|
|
420
420
|
gt as c
|
|
421
421
|
};
|
|
422
|
-
//# sourceMappingURL=code-snippet.
|
|
422
|
+
//# sourceMappingURL=code-snippet.CcdsPxT7.js.map
|