@adyen/bento-vue3 1.95.0 → 1.96.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.
Files changed (104) hide show
  1. package/dist/@types/index.d.ts +77 -0
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/date-picker.css +1 -1
  9. package/dist/assets/dialog-page.css +1 -1
  10. package/dist/assets/draggable-handle.css +1 -1
  11. package/dist/assets/dropdown.css +1 -1
  12. package/dist/assets/field-label.css +1 -1
  13. package/dist/assets/file-uploader.css +1 -1
  14. package/dist/assets/filter-bar.css +1 -1
  15. package/dist/assets/input-field-password.css +1 -1
  16. package/dist/assets/inspector.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/navigation-menu-group.css +1 -1
  19. package/dist/assets/secondary-nav.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/checkbox.js +2 -2
  22. package/dist/chunks/{calendar.74nP7Nu6.js → calendar.iQyNwQBL.js} +64 -58
  23. package/dist/chunks/calendar.iQyNwQBL.js.map +1 -0
  24. package/dist/chunks/{checkbox-group.BWx4wn0F.js → checkbox-group.BcDIXL27.js} +2 -2
  25. package/dist/chunks/{checkbox-group.BWx4wn0F.js.map → checkbox-group.BcDIXL27.js.map} +1 -1
  26. package/dist/chunks/{checkbox.DwfrmbwI.js → checkbox.LTRqb-pE.js} +18 -18
  27. package/dist/chunks/{checkbox.DwfrmbwI.js.map → checkbox.LTRqb-pE.js.map} +1 -1
  28. package/dist/chunks/{code-snippet.B9QFjFXf.js → code-snippet.DHzB-8JJ.js} +2 -2
  29. package/dist/chunks/{code-snippet.B9QFjFXf.js.map → code-snippet.DHzB-8JJ.js.map} +1 -1
  30. package/dist/chunks/{dashboard-section.C4plNql-.js → dashboard-section.Da6ZFGtm.js} +2 -2
  31. package/dist/chunks/{dashboard-section.C4plNql-.js.map → dashboard-section.Da6ZFGtm.js.map} +1 -1
  32. package/dist/chunks/{data-grid-template.Bwxo0AII.js → data-grid-template.-MuGcJp1.js} +2 -2
  33. package/dist/chunks/{data-grid-template.Bwxo0AII.js.map → data-grid-template.-MuGcJp1.js.map} +1 -1
  34. package/dist/chunks/{data-grid.Bx3Xy1tb.js → data-grid.CNIXkdCJ.js} +8 -8
  35. package/dist/chunks/{data-grid.Bx3Xy1tb.js.map → data-grid.CNIXkdCJ.js.map} +1 -1
  36. package/dist/chunks/{date-picker.89J8PGKn.js → date-picker.DyImOUH4.js} +61 -61
  37. package/dist/chunks/date-picker.DyImOUH4.js.map +1 -0
  38. package/dist/chunks/{date-range-picker.iaXigXuW.js → date-range-picker.BigC6wm2.js} +67 -67
  39. package/dist/chunks/{date-range-picker.iaXigXuW.js.map → date-range-picker.BigC6wm2.js.map} +1 -1
  40. package/dist/chunks/draggable-handle.C1dudqKz.js +1649 -0
  41. package/dist/chunks/{draggable-handle.CKuHzAzS.js.map → draggable-handle.C1dudqKz.js.map} +1 -1
  42. package/dist/chunks/{dropdown-tag.DNWUbf7x.js → dropdown-tag.C1ei1SyR.js} +2 -2
  43. package/dist/chunks/{dropdown-tag.DNWUbf7x.js.map → dropdown-tag.C1ei1SyR.js.map} +1 -1
  44. package/dist/chunks/{dropdown.CK8cdMyV.js → dropdown.C5um1anU.js} +292 -278
  45. package/dist/chunks/dropdown.C5um1anU.js.map +1 -0
  46. package/dist/chunks/{filter-bar.CqbdRCQD.js → filter-bar.CvZnM3hM.js} +279 -276
  47. package/dist/chunks/{filter-bar.CqbdRCQD.js.map → filter-bar.CvZnM3hM.js.map} +1 -1
  48. package/dist/chunks/{header-with-views.CB8M1Udi.js → header-with-views.ubPTyW9A.js} +4 -4
  49. package/dist/chunks/{header-with-views.CB8M1Udi.js.map → header-with-views.ubPTyW9A.js.map} +1 -1
  50. package/dist/chunks/{input-field-password.DJKloBB3.js → input-field-password.CZ-NTpZF.js} +5 -3
  51. package/dist/chunks/input-field-password.CZ-NTpZF.js.map +1 -0
  52. package/dist/chunks/{input-field-phone-number.C3fQypln.js → input-field-phone-number.DOHk6gSp.js} +2 -2
  53. package/dist/chunks/{input-field-phone-number.C3fQypln.js.map → input-field-phone-number.DOHk6gSp.js.map} +1 -1
  54. package/dist/chunks/{input-field.HgrRdDec.js → input-field.DBlTGgAD.js} +2 -2
  55. package/dist/chunks/{input-field.HgrRdDec.js.map → input-field.DBlTGgAD.js.map} +1 -1
  56. package/dist/chunks/{input-time.DxCYIHSf.js → input-time.CHIjCO74.js} +3 -3
  57. package/dist/chunks/{input-time.DxCYIHSf.js.map → input-time.CHIjCO74.js.map} +1 -1
  58. package/dist/chunks/{pagination.vqSlDmeK.js → pagination.DbpHH_53.js} +2 -2
  59. package/dist/chunks/{pagination.vqSlDmeK.js.map → pagination.DbpHH_53.js.map} +1 -1
  60. package/dist/chunks/{rich-text-editor.u_fKHVgZ.js → rich-text-editor.u-V4fNWK.js} +2 -2
  61. package/dist/chunks/{rich-text-editor.u_fKHVgZ.js.map → rich-text-editor.u-V4fNWK.js.map} +1 -1
  62. package/dist/chunks/{search-bar.CgSUD89l.js → search-bar.TKgi1KLs.js} +3 -3
  63. package/dist/chunks/{search-bar.CgSUD89l.js.map → search-bar.TKgi1KLs.js.map} +1 -1
  64. package/dist/chunks/secondary-nav.0OsJiAWI.js +315 -0
  65. package/dist/chunks/{secondary-nav.BqqNrHZE.js.map → secondary-nav.0OsJiAWI.js.map} +1 -1
  66. package/dist/chunks/{selection-card-group.C2Av3uyz.js → selection-card-group.C59ZIrVm.js} +9 -9
  67. package/dist/chunks/{selection-card-group.C2Av3uyz.js.map → selection-card-group.C59ZIrVm.js.map} +1 -1
  68. package/dist/chunks/{tab.DWoYKpTv.js → tab.ByjWuWQz.js} +107 -98
  69. package/dist/chunks/{tab.DWoYKpTv.js.map → tab.ByjWuWQz.js.map} +1 -1
  70. package/dist/chunks/{use-cached-selected-values.CtWNiy-e.js → use-cached-selected-values.DOw5IKdU.js} +2 -2
  71. package/dist/chunks/{use-cached-selected-values.CtWNiy-e.js.map → use-cached-selected-values.DOw5IKdU.js.map} +1 -1
  72. package/dist/chunks/{use-date-input-formatter.BshboCF9.js → use-date-input-formatter.x285YiSd.js} +2 -2
  73. package/dist/chunks/{use-date-input-formatter.BshboCF9.js.map → use-date-input-formatter.x285YiSd.js.map} +1 -1
  74. package/dist/code-snippet.js +1 -1
  75. package/dist/dashboard-template.js +1 -1
  76. package/dist/data-grid-template.js +1 -1
  77. package/dist/data-grid.js +1 -1
  78. package/dist/date-picker.js +2 -2
  79. package/dist/date-range-picker.js +2 -2
  80. package/dist/date-time-picker.js +4 -4
  81. package/dist/draggable.js +1 -1
  82. package/dist/dropdown.js +3 -3
  83. package/dist/filter-bar.js +1 -1
  84. package/dist/header-with-views.js +1 -1
  85. package/dist/index.js +25 -25
  86. package/dist/input-field-password.js +1 -1
  87. package/dist/input-field-phone-number.js +1 -1
  88. package/dist/input-field.js +1 -1
  89. package/dist/input-time.js +1 -1
  90. package/dist/internal.js +2 -2
  91. package/dist/pagination.js +1 -1
  92. package/dist/rich-text-editor.js +1 -1
  93. package/dist/search-bar.js +2 -2
  94. package/dist/secondary-nav.js +1 -1
  95. package/dist/selection-card.js +1 -1
  96. package/dist/tabs.js +1 -1
  97. package/dist/web-types.json +1 -1
  98. package/package.json +3 -3
  99. package/dist/chunks/calendar.74nP7Nu6.js.map +0 -1
  100. package/dist/chunks/date-picker.89J8PGKn.js.map +0 -1
  101. package/dist/chunks/draggable-handle.CKuHzAzS.js +0 -1639
  102. package/dist/chunks/dropdown.CK8cdMyV.js.map +0 -1
  103. package/dist/chunks/input-field-password.DJKloBB3.js.map +0 -1
  104. package/dist/chunks/secondary-nav.BqqNrHZE.js +0 -306
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as E, provide as T, toRef as A, useAttrs as P, ref as p, watch as F, openBlock as N, createElementBlock as y, createVNode as n, mergeProps as B, unref as t, createSlots as U, withCtx as h, createElementVNode as g, withKeys as m } from "vue";
2
- import { d as L } from "./use-cached-selected-values.CtWNiy-e.js";
2
+ import { d as L } from "./use-cached-selected-values.DOw5IKdU.js";
3
3
  import { u as R } from "./index.B875RXHM.js";
