@rei/cedar 13.5.0-alpha.1 → 13.5.0-alpha.2

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 (121) hide show
  1. package/dist/cedar-compiled.css +1031 -1031
  2. package/dist/component-docgen.json +3298 -0
  3. package/dist/icon-component-docgen.json +4094 -0
  4. package/dist/src/component-docgen.json.mjs +2421 -0
  5. package/dist/src/components/accordion/CdrAccordion.vue.mjs +13 -1
  6. package/dist/src/components/accordion/CdrAccordionGroup.vue.mjs +4 -0
  7. package/dist/src/components/accordion/styles/CdrAccordion.module.scss.mjs +29 -29
  8. package/dist/src/components/accordion/styles/CdrAccordionGroup.module.scss.mjs +2 -2
  9. package/dist/src/components/banner/CdrBanner.vue.mjs +5 -0
  10. package/dist/src/components/banner/styles/CdrBanner.module.scss.mjs +14 -14
  11. package/dist/src/components/breadcrumb/CdrBreadcrumb.vue.mjs +21 -8
  12. package/dist/src/components/breadcrumb/styles/CdrBreadcrumb.module.scss.mjs +7 -7
  13. package/dist/src/components/button/CdrButton.vue.mjs +29 -0
  14. package/dist/src/components/button/styles/CdrButton.module.scss.mjs +31 -31
  15. package/dist/src/components/caption/CdrCaption.vue.mjs +8 -0
  16. package/dist/src/components/caption/styles/CdrCaption.module.scss.mjs +2 -2
  17. package/dist/src/components/card/CdrCard.vue.mjs +3 -0
  18. package/dist/src/components/card/styles/CdrCard.module.scss.mjs +1 -1
  19. package/dist/src/components/checkbox/CdrCheckbox.vue.mjs +39 -21
  20. package/dist/src/components/checkbox/styles/CdrCheckbox.module.scss.mjs +25 -25
  21. package/dist/src/components/chip/CdrChipGroup.vue.mjs +6 -0
  22. package/dist/src/components/chip/styles/CdrChip.module.scss.mjs +4 -4
  23. package/dist/src/components/chip/styles/CdrChipGroup.module.scss.mjs +4 -4
  24. package/dist/src/components/container/CdrContainer.vue.mjs +6 -1
  25. package/dist/src/components/container/styles/CdrContainer.module.scss.mjs +2 -2
  26. package/dist/src/components/formError/styles/CdrFormError.module.scss.mjs +2 -2
  27. package/dist/src/components/formGroup/styles/CdrFormGroup.module.scss.mjs +8 -8
  28. package/dist/src/components/grid/CdrGrid.vue.mjs +4 -3
  29. package/dist/src/components/grid/styles/CdrGrid.module.scss.mjs +21 -21
  30. package/dist/src/components/icon/CdrIcon.vue.mjs +8 -5
  31. package/dist/src/components/icon/styles/CdrIcon.module.scss.mjs +12 -12
  32. package/dist/src/components/image/CdrImg.vue.mjs +16 -5
  33. package/dist/src/components/image/styles/CdrImg.module.scss.mjs +8 -8
  34. package/dist/src/components/input/CdrInput.vue.mjs +38 -10
  35. package/dist/src/components/input/styles/CdrInput.module.scss.mjs +32 -32
  36. package/dist/src/components/labelStandalone/styles/CdrLabelStandalone.module.scss.mjs +12 -12
  37. package/dist/src/components/labelWrapper/styles/CdrLabelWrapper.module.scss.mjs +23 -23
  38. package/dist/src/components/link/CdrLink.vue.mjs +14 -0
  39. package/dist/src/components/link/styles/CdrLink.module.scss.mjs +3 -3
  40. package/dist/src/components/list/CdrList.vue.mjs +7 -1
  41. package/dist/src/components/list/styles/CdrList.module.scss.mjs +5 -5
  42. package/dist/src/components/modal/CdrModal.vue.mjs +28 -1
  43. package/dist/src/components/modal/styles/CdrModal.module.scss.mjs +12 -12
  44. package/dist/src/components/pagination/CdrPagination.vue.mjs +53 -24
  45. package/dist/src/components/pagination/styles/CdrPagination.module.scss.mjs +53 -53
  46. package/dist/src/components/popover/CdrPopover.vue.mjs +33 -11
  47. package/dist/src/components/popover/styles/CdrPopover.module.scss.mjs +63 -63
  48. package/dist/src/components/popup/styles/CdrPopup.module.scss.mjs +14 -14
  49. package/dist/src/components/quote/CdrQuote.vue.mjs +11 -2
  50. package/dist/src/components/quote/styles/CdrQuote.module.scss.mjs +4 -4
  51. package/dist/src/components/radio/CdrRadio.vue.mjs +26 -7
  52. package/dist/src/components/radio/styles/CdrRadio.module.scss.mjs +25 -25
  53. package/dist/src/components/rating/CdrRating.vue.mjs +8 -3
  54. package/dist/src/components/rating/styles/CdrRating.module.scss.mjs +28 -28
  55. package/dist/src/components/select/CdrSelect.vue.mjs +41 -15
  56. package/dist/src/components/select/styles/CdrSelect.module.scss.mjs +42 -42
  57. package/dist/src/components/skeleton/CdrSkeleton.vue.mjs +6 -0
  58. package/dist/src/components/skeleton/CdrSkeletonBone.vue.mjs +5 -0
  59. package/dist/src/components/skeleton/styles/CdrSkeleton.module.scss.mjs +1 -1
  60. package/dist/src/components/skeleton/styles/CdrSkeletonBone.module.scss.mjs +7 -7
  61. package/dist/src/components/switch/CdrSwitch.vue.mjs +21 -1
  62. package/dist/src/components/switch/styles/CdrSwitch.module.scss.mjs +8 -8
  63. package/dist/src/components/table/CdrTable.vue.mjs +12 -0
  64. package/dist/src/components/table/styles/CdrTable.module.scss.mjs +13 -13
  65. package/dist/src/components/tabs/CdrTabPanel.vue.mjs +22 -11
  66. package/dist/src/components/tabs/CdrTabs.vue.mjs +20 -0
  67. package/dist/src/components/tabs/styles/CdrTabPanel.module.scss.mjs +5 -5
  68. package/dist/src/components/tabs/styles/CdrTabs.module.scss.mjs +28 -28
  69. package/dist/src/components/text/CdrText.vue.mjs +23 -17
  70. package/dist/src/components/text/styles/CdrText.module.scss.mjs +1 -1
  71. package/dist/src/components/toast/CdrToast.vue.mjs +17 -1
  72. package/dist/src/components/toast/styles/CdrToast.module.scss.mjs +57 -57
  73. package/dist/src/components/toggleButton/CdrToggleButton.vue.mjs +3 -0
  74. package/dist/src/components/toggleButton/CdrToggleGroup.vue.mjs +13 -1
  75. package/dist/src/components/toggleButton/styles/CdrToggleButton.module.scss.mjs +2 -2
  76. package/dist/src/components/toggleButton/styles/CdrToggleGroup.module.scss.mjs +5 -5
  77. package/dist/src/components/tooltip/CdrTooltip.vue.mjs +22 -1
  78. package/dist/src/components/tooltip/styles/CdrTooltip.module.scss.mjs +16 -16
  79. package/dist/src/lib.mjs +376 -374
  80. package/dist/style/cdr-accordion-group.css +1 -1
  81. package/dist/style/cdr-accordion.css +1 -1
  82. package/dist/style/cdr-banner.css +1 -1
  83. package/dist/style/cdr-breadcrumb.css +1 -1
  84. package/dist/style/cdr-button.css +1 -1
  85. package/dist/style/cdr-caption.css +1 -1
  86. package/dist/style/cdr-card.css +1 -1
  87. package/dist/style/cdr-checkbox.css +1 -1
  88. package/dist/style/cdr-chip-group.css +1 -1
  89. package/dist/style/cdr-chip.css +1 -1
  90. package/dist/style/cdr-container.css +1 -1
  91. package/dist/style/cdr-form-error.css +1 -1
  92. package/dist/style/cdr-form-group.css +1 -1
  93. package/dist/style/cdr-grid.css +1 -1
  94. package/dist/style/cdr-icon.css +1 -1
  95. package/dist/style/cdr-img.css +1 -1
  96. package/dist/style/cdr-input.css +1 -1
  97. package/dist/style/cdr-label-standalone.css +1 -1
  98. package/dist/style/cdr-label-wrapper.css +1 -1
  99. package/dist/style/cdr-link.css +1 -1
  100. package/dist/style/cdr-list.css +1 -1
  101. package/dist/style/cdr-modal.css +1 -1
  102. package/dist/style/cdr-pagination.css +1 -1
  103. package/dist/style/cdr-popover.css +1 -1
  104. package/dist/style/cdr-popup.css +1 -1
  105. package/dist/style/cdr-quote.css +1 -1
  106. package/dist/style/cdr-radio.css +1 -1
  107. package/dist/style/cdr-rating.css +1 -1
  108. package/dist/style/cdr-select.css +1 -1
  109. package/dist/style/cdr-skeleton-bone.css +1 -1
  110. package/dist/style/cdr-skeleton.css +1 -1
  111. package/dist/style/cdr-switch.css +1 -1
  112. package/dist/style/cdr-tab-panel.css +1 -1
  113. package/dist/style/cdr-table.css +1 -1
  114. package/dist/style/cdr-tabs.css +1 -1
  115. package/dist/style/cdr-text.css +1 -1
  116. package/dist/style/cdr-toast.css +1 -1
  117. package/dist/style/cdr-toggle-button.css +1 -1
  118. package/dist/style/cdr-toggle-group.css +1 -1
  119. package/dist/style/cdr-tooltip.css +1 -1
  120. package/dist/style.css +1 -1
  121. package/package.json +5 -2
