@ed.yakovich/component-library 0.0.12 → 0.0.15

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 (46) hide show
  1. package/dist/components/InfoBanner/index.js +4 -23
  2. package/dist/index-44540db3-BN5vFHKr.js +44 -0
  3. package/dist/index-4d46d9ca-BtyZMEt1.js +12 -0
  4. package/dist/index-D9BZSjMp.js +21158 -0
  5. package/dist/index-ba31999b-V1s4iffq.js +7451 -0
  6. package/dist/index.esm-a7c99373-DUoLYEEM.js +41 -0
  7. package/dist/main.js +1 -1
  8. package/dist/prism-accordion.entry-D4g7wdXB.js +51 -0
  9. package/dist/prism-avatar_3.entry-C1H9bg9y.js +335 -0
  10. package/dist/prism-badge.entry-CWLalQsR.js +56 -0
  11. package/dist/prism-banner.entry-D1sce4tY.js +105 -0
  12. package/dist/prism-breadcrumb.entry-C282yHQl.js +33 -0
  13. package/dist/prism-button_3.entry-DIg1AEXF.js +240 -0
  14. package/dist/prism-card.entry-DaxGD-uX.js +152 -0
  15. package/dist/prism-carousel.entry-BGmaoDVM.js +3346 -0
  16. package/dist/prism-checkbox-group.entry-Dwa_mvjd.js +62 -0
  17. package/dist/prism-checkbox.entry-CZvx2AHI.js +116 -0
  18. package/dist/prism-data-table.entry-DACAS8BE.js +3591 -0
  19. package/dist/prism-datepicker.entry-CHUyjilE.js +279 -0
  20. package/dist/prism-dialog.entry-DdO9Kt32.js +73 -0
  21. package/dist/prism-drawer.entry-Dn0rvW9U.js +43 -0
  22. package/dist/prism-form.entry-C8VzGp6c.js +42 -0
  23. package/dist/prism-header.entry-D0PypuC3.js +227 -0
  24. package/dist/prism-hero.entry-DQ8G7Jb_.js +23 -0
  25. package/dist/prism-image.entry-tx9Pc3k_.js +38 -0
  26. package/dist/prism-input-file.entry-CO-2LZxG.js +119 -0
  27. package/dist/prism-input-otp.entry-ZAxExI2D.js +79 -0
  28. package/dist/prism-input-text.entry-EXsN4rgi.js +278 -0
  29. package/dist/prism-input-textarea.entry-CRqY4mr9.js +145 -0
  30. package/dist/prism-input-time.entry-BJ9he6MX.js +85 -0
  31. package/dist/prism-layout.entry-ulDWjtj8.js +20 -0
  32. package/dist/prism-lineitem.entry-DJk6X6mR.js +47 -0
  33. package/dist/prism-modal.entry-C795YZic.js +95 -0
  34. package/dist/prism-pagination.entry-DYQieAu3.js +69 -0
  35. package/dist/prism-popover.entry-BgLcACZw.js +1114 -0
  36. package/dist/prism-progress.entry-Z21rpoTm.js +79 -0
  37. package/dist/prism-radio_2.entry-C0HPCb3G.js +159 -0
  38. package/dist/prism-select.entry-B_l-ab1d.js +286 -0
  39. package/dist/prism-switch.entry-OkC8X1bD.js +95 -0
  40. package/dist/prism-tab.entry-szftB_wL.js +20 -0
  41. package/dist/prism-tabs.entry-0UR3WF52.js +72 -0
  42. package/dist/prism-text.entry-BEAZ8xEV.js +28 -0
  43. package/dist/prism-treelist.entry-UX4FM4Bi.js +135 -0
  44. package/dist/prism-typeahead.entry-CwOiAFQE.js +1264 -0
  45. package/dist/purify-9647b094-0-ZyuBNz.js +572 -0
  46. package/package.json +3 -2