4
- import { I as k, B as D } from "./input-field.HgrRdDec.js";
4
+ import { I as k, B as D } from "./input-field.DBlTGgAD.js";
5
5
  import { S as K } from "./search.ClLmZAgC.js";
6
6
  import { C as w } from "./cross-circle-fill.BWCKKn0E.js";
7
7
  import { _ as V } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -110,4 +110,4 @@ export {
110
110
  $ as a,
111
111
  f as b
112
112
  };
113
- //# sourceMappingURL=search-bar.CgSUD89l.js.map
113
+ //# sourceMappingURL=search-bar.TKgi1KLs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-bar.CgSUD89l.js","sources":["../../../vue2/src/components/search-bar/search-bar.types.ts","../../../vue2/src/components/search-bar/search-bar.vue"],"sourcesContent":["export enum BentoSearchBarInternalEvent {\n CLEAR = 'clear',\n ESCAPE = 'escape-pressed',\n INPUT = 'input',\n UPDATE = 'update:search-term',\n}\n\nexport enum BentoSearchBarEvent {\n CLEAR = 'search-clear',\n INPUT = 'search-input',\n UPDATE = 'update:search-term',\n}\n\nexport interface BentoSearchBarItem {\n label: string;\n items?: Array<BentoSearchBarItem>;\n}\n\nexport type BentoSearchBarData = Array<BentoSearchBarItem>;\n\nexport interface BentoSearchBarProps {\n /**\n * Text that labels an the search bar input element\n */\n inputFieldAriaLabel: string;\n\n /**\n * Reduces height of the search bar. Default: false\n */\n condensed?: boolean;\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * Disables the text input.\n */\n disabled?: boolean;\n\n /**\n * Text displayed as a hint when the field is not empty\n */\n hint?: string;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * Text displayed as the value being searched\n */\n value?: string;\n}\n","<template>\n <div class=\"b-search-bar\">\n <bento-input-field\n ref=\"bentoInputField\"\n v-bind=\"attrs\"\n :model-value=\"searchTerm\"\n type=\"search\"\n :condensed=\"condensed\"\n :aria-label=\"inputFieldAriaLabel\"\n :aria-hidden=\"false\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @update:model-value=\"onInputEvent\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @escape-pressed=\"emit(BentoSearchBarInternalEvent.ESCAPE)\"\n >\n <template #iconBefore>\n <search-icon :svg-title=\"t('search')\" aria-hidden=\"true\" />\n </template>\n\n <template v-if=\"searchTerm\" #iconAfter>\n <div\n class=\"b-search-bar__clear-search\"\n tabindex=\"0\"\n data-testid=\"b-search-bar-clear-search-button\"\n @click=\"onClearSearch\"\n @keypress.enter=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"t('clearSearch')\" />\n </div>\n </template>\n </bento-input-field>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { provide, ref, toRef, useAttrs, watch } from 'vue';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoSearchBarInternalEvent, type BentoSearchBarProps } from './search-bar.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { INPUT_FIELD_HINT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import BentoInputField from '@/components/input-field/input-field.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoSearchBarProps>(), {\n condensed: false,\n debounceTime: 300,\n disabled: false,\n hint: '',\n placeholder: '',\n value: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes by typing a search. Debounced by the `debounceTime` property\n */\n (e: 'input', inputValue: string): void;\n\n /**\n * Emitted when the \"clear search\" button is clicked\n */\n (e: 'clear'): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed inside the Search Bar input\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n }>();\n\n provide(INPUT_FIELD_HINT_INJECTION_KEY, toRef(props, 'hint'));\n\n const attrs = useAttrs();\n const searchTerm = ref(props.value);\n const bentoInputField = ref<InstanceType<typeof BentoInputField> | null>();\n\n watch(\n () => props.value,\n () => {\n searchTerm.value = props.value;\n },\n { immediate: true }\n );\n\n const onClearSearch = () => {\n searchTerm.value = '';\n emit('clear');\n emit('input', '');\n };\n\n const debouncedEmit = debounce(() => {\n emit('input', searchTerm.value);\n }, props.debounceTime);\n\n const onInputEvent = (value: string) => {\n searchTerm.value = value;\n debouncedEmit();\n };\n\n const focus = () => {\n // bentoInputField.value?.focusInput();\n bentoInputField.value.focusInput();\n };\n\n // Expose method so that it can be used to focus on the input from outside the component\n defineExpose({\n /**\n * Focus on the input field when called.\n */\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Search functionality to help users find the desired data quicker.\n * When a user starts typing, the data is dynamically filtered to\n * only show the relevant results.\n *\n * Clearing the search field displays the entire list again.\n *\n * @example\n * import {\n * BentoSearchBar,\n * BentoSearchBarData,\n * useSearchBarFilter\n * } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSearchBar },\n * template: `\n * <bento-search-bar\n * input-field-aria-label=\"Search bar\"\n * v-model=\"searchTerm\"\n * @input=\"onInput\"\n * @clear=\"onClearSearch\"\n * />\n * // Render the filtered data\n * {{ filteredData }}\n * `,\n * setup() {\n * const searchTerm = ref('');\n * const data = ref<BentoSearchBarData>([]);\n * const filteredData = useSearchBarFilter(searchTerm, data);\n *\n * consdt onInput = () => {}\n * consdt onClearSearch = () => {}\n *\n * return {\n * searchTerm,\n * filteredData,\n * onInput,\n * onClearSearch,\n * };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./search-bar.scss\" />\n"],"names":["BentoSearchBarInternalEvent","BentoSearchBarInternalEvent2","BentoSearchBarEvent","BentoSearchBarEvent2","__default__","messages","t","useI18n","props","__props","emit","__emit","provide","INPUT_FIELD_HINT_INJECTION_KEY","toRef","attrs","useAttrs","searchTerm","ref","bentoInputField","watch","onClearSearch","debouncedEmit","debounce","onInputEvent","value","__expose"],"mappings":";;;;;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,sBAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,gBACAA,EAAA,QAAA,gBACAA,EAAA,SAAA,sBAHQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;kCCyKRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA/HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GASAC,IAAAC;AA2BA,IAAAC,EAAAC,GAAAC,EAAAN,GAAA,MAAA,CAAA;AAEA,UAAAO,IAAAC,EAAA,GACAC,IAAAC,EAAAV,EAAA,KAAA,GACAW,IAAAD,EAAA;AAEA,IAAAE;AAAA,MAAA,MAAAZ,EAAA;AAAA,MACgB,MAAA;AAER,QAAAS,EAAA,QAAAT,EAAA;AAAA,MAAyB;AAAA,MAC7B,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAa,IAAA,MAAA;AACI,MAAAJ,EAAA,QAAA,IACAP,EAAA,OAAA,GACAA,EAAA,SAAA,EAAA;AAAA,IAAgB,GAGpBY,IAAAC,EAAA,MAAA;AACI,MAAAb,EAAA,SAAAO,EAAA,KAAA;AAAA,IAA8B,GAAAT,EAAA,YAAA,GAGlCgB,IAAA,CAAAC,MAAA;AACI,MAAAR,EAAA,QAAAQ,GACAH,EAAA;AAAA,IAAc;AASlB,WAAAI,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,OANb,MAAA;AAEI,QAAAP,EAAA,MAAA,WAAA;AAAA,MAAiC;AAAA,IAQjC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"search-bar.TKgi1KLs.js","sources":["../../../vue2/src/components/search-bar/search-bar.types.ts","../../../vue2/src/components/search-bar/search-bar.vue"],"sourcesContent":["export enum BentoSearchBarInternalEvent {\n CLEAR = 'clear',\n ESCAPE = 'escape-pressed',\n INPUT = 'input',\n UPDATE = 'update:search-term',\n}\n\nexport enum BentoSearchBarEvent {\n CLEAR = 'search-clear',\n INPUT = 'search-input',\n UPDATE = 'update:search-term',\n}\n\nexport interface BentoSearchBarItem {\n label: string;\n items?: Array<BentoSearchBarItem>;\n}\n\nexport type BentoSearchBarData = Array<BentoSearchBarItem>;\n\nexport interface BentoSearchBarProps {\n /**\n * Text that labels an the search bar input element\n */\n inputFieldAriaLabel: string;\n\n /**\n * Reduces height of the search bar. Default: false\n */\n condensed?: boolean;\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * Disables the text input.\n */\n disabled?: boolean;\n\n /**\n * Text displayed as a hint when the field is not empty\n */\n hint?: string;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * Text displayed as the value being searched\n */\n value?: string;\n}\n","<template>\n <div class=\"b-search-bar\">\n <bento-input-field\n ref=\"bentoInputField\"\n v-bind=\"attrs\"\n :model-value=\"searchTerm\"\n type=\"search\"\n :condensed=\"condensed\"\n :aria-label=\"inputFieldAriaLabel\"\n :aria-hidden=\"false\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @update:model-value=\"onInputEvent\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @escape-pressed=\"emit(BentoSearchBarInternalEvent.ESCAPE)\"\n >\n <template #iconBefore>\n <search-icon :svg-title=\"t('search')\" aria-hidden=\"true\" />\n </template>\n\n <template v-if=\"searchTerm\" #iconAfter>\n <div\n class=\"b-search-bar__clear-search\"\n tabindex=\"0\"\n data-testid=\"b-search-bar-clear-search-button\"\n @click=\"onClearSearch\"\n @keypress.enter=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"t('clearSearch')\" />\n </div>\n </template>\n </bento-input-field>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { provide, ref, toRef, useAttrs, watch } from 'vue';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoSearchBarInternalEvent, type BentoSearchBarProps } from './search-bar.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { INPUT_FIELD_HINT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import BentoInputField from '@/components/input-field/input-field.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoSearchBarProps>(), {\n condensed: false,\n debounceTime: 300,\n disabled: false,\n hint: '',\n placeholder: '',\n value: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes by typing a search. Debounced by the `debounceTime` property\n */\n (e: 'input', inputValue: string): void;\n\n /**\n * Emitted when the \"clear search\" button is clicked\n */\n (e: 'clear'): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed inside the Search Bar input\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n }>();\n\n provide(INPUT_FIELD_HINT_INJECTION_KEY, toRef(props, 'hint'));\n\n const attrs = useAttrs();\n const searchTerm = ref(props.value);\n const bentoInputField = ref<InstanceType<typeof BentoInputField> | null>();\n\n watch(\n () => props.value,\n () => {\n searchTerm.value = props.value;\n },\n { immediate: true }\n );\n\n const onClearSearch = () => {\n searchTerm.value = '';\n emit('clear');\n emit('input', '');\n };\n\n const debouncedEmit = debounce(() => {\n emit('input', searchTerm.value);\n }, props.debounceTime);\n\n const onInputEvent = (value: string) => {\n searchTerm.value = value;\n debouncedEmit();\n };\n\n const focus = () => {\n // bentoInputField.value?.focusInput();\n bentoInputField.value.focusInput();\n };\n\n // Expose method so that it can be used to focus on the input from outside the component\n defineExpose({\n /**\n * Focus on the input field when called.\n */\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Search functionality to help users find the desired data quicker.\n * When a user starts typing, the data is dynamically filtered to\n * only show the relevant results.\n *\n * Clearing the search field displays the entire list again.\n *\n * @example\n * import {\n * BentoSearchBar,\n * BentoSearchBarData,\n * useSearchBarFilter\n * } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSearchBar },\n * template: `\n * <bento-search-bar\n * input-field-aria-label=\"Search bar\"\n * v-model=\"searchTerm\"\n * @input=\"onInput\"\n * @clear=\"onClearSearch\"\n * />\n * // Render the filtered data\n * {{ filteredData }}\n * `,\n * setup() {\n * const searchTerm = ref('');\n * const data = ref<BentoSearchBarData>([]);\n * const filteredData = useSearchBarFilter(searchTerm, data);\n *\n * consdt onInput = () => {}\n * consdt onClearSearch = () => {}\n *\n * return {\n * searchTerm,\n * filteredData,\n * onInput,\n * onClearSearch,\n * };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./search-bar.scss\" />\n"],"names":["BentoSearchBarInternalEvent","BentoSearchBarInternalEvent2","BentoSearchBarEvent","BentoSearchBarEvent2","__default__","messages","t","useI18n","props","__props","emit","__emit","provide","INPUT_FIELD_HINT_INJECTION_KEY","toRef","attrs","useAttrs","searchTerm","ref","bentoInputField","watch","onClearSearch","debouncedEmit","debounce","onInputEvent","value","__expose"],"mappings":";;;;;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,sBAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,gBACAA,EAAA,QAAA,gBACAA,EAAA,SAAA,sBAHQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;kCCyKRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA/HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GASAC,IAAAC;AA2BA,IAAAC,EAAAC,GAAAC,EAAAN,GAAA,MAAA,CAAA;AAEA,UAAAO,IAAAC,EAAA,GACAC,IAAAC,EAAAV,EAAA,KAAA,GACAW,IAAAD,EAAA;AAEA,IAAAE;AAAA,MAAA,MAAAZ,EAAA;AAAA,MACgB,MAAA;AAER,QAAAS,EAAA,QAAAT,EAAA;AAAA,MAAyB;AAAA,MAC7B,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAa,IAAA,MAAA;AACI,MAAAJ,EAAA,QAAA,IACAP,EAAA,OAAA,GACAA,EAAA,SAAA,EAAA;AAAA,IAAgB,GAGpBY,IAAAC,EAAA,MAAA;AACI,MAAAb,EAAA,SAAAO,EAAA,KAAA;AAAA,IAA8B,GAAAT,EAAA,YAAA,GAGlCgB,IAAA,CAAAC,MAAA;AACI,MAAAR,EAAA,QAAAQ,GACAH,EAAA;AAAA,IAAc;AASlB,WAAAI,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,OANb,MAAA;AAEI,QAAAP,EAAA,MAAA,WAAA;AAAA,MAAiC;AAAA,IAQjC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,315 @@
1
+ import { defineComponent as R, inject as W, ref as F, computed as b, watch as H, resolveComponent as Z, openBlock as t, createElementBlock as c, createElementVNode as _, unref as o, normalizeClass as G, createVNode as p, withCtx as i, createTextVNode as x, toDisplayString as y, createBlock as C, createCommentVNode as M, withModifiers as ee, Transition as re, normalizeStyle as ae, Fragment as O, renderList as z, toRef as oe, readonly as te, provide as ne } from "vue";
2
+ import { B as se } from "./dropdown.C5um1anU.js";
3
+ import { B as $ } from "./typography.B3J6_tYk.js";
4
+ import { B as J } from "./tag.Uu-6AQys.js";
5
+ import { C as P } from "./cross-circle-fill.BWCKKn0E.js";
6
+ import { b as le } from "./index.oOAkh64h.js";
7
+ import { u as X } from "./index.B875RXHM.js";
8
+ import { a as ie } from "./es6.Cu3DYUPA.js";
9
+ import { B as ue } from "./button.DWF7FSIw.js";
10
+ import { C as ce } from "./chevron-down.XeE-LBV_.js";
11
+ import { C as de } from "./chevron-up.Cmgl2a3x.js";
12
+ import { g as ve } from "./generate-uid.DBWe4g6T.js";
13
+ import { u as me } from "./use-expandable-content-height.Bdd9hQwq.js";
14
+ import { _ as U } from "./_plugin-vue_export-helper.CHgC5LLL.js";
15
+ import "../assets/secondary-nav.css";
16
+ const q = /* @__PURE__ */ Symbol("secondary nav state"), Q = {
17
+ "de-DE": { errorCount: "Fehler | Fehler" },
18
+ "en-GB": { errorCount: "error | errors" },
19
+ "en-US": { errorCount: "error | errors" },
20
+ "es-ES": { errorCount: "error | errores" },
21
+ "es-MX": { errorCount: "error | errores" },
22
+ "fr-FR": { errorCount: "erreur | erreurs" },
23
+ "it-IT": { errorCount: "errore | errori" },
24
+ "ja-JP": { errorCount: "エラー | エラー" },
25
+ "pt-BR": { errorCount: "erro | erros" },
26
+ "zh-CN": { errorCount: "错误 | 错误" }
27
+ }, pe = { class: "b-secondary-nav-item" }, be = { class: "b-secondary-nav-item__wrapper" }, _e = ["aria-current", "aria-expanded", "aria-controls"], ye = { class: "b-secondary-nav-item__visually-hidden" }, Ce = ["id"], fe = { i18n: { messages: Q } }, ge = /* @__PURE__ */ R({
28
+ ...fe,
29
+ __name: "secondary-nav-item",
30
+ props: {
31
+ label: {},
32
+ value: {},
33
+ items: {},
34
+ isSubItem: { type: Boolean },
35
+ errorCounter: {}
36
+ },
37
+ emits: ["click"],
38
+ setup(w, { emit: f }) {
39
+ const { tc: D } = X({ messages: Q }), { activeItemValue: d, updateActiveItemValue: j, allowExpandableItemNavigation: T } = W(q), u = "b-secondary-nav-item__animation--content", v = w, n = F(!1), g = ve("secondary-nav-sub-items"), B = F(null), h = b(() => !!v.items?.length), E = b(() => d.value === v.value), s = b(() => h.value && !T.value), { contentHeight: S } = me(B, n), L = b(() => S.value ? { "max-height": S.value } : {}), N = b(() => ({
40
+ "b-secondary-nav-item__option--active": E.value,
41
+ "b-secondary-nav-item__option--expandable": h.value,
42
+ "b-secondary-nav-item__option--sub-item": v.isSubItem
43
+ })), A = f, V = (a) => {
44
+ A("click", a), j(v.value);
45
+ }, e = () => {
46
+ n.value = !n.value;
47
+ }, l = (a, m) => a.some(
48
+ (k) => k.value === m || (k.items ? l(k.items, m) : !1)
49
+ ), r = (a) => a.some((m) => !!m.errorCounter || (m.items ? r(m.items) : !1));
50
+ return H(
51
+ [d, () => v.items],
52
+ ([a]) => {
53
+ h.value && v.items && (l(v.items, a) || r(v.items)) && (n.value = !0);
54
+ },
55
+ { immediate: !0, deep: !0 }
56
+ ), (a, m) => {
57
+ const k = Z("secondary-nav-item", !0);
58
+ return t(), c("div", pe, [
59
+ _("div", be, [
60
+ _("button", {
61
+ class: G(["b-secondary-nav-item__option", N.value]),
62
+ "aria-current": E.value ? "page" : void 0,
63
+ "aria-expanded": s.value ? `${n.value}` : void 0,
64
+ "aria-controls": s.value ? o(g) : void 0,
65
+ onClick: m[0] || (m[0] = (I) => s.value ? e() : V(I))
66
+ }, [
67
+ p(o($), {
68
+ class: "b-secondary-nav-item__title",
69
+ variant: "body",
70
+ stronger: ""
71
+ }, {
72
+ default: i(() => [
73
+ x(y(a.label), 1)
74
+ ]),
75
+ _: 1
76
+ }),
77
+ a.errorCounter ? (t(), C(o(J), {
78
+ key: 0,
79
+ class: "b-secondary-nav-item__error-counter",
80
+ variant: "red"
81
+ }, {
82
+ icon: i(() => [
83
+ p(o(P), { "aria-hidden": "true" })
84
+ ]),
85
+ default: i(() => [
86
+ _("span", null, y(a.errorCounter), 1),
87
+ _("span", ye, y(o(D)("errorCount", a.errorCounter)), 1)
88
+ ]),
89
+ _: 1
90
+ })) : M("", !0)
91
+ ], 10, _e),
92
+ h.value ? (t(), C(o(ue), {
93
+ key: 0,
94
+ "aria-hidden": s.value,
95
+ tabindex: s.value ? -1 : void 0,
96
+ class: "b-secondary-nav-item__toggle",
97
+ variant: "tertiary",
98
+ "aria-label": n.value ? `Collapse ${a.label}` : `Expand ${a.label}`,
99
+ "aria-expanded": s.value ? void 0 : `${n.value}`,
100
+ "aria-controls": s.value ? void 0 : o(g),
101
+ onClick: ee(e, ["stop"])
102
+ }, {
103
+ iconLeft: i(() => [
104
+ n.value ? (t(), C(o(de), {
105
+ key: 0,
106
+ class: "b-secondary-nav-item__icon",
107
+ "aria-hidden": "true"
108
+ })) : (t(), C(o(ce), {
109
+ key: 1,
110
+ class: "b-secondary-nav-item__icon",
111
+ "aria-hidden": "true"
112
+ }))
113
+ ]),
114
+ _: 1
115
+ }, 8, ["aria-hidden", "tabindex", "aria-label", "aria-expanded", "aria-controls"])) : M("", !0)
116
+ ]),
117
+ p(re, { name: u }, {
118
+ default: i(() => [
119
+ h.value && n.value ? (t(), c("div", {
120
+ key: 0,
121
+ id: o(g),
122
+ style: ae(L.value)
123
+ }, [
124
+ _("ul", {
125
+ ref_key: "subItemsRef",
126
+ ref: B,
127
+ class: "b-secondary-nav-item__sub-items"
128
+ }, [
129
+ (t(!0), c(O, null, z(a.items, (I) => (t(), c("li", {
130
+ key: I.value
131
+ }, [
132
+ p(k, {
133
+ label: I.label,
134
+ value: I.value,
135
+ items: I.items,
136
+ "error-counter": I.errorCounter,
137
+ "is-sub-item": ""
138
+ }, null, 8, ["label", "value", "items", "error-counter"])
139
+ ]))), 128))
140
+ ], 512)
141
+ ], 12, Ce)) : M("", !0)
142
+ ]),
143
+ _: 1
144
+ })
145
+ ]);
146
+ };
147
+ }
148
+ }), Y = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-0d3fb0ab"]]), he = ["aria-label"], Ie = { class: "b-secondary-nav__list" }, Ne = {}, ke = /* @__PURE__ */ R({
149
+ ...Ne,
150
+ __name: "secondary-nav-category",
151
+ props: {
152
+ label: {},
153
+ items: {}
154
+ },
155
+ setup(w) {
156
+ return (f, D) => (t(), c("section", {
157
+ class: "b-secondary-nav-category",
158
+ "aria-label": f.label
159
+ }, [
160
+ p(o($), {
161
+ el: "h1",
162
+ class: "b-secondary-nav-category__label",
163
+ variant: "caption",
164
+ stronger: ""
165
+ }, {
166
+ default: i(() => [
167
+ x(y(f.label), 1)
168
+ ]),
169
+ _: 1
170
+ }),
171
+ _("ul", Ie, [
172
+ (t(!0), c(O, null, z(f.items, (d) => (t(), c("li", {
173
+ key: d.value
174
+ }, [
175
+ p(o(Y), {
176
+ label: d.label,
177
+ value: d.value,
178
+ items: d.items,
179
+ "error-counter": d.errorCounter
180
+ }, null, 8, ["label", "value", "items", "error-counter"])
181
+ ]))), 128))
182
+ ])
183
+ ], 8, he));
184
+ }
185
+ }), we = /* @__PURE__ */ U(ke, [["__scopeId", "data-v-7b080ce9"]]), K = {
186
+ "de-DE": { errorCount: "Fehler | Fehler", mobileDropdownAriaLabel: "Navigationsoptionen Dropdown-Menü" },
187
+ "en-GB": { errorCount: "error | errors", mobileDropdownAriaLabel: "Navigation options drop-down" },
188
+ "en-US": { errorCount: "error | errors", mobileDropdownAriaLabel: "Navigation options dropdown" },
189
+ "es-ES": { errorCount: "error | errores", mobileDropdownAriaLabel: "Menú desplegable de opciones de navegación" },
190
+ "es-MX": { errorCount: "error | errores", mobileDropdownAriaLabel: "Menú desplegable de opciones de navegación" },
191
+ "fr-FR": { errorCount: "erreur | erreurs", mobileDropdownAriaLabel: "Menu déroulant des options de navigation" },
192
+ "it-IT": { errorCount: "errore | errori", mobileDropdownAriaLabel: "Menu a tendina delle opzioni di navigazione" },
193
+ "ja-JP": { errorCount: "エラー | エラー", mobileDropdownAriaLabel: "ナビゲーションオプションのドロップダウン" },
194
+ "pt-BR": { errorCount: "erro | erros", mobileDropdownAriaLabel: "Menu suspenso de opções de navegação" },
195
+ "zh-CN": { errorCount: "错误 | 错误", mobileDropdownAriaLabel: "导航选项下拉菜单" }
196
+ }, De = { class: "b-secondary-nav" }, Be = { class: "b-secondary-nav__visually-hidden" }, Ee = {
197
+ key: 1,
198
+ class: "b-secondary-nav__list"
199
+ }, Se = {
200
+ i18n: { messages: K }
201
+ }, Ae = /* @__PURE__ */ R({
202
+ ...Se,
203
+ __name: "secondary-nav",
204
+ props: {
205
+ items: {},
206
+ value: {},
207
+ allowExpandableItemNavigation: { type: Boolean }
208
+ },
209
+ emits: ["change"],
210
+ setup(w, { emit: f }) {
211
+ const { t: D, tc: d } = X({ messages: K }), T = le({
212
+ s: ie
213
+ }).smallerOrEqual("s"), u = w, v = f, n = (e) => "items" in e && !("value" in e), g = (e, l = 0) => e.flatMap((r) => {
214
+ const a = {
215
+ label: r.label,
216
+ value: r.value,
217
+ data: { level: l, hasSubItems: !!r.items?.length, errorCounter: r.errorCounter }
218
+ };
219
+ return r.items?.length ? [a, ...g(r.items, l + 1)] : [a];
220
+ }), B = (e) => !u.allowExpandableItemNavigation && e.data?.hasSubItems, h = b(() => u.items.some((e) => n(e))), E = b(() => u.items.flatMap((e) => n(e) ? [
221
+ {
222
+ label: e.label,
223
+ value: `category-${e.label}`,
224
+ items: g(e.items)
225
+ }
226
+ ] : e.items?.length ? g([e]) : [
227
+ {
228
+ label: e.label,
229
+ value: e.value,
230
+ data: { level: 0, errorCounter: e.errorCounter }
231
+ }
232
+ ])), s = (e) => e.flatMap((l) => [l, ...l.items?.length ? s(l.items) : []]), S = (e) => s(e).find((l) => u.allowExpandableItemNavigation || !l.items?.length)?.value ?? "", L = b(() => u.items.length ? S(
233
+ u.items.flatMap(
234
+ (e) => n(e) ? s(e.items) : s([e])
235
+ )
236
+ ) : ""), N = F(u.value ?? L.value), A = (e) => {
237
+ N.value = e, v("change", e);
238
+ }, V = {
239
+ activeItemValue: te(N),
240
+ updateActiveItemValue: A,
241
+ allowExpandableItemNavigation: oe(u, "allowExpandableItemNavigation")
242
+ };
243
+ return H(
244
+ () => u.value,
245
+ (e) => {
246
+ e !== void 0 && (N.value = e);
247
+ }
248
+ ), ne(q, V), (e, l) => (t(), c("nav", De, [
249
+ o(T) ? (t(), C(o(se), {
250
+ key: 0,
251
+ "aria-label": o(D)("mobileDropdownAriaLabel"),
252
+ items: E.value,
253
+ "static-categories": h.value,
254
+ "model-value": N.value,
255
+ "is-option-disabled": B,
256
+ "onUpdate:modelValue": A
257
+ }, {
258
+ "display-value": i(({ label: r }) => [
259
+ p(o($), { el: "span" }, {
260
+ default: i(() => [
261
+ x(y(r), 1)
262
+ ]),
263
+ _: 2
264
+ }, 1024)
265
+ ]),
266
+ default: i(({ label: r, data: a }) => [
267
+ p(o($), {
268
+ el: "div",
269
+ class: G({ "b-secondary-nav__option": !0, "b-secondary-nav__nested-option": !!a?.level })
270
+ }, {
271
+ default: i(() => [
272
+ x(y(r) + " ", 1),
273
+ a?.errorCounter ? (t(), C(o(J), {
274
+ key: 0,
275
+ class: "b-secondary-nav__error-counter",
276
+ variant: "red"
277
+ }, {
278
+ icon: i(() => [
279
+ p(o(P), { "aria-hidden": "true" })
280
+ ]),
281
+ default: i(() => [
282
+ _("span", null, y(a.errorCounter), 1),
283
+ _("span", Be, y(o(d)("errorCount", a.errorCounter)), 1)
284
+ ]),
285
+ _: 2
286
+ }, 1024)) : M("", !0)
287
+ ]),
288
+ _: 2
289
+ }, 1032, ["class"])
290
+ ]),
291
+ _: 1
292
+ }, 8, ["aria-label", "items", "static-categories", "model-value"])) : (t(), c("ul", Ee, [
293
+ (t(!0), c(O, null, z(e.items, (r) => (t(), c("li", {
294
+ key: r.label
295
+ }, [
296
+ "items" in r && !("value" in r) ? (t(), C(o(we), {
297
+ key: 0,
298
+ label: r.label,
299
+ items: r.items
300
+ }, null, 8, ["label", "items"])) : (t(), C(o(Y), {
301
+ key: 1,
302
+ label: r.label,
303
+ value: r.value,
304
+ items: r.items,
305
+ "error-counter": r.errorCounter
306
+ }, null, 8, ["label", "value", "items", "error-counter"]))
307
+ ]))), 128))
308
+ ]))
309
+ ]));
310
+ }
311
+ }), Je = /* @__PURE__ */ U(Ae, [["__scopeId", "data-v-34eeb7b8"]]);
312
+ export {
313
+ Je as s
314
+ };
315
+ //# sourceMappingURL=secondary-nav.0OsJiAWI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"secondary-nav.BqqNrHZE.js","sources":["../../../vue2/src/components/secondary-nav/secondary-nav.keys.ts","../../../vue2/src/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue","../../../vue2/src/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue","../../../vue2/src/components/secondary-nav/secondary-nav.vue"],"sourcesContent":["import { type InjectionKey } from 'vue';\nimport { type BentoSecondaryNavState } from './secondary-nav.types';\n\nexport const SECONDARY_NAV_STATE = Symbol('secondary nav state') as InjectionKey<BentoSecondaryNavState>;\n","<template>\n <div class=\"b-secondary-nav-item\">\n <div class=\"b-secondary-nav-item__wrapper\">\n <button\n class=\"b-secondary-nav-item__option\"\n :class=\"conditionalClasses\"\n :aria-current=\"isItemSelected ? 'page' : undefined\"\n :aria-expanded=\"expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click=\"expandleItemIsToggleOnly ? onToggleClick() : onClick($event)\"\n >\n <bento-typography class=\"b-secondary-nav-item__title\" variant=\"body\" stronger>\n {{ label }}\n </bento-typography>\n <bento-tag v-if=\"errorCounter\" class=\"b-secondary-nav-item__error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ errorCounter }}</span>\n <span class=\"b-secondary-nav-item__visually-hidden\">{{ tc('errorCount', errorCounter) }}</span>\n </bento-tag>\n </button>\n <bento-button\n v-if=\"hasSubItems\"\n :aria-hidden=\"expandleItemIsToggleOnly\"\n :tabindex=\"expandleItemIsToggleOnly ? -1 : undefined\"\n class=\"b-secondary-nav-item__toggle\"\n variant=\"tertiary\"\n :aria-label=\"isOpen ? `Collapse ${label}` : `Expand ${label}`\"\n :aria-expanded=\"!expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"!expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click.stop=\"onToggleClick\"\n >\n <template #iconLeft>\n <chevron-up-icon v-if=\"isOpen\" class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"hasSubItems && isOpen\" :id=\"subItemsId\" :style=\"subItemsMaxHeight\">\n <ul ref=\"subItemsRef\" class=\"b-secondary-nav-item__sub-items\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n is-sub-item\n />\n </li>\n </ul>\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { SECONDARY_NAV_STATE } from '../../secondary-nav.keys';\n import { BentoButton } from '@/components/button';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { computed, inject, ref, watch } from 'vue';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { tc } = useI18n<{ message: MessageSchema }>({ messages });\n const { activeItemValue, updateActiveItemValue, allowExpandableItemNavigation } = inject(SECONDARY_NAV_STATE);\n const CONTENT_TRANSITION_NAME = 'b-secondary-nav-item__animation--content';\n\n const props = defineProps<{\n /**\n * The display name of the navigation item\n */\n label: string;\n /**\n * The value of this item.\n */\n value: string;\n /**\n * Nested sub-items for this item.\n */\n items?: Array<BentoSecondaryNavItemsItem>;\n\n /**\n * Defines if the item is a subitem\n */\n isSubItem?: boolean;\n\n /**\n * Defines the number of errors pertaining to this item\n */\n errorCounter?: number;\n }>();\n\n const isOpen = ref(false);\n const subItemsId = generateUid('secondary-nav-sub-items');\n const subItemsRef = ref<HTMLUListElement>(null);\n const hasSubItems = computed(() => !!props.items?.length);\n const isItemSelected = computed(() => activeItemValue.value === props.value);\n const expandleItemIsToggleOnly = computed(() => hasSubItems.value && !allowExpandableItemNavigation.value);\n const { contentHeight } = useExpandableContentHeight(subItemsRef, isOpen);\n const subItemsMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n const conditionalClasses = computed(() => ({\n 'b-secondary-nav-item__option--active': isItemSelected.value,\n 'b-secondary-nav-item__option--expandable': hasSubItems.value,\n 'b-secondary-nav-item__option--sub-item': props.isSubItem,\n }));\n\n const emit = defineEmits<{\n /**\n * Event emitted when this element is clicked\n */\n (e: 'click', clickEvent: MouseEvent): void;\n }>();\n\n const onClick = (e: MouseEvent) => {\n emit('click', e);\n updateActiveItemValue(props.value);\n };\n\n const onToggleClick = () => {\n isOpen.value = !isOpen.value;\n };\n\n const hasActiveDescendant = (items: Array<BentoSecondaryNavItemsItem>, value: string): boolean => {\n return items.some(\n item => item.value === value || (item.items ? hasActiveDescendant(item.items, value) : false)\n );\n };\n\n const hasDescendantErrors = (items: Array<BentoSecondaryNavItemsItem>): boolean =>\n items.some(item => !!item.errorCounter || (item.items ? hasDescendantErrors(item.items) : false));\n\n watch(\n [activeItemValue, () => props.items],\n ([activeValue]) => {\n if (hasSubItems.value && props.items) {\n if (hasActiveDescendant(props.items, activeValue) || hasDescendantErrors(props.items)) {\n isOpen.value = true;\n }\n }\n },\n { immediate: true, deep: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-item.scss\" />\n","<template>\n <section class=\"b-secondary-nav-category\" :aria-label=\"label\">\n <bento-typography el=\"h1\" class=\"b-secondary-nav-category__label\" variant=\"caption\" stronger>{{\n label\n }}</bento-typography>\n <ul class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </section>\n</template>\n\n<script lang=\"ts\" setup>\n import { BentoTypography } from '@/components/typography';\n import { SecondaryNavItem } from '../secondary-nav-item';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n\n defineProps<{\n /**\n * The display name of the category\n */\n label: string;\n /**\n * A list of {@see BentoSecondaryNavItemsItem} that belongs to this category\n */\n items: Array<BentoSecondaryNavItemsItem>;\n }>();\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-category.scss\" />\n","<template>\n <nav class=\"b-secondary-nav\">\n <bento-dropdown\n v-if=\"isMobile\"\n :aria-label=\"t('mobileDropdownAriaLabel')\"\n :items=\"mobileDropdownItems\"\n :static-categories=\"hasCategories\"\n :model-value=\"activeItemValue\"\n :is-option-disabled=\"isMobileOptionDisabled\"\n @update:model-value=\"updateActiveItemValue\"\n >\n <template #display-value=\"{ label }\">\n <bento-typography el=\"span\">\n {{ label }}\n </bento-typography>\n </template>\n <template #default=\"{ label, data }\">\n <bento-typography\n el=\"div\"\n :class=\"{ 'b-secondary-nav__option': true, 'b-secondary-nav__nested-option': !!data?.level }\"\n >\n {{ label }}\n <bento-tag v-if=\"data?.errorCounter\" class=\"b-secondary-nav__error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ data.errorCounter }}</span>\n <span class=\"b-secondary-nav__visually-hidden\">{{ tc('errorCount', data.errorCounter) }}</span>\n </bento-tag>\n </bento-typography>\n </template>\n </bento-dropdown>\n <ul v-else class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.label\">\n <secondary-nav-category\n v-if=\"'items' in item && !('value' in item)\"\n :label=\"item.label\"\n :items=\"item.items\"\n />\n <secondary-nav-item\n v-else\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, readonly, ref, toRef, watch } from 'vue';\n import { SecondaryNavItem } from './components/secondary-nav-item';\n import { SecondaryNavCategory } from './components/secondary-nav-category';\n import { SECONDARY_NAV_STATE } from './secondary-nav.keys';\n import {\n type BentoSecondaryNavItems,\n type BentoSecondaryNavItemsCategory,\n type BentoSecondaryNavItemsItem,\n type BentoSecondaryNavState,\n } from './secondary-nav.types';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { BentoTag } from '@/components/tag';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useBreakpoints } from '@vueuse/core';\n import { useI18n } from '@/utils/ts/i18n';\n import { type BentoListboxOptionItem, type BentoListboxOptions } from '@/types/listbox';\n import { BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const breakpoints = useBreakpoints({\n s: BMediaQuerySMax,\n });\n\n const isMobile = breakpoints.smallerOrEqual('s');\n const props = defineProps<{\n /**\n * An array containing all the items on the nav. The array can have either {@see BentoSecondaryNavItemsCategory },\n * which is used to group different items or {@see BentoSecondaryNavItemsItem } if you don't need to group them.\n */\n items: BentoSecondaryNavItems;\n /**\n * The value of the selected item.\n * If nothing is passed, it defaults to the first item value in items.\n */\n value?: string;\n /**\n * When true, items that contain subitems are also clickable and can be selected.\n * When false, those items only act as expand/collapse toggles.\n */\n allowExpandableItemNavigation?: boolean;\n }>();\n\n const emit = defineEmits<{\n /**\n * Emmited when the current selected item changes\n */\n (e: 'change', category: string): void;\n }>();\n\n const isCategory = (item: BentoSecondaryNavItems[number]): item is BentoSecondaryNavItemsCategory =>\n 'items' in item && !('value' in item);\n\n const mapNestedItems = (items: Array<BentoSecondaryNavItemsItem>, level = 0): BentoListboxOptions =>\n items.flatMap((item): BentoListboxOptions => {\n const currentItem: BentoListboxOptionItem = {\n label: item.label,\n value: item.value,\n data: { level, hasSubItems: !!item.items?.length, errorCounter: item.errorCounter },\n };\n\n if (item.items?.length) {\n return [currentItem, ...mapNestedItems(item.items, level + 1)];\n }\n\n return [currentItem];\n });\n\n const isMobileOptionDisabled = (option: BentoListboxOptionItem): boolean =>\n !props.allowExpandableItemNavigation && (option.data as { hasSubItems?: boolean })?.hasSubItems;\n\n const hasCategories = computed(() => props.items.some(item => isCategory(item)));\n const mobileDropdownItems = computed<BentoListboxOptions>(() => {\n return props.items.flatMap(item => {\n if (isCategory(item)) {\n return [\n {\n label: item.label,\n value: `category-${item.label}`,\n items: mapNestedItems(item.items),\n } satisfies BentoListboxOptionItem,\n ];\n }\n\n if (item.items?.length) {\n return mapNestedItems([item]);\n }\n\n return [\n {\n label: item.label,\n value: item.value,\n data: { level: 0, errorCounter: item.errorCounter },\n } satisfies BentoListboxOptionItem,\n ];\n });\n });\n\n const flattenNestedItems = (items: Array<BentoSecondaryNavItemsItem>): Array<BentoSecondaryNavItemsItem> =>\n items.flatMap(item => [item, ...(item.items?.length ? flattenNestedItems(item.items) : [])]);\n\n const findFirstSelectableNestedItemValue = (items: Array<BentoSecondaryNavItemsItem>): string =>\n flattenNestedItems(items).find(item => props.allowExpandableItemNavigation || !item.items?.length)?.value ?? '';\n\n const activeItemValueFallback = computed(() => {\n if (!props.items.length) {\n return '';\n }\n\n return findFirstSelectableNestedItemValue(\n props.items.flatMap(item =>\n isCategory(item) ? flattenNestedItems(item.items) : flattenNestedItems([item])\n )\n );\n });\n\n const activeItemValue = ref(props.value ?? activeItemValueFallback.value);\n const updateActiveItemValue = (value: string) => {\n activeItemValue.value = value;\n emit('change', value);\n };\n\n // The component's state is inject on `secondary-nav-item` to determine the\n // current active item and to change its value\n const state: BentoSecondaryNavState = {\n activeItemValue: readonly(activeItemValue),\n updateActiveItemValue,\n allowExpandableItemNavigation: toRef(props, 'allowExpandableItemNavigation'),\n };\n\n watch(\n () => props.value,\n value => {\n if (value !== undefined) {\n activeItemValue.value = value;\n }\n }\n );\n\n provide(SECONDARY_NAV_STATE, state);\n</script>\n\n<script lang=\"ts\">\n /**\n * Secondary Nav offers users a structured way to access information.\n * It also provides a clear hierarchy for users to understand and navigate through various information.\n *\n * @example\n * import { BentoSecondaryNav } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSecondaryNav },\n * template: `\n * <bento-secondary-nav :value=\"value\" :items=\"items\" />\n * `,\n * setup() {\n * const value = ref(2) // Active item value\n * const items: BentoSecondaryNavItemInfo[] = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { items, value };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav.scss\" />\n"],"names":["SECONDARY_NAV_STATE","__default__$2","messages$1","tc","useI18n","activeItemValue","updateActiveItemValue","allowExpandableItemNavigation","inject","CONTENT_TRANSITION_NAME","props","__props","isOpen","ref","subItemsId","generateUid","subItemsRef","hasSubItems","computed","isItemSelected","expandleItemIsToggleOnly","contentHeight","useExpandableContentHeight","subItemsMaxHeight","conditionalClasses","emit","__emit","onClick","e","onToggleClick","hasActiveDescendant","items","value","item","hasDescendantErrors","watch","activeValue","__default__$1","__default__","messages","t","isMobile","useBreakpoints","BMediaQuerySMax","isCategory","mapNestedItems","level","currentItem","isMobileOptionDisabled","option","hasCategories","mobileDropdownItems","flattenNestedItems","findFirstSelectableNestedItemValue","activeItemValueFallback","state","readonly","toRef","provide"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAAA,IAAA,uBAAA,qBAAA;;2NC6JHC,KAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;AAtFA,UAAA,EAAA,IAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GACA,EAAA,iBAAAG,GAAA,uBAAAC,GAAA,+BAAAC,EAAA,IAAAC,EAAAR,CAAA,GACAS,IAAA,4CAEAC,IAAAC,GAyBAC,IAAAC,EAAA,EAAA,GACAC,IAAAC,GAAA,yBAAA,GACAC,IAAAH,EAAA,IAAA,GACAI,IAAAC,EAAA,MAAA,CAAA,CAAAR,EAAA,OAAA,MAAA,GACAS,IAAAD,EAAA,MAAAb,EAAA,UAAAK,EAAA,KAAA,GACAU,IAAAF,EAAA,MAAAD,EAAA,SAAA,CAAAV,EAAA,KAAA,GACA,EAAA,eAAAc,EAAA,IAAAC,GAAAN,GAAAJ,CAAA,GACAW,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AAAA,EAAA,OAAA,SAAAmB,EAAAnB,EAAA,KAAA,IAAA,CAAA,CAAA,CAAA,GAGAoB,IAAA,CAAAtB,MAAAqB,EAAArB,CAAA,EAAA,KAAA,CAAAE,MAAAvB,EAAA,iCAAA,CAAAuB,EAAA,OAAA,MAAA,GAAA,SAAA,IAGAqB,IAAApC,EAAA,MACIR,EAAA,MAAA,SAIA2C;AAAA,MAAO3C,EAAA,MAAA;AAAA,QACS,CAAAuB,MAAAW,EAAAX,CAAA,IAAAmB,EAAAnB,EAAA,KAAA,IAAAmB,EAAA,CAAAnB,CAAA,CAAA;AAAA,MACqE;AAAA,IACjF,IANA,EAOJ,GAGJ5B,IAAAQ,EAAAH,EAAA,SAAA4C,EAAA,KAAA,GACAhD,IAAA,CAAA0B,MAAA;AACI,MAAA3B,EAAA,QAAA2B,GACAP,EAAA,UAAAO,CAAA;AAAA,IAAoB,GAKxBuB,IAAA;AAAA,MAAsC,iBAAAC,GAAAnD,CAAA;AAAA,MACO,uBAAAC;AAAA,MACzC,+BAAAmD,GAAA/C,GAAA,+BAAA;AAAA,IAC2E;AAG/E,WAAAyB;AAAA,MAAA,MAAAzB,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,MAAA,WACI3B,EAAA,QAAA2B;AAAA,MACJ;AAAA,IACJ,GAGJ0B,GAAA1D,GAAAuD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"secondary-nav.0OsJiAWI.js","sources":["../../../vue2/src/components/secondary-nav/secondary-nav.keys.ts","../../../vue2/src/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue","../../../vue2/src/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue","../../../vue2/src/components/secondary-nav/secondary-nav.vue"],"sourcesContent":["import { type InjectionKey } from 'vue';\nimport { type BentoSecondaryNavState } from './secondary-nav.types';\n\nexport const SECONDARY_NAV_STATE = Symbol('secondary nav state') as InjectionKey<BentoSecondaryNavState>;\n","<template>\n <div class=\"b-secondary-nav-item\">\n <div class=\"b-secondary-nav-item__wrapper\">\n <button\n class=\"b-secondary-nav-item__option\"\n :class=\"conditionalClasses\"\n :aria-current=\"isItemSelected ? 'page' : undefined\"\n :aria-expanded=\"expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click=\"expandleItemIsToggleOnly ? onToggleClick() : onClick($event)\"\n >\n <bento-typography class=\"b-secondary-nav-item__title\" variant=\"body\" stronger>\n {{ label }}\n </bento-typography>\n <bento-tag v-if=\"errorCounter\" class=\"b-secondary-nav-item__error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ errorCounter }}</span>\n <span class=\"b-secondary-nav-item__visually-hidden\">{{ tc('errorCount', errorCounter) }}</span>\n </bento-tag>\n </button>\n <bento-button\n v-if=\"hasSubItems\"\n :aria-hidden=\"expandleItemIsToggleOnly\"\n :tabindex=\"expandleItemIsToggleOnly ? -1 : undefined\"\n class=\"b-secondary-nav-item__toggle\"\n variant=\"tertiary\"\n :aria-label=\"isOpen ? `Collapse ${label}` : `Expand ${label}`\"\n :aria-expanded=\"!expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"!expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click.stop=\"onToggleClick\"\n >\n <template #iconLeft>\n <chevron-up-icon v-if=\"isOpen\" class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"hasSubItems && isOpen\" :id=\"subItemsId\" :style=\"subItemsMaxHeight\">\n <ul ref=\"subItemsRef\" class=\"b-secondary-nav-item__sub-items\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n is-sub-item\n />\n </li>\n </ul>\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { SECONDARY_NAV_STATE } from '../../secondary-nav.keys';\n import { BentoButton } from '@/components/button';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { computed, inject, ref, watch } from 'vue';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { tc } = useI18n<{ message: MessageSchema }>({ messages });\n const { activeItemValue, updateActiveItemValue, allowExpandableItemNavigation } = inject(SECONDARY_NAV_STATE);\n const CONTENT_TRANSITION_NAME = 'b-secondary-nav-item__animation--content';\n\n const props = defineProps<{\n /**\n * The display name of the navigation item\n */\n label: string;\n /**\n * The value of this item.\n */\n value: string;\n /**\n * Nested sub-items for this item.\n */\n items?: Array<BentoSecondaryNavItemsItem>;\n\n /**\n * Defines if the item is a subitem\n */\n isSubItem?: boolean;\n\n /**\n * Defines the number of errors pertaining to this item\n */\n errorCounter?: number;\n }>();\n\n const isOpen = ref(false);\n const subItemsId = generateUid('secondary-nav-sub-items');\n const subItemsRef = ref<HTMLUListElement>(null);\n const hasSubItems = computed(() => !!props.items?.length);\n const isItemSelected = computed(() => activeItemValue.value === props.value);\n const expandleItemIsToggleOnly = computed(() => hasSubItems.value && !allowExpandableItemNavigation.value);\n const { contentHeight } = useExpandableContentHeight(subItemsRef, isOpen);\n const subItemsMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n const conditionalClasses = computed(() => ({\n 'b-secondary-nav-item__option--active': isItemSelected.value,\n 'b-secondary-nav-item__option--expandable': hasSubItems.value,\n 'b-secondary-nav-item__option--sub-item': props.isSubItem,\n }));\n\n const emit = defineEmits<{\n /**\n * Event emitted when this element is clicked\n */\n (e: 'click', clickEvent: MouseEvent): void;\n }>();\n\n const onClick = (e: MouseEvent) => {\n emit('click', e);\n updateActiveItemValue(props.value);\n };\n\n const onToggleClick = () => {\n isOpen.value = !isOpen.value;\n };\n\n const hasActiveDescendant = (items: Array<BentoSecondaryNavItemsItem>, value: string): boolean => {\n return items.some(\n item => item.value === value || (item.items ? hasActiveDescendant(item.items, value) : false)\n );\n };\n\n const hasDescendantErrors = (items: Array<BentoSecondaryNavItemsItem>): boolean =>\n items.some(item => !!item.errorCounter || (item.items ? hasDescendantErrors(item.items) : false));\n\n watch(\n [activeItemValue, () => props.items],\n ([activeValue]) => {\n if (hasSubItems.value && props.items) {\n if (hasActiveDescendant(props.items, activeValue) || hasDescendantErrors(props.items)) {\n isOpen.value = true;\n }\n }\n },\n { immediate: true, deep: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-item.scss\" />\n","<template>\n <section class=\"b-secondary-nav-category\" :aria-label=\"label\">\n <bento-typography el=\"h1\" class=\"b-secondary-nav-category__label\" variant=\"caption\" stronger>{{\n label\n }}</bento-typography>\n <ul class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </section>\n</template>\n\n<script lang=\"ts\" setup>\n import { BentoTypography } from '@/components/typography';\n import { SecondaryNavItem } from '../secondary-nav-item';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n\n defineProps<{\n /**\n * The display name of the category\n */\n label: string;\n /**\n * A list of {@see BentoSecondaryNavItemsItem} that belongs to this category\n */\n items: Array<BentoSecondaryNavItemsItem>;\n }>();\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-category.scss\" />\n","<template>\n <nav class=\"b-secondary-nav\">\n <bento-dropdown\n v-if=\"isMobile\"\n :aria-label=\"t('mobileDropdownAriaLabel')\"\n :items=\"mobileDropdownItems\"\n :static-categories=\"hasCategories\"\n :model-value=\"activeItemValue\"\n :is-option-disabled=\"isMobileOptionDisabled\"\n @update:model-value=\"updateActiveItemValue\"\n >\n <template #display-value=\"{ label }\">\n <bento-typography el=\"span\">\n {{ label }}\n </bento-typography>\n </template>\n <template #default=\"{ label, data }\">\n <bento-typography\n el=\"div\"\n :class=\"{ 'b-secondary-nav__option': true, 'b-secondary-nav__nested-option': !!data?.level }\"\n >\n {{ label }}\n <bento-tag v-if=\"data?.errorCounter\" class=\"b-secondary-nav__error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ data.errorCounter }}</span>\n <span class=\"b-secondary-nav__visually-hidden\">{{ tc('errorCount', data.errorCounter) }}</span>\n </bento-tag>\n </bento-typography>\n </template>\n </bento-dropdown>\n <ul v-else class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.label\">\n <secondary-nav-category\n v-if=\"'items' in item && !('value' in item)\"\n :label=\"item.label\"\n :items=\"item.items\"\n />\n <secondary-nav-item\n v-else\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, readonly, ref, toRef, watch } from 'vue';\n import { SecondaryNavItem } from './components/secondary-nav-item';\n import { SecondaryNavCategory } from './components/secondary-nav-category';\n import { SECONDARY_NAV_STATE } from './secondary-nav.keys';\n import {\n type BentoSecondaryNavItems,\n type BentoSecondaryNavItemsCategory,\n type BentoSecondaryNavItemsItem,\n type BentoSecondaryNavState,\n } from './secondary-nav.types';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { BentoTag } from '@/components/tag';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useBreakpoints } from '@vueuse/core';\n import { useI18n } from '@/utils/ts/i18n';\n import { type BentoListboxOptionItem, type BentoListboxOptions } from '@/types/listbox';\n import { BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const breakpoints = useBreakpoints({\n s: BMediaQuerySMax,\n });\n\n const isMobile = breakpoints.smallerOrEqual('s');\n const props = defineProps<{\n /**\n * An array containing all the items on the nav. The array can have either {@see BentoSecondaryNavItemsCategory },\n * which is used to group different items or {@see BentoSecondaryNavItemsItem } if you don't need to group them.\n */\n items: BentoSecondaryNavItems;\n /**\n * The value of the selected item.\n * If nothing is passed, it defaults to the first item value in items.\n */\n value?: string;\n /**\n * When true, items that contain subitems are also clickable and can be selected.\n * When false, those items only act as expand/collapse toggles.\n */\n allowExpandableItemNavigation?: boolean;\n }>();\n\n const emit = defineEmits<{\n /**\n * Emmited when the current selected item changes\n */\n (e: 'change', category: string): void;\n }>();\n\n const isCategory = (item: BentoSecondaryNavItems[number]): item is BentoSecondaryNavItemsCategory =>\n 'items' in item && !('value' in item);\n\n const mapNestedItems = (items: Array<BentoSecondaryNavItemsItem>, level = 0): BentoListboxOptions =>\n items.flatMap((item): BentoListboxOptions => {\n const currentItem: BentoListboxOptionItem = {\n label: item.label,\n value: item.value,\n data: { level, hasSubItems: !!item.items?.length, errorCounter: item.errorCounter },\n };\n\n if (item.items?.length) {\n return [currentItem, ...mapNestedItems(item.items, level + 1)];\n }\n\n return [currentItem];\n });\n\n const isMobileOptionDisabled = (option: BentoListboxOptionItem): boolean =>\n !props.allowExpandableItemNavigation && (option.data as { hasSubItems?: boolean })?.hasSubItems;\n\n const hasCategories = computed(() => props.items.some(item => isCategory(item)));\n const mobileDropdownItems = computed<BentoListboxOptions>(() => {\n return props.items.flatMap(item => {\n if (isCategory(item)) {\n return [\n {\n label: item.label,\n value: `category-${item.label}`,\n items: mapNestedItems(item.items),\n } satisfies BentoListboxOptionItem,\n ];\n }\n\n if (item.items?.length) {\n return mapNestedItems([item]);\n }\n\n return [\n {\n label: item.label,\n value: item.value,\n data: { level: 0, errorCounter: item.errorCounter },\n } satisfies BentoListboxOptionItem,\n ];\n });\n });\n\n const flattenNestedItems = (items: Array<BentoSecondaryNavItemsItem>): Array<BentoSecondaryNavItemsItem> =>\n items.flatMap(item => [item, ...(item.items?.length ? flattenNestedItems(item.items) : [])]);\n\n const findFirstSelectableNestedItemValue = (items: Array<BentoSecondaryNavItemsItem>): string =>\n flattenNestedItems(items).find(item => props.allowExpandableItemNavigation || !item.items?.length)?.value ?? '';\n\n const activeItemValueFallback = computed(() => {\n if (!props.items.length) {\n return '';\n }\n\n return findFirstSelectableNestedItemValue(\n props.items.flatMap(item =>\n isCategory(item) ? flattenNestedItems(item.items) : flattenNestedItems([item])\n )\n );\n });\n\n const activeItemValue = ref(props.value ?? activeItemValueFallback.value);\n const updateActiveItemValue = (value: string) => {\n activeItemValue.value = value;\n emit('change', value);\n };\n\n // The component's state is inject on `secondary-nav-item` to determine the\n // current active item and to change its value\n const state: BentoSecondaryNavState = {\n activeItemValue: readonly(activeItemValue),\n updateActiveItemValue,\n allowExpandableItemNavigation: toRef(props, 'allowExpandableItemNavigation'),\n };\n\n watch(\n () => props.value,\n value => {\n if (value !== undefined) {\n activeItemValue.value = value;\n }\n }\n );\n\n provide(SECONDARY_NAV_STATE, state);\n</script>\n\n<script lang=\"ts\">\n /**\n * Secondary Nav offers users a structured way to access information.\n * It also provides a clear hierarchy for users to understand and navigate through various information.\n *\n * @example\n * import { BentoSecondaryNav } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSecondaryNav },\n * template: `\n * <bento-secondary-nav :value=\"value\" :items=\"items\" />\n * `,\n * setup() {\n * const value = ref(2) // Active item value\n * const items: BentoSecondaryNavItemInfo[] = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { items, value };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav.scss\" />\n"],"names":["SECONDARY_NAV_STATE","__default__$2","messages$1","tc","useI18n","activeItemValue","updateActiveItemValue","allowExpandableItemNavigation","inject","CONTENT_TRANSITION_NAME","props","__props","isOpen","ref","subItemsId","generateUid","subItemsRef","hasSubItems","computed","isItemSelected","expandleItemIsToggleOnly","contentHeight","useExpandableContentHeight","subItemsMaxHeight","conditionalClasses","emit","__emit","onClick","e","onToggleClick","hasActiveDescendant","items","value","item","hasDescendantErrors","watch","activeValue","__default__$1","__default__","messages","t","isMobile","useBreakpoints","BMediaQuerySMax","isCategory","mapNestedItems","level","currentItem","isMobileOptionDisabled","option","hasCategories","mobileDropdownItems","flattenNestedItems","findFirstSelectableNestedItemValue","activeItemValueFallback","state","readonly","toRef","provide"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAAA,IAAA,uBAAA,qBAAA;;;;;;;;;;;2NC6JHC,KAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;AAtFA,UAAA,EAAA,IAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GACA,EAAA,iBAAAG,GAAA,uBAAAC,GAAA,+BAAAC,EAAA,IAAAC,EAAAR,CAAA,GACAS,IAAA,4CAEAC,IAAAC,GAy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2,11 +2,11 @@ import { defineComponent as J, useSlots as K, computed as r, inject as ee, ref a
2
2
  import { d as ne } from "./index.oOAkh64h.js";