@@ -1,9 +1,9 @@
1
1
  const d = {
2
- "cdr-list": "cdr-list_13-5-0-alpha-1",
3
- "cdr-list--compact": "cdr-list--compact_13-5-0-alpha-1",
4
- "cdr-list--ordered": "cdr-list--ordered_13-5-0-alpha-1",
5
- "cdr-list--unordered": "cdr-list--unordered_13-5-0-alpha-1",
6
- "cdr-list--inline": "cdr-list--inline_13-5-0-alpha-1"
2
+ "cdr-list": "cdr-list_13-5-0-alpha-2",
3
+ "cdr-list--compact": "cdr-list--compact_13-5-0-alpha-2",
4
+ "cdr-list--ordered": "cdr-list--ordered_13-5-0-alpha-2",
5
+ "cdr-list--unordered": "cdr-list--unordered_13-5-0-alpha-2",
6
+ "cdr-list--inline": "cdr-list--inline_13-5-0-alpha-2"
7
7
  };
8
8
  export {
9
9
  d as default
@@ -15,43 +15,70 @@ const he = Z({
15
15
  IconXLg: fe
16
16
  },
17
17
  props: {
18
+ /**
19
+ * Toggles the state of the modal
20
+ * @demoIgnore true
21
+ */
18
22
  opened: {
19
23
  type: Boolean,
20
24
  required: !0
21
25
  },
26
+ /**
27
+ * Sets `aria-label` and modal title text. Can also use title slot to set title.
28
+ */
22
29
  label: {
23
30
  type: String,
24
31
  required: !0
25
32
  },
33
+ /**
34
+ * Toggles the modal title text, which comes from `label` prop or `title` slot.
35
+ */
26
36
  showTitle: {
27
37
  type: Boolean,
28
38
  required: !1,
29
39
  default: !0
30
40
  },
41
+ /**
42
+ * Text for aria-describedby attribute. Applied to modal content element
43
+ */
31
44
  ariaDescribedby: {
32
45
  type: String,
33
46
  required: !1,
34
47
  default: null
35
48
  },
49
+ /**
50
+ * Sets the `role` attribute on the modal content element
51
+ * @values dialog, alertDialog
52
+ */
36
53
  role: {
37
54
  type: String,
38
55
  required: !1,
39
56
  default: "dialog"
40
57
  },
58
+ /**
59
+ * Sets unique `id` for modal
60
+ */
41
61
  id: {
42
62
  type: String,
43
63
  required: !1,
44
64
  default: null
45
65
  },
66
+ /** Adds custom class to the `cdr-modal__overlay` div */
46
67
  overlayClass: String,
68
+ /** Adds custom class to the `cdr-modal__outerWrap` div */
47
69
  wrapperClass: String,
70
+ /** Adds custom class to the `cdr-modal__innerWrap` div */
48
71
  contentClass: String,
72
+ /** Sets duration for modal's close animation */
49
73
  animationDuration: {
50
74
  type: Number,
51
75
  default: 300
52
76
  }
53
77
  },
54
- emits: ["closed"],
78
+ emits: {
79
+ /** Fires when modal is closed */
80
+ closed: null
81
+ },
55
82
  setup(e, d) {
56
83
  const E = "cdr-modal";
57
84
  let f, v;
@@ -1,16 +1,16 @@
1
1
  const a = {
2
- "cdr-modal": "cdr-modal_13-5-0-alpha-1",
3
- "cdr-modal__overlay": "cdr-modal__overlay_13-5-0-alpha-1",
4
- "cdr-modal__outerWrap": "cdr-modal__outerWrap_13-5-0-alpha-1",
5
- "cdr-modal__contentWrap": "cdr-modal__contentWrap_13-5-0-alpha-1",
6
- "cdr-modal__innerWrap": "cdr-modal__innerWrap_13-5-0-alpha-1",
7
- "cdr-modal__dialog": "cdr-modal__dialog_13-5-0-alpha-1",
8
- "cdr-modal__content": "cdr-modal__content_13-5-0-alpha-1",
9
- "cdr-modal__header": "cdr-modal__header_13-5-0-alpha-1",
10
- "cdr-modal__title": "cdr-modal__title_13-5-0-alpha-1",
11
- "cdr-modal__close-button": "cdr-modal__close-button_13-5-0-alpha-1",
12
- "cdr-modal__text-content": "cdr-modal__text-content_13-5-0-alpha-1",
13
- "cdr-modal--closed": "cdr-modal--closed_13-5-0-alpha-1"
2
+ "cdr-modal": "cdr-modal_13-5-0-alpha-2",
3
+ "cdr-modal__overlay": "cdr-modal__overlay_13-5-0-alpha-2",
4
+ "cdr-modal__outerWrap": "cdr-modal__outerWrap_13-5-0-alpha-2",
5
+ "cdr-modal__contentWrap": "cdr-modal__contentWrap_13-5-0-alpha-2",
6
+ "cdr-modal__innerWrap": "cdr-modal__innerWrap_13-5-0-alpha-2",
7
+ "cdr-modal__dialog": "cdr-modal__dialog_13-5-0-alpha-2",
8
+ "cdr-modal__content": "cdr-modal__content_13-5-0-alpha-2",
9
+ "cdr-modal__header": "cdr-modal__header_13-5-0-alpha-2",
10
+ "cdr-modal__title": "cdr-modal__title_13-5-0-alpha-2",
11
+ "cdr-modal__close-button": "cdr-modal__close-button_13-5-0-alpha-2",
12
+ "cdr-modal__text-content": "cdr-modal__text-content_13-5-0-alpha-2",
13
+ "cdr-modal--closed": "cdr-modal--closed_13-5-0-alpha-2"
14
14
  };
15
15
  export {
16
16
  a as default
@@ -1,6 +1,6 @@
1
1
  import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.array.unshift.js";
3
- import { defineComponent as B, ref as q, computed as d, onMounted as G, watch as R, useCssModule as U, resolveComponent as $, openBlock as l, createElementBlock as u, createElementVNode as k, normalizeClass as r, createBlock as D, resolveDynamicComponent as T, withCtx as h, createVNode as f, createTextVNode as m, Fragment as N, renderList as w, toDisplayString as I, withModifiers as E, nextTick as H } from "vue";
3
+ import { defineComponent as B, ref as q, computed as d, onMounted as G, watch as R, useCssModule as U, resolveComponent as $, openBlock as i, createElementBlock as u, createElementVNode as k, normalizeClass as r, createBlock as D, resolveDynamicComponent as T, withCtx as h, createVNode as f, createTextVNode as m, Fragment as N, renderList as w, toDisplayString as I, withModifiers as E, nextTick as H } from "vue";
4
4
  import z from "../../utils/mapClasses.mjs";
5
5
  import A from "../../utils/propValidator.mjs";
6
6
  import F from "../icon/comps/caret-left.vue.mjs";
@@ -17,31 +17,47 @@ const Y = B({
17
17
  CdrSelect: J
18
18
  },
19
19
  props: {
20
- // NOTE pagination now requires an ID
20
+ /**
21
+ * Define a custom slug for the generated breadcrumb item IDs. Slug is randomly generated if no ID provided.
22
+ * @demoIgnore true
23
+ */
21
24
  id: {
22
25
  type: String
23
26
  },
24
27
  /**
25
- * Total number of pages. Sometimes the total number of pages is different than total page data
26
- * and this prop allows for that.
28
+ * Sets the total number of pages for displaying "Page x of <totalPages>".
29
+ * Sometimes the total number of pages is different than total page data objects in the pages array.
30
+ * For example, if only the next and previous pages are provided.
27
31
  */
28
32
  totalPages: {
29
33
  type: Number,
30
34
  default: null
31
35
  },
32
36
  /**
33
- * Array of objects. Objects have structure of { page: Number, url: String }
37
+ * Array of objects containing pagination data.
38
+ * Objects must have structure of `{ page: number, url: string }`
34
39
  */
35
40
  pages: {
36
41
  type: Array,
37
42
  required: !0,
38
- validator: (e) => e.every((i) => !Object.prototype.hasOwnProperty.call(i, "page") || typeof i.page != "number" ? (console.error('Property "page" is missing or is not a number', i), !1) : !Object.prototype.hasOwnProperty.call(i, "url") || typeof i.url != "string" ? (console.error('Property "url" is missing or is not a string', i), !1) : !0)
43
+ validator: (e) => e.every((l) => !Object.prototype.hasOwnProperty.call(l, "page") || typeof l.page != "number" ? (console.error('Property "page" is missing or is not a number', l), !1) : !Object.prototype.hasOwnProperty.call(l, "url") || typeof l.url != "string" ? (console.error('Property "url" is missing or is not a string', l), !1) : !0)
39
44
  },
45
+ /**
46
+ * Sets which tag type is used to render pagination elements
47
+ * @values a, button
48
+ */
40
49
  linkTag: {
41
50
  type: String,
42
51
  default: "a",
43
52
  validator: (e) => A(e, ["a", "button"])
44
53
  },
54
+ /**
55
+ * Used to customize the aria-label for the root pagination element.
56
+ * For page-level pagination (i.e, pagination that updates the entire page content and changes the URL)
57
+ * this property should be omitted.
58
+ * For intra-page navigation this property should describe the element being paginated, for example:
59
+ * `Pagination for sub-content`
60
+ */
45
61
  forLabel: {
46
62
  type: String,
47
63
  default: ""
@@ -51,16 +67,29 @@ const Y = B({
51
67
  type: Number
52
68
  }
53
69
  },
54
- emits: ["update:modelValue", "navigate"],
70
+ emits: {
71
+ /**
72
+ * Event emitted by v-model on the select <input> element to indicate current page.
73
+ * Only used on small devices
74
+ * @param modelValue
75
+ */
76
+ "update:modelValue": null,
77
+ /**
78
+ * $emit event fired when page changes based on user interaction by clicking a link
79
+ * or selecting an option from the select on mobile.
80
+ * `event.preventDefault()` can be used to override the default link navigation behavior.
81
+ */
82
+ navigate: null
83
+ },
55
84
  setup(e, s) {
56
- const i = q(0), C = q([]), _ = e.id ? e.id : K(), y = (n) => {
57
- i.value = e.pages.map((t) => t.page).indexOf(n);
85
+ const l = q(0), C = q([]), _ = e.id ? e.id : K(), y = (n) => {
86
+ l.value = e.pages.map((t) => t.page).indexOf(n);
58
87
  }, p = d({
59
88
  get: () => e.modelValue,
60
89
  set: (n) => {
61
90
  y(n), s.emit("update:modelValue", n);
62
91
  }
63
- }), P = d(() => e.pages[i.value].url), v = (n, t) => {
92
+ }), P = d(() => e.pages[l.value].url), v = (n, t) => {
64
93
  const g = t.target.offsetWidth > 0 && t.target.offsetHeight > 0;
65
94
  if (n === p.value && g) {
66
95
  t.preventDefault();
@@ -75,7 +104,7 @@ const Y = B({
75
104
  });
76
105
  }, a = (n) => {
77
106
  C.value.find((g) => (g == null ? void 0 : g.innerHTML) === n.target.value).click();
78
- }, b = d(() => e.forLabel || "Pagination"), c = d(() => e.pages[i.value - 1]), O = d(() => e.pages[i.value + 1]), S = d(() => {
107
+ }, b = d(() => e.forLabel || "Pagination"), c = d(() => e.pages[l.value - 1]), O = d(() => e.pages[l.value + 1]), S = d(() => {
79
108
  const n = e.pages.length, t = p.value, g = 1;
80
109
  let o = [], L = !0, M = !0;
81
110
  if (n <= 7)
@@ -101,7 +130,7 @@ const Y = B({
101
130
  nextPageData: O,
102
131
  paginationData: S,
103
132
  innerValue: p,
104
- currentIdx: i
133
+ currentIdx: l
105
134
  };
106
135
  }
107
136
  }), Z = ["aria-label"], j = {
@@ -115,13 +144,13 @@ const Y = B({
115
144
  key: 3,
116
145
  "aria-hidden": "true"
117
146
  };
118
- function te(e, s, i, C, _, y) {
147
+ function te(e, s, l, C, _, y) {
119
148
  const p = $("icon-caret-left"), P = $("cdr-select"), v = $("icon-caret-right");
120
- return l(), u("nav", {
149
+ return i(), u("nav", {
121
150
  "aria-label": e.ariaLabel
122
151
  }, [k("ol", {
123
152
  class: r(e.style["cdr-pagination"])
124
- }, [e.innerValue > e.pages[0].page ? (l(), u("li", j, [(l(), D(T(e.linkTag), {
153
+ }, [e.innerValue > e.pages[0].page ? (i(), u("li", j, [(i(), D(T(e.linkTag), {
125
154
  "aria-label": "Go to previous page",
126
155
  href: e.linkTag === "a" && e.prevPageData && e.prevPageData.url || void 0,
127
156
  class: r(e.mapClasses(e.style, "cdr-pagination__link", "cdr-pagination__prev")),
@@ -131,16 +160,16 @@ function te(e, s, i, C, _, y) {
131
160
  class: r(e.style["cdr-pagination_caret--prev"])
132
161
  }, null, 8, ["class"]), m(" Prev ")]),
133
162
  _: 1
134
- }, 8, ["href", "class"]))])) : (l(), u("li", x, [k("span", {
163
+ }, 8, ["href", "class"]))])) : (i(), u("li", x, [k("span", {
135
164
  "aria-disabled": "true",
136
165
  class: r(e.mapClasses(e.style, "cdr-pagination__link", "cdr-pagination__prev", "cdr-pagination__link--disabled"))
137
166
  }, [f(p, {
138
167
  class: r(e.style["cdr-pagination_caret--prev"]),
139
168
  "inherit-color": ""
140
- }, null, 8, ["class"]), m(" Prev ")], 2)])), (l(!0), u(N, null, w(e.paginationData, (a, b) => (l(), u("li", {
169
+ }, null, 8, ["class"]), m(" Prev ")], 2)])), (i(!0), u(N, null, w(e.paginationData, (a, b) => (i(), u("li", {
141
170
  key: `pagination-${e.uniqueId}-li-${a.page}`,
142
171
  class: r(e.style["cdr-pagination__li--links"])
143
- }, [a.page ? (l(), D(T(e.linkTag), {
172
+ }, [a.page ? (i(), D(T(e.linkTag), {
144
173
  key: 0,
145
174
  id: `pagination-${e.uniqueId}-link-${a.page}`,
146
175
  class: r(e.mapClasses(e.style, "cdr-pagination__link", a.page === e.innerValue && "cdr-pagination__link--current")),
@@ -155,7 +184,7 @@ function te(e, s, i, C, _, y) {
155
184
  }, {
156
185
  default: h(() => [m(I(a.page), 1)]),
157
186
  _: 2
158
- }, 1032, ["id", "class", "aria-label", "aria-current", "href", "onClick"])) : (l(), u("span", {
187
+ }, 1032, ["id", "class", "aria-label", "aria-current", "href", "onClick"])) : (i(), u("span", {
159
188
  key: 1,
160
189
  class: r(e.style["cdr-pagination__ellipse"])
161
190
  }, " … ", 2))], 2))), 128)), k("li", {
@@ -168,12 +197,12 @@ function te(e, s, i, C, _, y) {
168
197
  "hide-label": "",
169
198
  onChange: s[2] || (s[2] = E((a) => e.select(a), ["prevent"]))
170
199
  }, {
171
- default: h(() => [(l(!0), u(N, null, w(e.paginationData.filter((a) => a.page), (a) => (l(), u("option", {
200
+ default: h(() => [(i(!0), u(N, null, w(e.paginationData.filter((a) => a.page), (a) => (i(), u("option", {
172
201
  key: `pagination-${e.uniqueId}-select-${a.page}`,
173
202
  value: a.page
174
203
  }, " Page " + I(a.page) + I(e.totalPages === null ? "" : ` of ${e.totalPages}`), 9, ee))), 128))]),
175
204
  _: 1
176
- }, 8, ["id", "modelValue"])], 2), e.innerValue < e.pages[e.pages.length - 1].page ? (l(), u("li", ae, [(l(), D(T(e.linkTag), {
205
+ }, 8, ["id", "modelValue"])], 2), e.innerValue < e.pages[e.pages.length - 1].page ? (i(), u("li", ae, [(i(), D(T(e.linkTag), {
177
206
  "aria-label": "Go to next page",
178
207
  href: e.linkTag === "a" && e.nextPageData && e.nextPageData.url || void 0,
179
208
  class: r(e.mapClasses(e.style, "cdr-pagination__link", "cdr-pagination__next")),
@@ -183,7 +212,7 @@ function te(e, s, i, C, _, y) {
183
212
  class: r(e.style["cdr-pagination_caret--next"])
184
213
  }, null, 8, ["class"])]),
185
214
  _: 1
186
- }, 8, ["href", "class"]))])) : (l(), u("li", ne, [k("span", {
215
+ }, 8, ["href", "class"]))])) : (i(), u("li", ne, [k("span", {
187
216
  "aria-disabled": "true",
188
217
  class: r(e.mapClasses(e.style, "cdr-pagination__link", "cdr-pagination__next", "cdr-pagination__link--disabled"))
189
218
  }, [m(" Next "), f(v, {
@@ -191,9 +220,9 @@ function te(e, s, i, C, _, y) {
191
220
  "inherit-color": ""
192
221
  }, null, 8, ["class"])], 2)]))], 2)], 8, Z);
193
222
  }
194
- const ie = {
223
+ const le = {
195
224
  $style: Q
196
- }, ye = /* @__PURE__ */ X(Y, [["render", te], ["__cssModules", ie]]);
225
+ }, ye = /* @__PURE__ */ X(Y, [["render", te], ["__cssModules", le]]);
197
226
  export {
198
227
  ye as default
199
228
  };
@@ -1,57 +1,57 @@
1
1
  const a = {
2
- "cdr-icon": "cdr-icon_13-5-0-alpha-1",
3
- "cdr-icon--small": "cdr-icon--small_13-5-0-alpha-1",
4
- "cdr-icon--large": "cdr-icon--large_13-5-0-alpha-1",
5
- "cdr-icon--small@xs": "cdr-icon--small@xs_13-5-0-alpha-1",
6
- "cdr-icon--large@xs": "cdr-icon--large@xs_13-5-0-alpha-1",
7
- "cdr-icon--small@sm": "cdr-icon--small@sm_13-5-0-alpha-1",
8
- "cdr-icon--large@sm": "cdr-icon--large@sm_13-5-0-alpha-1",
9
- "cdr-icon--small@md": "cdr-icon--small@md_13-5-0-alpha-1",
10
- "cdr-icon--large@md": "cdr-icon--large@md_13-5-0-alpha-1",
11
- "cdr-icon--small@lg": "cdr-icon--small@lg_13-5-0-alpha-1",
12
- "cdr-icon--large@lg": "cdr-icon--large@lg_13-5-0-alpha-1",
13
- "cdr-icon--inherit-color": "cdr-icon--inherit-color_13-5-0-alpha-1",
14
- "cdr-label-standalone": "cdr-label-standalone_13-5-0-alpha-1",
15
- "cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_13-5-0-alpha-1",
16
- "cdr-label-standalone__label": "cdr-label-standalone__label_13-5-0-alpha-1",
17
- "cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_13-5-0-alpha-1",
18
- "cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_13-5-0-alpha-1",
19
- "cdr-label-standalone__optional": "cdr-label-standalone__optional_13-5-0-alpha-1",
20
- "cdr-label-standalone__helper": "cdr-label-standalone__helper_13-5-0-alpha-1",
21
- "cdr-label-standalone__info": "cdr-label-standalone__info_13-5-0-alpha-1",
22
- "cdr-label-standalone__post-content": "cdr-label-standalone__post-content_13-5-0-alpha-1",
23
- "cdr-label-standalone__info-action": "cdr-label-standalone__info-action_13-5-0-alpha-1",
24
- "cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_13-5-0-alpha-1",
25
- "cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_13-5-0-alpha-1",
26
- "cdr-form-error": "cdr-form-error_13-5-0-alpha-1",
27
- "cdr-form-error__icon": "cdr-form-error__icon_13-5-0-alpha-1",
28
- "cdr-select": "cdr-select_13-5-0-alpha-1",
29
- "cdr-select--primary": "cdr-select--primary_13-5-0-alpha-1",
30
- "cdr-select--secondary": "cdr-select--secondary_13-5-0-alpha-1",
31
- "cdr-select--error": "cdr-select--error_13-5-0-alpha-1",
32
- "cdr-select--preicon": "cdr-select--preicon_13-5-0-alpha-1",
33
- "cdr-select__prompt": "cdr-select__prompt_13-5-0-alpha-1",
34
- "cdr-select__caret": "cdr-select__caret_13-5-0-alpha-1",
35
- "cdr-select__caret--disabled": "cdr-select__caret--disabled_13-5-0-alpha-1",
36
- "cdr-select__pre-icon": "cdr-select__pre-icon_13-5-0-alpha-1",
37
- "cdr-select--multiple": "cdr-select--multiple_13-5-0-alpha-1",
38
- "cdr-select--large@xs": "cdr-select--large@xs_13-5-0-alpha-1",
39
- "cdr-select--large": "cdr-select--large_13-5-0-alpha-1",
40
- "cdr-select--large@sm": "cdr-select--large@sm_13-5-0-alpha-1",
41
- "cdr-select--large@md": "cdr-select--large@md_13-5-0-alpha-1",
42
- "cdr-select--large@lg": "cdr-select--large@lg_13-5-0-alpha-1",
43
- "cdr-select-wrap": "cdr-select-wrap_13-5-0-alpha-1",
44
- "cdr-pagination": "cdr-pagination_13-5-0-alpha-1",
45
- "cdr-pagination__li--links": "cdr-pagination__li--links_13-5-0-alpha-1",
46
- "cdr-pagination__li--select": "cdr-pagination__li--select_13-5-0-alpha-1",
47
- "cdr-pagination__link": "cdr-pagination__link_13-5-0-alpha-1",
48
- "cdr-pagination__link--current": "cdr-pagination__link--current_13-5-0-alpha-1",
49
- "cdr-pagination__link--disabled": "cdr-pagination__link--disabled_13-5-0-alpha-1",
50
- "cdr-pagination__ellipse": "cdr-pagination__ellipse_13-5-0-alpha-1",
51
- "cdr-pagination__prev": "cdr-pagination__prev_13-5-0-alpha-1",
52
- "cdr-pagination__next": "cdr-pagination__next_13-5-0-alpha-1",
53
- "cdr-pagination__caret--prev": "cdr-pagination__caret--prev_13-5-0-alpha-1",
54
- "cdr-pagination__caret--next": "cdr-pagination__caret--next_13-5-0-alpha-1"
2
+ "cdr-icon": "cdr-icon_13-5-0-alpha-2",
3
+ "cdr-icon--small": "cdr-icon--small_13-5-0-alpha-2",
4
+ "cdr-icon--large": "cdr-icon--large_13-5-0-alpha-2",
5
+ "cdr-icon--small@xs": "cdr-icon--small@xs_13-5-0-alpha-2",
6
+ "cdr-icon--large@xs": "cdr-icon--large@xs_13-5-0-alpha-2",
7
+ "cdr-icon--small@sm": "cdr-icon--small@sm_13-5-0-alpha-2",
8
+ "cdr-icon--large@sm": "cdr-icon--large@sm_13-5-0-alpha-2",
9
+ "cdr-icon--small@md": "cdr-icon--small@md_13-5-0-alpha-2",
10
+ "cdr-icon--large@md": "cdr-icon--large@md_13-5-0-alpha-2",
11
+ "cdr-icon--small@lg": "cdr-icon--small@lg_13-5-0-alpha-2",
12
+ "cdr-icon--large@lg": "cdr-icon--large@lg_13-5-0-alpha-2",
13
+ "cdr-icon--inherit-color": "cdr-icon--inherit-color_13-5-0-alpha-2",
14
+ "cdr-label-standalone": "cdr-label-standalone_13-5-0-alpha-2",
15
+ "cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_13-5-0-alpha-2",
16
+ "cdr-label-standalone__label": "cdr-label-standalone__label_13-5-0-alpha-2",
17
+ "cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_13-5-0-alpha-2",
18
+ "cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_13-5-0-alpha-2",
19
+ "cdr-label-standalone__optional": "cdr-label-standalone__optional_13-5-0-alpha-2",
20
+ "cdr-label-standalone__helper": "cdr-label-standalone__helper_13-5-0-alpha-2",
21
+ "cdr-label-standalone__info": "cdr-label-standalone__info_13-5-0-alpha-2",
22
+ "cdr-label-standalone__post-content": "cdr-label-standalone__post-content_13-5-0-alpha-2",
23
+ "cdr-label-standalone__info-action": "cdr-label-standalone__info-action_13-5-0-alpha-2",
24
+ "cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_13-5-0-alpha-2",
25
+ "cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_13-5-0-alpha-2",
26
+ "cdr-form-error": "cdr-form-error_13-5-0-alpha-2",
27
+ "cdr-form-error__icon": "cdr-form-error__icon_13-5-0-alpha-2",
28
+ "cdr-select": "cdr-select_13-5-0-alpha-2",
29
+ "cdr-select--primary": "cdr-select--primary_13-5-0-alpha-2",
30
+ "cdr-select--secondary": "cdr-select--secondary_13-5-0-alpha-2",
31
+ "cdr-select--error": "cdr-select--error_13-5-0-alpha-2",
32
+ "cdr-select--preicon": "cdr-select--preicon_13-5-0-alpha-2",
33
+ "cdr-select__prompt": "cdr-select__prompt_13-5-0-alpha-2",
34
+ "cdr-select__caret": "cdr-select__caret_13-5-0-alpha-2",
35
+ "cdr-select__caret--disabled": "cdr-select__caret--disabled_13-5-0-alpha-2",
36
+ "cdr-select__pre-icon": "cdr-select__pre-icon_13-5-0-alpha-2",
37
+ "cdr-select--multiple": "cdr-select--multiple_13-5-0-alpha-2",
38
+ "cdr-select--large@xs": "cdr-select--large@xs_13-5-0-alpha-2",
39
+ "cdr-select--large": "cdr-select--large_13-5-0-alpha-2",
40
+ "cdr-select--large@sm": "cdr-select--large@sm_13-5-0-alpha-2",
41
+ "cdr-select--large@md": "cdr-select--large@md_13-5-0-alpha-2",
42
+ "cdr-select--large@lg": "cdr-select--large@lg_13-5-0-alpha-2",
43
+ "cdr-select-wrap": "cdr-select-wrap_13-5-0-alpha-2",
44
+ "cdr-pagination": "cdr-pagination_13-5-0-alpha-2",
45
+ "cdr-pagination__li--links": "cdr-pagination__li--links_13-5-0-alpha-2",
46
+ "cdr-pagination__li--select": "cdr-pagination__li--select_13-5-0-alpha-2",
47
+ "cdr-pagination__link": "cdr-pagination__link_13-5-0-alpha-2",
48
+ "cdr-pagination__link--current": "cdr-pagination__link--current_13-5-0-alpha-2",
49
+ "cdr-pagination__link--disabled": "cdr-pagination__link--disabled_13-5-0-alpha-2",
50
+ "cdr-pagination__ellipse": "cdr-pagination__ellipse_13-5-0-alpha-2",
51
+ "cdr-pagination__prev": "cdr-pagination__prev_13-5-0-alpha-2",
52
+ "cdr-pagination__next": "cdr-pagination__next_13-5-0-alpha-2",
53
+ "cdr-pagination__caret--prev": "cdr-pagination__caret--prev_13-5-0-alpha-2",
54
+ "cdr-pagination__caret--next": "cdr-pagination__caret--next_13-5-0-alpha-2"
55
55
  };
56
56
  export {
57
57
  a as default
@@ -1,4 +1,4 @@
1
- import { defineComponent as P, ref as u, watch as E, onMounted as S, useCssModule as k, resolveComponent as m, openBlock as y, createElementBlock as b, normalizeClass as n, createElementVNode as f, renderSlot as a, createVNode as v, withCtx as h, createTextVNode as q, toDisplayString as T, createCommentVNode as B } from "vue";
1
+ import { defineComponent as P, ref as u, watch as E, onMounted as S, useCssModule as k, resolveComponent as m, openBlock as y, createElementBlock as b, normalizeClass as l, createElementVNode as f, renderSlot as a, createVNode as v, withCtx as h, createTextVNode as q, toDisplayString as T, createCommentVNode as B } from "vue";
2
2
  import M from "tabbable";
3
3
  import N from "../icon/comps/x-sm.vue.mjs";
4
4
  import V from "../button/CdrButton.vue.mjs";
@@ -15,51 +15,73 @@ const H = P({
15
15
  CdrPopup: w
16
16
  },
17
17
  props: {
18
+ /**
19
+ * Sets the position where the popover will render relative to the trigger element.
20
+ * @demoSelectMultiple false
21
+ * @values top, bottom, left, right
22
+ */
18
23
  position: {
19
24
  type: String,
20
25
  required: !1,
21
26
  default: "top",
22
27
  validator: (e) => A(e, ["top", "bottom", "left", "right"])
23
28
  },
29
+ /**
30
+ * If set to `true`, popover will attempt to dynamically set it's position to
31
+ * ensure it renders within the visible browser window.
32
+ * If `false` the popover will always render in the provided `position`.
33
+ */
24
34
  autoPosition: {
25
35
  type: Boolean,
26
36
  required: !1,
27
37
  default: !0
28
38
  },
39
+ /** Sets the title for the popover content. Can also be provided via the `title` slot. */
29
40
  label: {
30
41
  type: String,
31
42
  required: !1
32
43
  },
44
+ /** ID for the popover element, required for accessibility */
33
45
  id: {
34
46
  type: String,
35
47
  required: !0
36
48
  },
49
+ /** Add custom class to the popover content wrapper. Allows for overriding size, styling, etc. */
37
50
  contentClass: {
38
51
  type: String,
39
52
  required: !1
40
53
  },
54
+ /**
55
+ * Used to programmatically control the popover state. Does not need to be set if you are using the `trigger` slot.
56
+ * @demoIgnore true
57
+ */
41
58
  open: {
42
59
  type: Boolean,
43
60
  default: !1,
44
61
  required: !1
45
62
  }
46
63
  },
47
- emits: ["opened", "closed"],
64
+ emits: {
65
+ /** Emits when popover is opened */
66
+ opened: null,
67
+ /** Emits when popover is closed */
68
+ closed: null
69
+ },
48
70
  setup(e, t) {
49
71
  const s = u(!1);
50
- let l;
72
+ let n;
51
73
  const i = u(null), p = u(null), d = t.slots.trigger, c = t.slots.title || e.label, r = (o) => {
52
74
  if (s.value === !0)
53
75
  return;
54
76
  const {
55
77
  activeElement: $
56
78
  } = document;
57
- l = $, s.value = !0, t.emit("opened", o), setTimeout(() => {
79
+ n = $, s.value = !0, t.emit("opened", o), setTimeout(() => {
58
80
  const C = M(p.value.$el);
59
81
  C[0] && C[0].focus();
60
82
  }, 50);
61
83
  }, g = (o) => {
62
- s.value = !1, t.emit("closed", o), l && l.focus();
84
+ s.value = !1, t.emit("closed", o), n && n.focus();
63
85
  }, _ = () => {
64
86
  const o = i.value.children[0];
65
87
  o && o.addEventListener("click", r);
@@ -85,10 +107,10 @@ const H = P({
85
107
  }), I = {
86
108
  ref: "triggerEl"
87
109
  };
88
- function L(e, t, s, l, i, p) {
110
+ function L(e, t, s, n, i, p) {
89
111
  const d = m("icon-x-sm"), c = m("cdr-button"), r = m("cdr-popup");
90
112
  return y(), b("div", {
91
- class: n(e.mapClasses(e.style, "cdr-popover--wrapper", e.hasTrigger && "cdr-popover--position"))
113
+ class: l(e.mapClasses(e.style, "cdr-popover--wrapper", e.hasTrigger && "cdr-popover--position"))
92
114
  }, [f("div", I, [a(e.$slots, "trigger")], 512), v(r, {
93
115
  role: "dialog",
94
116
  ref: "popupEl",
@@ -101,14 +123,14 @@ function L(e, t, s, l, i, p) {
101
123
  "content-class": e.contentClass
102
124
  }, {
103
125
  default: h(() => [f("div", {
104
- class: n(e.style["cdr-popover__container"])
126
+ class: l(e.style["cdr-popover__container"])
105
127
  }, [f("div", {
106
- class: n(e.style["cdr-popover__content"])
128
+ class: l(e.style["cdr-popover__content"])
107
129
  }, [e.hasTitle ? (y(), b("div", {
108
130
  key: 0,
109
- class: n(e.style["cdr-popover__title"])
131
+ class: l(e.style["cdr-popover__title"])
110
132
  }, [a(e.$slots, "title", {}, () => [q(T(e.label), 1)])], 2)) : B("", !0), a(e.$slots, "default")], 2), v(c, {
111
- class: n(e.style["cdr-popover__close-button"]),
133
+ class: l(e.style["cdr-popover__close-button"]),
112
134
  "icon-only": "",
113
135
  onClick: e.closePopover,
114
136
  "aria-label": "Close",