@rotki/ui-library 3.0.0-beta.1 → 3.0.0-beta.3

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 (156) hide show
  1. package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
  2. package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  3. package/dist/components/accordions/accordions/RuiAccordions.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/components/avatars/RuiAvatar.vue_vue_type_script_setup_true_lang.js +1 -1
  5. package/dist/components/avatars/RuiAvatarGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/dist/components/buttons/button/RuiButton.js.map +1 -1
  7. package/dist/components/buttons/button/RuiButton.vue_vue_type_script_setup_true_lang.js +10 -10
  8. package/dist/components/buttons/button/RuiButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/buttons/button/button-styles.js +10 -2
  10. package/dist/components/buttons/button/button-styles.js.map +1 -1
  11. package/dist/components/buttons/button-group/RuiButtonGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/components/calendar/RuiCalendar.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/components/calendar/RuiCalendarGrid.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/dist/components/calendar/RuiCalendarHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/components/calendar/RuiCalendarMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/components/chips/RuiChip.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/components/color-picker/RuiColorDisplay.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js +9 -10
  21. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js +3 -4
  23. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js +33 -33
  25. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/date-time-picker/use-date-bounds.js +1 -1
  27. package/dist/components/date-time-picker/use-date-time-selection.js +65 -66
  28. package/dist/components/date-time-picker/use-date-time-selection.js.map +1 -1
  29. package/dist/components/date-time-picker/use-input-handler.js +1 -1
  30. package/dist/components/date-time-picker/use-keyboard-handler.js +29 -30
  31. package/dist/components/date-time-picker/use-keyboard-handler.js.map +1 -1
  32. package/dist/components/forms/auto-complete/RuiAutoComplete.js.map +1 -1
  33. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js +25 -24
  34. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/components/forms/auto-complete/auto-complete-styles.d.ts +3 -53
  36. package/dist/components/forms/auto-complete/auto-complete-styles.js +2 -1
  37. package/dist/components/forms/auto-complete/auto-complete-styles.js.map +1 -1
  38. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js +49 -49
  39. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/forms/checkbox/RuiCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  42. package/dist/components/forms/file-upload/RuiFileUpload.js.map +1 -1
  43. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js +19 -17
  44. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/components/forms/radio-button/radio/RuiRadio.vue_vue_type_script_setup_true_lang.js +1 -1
  46. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js +11 -11
  47. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js +17 -17
  49. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  50. package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
  51. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js +21 -21
  52. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/components/forms/text-field/RuiTextField.js.map +1 -1
  54. package/dist/components/forms/text-field/RuiTextField.vue.d.ts +2 -0
  55. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js +24 -20
  56. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/components/forms/text-input-styles.js +1 -1
  58. package/dist/components/forms/text-input-styles.js.map +1 -1
  59. package/dist/components/helpers/RuiFormTextDetail.js.map +1 -1
  60. package/dist/components/helpers/RuiFormTextDetail.vue.d.ts +11 -1
  61. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js +3 -3
  62. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  64. package/dist/components/logos/RuiLogo.vue_vue_type_script_setup_true_lang.js +1 -1
  65. package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js +1 -1
  66. package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js +1 -1
  67. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js +17 -17
  68. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  69. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.js.map +1 -1
  70. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js +9 -9
  71. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js +3 -4
  73. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js +1 -1
  75. package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js +1 -1
  77. package/dist/components/steppers/RuiStepper.js.map +1 -1
  78. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js +13 -8
  79. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js +27 -27
  81. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js +1 -1
  83. package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js +1 -1
  84. package/dist/components/tables/data-table/RuiDataTableCell.vue_vue_type_script_setup_true_lang.js +1 -1
  85. package/dist/components/tables/data-table/RuiDataTableGroupRow.vue_vue_type_script_setup_true_lang.js +1 -1
  86. package/dist/components/tables/data-table/RuiDataTableMobileSort.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js +23 -23
  88. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  89. package/dist/components/tables/use-pagination-navigation.js +1 -1
  90. package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js +1 -1
  91. package/dist/components/tabs/tab/use-tab-link.js +1 -1
  92. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js +6 -6
  93. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js.map +1 -1
  94. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js +11 -12
  95. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  96. package/dist/components/tabs/tabs/use-tab-indicator.js +7 -7
  97. package/dist/components/tabs/tabs/use-tab-indicator.js.map +1 -1
  98. package/dist/components/tabs/tabs/use-tab-keyboard.js +1 -1
  99. package/dist/components/tabs/tabs/use-tab-scroll.js +15 -15
  100. package/dist/components/tabs/tabs/use-tab-scroll.js.map +1 -1
  101. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js +60 -61
  102. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  103. package/dist/composables/breakpoint.js +3 -3
  104. package/dist/composables/breakpoint.js.map +1 -1
  105. package/dist/composables/dropdown-menu.d.ts +9 -9
  106. package/dist/composables/dropdown-menu.js +32 -32
  107. package/dist/composables/dropdown-menu.js.map +1 -1
  108. package/dist/composables/floating.d.ts +1 -1
  109. package/dist/composables/floating.js +11 -11
  110. package/dist/composables/floating.js.map +1 -1
  111. package/dist/composables/forms/auto-complete/focus.js +16 -17
  112. package/dist/composables/forms/auto-complete/focus.js.map +1 -1
  113. package/dist/composables/forms/auto-complete/keyboard-navigation.js +1 -1
  114. package/dist/composables/forms/auto-complete/search.js +6 -7
  115. package/dist/composables/forms/auto-complete/search.js.map +1 -1
  116. package/dist/composables/forms/auto-complete/selection.js +1 -1
  117. package/dist/composables/forms/auto-complete/value.js +1 -1
  118. package/dist/composables/forms/category-picker/use-category-picker.js +1 -1
  119. package/dist/composables/forms/use-prepend-append-width.js +6 -6
  120. package/dist/composables/forms/use-prepend-append-width.js.map +1 -1
  121. package/dist/composables/keyboard-scroll.js +5 -5
  122. package/dist/composables/keyboard-scroll.js.map +1 -1
  123. package/dist/composables/overlay-stack.js +1 -1
  124. package/dist/composables/sticky-header.js +8 -8
  125. package/dist/composables/sticky-header.js.map +1 -1
  126. package/dist/composables/tables/data-table/columns.js +1 -1
  127. package/dist/composables/tables/data-table/expansion.js +1 -1
  128. package/dist/composables/tables/data-table/grouping.js +27 -28
  129. package/dist/composables/tables/data-table/grouping.js.map +1 -1
  130. package/dist/composables/tables/data-table/page-scroll.d.ts +7 -5
  131. package/dist/composables/tables/data-table/page-scroll.js +48 -17
  132. package/dist/composables/tables/data-table/page-scroll.js.map +1 -1
  133. package/dist/composables/tables/data-table/pagination.js +1 -1
  134. package/dist/composables/tables/data-table/selection.js +37 -38
  135. package/dist/composables/tables/data-table/selection.js.map +1 -1
  136. package/dist/composables/tables/data-table/sort.js +1 -1
  137. package/dist/composables/theme.js +12 -12
  138. package/dist/composables/theme.js.map +1 -1
  139. package/dist/composables/timeout-manager.js +1 -1
  140. package/dist/index.d.ts +2 -2
  141. package/dist/index.js +2 -2
  142. package/dist/index.js.map +1 -1
  143. package/dist/style.css +6 -18
  144. package/dist/types/dom.d.ts +9 -0
  145. package/dist/types/theme.d.ts +2 -3
  146. package/dist/types/theme.js.map +1 -1
  147. package/dist/utils/form-text-detail.js +1 -1
  148. package/dist/utils/helpers.js +1 -1
  149. package/dist/vendor/@vueuse/core/dist/index.js +1577 -0
  150. package/dist/vendor/@vueuse/core/dist/index.js.map +1 -0
  151. package/dist/vendor/@vueuse/shared/dist/index.js +563 -0
  152. package/dist/vendor/@vueuse/shared/dist/index.js.map +1 -0
  153. package/dist/vite-plugin/index.js +5 -6
  154. package/dist/vite-plugin/index.js.map +1 -1
  155. package/dist/web-types.json +9 -2
  156. package/package.json +5 -4
@@ -1,9 +1,9 @@
1
+ import { get } from "../../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { cn, tv } from "../../../utils/tv.js";
2
3
  import { ButtonGroupBoundary } from "../../buttons/button-group/button-group-context.js";
3
4
  import { useFloating } from "../../../composables/floating.js";
4
5
  import { tooltipStyles } from "./tooltip-styles.js";