@@ -0,0 +1,47 @@
1
+ import { r as n, c as l, h as i, H as o, g as c } from "./index-D9BZSjMp.js";
2
+ import { g as d, m as p } from "./index-44540db3-BN5vFHKr.js";
3
+ /*!
4
+ * Copyright (c) 2025 Comcast. Prism UI - v8.28.0 - made with ❤️ in Philadelphia
5
+ */
6
+ const m = '.sc-prism-lineitem-h{align-items:center;box-sizing:border-box;display:inline-flex;isolation:auto;margin:var(--prism-lineitem-spacing-margin,0);outline:1px solid transparent;width:100%}.sc-prism-lineitem-h:not(.hydrated){transition-duration:0ms}.divide.sc-prism-lineitem-h{border-bottom:1px solid color-mix(in srgb,var(--prism-color-border-primary-base) var(--prism-alpha-tertiary-percentage),transparent);margin:var(--prism-lineitem-spacing-margin,var(--prism-spacer-size-xxs))}.link.sc-prism-lineitem{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-style:none;color:inherit;display:block;font:inherit;outline:2px solid transparent;outline-offset:2px;padding:0;text-align:left;-webkit-text-decoration-line:none;text-decoration-line:none;transition:all var(--prism-animation-duration-normal) var(--prism-animation-timing-function)}.link.sc-prism-lineitem,.link.no-label.sc-prism-lineitem{height:100%;width:100%}.link.no-label.sc-prism-lineitem{display:unset;position:absolute}.link.no-label.sc-prism-lineitem,.link.sc-prism-lineitem:after{left:0;top:0}.link.sc-prism-lineitem:after{inset:0;bottom:0;content:"";opacity:0;position:absolute;right:0;z-index:var(--prism-layout-z-index-base)}.li-wrapper.sc-prism-lineitem,.link.sc-prism-lineitem:after{transition:all var(--prism-animation-duration-normal) var(--prism-animation-timing-function)}.li-wrapper.sc-prism-lineitem{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--prism-color-material-primary-base);border-width:0;border:1px solid transparent;display:flex;flex:1 1 auto;padding:var(--prism-lineitem-spacing-padding,var(--prism-spacer-size-lg));position:relative;text-align:left;width:100%}.compact.sc-prism-lineitem-h .li-wrapper.sc-prism-lineitem{padding:var(--prism-lineitem-spacing-padding,var(--prism-spacer-size-md))}.clickable.sc-prism-lineitem:has(.link:focus-visible){border-color:var(--prism-color-border-primary-focus);outline:none}.clickable.sc-prism-lineitem{transition:all var(--prism-animation-duration-normal) var(--prism-animation-timing-function)}.clickable.sc-prism-lineitem:has(button,a).sc-prism-lineitem:hover{background-color:var(--prism-color-material-primary-focus)}.clickable.sc-prism-lineitem:has(button,a).sc-prism-lineitem:active{--prism-text-priority:1;background-color:var(--prism-color-material-primary-down)}.li-wrapper.line.sc-prism-lineitem{border:1px solid color-mix(in srgb,var(--prism-color-border-primary-base) var(--prism-alpha-tertiary-percentage),transparent);margin-right:var(--prism-spacer-size-sm);padding-right:var(--prism-spacer-size-sm)}.last-item.sc-prism-lineitem{padding-left:var(--prism-spacer-size-sm)}.li-wrapper.sc-prism-lineitem .description.sc-prism-lineitem{margin-top:var(--prism-spacer-size-xs)}.li-wrapper.sc-prism-lineitem .right.sc-prism-lineitem{flex:none;text-align:right}.li-wrapper.sc-prism-lineitem .right.sc-prism-lineitem:not(:empty){margin-left:var(--prism-spacer-size-lg)}.li-wrapper.sc-prism-lineitem .middle.sc-prism-lineitem{width:100%}.li-wrapper.selected.sc-prism-lineitem:before{background-color:var(--prism-color-border-brand-primary-base);content:"";height:100%;left:0;position:absolute;top:0;width:4px}.sc-prism-lineitem-s>[css-slot=asset-leading]{margin-right:var(--prism-spacer-size-lg)}.sc-prism-lineitem-s>[css-slot=asset-leading].prism-justify-top{align-self:flex-start}@media (prefers-reduced-motion){.sc-prism-lineitem-h{transition:none}}', h = m, b = class {
7
+ constructor(e) {
8
+ n(this, e), this.prismClick = l(this, "prismClick", 7), this.uid = d(), this.sibling = !1, this.slots = {
9
+ leading: !1,
10
+ trailing: !1,
11
+ tags: !1
12
+ }, this._itemClicked = (t) => {
13
+ const { currentTarget: s } = t, { id: a } = s;
14
+ this.prismClick.emit({
15
+ id: a,
16
+ name: "lineitem-clicked",
17
+ target: s
18
+ }).defaultPrevented && t.preventDefault();
19
+ }, this.prismId = `prism-lineitem-${this.uid}`, this.attr = {}, this.label = void 0, this.split = void 0, this.arrow = !0, this.eyebrow = void 0, this.labelSecondary = void 0, this.description = void 0, this.descriptionSecondary = void 0, this.spacing = "standard", this.divider = !0, this.leadingAlign = "center", this.tag = "section", this.type = "button", this.download = void 0, this.href = void 0, this.rel = void 0, this.target = void 0, this.direction = "right", this.selected = !1, this.name = void 0, this.value = void 0;
20
+ }
21
+ componentWillLoad() {
22
+ var e;
23
+ ((e = this.el.nextElementSibling) === null || e === void 0 ? void 0 : e.tagName) === "PRISM-LINEITEM" && (this.sibling = !0);
24
+ }
25
+ connectedCallback() {
26
+ p("prism-lineitem");
27
+ }
28
+ componentWillRender() {
29
+ this.slots.leading = !!this.el.querySelector('[slot="asset-leading"]'), this.slots.trailing = !!this.el.querySelector('[slot="asset-trailing"]'), this.slots.tags = !!this.el.querySelector('[slot="tags"]'), this.slots.leading && (this.el.querySelector('[slot="asset-leading"]').setAttribute("css-slot", "asset-leading"), this.el.querySelector('[slot="asset-leading"]').classList.add(`prism-justify-${this.leadingAlign}`)), this.slots.trailing && (this.split = !0);
30
+ }
31
+ render() {
32
+ const e = this.tag, t = this.tag === "a" || this.tag === "button", s = t === !0 && this.arrow, a = this.labelSecondary || this.descriptionSecondary;
33
+ return i(o, { key: "f585f3a19b0ef4f97075f8280dc62a725768ea56", class: { divide: this.sibling && this.divider, [this.spacing]: !0 } }, i("section", { key: "bf27842025272a38614e3fbdd8e3bf3e5c88a571", id: this.prismId, class: { "li-wrapper": !0, selected: this.selected, line: s && this.split === !0, clickable: t } }, i("slot", { key: "19a051bfe5a82ca2d714e03c73cdf121925461d6", name: "asset-leading" }), i("span", { key: "f65db6fd89d0ef0fb3dd09baf33f499c59c17b9d", class: "middle" }, i("span", { key: "bb4e42a238541af1b753dcab390cfed9677c777b", class: "upper-row" }, this.eyebrow && i("prism-text", { key: "89aceee9135addca8c178d01b2f89b3f3f0376cb", priority: "secondary", as: "caption" }, this.eyebrow), i(e, Object.assign({ key: "fae39590851fc71b05c998d61e37bfc8763e8a22", href: this.tag === "a" ? this.href : void 0, target: this.tag === "a" ? this.target : void 0, download: this.tag === "a" ? this.download : void 0, rel: this.tag === "a" ? this.rel : void 0, type: this.tag === "button" ? "button" : void 0, class: { link: t, "no-label": this.label === void 0 || this.label.length === 0 }, "aria-labelledby": this.label ? null : this.prismId, name: this.tag === "button" ? this.name : void 0, value: this.tag === "button" ? this.value : void 0 }, typeof this.attr == "object" && this.attr !== null && !Array.isArray(this.attr) ? this.attr : {}, {
34
+ // eslint-disable-next-line react/jsx-no-bind
35
+ onClick: t ? (r) => {
36
+ this._itemClicked(r);
37
+ } : void 0
38
+ }), this.label && i("prism-text", { key: "4faa338dce328302b9836ca513ccc7eb4bbcd45c", tag: "span", family: "body", size: "400" }, this.label))), i("span", { key: "a8a9ca9b5b7a6f3ebe5c242620bd784134c85bb8", class: "middle-row" }, this.description && i("prism-text", { key: "660d5b1fb1d54269137a95648788bbb6c9751cdb", class: "description", priority: "secondary", as: "caption" }, this.description), i("slot", { key: "9e137dcc17574d207f24bf288ba08fa3bf1dd5a9", name: "tags" })), i("span", { key: "189c900bc1631300f22aa103eada6ce3c2756e76", class: "custom-slot" }, i("slot", { key: "0d4615206655c71721fe93a22f4fc50762aa9bf4" }))), a && i("span", { key: "07c7a2c2fbf80d5007b49bec05214a7fa78fe9c7", class: "right" }, this.labelSecondary && i("prism-text", { key: "c03110b567ea83efa5ac05f669acc01f29e65b83", family: "body", size: "400" }, this.labelSecondary), this.descriptionSecondary && i("prism-text", { key: "99e6392ad0649a40414c488593d987732ff1d364", class: "description", priority: "secondary", as: "caption" }, this.descriptionSecondary)), s && i("prism-icon", { key: "235682a03ba6585344f75ce5127a6ab15417855f", display: "outline", priority: "secondary", class: "last-item", name: `caret_${this.direction}_button` })), i("slot", { key: "df54b07a94d3a9a83b0c9bd5d7a241d111a25959", name: "asset-trailing" }));
39
+ }
40
+ get el() {
41
+ return c(this);
42
+ }
43
+ };
44
+ b.style = h;
45
+ export {
46
+ b as prism_lineitem
47
+ };
@@ -0,0 +1,95 @@
1
+ import { r as l, c as d, h as i, H as n, g as c } from "./index-D9BZSjMp.js";
2
+ import { g as m, a as o, m as h } from "./index-44540db3-BN5vFHKr.js";
3
+ /*!
4
+ * Copyright (c) 2025 Comcast. Prism UI - v8.28.0 - made with ❤️ in Philadelphia
5
+ */
6
+ const p = ".sc-prism-modal-h{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:color-mix(in srgb,var(--prism-modal-backdrop-color,var(--prism-color-fill-primary-base)) var(--prism-alpha-secondary-percentage),#000 10%);bottom:0;display:none;height:0;isolation:isolate;left:0;opacity:0;position:fixed;right:0;top:0;width:0;z-index:var(--prism-layout-z-index-backdrop)}.open.sc-prism-modal-h{display:block;height:100%;min-height:100vh;opacity:1;width:100%}.modal-container.sc-prism-modal:focus,.sc-prism-modal-h:focus{outline:2px solid transparent;outline-offset:2px}.modal.sc-prism-modal{display:flex;flex-direction:column;height:100vh;justify-content:center;position:relative}.modal-container.sc-prism-modal{background-color:var(--prism-color-material-primary-base);margin-left:auto;margin-right:auto;padding:var(--prism-modal-spacing-padding,var(--prism-spacer-size-xxl));position:relative}.modal-container.sc-prism-modal .header-actions.sc-prism-modal{position:absolute;right:var(--prism-modal-position-close-right,var(--prism-spacer-size-md));top:var(--prism-modal-position-close-top,var(--prism-spacer-size-md));z-index:var(--prism-layout-z-index-base)}.modal-content.dismissible.sc-prism-modal .header.sc-prism-modal{padding-right:var(--prism-spacer-size-3xl)}.header.sc-prism-modal{margin-bottom:var(--prism-spacer-size-lg)}.modal-content-header.sc-prism-modal{display:flex;flex-direction:column;gap:var(--prism-spacer-size-lg)}.show.sc-prism-modal{animation:modal-animation var(--prism-animation-duration-fast) cubic-bezier(.25,.46,.45,.94) both;-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:var(--prism-radius-size-md);box-shadow:var(--prism-shadow-sm-base);height:-webkit-min-content;height:-moz-min-content;height:min-content;max-height:var(--prism-modal-max-height,75vh);max-width:var(--prism-modal-width,75vw);overflow:var(--prism-modal-content-overflow,auto);width:100%}@media (max-width:767px){.show.behavior-fullscreen.sc-prism-modal{--prism-modal-width:100vw;--prism-modal-max-height:100vh;border-radius:var(--prism-radius-size-none);height:100%;width:100%}}@media (min-width:768px){.show.sc-prism-modal{max-height:var(--prism-modal-max-height,75vh)}.modal-container.sc-prism-modal{padding:var(--prism-modal-spacing-padding,var(--prism-spacer-size-4xl))}.modal-container.sc-prism-modal .header-actions.sc-prism-modal{right:var(--prism-modal-position-close-right,var(--prism-spacer-size-xxl));top:var(--prism-modal-position-close-top,var(--prism-spacer-size-xxl))}.modal-content.dismissible.sc-prism-modal .header.sc-prism-modal{padding-right:var(--prism-spacer-size-4xl)}}.footer.sc-prism-modal{margin-top:var(--prism-spacer-size-3xl)}.footer.persistant.sc-prism-modal{background-color:var(--prism-color-material-primary-base);bottom:0;margin-top:var(--prism-spacer-size-xxl);padding-bottom:var(--prism-spacer-size-4xl);padding-top:var(--prism-spacer-size-sm);position:-webkit-sticky;position:sticky;transform:translateY(var(--prism-spacer-size-4xl))}@keyframes modal-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion){.show.sc-prism-modal{animation:none}}", b = p, f = class {
7
+ constructor(e) {
8
+ l(this, e), this.prismClick = d(this, "prismClick", 7), this.prismClosed = d(this, "prismClosed", 7), this.uid = m(), this.hasHeader = !1, this.hasFooter = !1, this.hasAsset = !1, this.body = this.el.closest("body"), this.dismiss = (s) => {
9
+ if (this.open = !1, s) {
10
+ const { currentTarget: a } = s;
11
+ s instanceof KeyboardEvent || this.prismClick.emit({
12
+ name: "modal-closed",
13
+ dismissed: !0,
14
+ target: a,
15
+ host: this.el
16
+ }), this.prismClosed.emit({
17
+ name: "modal-closed",
18
+ dismissed: !0,
19
+ target: a,
20
+ host: this.el
21
+ });
22
+ }
23
+ }, this._disableBodyFocusTarget = () => {
24
+ this.body.classList.contains("sb-main-fullscreen") || (this.body.style.overflow = "hidden"), this.referElement = document.activeElement, setTimeout(() => {
25
+ o(this.el)[1].focus();
26
+ }, 0);
27
+ }, this._resetBodyFocusTarget = () => {
28
+ this.body.classList.contains("sb-main-fullscreen") || (this.body.style.overflow = "auto"), setTimeout(() => {
29
+ var s;
30
+ (s = this.referElement) === null || s === void 0 || s.focus();
31
+ }, 0);
32
+ }, this.open = !1, this.header = void 0, this.label = void 0, this.dismissible = !0, this.dismissibleByKeyboard = !0, this.dismissibleByPointer = !0, this.closeIconPath = void 0, this.sticky = void 0, this.headingDisplay = "200", this.closeLabel = "close dialog", this.mobileBehavior = "default", this.prismId = `prism-modal-${this.uid}`;
33
+ }
34
+ // Listen for Tabbing or Window Swapping
35
+ handleVisibilityChange(e) {
36
+ }
37
+ connectedCallback() {
38
+ h("prism-modal");
39
+ }
40
+ /**
41
+ * @description Public: Open Modal
42
+ */
43
+ async setOpen() {
44
+ this.open = !0;
45
+ }
46
+ /**
47
+ * @description Public: Close Modal
48
+ */
49
+ async setClose() {
50
+ this.dismiss(null);
51
+ }
52
+ watchHandler(e) {
53
+ e ? this._disableBodyFocusTarget() : this._resetBodyFocusTarget();
54
+ }
55
+ startingFocus(e) {
56
+ let s = o(this.el);
57
+ o(this.el)[s.length - 2].focus();
58
+ }
59
+ endingFocus(e) {
60
+ o(this.el)[1].focus();
61
+ }
62
+ componentDidLoad() {
63
+ var e, s;
64
+ this.hasFooter = !!this.element.querySelector('[slot="footer"]'), this.hasAsset = !!this.element.querySelector('[slot="asset-leading"]'), this.escKeydownListener = (a) => {
65
+ var t;
66
+ let r = !(!((t = document.activeElement) === null || t === void 0) && t.closest("form"));
67
+ a.code === "Escape" && this.dismissibleByKeyboard && this.dismissible && r && this.dismiss(a);
68
+ }, this.overlayClickListener = (a) => {
69
+ !a.target.closest("[role=dialog]") && this.dismissibleByPointer && this.dismissible && this.dismiss(a);
70
+ }, (e = this.el) === null || e === void 0 || e.addEventListener("keydown", this.escKeydownListener), (s = this.el) === null || s === void 0 || s.addEventListener("click", this.overlayClickListener), this.open === !0 && this._disableBodyFocusTarget();
71
+ }
72
+ disconnectedCallback() {
73
+ var e, s;
74
+ this._resetBodyFocusTarget(), this.escKeydownListener && ((e = this.el) === null || e === void 0 || e.removeEventListener("keydown", this.escKeydownListener)), this.overlayClickListener && ((s = this.el) === null || s === void 0 || s.removeEventListener("click", this.overlayClickListener)), this._resetBodyFocusTarget();
75
+ }
76
+ render() {
77
+ return i(n, {
78
+ key: "d18ee561c7009d9ca4536734a0d98cfa9f73834a",
79
+ tabindex: "-1",
80
+ class: { open: this.open }
81
+ }, i("section", { key: "abfeec4e8bfab3e3b6ed24b2ea6b972de2ecc516", class: "modal" }, i("div", { key: "14fd85a3e4662310d66a260e937cee619062f809", role: "dialog", "aria-modal": "true", inert: !this.open, "aria-label": this.label || this.header, class: { "modal-container": !0, show: this.open, [`behavior-${this.mobileBehavior}`]: !0 }, ref: (e) => this.element = e }, i("span", { key: "39bd40d55d10781abca29e078661bd7b18efbef7", onFocus: (e) => this.startingFocus(e), id: `start-${this.prismId}`, tabindex: "0" }), this.dismissible && i("div", { key: "1c3e8d427ef3408919dc80388fb3ecaa42adc0e3", class: "header-actions" }, i("prism-button", { key: "8325d4c788fd518a71081cf420c83421b5198fce", display: "ghost-icon", tone: "primary", size: "xs", label: this.closeLabel, onPrismClick: (e) => this.dismiss(e), type: "button" }, i("prism-icon", { key: "8cca2b1239946a01349830ce07e301abb6ec4fae", role: "presentation", display: "outline", class: "icon", size: "sm", name: "close", path: this.closeIconPath }, this.closeLabel))), i("div", { key: "5731de7520b3768eaa7ff0aa599a2b7ec0f6a3e0", class: { "modal-content": !0, dismissible: this.dismissible } }, i("div", { key: "db41d4a80509e7506d6e203b0c2aac5d40558058", class: "modal-content-header" }, i("slot", { key: "a951d3c5142be28e453e091f42b2cbf921d8885c", name: "asset-leading" }), this.header && i("prism-text", { key: "420257779a88fc0c66d539901731dc78e558043e", class: "header", tag: "h2", family: "headline", size: this.headingDisplay }, this.header)), i("slot", { key: "23f7a6d0e5c95ef62be48b3e58e76ffd60829a5f" })), i("div", { key: "80a71796cba6d96f17d9726dd926869d83c86cd9", class: { footer: !0, persistant: this.sticky === "footer" } }, i("slot", { key: "70307db89e0cadd9ecec3d64578762d82131ef2d", name: "footer" })), i("span", { key: "771160336813a58bc00c0e0787f12f7155e02249", onFocus: (e) => this.endingFocus(e), id: `end-${this.prismId}`, tabindex: "0" }))));
82
+ }
83
+ get el() {
84
+ return c(this);
85
+ }
86
+ static get watchers() {
87
+ return {
88
+ open: ["watchHandler"]
89
+ };
90
+ }
91
+ };
92
+ f.style = b;
93
+ export {
94
+ f as prism_modal
95
+ };
@@ -0,0 +1,69 @@
1
+ import { r as e, c as r, h as t, H as a } from "./index-D9BZSjMp.js";
2
+ import { g as n, m as h } from "./index-44540db3-BN5vFHKr.js";
3
+ /*!
4
+ * Copyright (c) 2025 Comcast. Prism UI - v8.28.0 - made with ❤️ in Philadelphia
5
+ */
6
+ const c = ".sc-prism-pagination-h{align-items:center;display:inline-flex;width:100%}.max.sc-prism-pagination{white-space:nowrap}.input.sc-prism-pagination{--prism-input-text-align:center;-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}.current.sc-prism-pagination{margin-left:var(--prism-spacer-size-sm);width:4rem}.current.sc-prism-pagination,.previous.sc-prism-pagination{margin-right:var(--prism-spacer-size-sm)}.next.sc-prism-pagination{margin-left:var(--prism-spacer-size-sm)}", p = c, u = class {
7
+ constructor(i) {
8
+ e(this, i), this.prismChange = r(this, "prismChange", 7), this.uid = n(), this.first = !0, this.last = !1, this.max = void 0, this.min = 1, this.current = 1, this.prismId = `prism-pagination-${this.uid}`, this.variant = "contained", this.iconVariant = "outline", this.tone = "primary", this.inputTone = "secondary", this.invalid = !1;
9
+ }
10
+ connectedCallback() {
11
+ this.previous = this.current, h("prism-pagination");
12
+ }
13
+ // Check for current page
14
+ _checkCurrentPage() {
15
+ this.first = this.current === 1 || this.current <= 1, this.last = this.current === this.max || this.current >= this.max;
16
+ }
17
+ // On Value Change of the input text box
18
+ _valueChange(i) {
19
+ i.detail.value === "" && !Number.isNaN(this.current) && this.previous !== this.current ? this.previous = this.current : this.current = i.detail.value, this._checkCurrentPage(), this.prismChange.emit({
20
+ scope: this.prismId,
21
+ element: i.detail.id,
22
+ action: "change",
23
+ page: this.current,
24
+ first: this.first,
25
+ last: this.last,
26
+ previous: this.previous
27
+ });
28
+ }
29
+ // On click of previous button
30
+ _previousPage(i) {
31
+ Number.isNaN(this.current) ? this.previous && (this.current = this.previous, this.invalid = !1) : this.current <= this.max && this.current !== this.min ? (this.previous = this.current, this.current--, this._checkCurrentPage()) : this.current > this.max && (this.previous = this.max, this.current = this.max, this.invalid = !1), this.prismChange.emit({
32
+ scope: this.prismId,
33
+ element: i.detail.id,
34
+ action: "previous",
35
+ page: this.current,
36
+ first: this.first,
37
+ last: this.last,
38
+ previous: this.previous
39
+ });
40
+ }
41
+ // On click of next button
42
+ _nextPage(i) {
43
+ Number.isNaN(this.current) ? this.previous && (this.current = this.previous, this.invalid = !1) : this.current < this.max && (this.current < this.min ? (this.current = this.min, this.previous = this.min, this.invalid = !1) : (this.previous = this.current, this.current++, this._checkCurrentPage())), this.prismChange.emit({
44
+ scope: this.prismId,
45
+ element: i.detail.id,
46
+ action: "next",
47
+ page: this.current,
48
+ first: this.first,
49
+ last: this.last,
50
+ previous: this.previous
51
+ });
52
+ }
53
+ _onBlur(i) {
54
+ var s;
55
+ this.invalid = !(!((s = i.detail) === null || s === void 0) && s.valid);
56
+ }
57
+ componentWillRender() {
58
+ this._checkCurrentPage();
59
+ }
60
+ render() {
61
+ return t(a, { key: "4b7c98e6e153b75bd7ea43e3f3eec5c3529220e4" }, t("prism-button", { key: "a5471bcc302110602d24d2e9750446ee7c3b1804", size: "xs", prismId: `${this.prismId}-previous-page`, "data-testid": `${this.prismId}-previous-page`, label: "Previous Page", class: "previous", disabled: this.first, onPrismClick: (i) => this._previousPage(i), display: "ghost-icon", tone: this.tone }, t("prism-icon", { key: "7d3ca240cf6e016c371621d80f49d62f23d3a1ab", display: this.iconVariant, name: "caret_left_button" })), t("section", { key: "d9e81f7f796f22abe56d765c5ea54b6c80fe3c18", class: "current" }, t("prism-input-text", { key: "75501ed1727f4dba5c74944a3b5d93eb270a579e", tone: this.inputTone, invalid: this.invalid, required: !0, hideLabel: !0, hideInvalid: !0, variant: this.variant, prismId: this.prismId, "data-testid": this.prismId, class: "input", invalidMessage: `Max of ${this.max}`, label: "set current page", onPrismChange: (i) => this._valueChange(i), onPrismBlur: (i) => {
62
+ this._onBlur(i);
63
+ }, max: this.max, min: this.min, type: "number", inputMode: "numeric", value: this.current.toString(), validation: "manual" })), t("prism-text", { key: "85693b0dc76f618b5aa2f7a64624752bf4fc6f9a", class: "max", family: "body", size: "400" }, "of ", this.max), t("prism-button", { key: "46645e3397b0c6eb778708f09b0ccf2a72cb5211", prismId: `${this.prismId}-next-page`, "data-testid": `${this.prismId}-next-page`, label: "Next Page", class: "next", disabled: this.last, onPrismClick: (i) => this._nextPage(i), size: "xs", display: "ghost-icon", tone: this.tone }, t("prism-icon", { key: "7d0b4cfe173ca2c9984196bee5285088b1be4117", display: this.iconVariant, name: "caret_right_button" })));
64
+ }
65
+ };
66
+ u.style = p;
67
+ export {
68
+ u as prism_pagination
69
+ };