3
3
  import { a as ie, B as se } from "./es6.Cu3DYUPA.js";
4
4
  import { B as I } from "./typography.B3J6_tYk.js";
5
- import { u as de } from "./aria-label.CaUURpnB.js";
5
+ import { C as de } from "./checkbox-input.CVFQCfZM.js";
6
+ import { u as ue } from "./aria-label.CaUURpnB.js";
6
7
  import { g as Q } from "./generate-uid.DBWe4g6T.js";
7
- import { u as ue } from "./use-has-slot.CyMiImRQ.js";
8
- import { a as ce } from "./radio-input.FC4PVCHr.js";
9
- import { C as fe } from "./checkbox-input.CVFQCfZM.js";
8
+ import { u as ce } from "./use-has-slot.CyMiImRQ.js";
9
+ import { a as fe } from "./radio-input.FC4PVCHr.js";
10
10
  import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
11
  import { u as me } from "./form-field.D_2g7vaP.js";
12
12
  import { C as ve } from "./controls-group.B-wIl-I7.js";
@@ -84,7 +84,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
84
84
  },
85
85
  emits: ["input", "update:model-value"],
86
86
  setup(l, { emit: x }) {
87
- const e = l, S = x, z = K(), k = ue(z), u = Q("selection-card-input-id"), M = Q("selection-card-description"), g = r(
87
+ const e = l, S = x, z = K(), k = ce(z), u = Q("selection-card-input-id"), M = Q("selection-card-description"), g = r(
88
88
  () => e.modelValue
89
89
  ), L = r(
90
90
  () => e.modelValue
@@ -102,7 +102,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
102
102
  "b-selection-card__checkbox-container-text--center-aligned": B.value
103
103
  })), O = r(() => ({
104
104
  "b-selection-card__slot--with-icon": k("icon")
105
- })), $ = de({
105
+ })), $ = ue({
106
106
  ariaLabel: e.title,
107
107
  label: e.value
108
108
  }), c = r(() => Array.isArray(e.modelValue)), P = r(() => b.value ? e.value === e.modelValue : c.value ? e.modelValue.some((o) => o === e.value) : e.modelValue), b = ee(Z, _(!1)), B = r(() => !e.subtitle && !e.description), f = _(null), E = _(null), a = _(null), p = (o) => {
@@ -180,7 +180,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
180
180
  })) : R("", !0)
181
181
  ], 8, he)
182
182
  ], 2),
183
- t(b) ? (n(), d(t(ce), {
183
+ t(b) ? (n(), d(t(fe), {
184
184
  key: 0,
185
185
  id: t(u),
186
186
  ref_key: "inputRef",
@@ -193,7 +193,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
193
193
  value: l.value,
194
194
  readonly: l.readonly,
195
195
  "model-value": g.value
196
- }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (n(), d(t(fe), {
196
+ }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (n(), d(t(de), {
197
197
  key: 1,
198
198
  id: t(u),
199
199
  ref_key: "inputRef",
@@ -409,4 +409,4 @@ export {
409
409
  G as a,
410
410
  qe as s
411
411
  };
412
- //# sourceMappingURL=selection-card-group.C2Av3uyz.js.map
412
+ //# sourceMappingURL=selection-card-group.C59ZIrVm.js.map