5
6
  import { Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
6
- import { get } from "@vueuse/shared";
7
7
  //#region src/components/overlays/tooltip/RuiTooltip.vue?vue&type=script&setup=true&lang.ts
8
8
  var _hoisted_1 = ["data-tooltip-disabled", "aria-describedby"];
9
9
  var _hoisted_2 = [
@@ -1,7 +1,7 @@
1
+ import { get } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { tv } from "../../utils/tv.js";
2
3
  import { ProgressVariant } from "./progress-props.js";
3
4
  import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, toDisplayString, unref } from "vue";
4
- import { get } from "@vueuse/shared";
5
5
  //#region src/components/progress/RuiProgress.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = [
7
7
  "aria-valuenow",
@@ -1,10 +1,10 @@
1
+ import { get, set } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { tv } from "../../utils/tv.js";
2
3
  import RuiIcon_default from "../icons/RuiIcon.js";
3
4
  import RuiProgress_default from "../progress/RuiProgress.js";
4
5
  import RuiButton_default from "../buttons/button/RuiButton.js";
5
6
  import { FooterStepperVariant } from "./footer-stepper-variant.js";
6
7
  import { Fragment, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, toDisplayString, unref, useModel, withCtx } from "vue";
7
- import { get, set } from "@vueuse/shared";
8
8
  //#region src/components/steppers/RuiFooterStepper.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = ["data-variant"];
10
10
  var _hoisted_2 = {
@@ -1 +1 @@
1
- {"version":3,"file":"RuiStepper.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-6',\n divider: 'block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiStepper.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { cn, tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n inheritAttrs: false,\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-3',\n // reaches into both steps' padding, so the line runs from just under one marker to just over the next\n divider: 'block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root({ class: cn([classNames?.root, $attrs.class]) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -1,10 +1,10 @@
1
+ import { get } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { StepperOrientation, StepperState } from "../../types/stepper.js";
2
- import { tv } from "../../utils/tv.js";
3
+ import { cn, tv } from "../../utils/tv.js";
3
4
  import RuiProgress_default from "../progress/RuiProgress.js";
4
5
  import { useKeyboardScroll } from "../../composables/keyboard-scroll.js";
5
6
  import RuiStepperIcon_default from "./RuiStepperIcon.js";
6
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useTemplateRef, watch } from "vue";
7
- import { get } from "@vueuse/shared";
8
8
  //#region src/components/steppers/RuiStepper.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = [
10
10
  "tabindex",
@@ -20,6 +20,7 @@ var _hoisted_2 = [
20
20
  var _hoisted_3 = { class: "relative flex py-2" };
21
21
  var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
22
22
  name: "RuiStepper",
23
+ inheritAttrs: false,
23
24
  __name: "RuiStepper",
24
25
  props: {
25
26
  step: {},
@@ -60,8 +61,8 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
60
61
  },
61
62
  [StepperOrientation.vertical]: {
62
63
  root: "flex-col inline-flex",
63
- step: "px-1 py-6",
64
- divider: "block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l"
64
+ step: "px-1 py-3",
65
+ divider: "block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l"
65
66
  }
66
67
  },
67
68
  state: {
@@ -181,17 +182,21 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
181
182
  });
182
183
  });
183
184
  return (_ctx, _cache) => {
184
- return openBlock(), createElementBlock("div", {
185
+ return openBlock(), createElementBlock("div", mergeProps({
185
186
  ref_key: "wrapperRef",
186
187
  ref: wrapperRef,
187
188
  tabindex: unref(scrollTabindex),
188
189
  role: "list",
189
190
  "aria-label": "Progress steps",
190
- class: normalizeClass(unref(ui).root()),
191
+ class: unref(ui).root({ class: unref(cn)([__props.classNames?.root, _ctx.$attrs.class]) })
192
+ }, {
193
+ ..._ctx.$attrs,
194
+ class: void 0
195
+ }, {
191
196
  "data-orientation": __props.orientation,
192
197
  "data-icon-top": __props.iconTop || void 0,
193
198
  "data-custom": __props.custom || void 0
194
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(renderedStep), ({ title, description, state, loading }, index) => {
199
+ }), [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(renderedStep), ({ title, description, state, loading }, index) => {
195
200
  return openBlock(), createElementBlock(Fragment, { key: index }, [index > 0 ? (openBlock(), createElementBlock("hr", {
196
201
  key: 0,
197
202
  "aria-hidden": "true",
@@ -232,7 +237,7 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
232
237
  key: 1,
233
238
  class: normalizeClass([[stepUi(resolveState(state)).subtitle(), __props.custom && __props.classNames?.subtitle], "text-caption"])
234
239
  }, toDisplayString(description), 3)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 10, _hoisted_2)], 64);
235
- }), 128))], 10, _hoisted_1);
240
+ }), 128))], 16, _hoisted_1);
236
241
  };
237
242
  }
238
243
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RuiStepper.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-6',\n divider: 'block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,aAAa,eAA+B,YAAY;EAC9D,MAAM,iBAAiB,kBAAkB,UAAU;EAEnD,MAAM,UAAU,GAAG;GACjB,OAAO;IAEL,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IAEP,SAAS;GACX;GACA,UAAU;IACR,aAAa;MACV,mBAAmB,aAAa;MAC/B,MAAM;MACN,MAAM;MACN,SAAS;KACX;MACC,mBAAmB,WAAW;MAC7B,MAAM;MAEN,MAAM;MACN,SAAS;KACX;IACF;IACA,OAAO;MAEJ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rs"],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { cn, tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n inheritAttrs: false,\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-3',\n // reaches into both steps' padding, so the line runs from just under one marker to just over the next\n divider: 'block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root({ class: cn([classNames?.root, $attrs.class]) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,aAAa,eAA+B,YAAY;EAC9D,MAAM,iBAAiB,kBAAkB,UAAU;EAEnD,MAAM,UAAU,GAAG;GACjB,OAAO;IAEL,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IAEP,SAAS;GACX;GACA,UAAU;IACR,aAAa;MACV,mBAAmB,aAAa;MAC/B,MAAM;MACN,MAAM;MACN,SAAS;KACX;MACC,mBAAmB,WAAW;MAC7B,MAAM;MAEN,MAAM;MAEN,SAAS;KACX;IACF;IACA,OAAO;MAEJ,aAAa,WAAW;MACvB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,SAAS;MACrB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,QAAQ;MACpB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;IACF;IACA,SAAS,EACP,MAAM;KACJ,MAAM;KACN,OAAO;IACT,EACF;IACA,QAAQ;K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,UAAA,GAAA,YAQE,qBAAA;;KANA,OAAM;KACL,MAAM,QAAA,SAAM,KAAA;KACb,SAAQ;KACR,UAAA;KACA,WAAU;KACV,OAAM;IAKJ,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA,CAAA,CAAA,GAAA,SAAS,eADjB,UAAA,GAAA,mBAmBM,OAAA;;KAjBH,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;KAChB,WAAQ;IAGA,GAAA,CAAA,SADR,UAAA,GAAA,mBAMO,QAAA;;KAJJ,OAAK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,MAAK,GAAI,QAAA,UAAU,QAAA,YAAY,KAAK,GACnE,iBAAiB,CAAA;IAEpB,GAAA,gBAAA,KAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAGF,eADR,UAAA,GAAA,mBAMO,QAAA;;KAJJ,OAAK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,SAAQ,GAAI,QAAA,UAAU,QAAA,YAAY,QAAQ,GACzE,cAAc,CAAA;IAEjB,GAAA,gBAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,CAAA,GAAA,EAAA"}
@@ -1,4 +1,6 @@
1
1
  import { useTable } from "../../composables/defaults/table.js";
2
+ import { get, set } from "../../vendor/@vueuse/shared/dist/index.js";
3
+ import { useElementSize, useWindowSize } from "../../vendor/@vueuse/core/dist/index.js";
2
4
  import { useKeyboardScroll } from "../../composables/keyboard-scroll.js";
3
5
  import { dataTableStyles } from "./data-table-styles.js";
4
6
  import { provideDataTableContext, provideDataTableNested, useDataTableNested } from "./data-table/context.js";
@@ -16,8 +18,6 @@ import { useTablePagination } from "../../composables/tables/data-table/paginati
16
18
  import { useTableSelection } from "../../composables/tables/data-table/selection.js";
17
19
  import { useTableSort } from "../../composables/tables/data-table/sort.js";
18
20
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, isRef, mergeModels, normalizeClass, normalizeProps, normalizeStyle, onMounted, openBlock, renderList, renderSlot, toValue, unref, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
19
- import { useElementSize, useWindowSize } from "@vueuse/core";
20
- import { get as get$1, set as set$1 } from "@vueuse/shared";
21
21
  //#region src/components/tables/RuiDataTable.vue?vue&type=script&setup=true&lang.ts
22
22
  var _hoisted_1 = {
23
23
  class: "flex justify-end p-2",
@@ -136,12 +136,12 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
136
136
  const resolvedMobileBreakpoint = computed(() => {
137
137
  if (__props.mobileBreakpoint !== void 0) return __props.mobileBreakpoint;
138
138
  const globalBreakpoint = tableDefaults.mobileBreakpoint;
139
- return globalBreakpoint === void 0 ? void 0 : get$1(globalBreakpoint);
139
+ return globalBreakpoint === void 0 ? void 0 : get(globalBreakpoint);
140
140
  });
141
141
  const resolvedMobileBasis = computed(() => {
142
142
  if (__props.mobileBreakpointBasis !== void 0) return __props.mobileBreakpointBasis;
143
143
  const globalBasis = tableDefaults.mobileBreakpointBasis;
144
- return globalBasis === void 0 ? "viewport" : get$1(globalBasis);
144
+ return globalBasis === void 0 ? "viewport" : get(globalBasis);
145
145
  });
146
146
  /**
147
147
  * Whether the stacked card layout is showing.
@@ -152,12 +152,12 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
152
152
  * `mobile === true` can still force the stacked layout on.
153
153
  */
154
154
  const isMobile = computed(() => {
155
- const breakpoint = get$1(resolvedMobileBreakpoint);
155
+ const breakpoint = get(resolvedMobileBreakpoint);
156
156
  if (breakpoint === void 0) return __props.mobile;
157
157
  if (__props.mobile) return true;
158
- return (get$1(resolvedMobileBasis) === "container" ? get$1(containerWidth) || get$1(windowWidth) : get$1(windowWidth)) < breakpoint;
158
+ return (get(resolvedMobileBasis) === "container" ? get(containerWidth) || get(windowWidth) : get(windowWidth)) < breakpoint;
159
159
  });
160
- const stickyHeaderOffset = computed(() => __props.stickyOffset !== void 0 ? __props.stickyOffset : get$1(tableDefaults.stickyOffset));
160
+ const stickyHeaderOffset = computed(() => __props.stickyOffset !== void 0 ? __props.stickyOffset : get(tableDefaults.stickyOffset));
161
161
  /**
162
162
  * A table rendered inside an expanded row must not pin its own toolbar: only
163
163
  * the outermost table sticks, otherwise the bars stack and collide.
@@ -168,7 +168,7 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
168
168
  * On mobile there is no column header to pin, so `stickyHeader` pins the
169
169
  * pagination and sort toolbar instead while the card list scrolls.
170
170
  */
171
- const stickyMobileToolbar = computed(() => __props.stickyHeader && get$1(isMobile) && !isNestedTable);
171
+ const stickyMobileToolbar = computed(() => __props.stickyHeader && get(isMobile) && !isNestedTable);
172
172
  const table = useTemplateRef("table");
173
173
  const tableScroller = useTemplateRef("tableScroller");
174
174
  const scrollerTabindex = useKeyboardScroll(tableScroller);
@@ -181,8 +181,8 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
181
181
  * resets the variable, so a nested table never inherits its parent's width.
182
182
  */
183
183
  const viewportStyle = computed(() => {
184
- const width = get$1(scrollerWidth);
185
- return { "--rui-table-viewport": width > 0 && !get$1(isMobile) ? `${width}px` : "initial" };
184
+ const width = get(scrollerWidth);
185
+ return { "--rui-table-viewport": width > 0 && !get(isMobile) ? `${width}px` : "initial" };
186
186
  });
187
187
  const { expandable, isExpanded, onToggleExpand } = useTableExpansion({
188
188
  rowAttr: __props.rowAttr,
@@ -217,8 +217,8 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
217
217
  emitUpdateOptions,
218
218
  tableDefaults
219
219
  });
220
- const noData = computed(() => get$1(filtered).length === 0);
221
- const headerLoading = computed(() => __props.loading && !get$1(noData));
220
+ const noData = computed(() => get(filtered).length === 0);
221
+ const headerLoading = computed(() => __props.loading && !get(noData));
222
222
  /**
223
223
  * A nested table (a breakdown in an expanded row) that pages its own rows drops the bar when they all fit
224
224
  * the smallest page size: no control on it could change what shows, and in a breakdown it is pure noise.
@@ -226,27 +226,27 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
226
226
  */
227
227
  const fitsSmallestPage = computed(() => {
228
228
  if (!isNestedTable || paginationModifiers.external) return false;
229
- const { limits } = get$1(paginationData);
229
+ const { limits } = get(paginationData);
230
230
  const sizes = limits ?? toValue(tableDefaults.limits);
231
- return sizes.length > 0 && get$1(sorted).length <= Math.min(...sizes);
231
+ return sizes.length > 0 && get(sorted).length <= Math.min(...sizes);
232
232
  });
233
- const showPagination = computed(() => !!get$1(paginationData) && !__props.hidePagination && !get$1(fitsSmallestPage));
233
+ const showPagination = computed(() => !!get(paginationData) && !__props.hidePagination && !get(fitsSmallestPage));
234
234
  /**
235
235
  * The one pagination bar sticks to the bottom of the view, so a long page can be turned without
236
236
  * scrolling down to it. `position: sticky` keeps it inside this table, so stacked and side-by-side
237
237
  * tables each hold their own bar. A nested table's bar stays in place: two stuck bars would stack.
238
238
  */
239
- const canStickPagination = useStickyPaginationBar(tableWrapper, () => !isNestedTable && get$1(showPagination));
240
- const stickyPagination = computed(() => !isNestedTable && get$1(canStickPagination));
239
+ const canStickPagination = useStickyPaginationBar(tableWrapper, () => !isNestedTable && get(showPagination));
240
+ const stickyPagination = computed(() => !isNestedTable && get(canStickPagination));
241
241
  const paginationBarElement = computed(() => {
242
- const element = get$1(paginationBar)?.$el;
242
+ const element = get(paginationBar)?.$el;
243
243
  return element instanceof HTMLElement ? element : void 0;
244
244
  });
245
245
  useStickyBottomInset(paginationSentinel, paginationBarElement, stickyPagination);
246
246
  /**
247
247
  * Grouped columns leave the column list, so their labels come from `cols`.
248
248
  */
249
- const groupLabels = computed(() => get$1(groupKeys).map((key) => {
249
+ const groupLabels = computed(() => get(groupKeys).map((key) => {
250
250
  const label = __props.cols?.find((column) => column.key === key)?.[__props.columnAttr];
251
251
  return {
252
252
  key: String(key),
@@ -255,14 +255,14 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
255
255
  }));
256
256
  /** Each group's list starts with its header entry, which is not a row. */
257
257
  function getGroupSize(identifier) {
258
- return Math.max((get$1(mappedGroups)[identifier]?.length ?? 0) - 1, 0);
258
+ return Math.max((get(mappedGroups)[identifier]?.length ?? 0) - 1, 0);
259
259
  }
260
260
  const ui = computed(() => dataTableStyles({
261
261
  outlined: __props.outlined,
262
262
  rounded: __props.rounded,
263
263
  dense: __props.dense,
264
264
  striped: __props.striped,
265
- mobile: get$1(isMobile)
265
+ mobile: get(isMobile)
266
266
  }));
267
267
  const { columns, colspan, headerSlots, cellValue } = useTableColumns({
268
268
  cols: () => __props.cols,
@@ -273,9 +273,9 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
273
273
  selectedData,
274
274
  slots,
275
275
  isMobile,
276
- tdResolver: (options) => get$1(ui).td(options)
276
+ tdResolver: (options) => get(ui).td(options)
277
277
  });
278
- const showMobileSort = computed(() => get$1(isMobile) && !!get$1(sortData) && get$1(columns).some((column) => column.sortable));
278
+ const showMobileSort = computed(() => get(isMobile) && !!get(sortData) && get(columns).some((column) => column.sortable));
279
279
  const itemSlotKeys = new Set(Object.keys(slots).filter((key) => key.startsWith(ITEM_SLOT_PREFIX)).map((key) => key.slice(5)));
280
280
  const { isAllSelected, indeterminate, isSelected, isDisabledRow, onToggleAll, onSelect, onCheckboxClick, deselectRemovedRows, resetCheckboxShiftState } = useTableSelection({
281
281
  rowAttr: __props.rowAttr,
@@ -296,7 +296,7 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
296
296
  }
297
297
  const { revealTableTop } = usePageScroll(tableWrapper, stickyHeaderOffset);
298
298
  async function onPaginate() {
299
- if ((get$1(expanded)?.length ?? 0) > 0) set$1(expanded, []);
299
+ if ((get(expanded)?.length ?? 0) > 0) set(expanded, []);
300
300
  if (!__props.multiPageSelect) onToggleAll(false);
301
301
  resetCheckboxShiftState();
302
302
  await revealTableTop();
@@ -311,10 +311,10 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
311
311
  setInternalTotal(items);
312
312
  });
313
313
  onMounted(() => {
314
- setInternalTotal(get$1(sorted));
314
+ setInternalTotal(get(sorted));
315
315
  });
316
316
  const classes = computed(() => {
317
- const s = get$1(ui);
317
+ const s = get(ui);
318
318
  return {
319
319
  td: s.td(),
320
320
  tr: s.tr(),
@@ -351,7 +351,7 @@ var RuiDataTable_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
351
351
  itemClass: __props.itemClass,
352
352
  onCheckboxClick,
353
353
  onCopyGroup: (header) => emit("copy:group", {
354
- key: get$1(groupKey) ?? "",
354
+ key: get(groupKey) ?? "",
355
355
  value: header.group
356
356
  }),
357
357
  onSelect,
@@ -1 +1 @@
1
- {"version":3,"file":"RuiDataTable.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/tables/RuiDataTable.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T extends object, IdType extends keyof T = keyof T\">\nimport type { GroupHeader } from '@/composables/tables/data-table/types';\nimport { dataTableStyles } from '@/components/tables/data-table-styles';\nimport { type DataTableClasses, type DataTableGroupLabel, provideDataTableContext, provideDataTableNested, useDataTableNested } from '@/components/tables/data-table/context';\nimport RuiDataTableBody from '@/components/tables/data-table/RuiDataTableBody.vue';\nimport RuiDataTableMobileSort from '@/components/tables/data-table/RuiDataTableMobileSort.vue';\nimport RuiTableHead, {\n type GroupData,\n type TableColumn,\n type TableRowKeyData,\n type TableSortData,\n} from '@/components/tables/RuiTableHead.vue';\nimport RuiTablePagination, {\n type TablePaginationData,\n} from '@/components/tables/RuiTablePagination.vue';\nimport { GroupExpandButtonPosition } from '@/components/tables/table-props';\nimport { useTable } from '@/composables/defaults/table';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { useStickyTableHeader } from '@/composables/sticky-header';\nimport { useTableColumns } from '@/composables/tables/data-table/columns';\nimport { useTableExpansion } from '@/composables/tables/data-table/expansion';\nimport { useTableGrouping } from '@/composables/tables/data-table/grouping';\nimport { usePageScroll, useStickyBottomInset, useStickyPaginationBar } from '@/composables/tables/data-table/page-scroll';\nimport { useTablePagination } from '@/composables/tables/data-table/pagination';\nimport { useTableSelection } from '@/composables/tables/data-table/selection';\nimport { useTableSort } from '@/composables/tables/data-table/sort';\n\nexport type { GroupedTableRow, GroupHeader, TableOptions } from '@/composables/tables/data-table/types';\n\nexport interface Props<T, K extends keyof T> {\n /**\n * list of items for each row\n */\n rows: readonly T[];\n /**\n * the attribute used to identify each row uniquely for selection, usually `id`\n */\n rowAttr: K;\n /**\n * model for internal searching\n */\n search?: string;\n /**\n * model for items per page\n * will be used if the `pagination` model isn't specified\n */\n itemsPerPage?: number;\n /**\n * list of column definitions\n */\n cols?: TableColumn<T>[];\n /**\n * attribute to use from column definitions to display column titles\n */\n columnAttr?: keyof TableColumn<T>;\n /**\n * flag to show a more or less spacious table\n */\n dense?: boolean;\n /**\n * flag to outline the flag with a border\n */\n outlined?: boolean;\n /**\n * should add zebra-striping to the table row\n */\n striped?: boolean;\n /**\n * flag to show loading state of the table\n * triggers indefinite progress at the bottom of the table header\n */\n loading?: boolean;\n disablePerPage?: boolean;\n /**\n * Maximum number of pages before the jump-to-page dropdown is replaced with\n * a numeric input. Defaults to `500`. Forwarded to `RuiTablePagination`.\n */\n rangesThreshold?: number;\n /**\n * The text and icon shown when there are no rows, e.g.\n * `:empty=\"\\{ icon: 'transactions-line', label: 'No transactions found' \\}\"`\n */\n empty?: {\n label?: string;\n description?: string;\n };\n /**\n * Why the last read failed. Shown above any rows kept from an earlier read,\n * or in place of the empty state; `loading` still takes precedence.\n */\n error?: string;\n /** Heading for that failure. */\n errorTitle?: string;\n /** Label for the retry control; without one, no control is offered. */\n retryText?: string;\n /**\n * Hide the pagination bar. The bar sits under the table and sticks to the bottom of the view\n * while the table runs past it.\n */\n hidePagination?: boolean;\n\n rounded?: 'sm' | 'md' | 'lg';\n /**\n * make expansion work like accordion\n */\n singleExpand?: boolean;\n /**\n * make table head stick to top on scroll\n */\n stickyHeader?: boolean;\n stickyOffset?: number;\n /**\n * Affects how the items per page work across the app.\n * When true, changing the items per page setting in one table will affect other tables.\n */\n globalItemsPerPage?: boolean;\n groupExpandButtonPosition?: GroupExpandButtonPosition;\n disabledRows?: readonly T[];\n multiPageSelect?: boolean;\n itemClass?: ((item: T) => string) | string;\n /**\n * Render each row as a stacked card instead of a table row once the measured\n * width is narrower than this width (in pixels). Columns flagged with\n * `mobileHidden` are dropped in this layout. Falls back to the global\n * `mobileBreakpoint` table default; leave both unset to keep the default table\n * layout at every width.\n */\n mobileBreakpoint?: number;\n /**\n * What the `mobileBreakpoint` is measured against: the browser `viewport`\n * (default) or this table's own `container` width. Use `container` when the\n * table lives in a narrow region of a wider window. Falls back to the global\n * `mobileBreakpointBasis` table default.\n */\n mobileBreakpointBasis?: 'viewport' | 'container';\n /**\n * Force the stacked mobile card layout on (`true`) or off (`false`),\n * regardless of `mobileBreakpoint`. Leave unset to derive it from the width.\n */\n mobile?: boolean;\n}\n\ndefineOptions({\n name: 'RuiDataTable',\n});\n\nconst selectedData = defineModel<T[IdType][]>();\n\nconst expanded = defineModel<T[]>('expanded');\n\nconst [pagination, paginationModifiers] = defineModel<TablePaginationData, 'external'>('pagination');\n\nconst [sort, sortModifiers] = defineModel<TableSortData<T>, 'external'>('sort');\n\nconst group = defineModel<TableRowKeyData<T>>('group');\n\nconst collapsed = defineModel<T[]>('collapsed');\n\nconst {\n rows,\n rowAttr,\n search = '',\n itemsPerPage = 10,\n cols,\n columnAttr = 'label',\n dense = false,\n outlined = false,\n striped = false,\n loading = false,\n disablePerPage = false,\n rangesThreshold = 500,\n empty = { label: 'No item found' },\n error = '',\n errorTitle = '',\n retryText = '',\n hidePagination = false,\n rounded = 'md',\n singleExpand = false,\n stickyHeader = false,\n stickyOffset,\n globalItemsPerPage = undefined,\n groupExpandButtonPosition = GroupExpandButtonPosition.start,\n disabledRows,\n multiPageSelect = false,\n itemClass = '',\n mobileBreakpoint,\n mobileBreakpointBasis,\n mobile,\n} = defineProps<Props<T, IdType>>();\n\nconst emit = defineEmits<{\n 'update:options': [value: { pagination?: TablePaginationData; sort?: TableSortData<T> }];\n 'copy:group': [value: GroupData<T>];\n 'retry': [];\n}>();\n\nconst slots = defineSlots<Partial<\n Record<`header.${string}`, (props: { column: TableColumn<T> }) => any> &\n Record<`item.${string}`, (props: { column: TableColumn<T>; row: T; index: number }) => any> & {\n 'body.prepend': (props: { colspan: number }) => any;\n 'body.append': (props: { colspan: number }) => any;\n 'group.header': (props: {\n colspan: number;\n header: GroupHeader<T>;\n isOpen: boolean;\n toggle: () => void;\n }) => any;\n 'group.header.content': (props: { header: GroupHeader<T>; groupKey: string }) => any;\n 'expanded-item': (props: { row: T; index: number }) => any;\n 'no-data': () => any;\n 'empty-description': () => any;\n 'error': () => any;\n 'tfoot': () => any;\n }\n>>();\n\nconst tableDefaults = useTable();\n\nconst tableWrapper = useTemplateRef<HTMLElement>('tableWrapper');\nconst paginationSentinel = useTemplateRef<HTMLElement>('paginationSentinel');\nconst paginationBar = useTemplateRef<InstanceType<typeof RuiTablePagination>>('paginationBar');\nconst { width: windowWidth } = useWindowSize();\nconst { width: containerWidth } = useElementSize(tableWrapper);\n\n// Per-table props win, then the global table defaults.\nconst resolvedMobileBreakpoint = computed<number | undefined>(() => {\n if (mobileBreakpoint !== undefined)\n return mobileBreakpoint;\n const globalBreakpoint = tableDefaults.mobileBreakpoint;\n return globalBreakpoint === undefined ? undefined : get(globalBreakpoint);\n});\nconst resolvedMobileBasis = computed<'viewport' | 'container'>(() => {\n if (mobileBreakpointBasis !== undefined)\n return mobileBreakpointBasis;\n const globalBasis = tableDefaults.mobileBreakpointBasis;\n return globalBasis === undefined ? 'viewport' : get(globalBasis);\n});\n\n/**\n * Whether the stacked card layout is showing.\n *\n * Vue coerces an absent Boolean prop to `false`, so `mobile` cannot say\n * \"unset\": with no breakpoint configured it is the manual switch, defaulting\n * to desktop, and with one configured the breakpoint drives the layout while\n * `mobile === true` can still force the stacked layout on.\n */\nconst isMobile = computed<boolean>(() => {\n const breakpoint = get(resolvedMobileBreakpoint);\n if (breakpoint === undefined)\n return mobile;\n if (mobile)\n return true;\n // `containerWidth` is 0 until measured; the viewport keeps the first paint off mobile\n const width = get(resolvedMobileBasis) === 'container'\n ? (get(containerWidth) || get(windowWidth))\n : get(windowWidth);\n return width < breakpoint;\n});\n\nconst stickyHeaderOffset = computed<number | undefined>(() =>\n stickyOffset !== undefined ? stickyOffset : get(tableDefaults.stickyOffset),\n);\n\n/**\n * A table rendered inside an expanded row must not pin its own toolbar: only\n * the outermost table sticks, otherwise the bars stack and collide.\n */\nconst isNestedTable = useDataTableNested();\nprovideDataTableNested();\n\n/**\n * On mobile there is no column header to pin, so `stickyHeader` pins the\n * pagination and sort toolbar instead while the card list scrolls.\n */\nconst stickyMobileToolbar = computed<boolean>(() => stickyHeader && get(isMobile) && !isNestedTable);\n\nconst table = useTemplateRef<HTMLTableElement>('table');\nconst tableScroller = useTemplateRef<HTMLElement>('tableScroller');\nconst scrollerTabindex = useKeyboardScroll(tableScroller);\n\nconst { stick } = useStickyTableHeader(\n () => stickyHeader,\n stickyHeaderOffset,\n { table },\n);\n\nconst { width: scrollerWidth } = useElementSize(tableScroller);\n\n/**\n * The visible width of the table, which an expanded row caps its content to.\n * Without the cap a wide panel, such as a nested table, sets the minimum width\n * of the whole table and pushes every column past the scroller. `initial`\n * resets the variable, so a nested table never inherits its parent's width.\n */\nconst viewportStyle = computed<Record<string, string>>(() => {\n const width = get(scrollerWidth);\n return { '--rui-table-viewport': width > 0 && !get(isMobile) ? `${width}px` : 'initial' };\n});\n\nconst { expandable, isExpanded, onToggleExpand } = useTableExpansion<T, IdType>(\n { rowAttr, singleExpand },\n { expanded },\n);\n\nfunction emitUpdateOptions(opts: { sort?: TableSortData<T>; pagination?: TablePaginationData }): void {\n emit('update:options', opts);\n}\n\nconst {\n sortData,\n sortedMap,\n sorted,\n onSort: applySort,\n} = useTableSort<T>(\n { rows: () => rows, search: () => search, sortModifiersExternal: sortModifiers.external },\n {\n sort,\n pagination,\n emitUpdateOptions,\n },\n);\n\nconst {\n groupKeys,\n groupKey,\n grouped,\n mappedGroups,\n isExpandedGroup,\n isHiddenRow,\n onToggleExpandGroup,\n onUngroup,\n} = useTableGrouping<T, IdType>(\n { rowAttr },\n {\n group,\n collapsed,\n sorted,\n },\n);\n\nconst {\n paginationData,\n filtered,\n setInternalTotal,\n resetPagination,\n} = useTablePagination<T>(\n {\n itemsPerPage,\n paginationModifiersExternal: paginationModifiers.external,\n globalItemsPerPage,\n },\n {\n pagination,\n grouped,\n isHiddenRow,\n sort,\n emitUpdateOptions,\n tableDefaults,\n },\n);\n\nconst noData = computed<boolean>(() => get(filtered).length === 0);\n\n// one loader at a time: the header bar marks a refetch over rows, and an empty table shows only its spinner row\nconst headerLoading = computed<boolean>(() => loading && !get(noData));\n\n/**\n * A nested table (a breakdown in an expanded row) that pages its own rows drops the bar when they all fit\n * the smallest page size: no control on it could change what shows, and in a breakdown it is pure noise.\n * A top-level table keeps it as a summary; a server-paged one keeps it, since only the server knows the total.\n */\nconst fitsSmallestPage = computed<boolean>(() => {\n if (!isNestedTable || paginationModifiers.external)\n return false;\n const { limits } = get(paginationData);\n const sizes = limits ?? toValue(tableDefaults.limits);\n // the rows themselves, not the pagination total, which is only filled in after mount\n return sizes.length > 0 && get(sorted).length <= Math.min(...sizes);\n});\n\nconst showPagination = computed<boolean>(() => !!get(paginationData) && !hidePagination && !get(fitsSmallestPage));\n\n/**\n * The one pagination bar sticks to the bottom of the view, so a long page can be turned without\n * scrolling down to it. `position: sticky` keeps it inside this table, so stacked and side-by-side\n * tables each hold their own bar. A nested table's bar stays in place: two stuck bars would stack.\n */\nconst canStickPagination = useStickyPaginationBar(tableWrapper, () => !isNestedTable && get(showPagination));\nconst stickyPagination = computed<boolean>(() => !isNestedTable && get(canStickPagination));\n\nconst paginationBarElement = computed<HTMLElement | undefined>(() => {\n const element: unknown = get(paginationBar)?.$el;\n return element instanceof HTMLElement ? element : undefined;\n});\n\n// while the bar is stuck to the page, `--rui-sticky-bottom` tells the page's floating parts to rise above it\nuseStickyBottomInset(paginationSentinel, paginationBarElement, stickyPagination);\n\n/**\n * Grouped columns leave the column list, so their labels come from `cols`.\n */\nconst groupLabels = computed<DataTableGroupLabel[]>(() => get(groupKeys).map((key) => {\n const label = cols?.find(column => column.key === key)?.[columnAttr];\n return {\n key: String(key),\n label: label === undefined || label === null ? String(key) : String(label),\n };\n}));\n\n/** Each group's list starts with its header entry, which is not a row. */\nfunction getGroupSize(identifier: string): number {\n return Math.max((get(mappedGroups)[identifier]?.length ?? 0) - 1, 0);\n}\n\nconst ui = computed<ReturnType<typeof dataTableStyles>>(() => dataTableStyles({\n outlined,\n rounded,\n dense,\n striped,\n mobile: get(isMobile),\n}));\n\nconst { columns, colspan, headerSlots, cellValue } = useTableColumns<T, IdType>({\n cols: () => cols,\n columnAttr,\n rows: () => rows,\n expandable,\n groupKeys,\n selectedData,\n slots,\n isMobile,\n tdResolver: options => get(ui).td(options),\n});\n\nconst showMobileSort = computed<boolean>(() =>\n get(isMobile) && !!get(sortData) && get(columns).some(column => column.sortable),\n);\n\nconst ITEM_SLOT_PREFIX = 'item.';\n\n// Slot keys are static for the component lifetime — no reactivity needed\nconst itemSlotKeys: Set<string> = new Set(\n Object.keys(slots)\n .filter((key): key is `item.${string}` => key.startsWith(ITEM_SLOT_PREFIX))\n .map(key => key.slice(ITEM_SLOT_PREFIX.length)),\n);\n\nconst {\n isAllSelected,\n indeterminate,\n isSelected,\n isDisabledRow,\n onToggleAll,\n onSelect,\n onCheckboxClick,\n deselectRemovedRows,\n resetCheckboxShiftState,\n} = useTableSelection<T, IdType>(\n { rowAttr, multiPageSelect, disabledRows: () => disabledRows },\n { selectedData, filtered },\n);\n\n/**\n * Sorting clears the selection. That lives here rather than in either\n * composable, which would make sort and selection depend on each other.\n */\nfunction onSort(payload: Parameters<typeof applySort>[0]): void {\n applySort(payload);\n if (!multiPageSelect)\n onToggleAll(false);\n resetCheckboxShiftState();\n}\n\nconst { revealTableTop } = usePageScroll(tableWrapper, stickyHeaderOffset);\n\nasync function onPaginate(): Promise<void> {\n if ((get(expanded)?.length ?? 0) > 0)\n set(expanded, []);\n if (!multiPageSelect)\n onToggleAll(false);\n resetCheckboxShiftState();\n await revealTableTop();\n}\n\n// Reset pagination page to 1 on search query change\nwatch(() => search, () => {\n resetPagination();\n onToggleAll(false);\n resetCheckboxShiftState();\n});\n\nwatch(sorted, (items) => {\n if (!multiPageSelect)\n deselectRemovedRows();\n setInternalTotal(items);\n});\n\nonMounted(() => {\n setInternalTotal(get(sorted));\n});\n\nconst classes = computed<DataTableClasses>(() => {\n const s = get(ui);\n return {\n td: s.td(),\n tr: s.tr(),\n trSelected: s.tr({ rowVariant: 'selected' }),\n trExpandable: s.tr({ rowVariant: 'expandable' }),\n trExpandedParent: s.tr({ rowVariant: 'expandedParent' }),\n trGroup: s.tr({ rowVariant: 'group' }),\n trEmpty: s.tr({ rowVariant: 'empty' }),\n checkbox: s.checkbox(),\n tbody: s.tbody(),\n tbodyLoader: s.tbodyLoader(),\n };\n});\n\nprovideDataTableContext<T, IdType>({\n // Reactive (ComputedRef/Ref) — destructuring preserves reactivity via Vue template auto-unwrap\n classes,\n columns,\n colspan,\n expandable,\n groupKey,\n groupLabels,\n isMobile,\n selectedData,\n // Static values\n cellValue,\n columnAttr,\n dense,\n getGroupSize,\n getRowId: (row: T) => row[rowAttr],\n itemSlotKeys,\n groupExpandButtonPosition,\n isDisabledRow,\n isExpanded,\n isExpandedGroup,\n isSelected,\n itemClass,\n onCheckboxClick,\n onCopyGroup: (header: GroupHeader<T>) => emit('copy:group', { key: get(groupKey) ?? '', value: header.group }),\n onSelect,\n onToggleExpand,\n onToggleExpandGroup,\n onUngroup,\n});\n</script>\n\n<template>\n <div\n ref=\"tableWrapper\"\n :class=\"ui.wrapper()\"\n data-id=\"table-wrapper\"\n >\n <div\n v-if=\"showMobileSort\"\n :class=\"stickyMobileToolbar ? 'sticky z-rui-raised bg-rui-background pt-2' : 'contents'\"\n :style=\"stickyMobileToolbar ? { top: `${stickyHeaderOffset ?? 0}px` } : undefined\"\n data-id=\"table-mobile-toolbar-sticky\"\n >\n <div\n class=\"flex justify-end p-2\"\n data-id=\"table-mobile-toolbar\"\n >\n <RuiDataTableMobileSort\n :columns=\"columns\"\n :column-attr=\"columnAttr\"\n :sorted-map=\"sortedMap\"\n :dense=\"dense\"\n @sort=\"onSort($event)\"\n />\n </div>\n </div>\n <div\n ref=\"tableScroller\"\n :class=\"[ui.scroller(), isMobile && !showMobileSort ? 'pt-2' : '']\"\n :tabindex=\"scrollerTabindex\"\n data-id=\"table-scroller\"\n >\n <table\n ref=\"table\"\n :class=\"ui.table()\"\n :style=\"viewportStyle\"\n :aria-busy=\"loading\"\n >\n <RuiTableHead\n v-if=\"!isMobile\"\n :loading=\"headerLoading\"\n :indeterminate=\"indeterminate\"\n :capitalize-headers=\"!cols\"\n :colspan=\"colspan\"\n :column-attr=\"columnAttr\"\n :columns=\"columns\"\n :dense=\"dense\"\n :disable-check-all=\"!filtered?.length\"\n :is-all-selected=\"isAllSelected\"\n :selectable=\"!!selectedData\"\n :sort-data=\"sortData\"\n :sorted-map=\"sortedMap\"\n :stick=\"stick\"\n :sticky-header=\"stickyHeader\"\n @sort=\"onSort($event)\"\n @select:all=\"onToggleAll($event)\"\n >\n <template\n v-for=\"headerSlot in headerSlots\"\n #[headerSlot]=\"slotData\"\n >\n <slot\n :name=\"headerSlot\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiTableHead>\n <RuiTableHead\n v-if=\"stickyHeader && !isMobile\"\n :loading=\"headerLoading\"\n :capitalize-headers=\"!cols\"\n :colspan=\"colspan\"\n :column-attr=\"columnAttr\"\n :columns=\"columns\"\n :dense=\"dense\"\n :selectable=\"!!selectedData\"\n :sort-data=\"sortData\"\n :sorted-map=\"sortedMap\"\n data-id=\"head-clone\"\n class=\"opacity-0 invisible\"\n >\n <template\n v-for=\"headerSlot in headerSlots\"\n #[headerSlot]=\"slotData\"\n >\n <slot\n :name=\"headerSlot\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiTableHead>\n <RuiDataTableBody\n :filtered=\"filtered\"\n :loading=\"loading\"\n :no-data=\"noData\"\n :empty=\"empty\"\n :error=\"error\"\n :error-title=\"errorTitle\"\n :retry-text=\"retryText\"\n @retry=\"emit('retry')\"\n >\n <template\n v-if=\"slots.error\"\n #error\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"error\" />\n </template>\n <template\n v-if=\"slots['body.prepend']\"\n #body.prepend=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"body.prepend\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['group.header']\"\n #group.header=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"group.header\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['group.header.content']\"\n #group.header.content=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"group.header.content\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-for=\"key in itemSlotKeys\"\n #[`item.${key}`]=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n :name=\"`item.${key}`\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['expanded-item']\"\n #expanded-item=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"expanded-item\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['no-data']\"\n #no-data\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"no-data\" />\n </template>\n <template\n v-if=\"slots['empty-description']\"\n #empty-description\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"empty-description\" />\n </template>\n <template\n v-if=\"slots['body.append']\"\n #body.append=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"body.append\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiDataTableBody>\n <tfoot>\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"tfoot\" />\n </tfoot>\n </table>\n </div>\n <!-- the bar's own place after the rows: below the view, the bar is stuck; no divider of its own -->\n <div\n v-if=\"paginationData && showPagination && !isNestedTable\"\n ref=\"paginationSentinel\"\n class=\"border-0!\"\n aria-hidden=\"true\"\n data-id=\"table-pagination-sentinel\"\n />\n <RuiTablePagination\n v-if=\"paginationData && showPagination\"\n ref=\"paginationBar\"\n v-model=\"paginationData\"\n :class=\"ui.pagination({ sticky: stickyPagination })\"\n :dense=\"dense\"\n :loading=\"loading\"\n :mobile=\"isMobile\"\n :disable-per-page=\"disablePerPage\"\n :ranges-threshold=\"rangesThreshold\"\n :data-sticky=\"stickyPagination || undefined\"\n data-id=\"table-pagination\"\n @update:model-value=\"onPaginate()\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsbA,IAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;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A;KACT,QAAQ,MAAA,QAAA;KACR,oBAAkB,QAAA;KAClB,oBAAkB,QAAA;KAClB,eAAa,MAAA,gBAAA,KAAoB,KAAA;KAClC,WAAQ"}
1
+ {"version":3,"file":"RuiDataTable.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/tables/RuiDataTable.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T extends object, IdType extends keyof T = keyof T\">\nimport type { GroupHeader } from '@/composables/tables/data-table/types';\nimport { dataTableStyles } from '@/components/tables/data-table-styles';\nimport { type DataTableClasses, type DataTableGroupLabel, provideDataTableContext, provideDataTableNested, useDataTableNested } from '@/components/tables/data-table/context';\nimport RuiDataTableBody from '@/components/tables/data-table/RuiDataTableBody.vue';\nimport RuiDataTableMobileSort from '@/components/tables/data-table/RuiDataTableMobileSort.vue';\nimport RuiTableHead, {\n type GroupData,\n type TableColumn,\n type TableRowKeyData,\n type TableSortData,\n} from '@/components/tables/RuiTableHead.vue';\nimport RuiTablePagination, {\n type TablePaginationData,\n} from '@/components/tables/RuiTablePagination.vue';\nimport { GroupExpandButtonPosition } from '@/components/tables/table-props';\nimport { useTable } from '@/composables/defaults/table';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { useStickyTableHeader } from '@/composables/sticky-header';\nimport { useTableColumns } from '@/composables/tables/data-table/columns';\nimport { useTableExpansion } from '@/composables/tables/data-table/expansion';\nimport { useTableGrouping } from '@/composables/tables/data-table/grouping';\nimport { usePageScroll, useStickyBottomInset, useStickyPaginationBar } from '@/composables/tables/data-table/page-scroll';\nimport { useTablePagination } from '@/composables/tables/data-table/pagination';\nimport { useTableSelection } from '@/composables/tables/data-table/selection';\nimport { useTableSort } from '@/composables/tables/data-table/sort';\n\nexport type { GroupedTableRow, GroupHeader, TableOptions } from '@/composables/tables/data-table/types';\n\nexport interface Props<T, K extends keyof T> {\n /**\n * list of items for each row\n */\n rows: readonly T[];\n /**\n * the attribute used to identify each row uniquely for selection, usually `id`\n */\n rowAttr: K;\n /**\n * model for internal searching\n */\n search?: string;\n /**\n * model for items per page\n * will be used if the `pagination` model isn't specified\n */\n itemsPerPage?: number;\n /**\n * list of column definitions\n */\n cols?: TableColumn<T>[];\n /**\n * attribute to use from column definitions to display column titles\n */\n columnAttr?: keyof TableColumn<T>;\n /**\n * flag to show a more or less spacious table\n */\n dense?: boolean;\n /**\n * flag to outline the flag with a border\n */\n outlined?: boolean;\n /**\n * should add zebra-striping to the table row\n */\n striped?: boolean;\n /**\n * flag to show loading state of the table\n * triggers indefinite progress at the bottom of the table header\n */\n loading?: boolean;\n disablePerPage?: boolean;\n /**\n * Maximum number of pages before the jump-to-page dropdown is replaced with\n * a numeric input. Defaults to `500`. Forwarded to `RuiTablePagination`.\n */\n rangesThreshold?: number;\n /**\n * The text and icon shown when there are no rows, e.g.\n * `:empty=\"\\{ icon: 'transactions-line', label: 'No transactions found' \\}\"`\n */\n empty?: {\n label?: string;\n description?: string;\n };\n /**\n * Why the last read failed. Shown above any rows kept from an earlier read,\n * or in place of the empty state; `loading` still takes precedence.\n */\n error?: string;\n /** Heading for that failure. */\n errorTitle?: string;\n /** Label for the retry control; without one, no control is offered. */\n retryText?: string;\n /**\n * Hide the pagination bar. The bar sits under the table and sticks to the bottom of the view\n * while the table runs past it.\n */\n hidePagination?: boolean;\n\n rounded?: 'sm' | 'md' | 'lg';\n /**\n * make expansion work like accordion\n */\n singleExpand?: boolean;\n /**\n * make table head stick to top on scroll\n */\n stickyHeader?: boolean;\n stickyOffset?: number;\n /**\n * Affects how the items per page work across the app.\n * When true, changing the items per page setting in one table will affect other tables.\n */\n globalItemsPerPage?: boolean;\n groupExpandButtonPosition?: GroupExpandButtonPosition;\n disabledRows?: readonly T[];\n multiPageSelect?: boolean;\n itemClass?: ((item: T) => string) | string;\n /**\n * Render each row as a stacked card instead of a table row once the measured\n * width is narrower than this width (in pixels). Columns flagged with\n * `mobileHidden` are dropped in this layout. Falls back to the global\n * `mobileBreakpoint` table default; leave both unset to keep the default table\n * layout at every width.\n */\n mobileBreakpoint?: number;\n /**\n * What the `mobileBreakpoint` is measured against: the browser `viewport`\n * (default) or this table's own `container` width. Use `container` when the\n * table lives in a narrow region of a wider window. Falls back to the global\n * `mobileBreakpointBasis` table default.\n */\n mobileBreakpointBasis?: 'viewport' | 'container';\n /**\n * Force the stacked mobile card layout on (`true`) or off (`false`),\n * regardless of `mobileBreakpoint`. Leave unset to derive it from the width.\n */\n mobile?: boolean;\n}\n\ndefineOptions({\n name: 'RuiDataTable',\n});\n\nconst selectedData = defineModel<T[IdType][]>();\n\nconst expanded = defineModel<T[]>('expanded');\n\nconst [pagination, paginationModifiers] = defineModel<TablePaginationData, 'external'>('pagination');\n\nconst [sort, sortModifiers] = defineModel<TableSortData<T>, 'external'>('sort');\n\nconst group = defineModel<TableRowKeyData<T>>('group');\n\nconst collapsed = defineModel<T[]>('collapsed');\n\nconst {\n rows,\n rowAttr,\n search = '',\n itemsPerPage = 10,\n cols,\n columnAttr = 'label',\n dense = false,\n outlined = false,\n striped = false,\n loading = false,\n disablePerPage = false,\n rangesThreshold = 500,\n empty = { label: 'No item found' },\n error = '',\n errorTitle = '',\n retryText = '',\n hidePagination = false,\n rounded = 'md',\n singleExpand = false,\n stickyHeader = false,\n stickyOffset,\n globalItemsPerPage = undefined,\n groupExpandButtonPosition = GroupExpandButtonPosition.start,\n disabledRows,\n multiPageSelect = false,\n itemClass = '',\n mobileBreakpoint,\n mobileBreakpointBasis,\n mobile,\n} = defineProps<Props<T, IdType>>();\n\nconst emit = defineEmits<{\n 'update:options': [value: { pagination?: TablePaginationData; sort?: TableSortData<T> }];\n 'copy:group': [value: GroupData<T>];\n 'retry': [];\n}>();\n\nconst slots = defineSlots<Partial<\n Record<`header.${string}`, (props: { column: TableColumn<T> }) => any> &\n Record<`item.${string}`, (props: { column: TableColumn<T>; row: T; index: number }) => any> & {\n 'body.prepend': (props: { colspan: number }) => any;\n 'body.append': (props: { colspan: number }) => any;\n 'group.header': (props: {\n colspan: number;\n header: GroupHeader<T>;\n isOpen: boolean;\n toggle: () => void;\n }) => any;\n 'group.header.content': (props: { header: GroupHeader<T>; groupKey: string }) => any;\n 'expanded-item': (props: { row: T; index: number }) => any;\n 'no-data': () => any;\n 'empty-description': () => any;\n 'error': () => any;\n 'tfoot': () => any;\n }\n>>();\n\nconst tableDefaults = useTable();\n\nconst tableWrapper = useTemplateRef<HTMLElement>('tableWrapper');\nconst paginationSentinel = useTemplateRef<HTMLElement>('paginationSentinel');\nconst paginationBar = useTemplateRef<InstanceType<typeof RuiTablePagination>>('paginationBar');\nconst { width: windowWidth } = useWindowSize();\nconst { width: containerWidth } = useElementSize(tableWrapper);\n\n// Per-table props win, then the global table defaults.\nconst resolvedMobileBreakpoint = computed<number | undefined>(() => {\n if (mobileBreakpoint !== undefined)\n return mobileBreakpoint;\n const globalBreakpoint = tableDefaults.mobileBreakpoint;\n return globalBreakpoint === undefined ? undefined : get(globalBreakpoint);\n});\nconst resolvedMobileBasis = computed<'viewport' | 'container'>(() => {\n if (mobileBreakpointBasis !== undefined)\n return mobileBreakpointBasis;\n const globalBasis = tableDefaults.mobileBreakpointBasis;\n return globalBasis === undefined ? 'viewport' : get(globalBasis);\n});\n\n/**\n * Whether the stacked card layout is showing.\n *\n * Vue coerces an absent Boolean prop to `false`, so `mobile` cannot say\n * \"unset\": with no breakpoint configured it is the manual switch, defaulting\n * to desktop, and with one configured the breakpoint drives the layout while\n * `mobile === true` can still force the stacked layout on.\n */\nconst isMobile = computed<boolean>(() => {\n const breakpoint = get(resolvedMobileBreakpoint);\n if (breakpoint === undefined)\n return mobile;\n if (mobile)\n return true;\n // `containerWidth` is 0 until measured; the viewport keeps the first paint off mobile\n const width = get(resolvedMobileBasis) === 'container'\n ? (get(containerWidth) || get(windowWidth))\n : get(windowWidth);\n return width < breakpoint;\n});\n\nconst stickyHeaderOffset = computed<number | undefined>(() =>\n stickyOffset !== undefined ? stickyOffset : get(tableDefaults.stickyOffset),\n);\n\n/**\n * A table rendered inside an expanded row must not pin its own toolbar: only\n * the outermost table sticks, otherwise the bars stack and collide.\n */\nconst isNestedTable = useDataTableNested();\nprovideDataTableNested();\n\n/**\n * On mobile there is no column header to pin, so `stickyHeader` pins the\n * pagination and sort toolbar instead while the card list scrolls.\n */\nconst stickyMobileToolbar = computed<boolean>(() => stickyHeader && get(isMobile) && !isNestedTable);\n\nconst table = useTemplateRef<HTMLTableElement>('table');\nconst tableScroller = useTemplateRef<HTMLElement>('tableScroller');\nconst scrollerTabindex = useKeyboardScroll(tableScroller);\n\nconst { stick } = useStickyTableHeader(\n () => stickyHeader,\n stickyHeaderOffset,\n { table },\n);\n\nconst { width: scrollerWidth } = useElementSize(tableScroller);\n\n/**\n * The visible width of the table, which an expanded row caps its content to.\n * Without the cap a wide panel, such as a nested table, sets the minimum width\n * of the whole table and pushes every column past the scroller. `initial`\n * resets the variable, so a nested table never inherits its parent's width.\n */\nconst viewportStyle = computed<Record<string, string>>(() => {\n const width = get(scrollerWidth);\n return { '--rui-table-viewport': width > 0 && !get(isMobile) ? `${width}px` : 'initial' };\n});\n\nconst { expandable, isExpanded, onToggleExpand } = useTableExpansion<T, IdType>(\n { rowAttr, singleExpand },\n { expanded },\n);\n\nfunction emitUpdateOptions(opts: { sort?: TableSortData<T>; pagination?: TablePaginationData }): void {\n emit('update:options', opts);\n}\n\nconst {\n sortData,\n sortedMap,\n sorted,\n onSort: applySort,\n} = useTableSort<T>(\n { rows: () => rows, search: () => search, sortModifiersExternal: sortModifiers.external },\n {\n sort,\n pagination,\n emitUpdateOptions,\n },\n);\n\nconst {\n groupKeys,\n groupKey,\n grouped,\n mappedGroups,\n isExpandedGroup,\n isHiddenRow,\n onToggleExpandGroup,\n onUngroup,\n} = useTableGrouping<T, IdType>(\n { rowAttr },\n {\n group,\n collapsed,\n sorted,\n },\n);\n\nconst {\n paginationData,\n filtered,\n setInternalTotal,\n resetPagination,\n} = useTablePagination<T>(\n {\n itemsPerPage,\n paginationModifiersExternal: paginationModifiers.external,\n globalItemsPerPage,\n },\n {\n pagination,\n grouped,\n isHiddenRow,\n sort,\n emitUpdateOptions,\n tableDefaults,\n },\n);\n\nconst noData = computed<boolean>(() => get(filtered).length === 0);\n\n// one loader at a time: the header bar marks a refetch over rows, and an empty table shows only its spinner row\nconst headerLoading = computed<boolean>(() => loading && !get(noData));\n\n/**\n * A nested table (a breakdown in an expanded row) that pages its own rows drops the bar when they all fit\n * the smallest page size: no control on it could change what shows, and in a breakdown it is pure noise.\n * A top-level table keeps it as a summary; a server-paged one keeps it, since only the server knows the total.\n */\nconst fitsSmallestPage = computed<boolean>(() => {\n if (!isNestedTable || paginationModifiers.external)\n return false;\n const { limits } = get(paginationData);\n const sizes = limits ?? toValue(tableDefaults.limits);\n // the rows themselves, not the pagination total, which is only filled in after mount\n return sizes.length > 0 && get(sorted).length <= Math.min(...sizes);\n});\n\nconst showPagination = computed<boolean>(() => !!get(paginationData) && !hidePagination && !get(fitsSmallestPage));\n\n/**\n * The one pagination bar sticks to the bottom of the view, so a long page can be turned without\n * scrolling down to it. `position: sticky` keeps it inside this table, so stacked and side-by-side\n * tables each hold their own bar. A nested table's bar stays in place: two stuck bars would stack.\n */\nconst canStickPagination = useStickyPaginationBar(tableWrapper, () => !isNestedTable && get(showPagination));\nconst stickyPagination = computed<boolean>(() => !isNestedTable && get(canStickPagination));\n\nconst paginationBarElement = computed<HTMLElement | undefined>(() => {\n const element: unknown = get(paginationBar)?.$el;\n return element instanceof HTMLElement ? element : undefined;\n});\n\n// while the bar is stuck to the page, `--rui-sticky-bottom` tells the page's floating parts to rise above it\nuseStickyBottomInset(paginationSentinel, paginationBarElement, stickyPagination);\n\n/**\n * Grouped columns leave the column list, so their labels come from `cols`.\n */\nconst groupLabels = computed<DataTableGroupLabel[]>(() => get(groupKeys).map((key) => {\n const label = cols?.find(column => column.key === key)?.[columnAttr];\n return {\n key: String(key),\n label: label === undefined || label === null ? String(key) : String(label),\n };\n}));\n\n/** Each group's list starts with its header entry, which is not a row. */\nfunction getGroupSize(identifier: string): number {\n return Math.max((get(mappedGroups)[identifier]?.length ?? 0) - 1, 0);\n}\n\nconst ui = computed<ReturnType<typeof dataTableStyles>>(() => dataTableStyles({\n outlined,\n rounded,\n dense,\n striped,\n mobile: get(isMobile),\n}));\n\nconst { columns, colspan, headerSlots, cellValue } = useTableColumns<T, IdType>({\n cols: () => cols,\n columnAttr,\n rows: () => rows,\n expandable,\n groupKeys,\n selectedData,\n slots,\n isMobile,\n tdResolver: options => get(ui).td(options),\n});\n\nconst showMobileSort = computed<boolean>(() =>\n get(isMobile) && !!get(sortData) && get(columns).some(column => column.sortable),\n);\n\nconst ITEM_SLOT_PREFIX = 'item.';\n\n// Slot keys are static for the component lifetime — no reactivity needed\nconst itemSlotKeys: Set<string> = new Set(\n Object.keys(slots)\n .filter((key): key is `item.${string}` => key.startsWith(ITEM_SLOT_PREFIX))\n .map(key => key.slice(ITEM_SLOT_PREFIX.length)),\n);\n\nconst {\n isAllSelected,\n indeterminate,\n isSelected,\n isDisabledRow,\n onToggleAll,\n onSelect,\n onCheckboxClick,\n deselectRemovedRows,\n resetCheckboxShiftState,\n} = useTableSelection<T, IdType>(\n { rowAttr, multiPageSelect, disabledRows: () => disabledRows },\n { selectedData, filtered },\n);\n\n/**\n * Sorting clears the selection. That lives here rather than in either\n * composable, which would make sort and selection depend on each other.\n */\nfunction onSort(payload: Parameters<typeof applySort>[0]): void {\n applySort(payload);\n if (!multiPageSelect)\n onToggleAll(false);\n resetCheckboxShiftState();\n}\n\nconst { revealTableTop } = usePageScroll(tableWrapper, stickyHeaderOffset);\n\nasync function onPaginate(): Promise<void> {\n if ((get(expanded)?.length ?? 0) > 0)\n set(expanded, []);\n if (!multiPageSelect)\n onToggleAll(false);\n resetCheckboxShiftState();\n await revealTableTop();\n}\n\n// Reset pagination page to 1 on search query change\nwatch(() => search, () => {\n resetPagination();\n onToggleAll(false);\n resetCheckboxShiftState();\n});\n\nwatch(sorted, (items) => {\n if (!multiPageSelect)\n deselectRemovedRows();\n setInternalTotal(items);\n});\n\nonMounted(() => {\n setInternalTotal(get(sorted));\n});\n\nconst classes = computed<DataTableClasses>(() => {\n const s = get(ui);\n return {\n td: s.td(),\n tr: s.tr(),\n trSelected: s.tr({ rowVariant: 'selected' }),\n trExpandable: s.tr({ rowVariant: 'expandable' }),\n trExpandedParent: s.tr({ rowVariant: 'expandedParent' }),\n trGroup: s.tr({ rowVariant: 'group' }),\n trEmpty: s.tr({ rowVariant: 'empty' }),\n checkbox: s.checkbox(),\n tbody: s.tbody(),\n tbodyLoader: s.tbodyLoader(),\n };\n});\n\nprovideDataTableContext<T, IdType>({\n // Reactive (ComputedRef/Ref) — destructuring preserves reactivity via Vue template auto-unwrap\n classes,\n columns,\n colspan,\n expandable,\n groupKey,\n groupLabels,\n isMobile,\n selectedData,\n // Static values\n cellValue,\n columnAttr,\n dense,\n getGroupSize,\n getRowId: (row: T) => row[rowAttr],\n itemSlotKeys,\n groupExpandButtonPosition,\n isDisabledRow,\n isExpanded,\n isExpandedGroup,\n isSelected,\n itemClass,\n onCheckboxClick,\n onCopyGroup: (header: GroupHeader<T>) => emit('copy:group', { key: get(groupKey) ?? '', value: header.group }),\n onSelect,\n onToggleExpand,\n onToggleExpandGroup,\n onUngroup,\n});\n</script>\n\n<template>\n <div\n ref=\"tableWrapper\"\n :class=\"ui.wrapper()\"\n data-id=\"table-wrapper\"\n >\n <div\n v-if=\"showMobileSort\"\n :class=\"stickyMobileToolbar ? 'sticky z-rui-raised bg-rui-background pt-2' : 'contents'\"\n :style=\"stickyMobileToolbar ? { top: `${stickyHeaderOffset ?? 0}px` } : undefined\"\n data-id=\"table-mobile-toolbar-sticky\"\n >\n <div\n class=\"flex justify-end p-2\"\n data-id=\"table-mobile-toolbar\"\n >\n <RuiDataTableMobileSort\n :columns=\"columns\"\n :column-attr=\"columnAttr\"\n :sorted-map=\"sortedMap\"\n :dense=\"dense\"\n @sort=\"onSort($event)\"\n />\n </div>\n </div>\n <div\n ref=\"tableScroller\"\n :class=\"[ui.scroller(), isMobile && !showMobileSort ? 'pt-2' : '']\"\n :tabindex=\"scrollerTabindex\"\n data-id=\"table-scroller\"\n >\n <table\n ref=\"table\"\n :class=\"ui.table()\"\n :style=\"viewportStyle\"\n :aria-busy=\"loading\"\n >\n <RuiTableHead\n v-if=\"!isMobile\"\n :loading=\"headerLoading\"\n :indeterminate=\"indeterminate\"\n :capitalize-headers=\"!cols\"\n :colspan=\"colspan\"\n :column-attr=\"columnAttr\"\n :columns=\"columns\"\n :dense=\"dense\"\n :disable-check-all=\"!filtered?.length\"\n :is-all-selected=\"isAllSelected\"\n :selectable=\"!!selectedData\"\n :sort-data=\"sortData\"\n :sorted-map=\"sortedMap\"\n :stick=\"stick\"\n :sticky-header=\"stickyHeader\"\n @sort=\"onSort($event)\"\n @select:all=\"onToggleAll($event)\"\n >\n <template\n v-for=\"headerSlot in headerSlots\"\n #[headerSlot]=\"slotData\"\n >\n <slot\n :name=\"headerSlot\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiTableHead>\n <RuiTableHead\n v-if=\"stickyHeader && !isMobile\"\n :loading=\"headerLoading\"\n :capitalize-headers=\"!cols\"\n :colspan=\"colspan\"\n :column-attr=\"columnAttr\"\n :columns=\"columns\"\n :dense=\"dense\"\n :selectable=\"!!selectedData\"\n :sort-data=\"sortData\"\n :sorted-map=\"sortedMap\"\n data-id=\"head-clone\"\n class=\"opacity-0 invisible\"\n >\n <template\n v-for=\"headerSlot in headerSlots\"\n #[headerSlot]=\"slotData\"\n >\n <slot\n :name=\"headerSlot\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiTableHead>\n <RuiDataTableBody\n :filtered=\"filtered\"\n :loading=\"loading\"\n :no-data=\"noData\"\n :empty=\"empty\"\n :error=\"error\"\n :error-title=\"errorTitle\"\n :retry-text=\"retryText\"\n @retry=\"emit('retry')\"\n >\n <template\n v-if=\"slots.error\"\n #error\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"error\" />\n </template>\n <template\n v-if=\"slots['body.prepend']\"\n #body.prepend=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"body.prepend\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['group.header']\"\n #group.header=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"group.header\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['group.header.content']\"\n #group.header.content=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"group.header.content\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-for=\"key in itemSlotKeys\"\n #[`item.${key}`]=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n :name=\"`item.${key}`\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['expanded-item']\"\n #expanded-item=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"expanded-item\"\n v-bind=\"slotData\"\n />\n </template>\n <template\n v-if=\"slots['no-data']\"\n #no-data\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"no-data\" />\n </template>\n <template\n v-if=\"slots['empty-description']\"\n #empty-description\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"empty-description\" />\n </template>\n <template\n v-if=\"slots['body.append']\"\n #body.append=\"slotData\"\n >\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot\n name=\"body.append\"\n v-bind=\"slotData\"\n />\n </template>\n </RuiDataTableBody>\n <tfoot>\n <!-- eslint-disable-next-line vue/require-explicit-slots -- defined via Partial<Record<...>> in defineSlots -->\n <slot name=\"tfoot\" />\n </tfoot>\n </table>\n </div>\n <!-- the bar's own place after the rows: below the view, the bar is stuck; no divider of its own -->\n <div\n v-if=\"paginationData && showPagination && !isNestedTable\"\n ref=\"paginationSentinel\"\n class=\"border-0!\"\n aria-hidden=\"true\"\n data-id=\"table-pagination-sentinel\"\n />\n <RuiTablePagination\n v-if=\"paginationData && showPagination\"\n ref=\"paginationBar\"\n v-model=\"paginationData\"\n :class=\"ui.pagination({ sticky: stickyPagination })\"\n :dense=\"dense\"\n :loading=\"loading\"\n :mobile=\"isMobile\"\n :disable-per-page=\"disablePerPage\"\n :ranges-threshold=\"rangesThreshold\"\n :data-sticky=\"stickyPagination || undefined\"\n data-id=\"table-pagination\"\n @update:model-value=\"onPaginate()\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsbA,IAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EApSzB,MAAM,eAAe,SAAwB,SAAA,YAAC;EAE9C,MAAM,WAAW,SAAgB,SAAC,UAAU;EAE5C,MAAM,CAAC,YAAY,uBAAuB,SAA4C,SAAC,YAAY;EAEnG,MAAM,CAAC,MAAM,iBAAiB,SAAyC,SAAC,MAAM;EAE9E,MAAM,QAAQ,SAA+B,SAAC,OAAO;EAErD,MAAM,YAAY,SAAgB,SAAC,WAAW;EAkC9C,MAAM,OAAO;EAMb,MAAM,QAAQ,SAAA;EAoBd,MAAM,gBAAgB,SAAS;EAE/B,MAAM,eAAe,eAA4B,cAAc;EAC/D,MAAM,qBAAqB,eAA4B,oBAAoB;EAC3E,MAAM,gBAAgB,eAAwD,eAAe;EAC7F,MAAM,EAAE,OAAO,gBAAgB,cAAc;E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eAAA,mBADQ,QAAQ,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;KAItB,mBAGQ,SAAA,MAAA,CADN,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;IAMnB,MAAA,cAAA,KAAkB,MAAA,cAAA,KAAc,CAAK,MAAA,aAAA,KAD7C,UAAA,GAAA,mBAME,OAAA;;KAJI,SAAA;KAAJ,KAAI;KACJ,OAAM;KACN,eAAY;KACZ,WAAQ;;IAGF,MAAA,cAAA,KAAkB,MAAA,cAAA,KAD1B,UAAA,GAAA,YAaE,4BAAA;;KAXI,SAAA;KAAJ,KAAI;KACK,YAAA,MAAA,cAAA;KAAA,uBAAA,CAAA,OAAA,OAAA,OAAA,MAAA,WAAA,MAAA,cAAA,IAAA,eAAc,QAAA,SAAA,OASF,OAAA,OAAA,OAAA,MAAA,WAAA,WAAU,EAAA;KAR9B,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,WAAU,EAAA,QAAW,MAAA,gBAAA,EAAgB,CAAA,CAAA;KAC/C,OAAO,QAAA;KACP,SAAS,QAAA;KACT,QAAQ,MAAA,QAAA;KACR,oBAAkB,QAAA;KAClB,oBAAkB,QAAA;KAClB,eAAa,MAAA,gBAAA,KAAoB,KAAA;KAClC,WAAQ"}
@@ -1,3 +1,4 @@
1
+ import { get } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { tv } from "../../utils/tv.js";
2
3
  import RuiIcon_default from "../icons/RuiIcon.js";
3
4
  import RuiProgress_default from "../progress/RuiProgress.js";
@@ -6,7 +7,6 @@ import RuiCheckbox_default from "../forms/checkbox/RuiCheckbox.js";
6
7
  import { NESTED_BAR } from "./data-table-styles.js";
7
8
  import { SortDirection, TableAlign, getAlignClass, getSortButtonAlignClass } from "./table-props.js";
8
9
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
9
- import { get } from "@vueuse/shared";
10
10
  //#region src/components/tables/RuiTableHead.vue?vue&type=script&setup=true&lang.ts
11
11
  var _hoisted_1 = ["data-id"];
12
12
  var _hoisted_2 = [
@@ -1,4 +1,5 @@
1
1
  import { useTable } from "../../composables/defaults/table.js";
2
+ import { get, set } from "../../vendor/@vueuse/shared/dist/index.js";
2
3
  import { tv } from "../../utils/tv.js";
3
4
  import RuiIcon_default from "../icons/RuiIcon.js";
4
5
  import RuiButton_default from "../buttons/button/RuiButton.js";
@@ -6,7 +7,6 @@ import RuiTextField_default from "../forms/text-field/RuiTextField.js";
6
7
  import RuiMenuSelect_default from "../forms/select/RuiMenuSelect.js";
7
8
  import { usePaginationNavigation } from "./use-pagination-navigation.js";
8
9
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, isRef, mergeModels, normalizeClass, openBlock, ref, toDisplayString, unref, useId, useModel, watch, withCtx, withKeys } from "vue";
9
- import { get, set } from "@vueuse/shared";
10
10
  //#region src/components/tables/RuiTablePagination.vue?vue&type=script&setup=true&lang.ts
11
11
  var _hoisted_1 = ["for"];
12
12
  var _hoisted_2 = ["for"];
@@ -1,7 +1,7 @@
1
+ import { get } from "../../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { useDataTableColumns, useDataTableExpansion, useDataTableStyling } from "./context.js";
2
3
  import RuiExpandButton_default from "../RuiExpandButton.js";
3
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref } from "vue";
4
- import { get } from "@vueuse/shared";
5
5
  //#region src/components/tables/data-table/RuiDataTableCell.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = ["colspan", "rowspan"];
7
7
  var _hoisted_2 = {