@uoguelph/web-components 1.9.0-rc.9 → 1.9.1-rc.1

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.
@@ -1,42 +1,42 @@
1
- import { A as S, B as D, C as F, D as T, S as j, q as z, c as R, p as U, a as o, u as _, E as y, F as G, b as J, d as K, e as L, f as M, j as x, G as N, h as l, i as Y, k as H, t as v, s as I, l as P, m as Q, n as V, o as W, r as O } from "./bundle-mjs-BDxvNl4x.js";
2
- import { a as X } from "./slot-DDCVqxeF.js";
3
- function E(a, t) {
4
- return a === t || (a == null ? void 0 : a[j]) === t;
1
+ import { y as q, z as D, A as F, B as T, S as z, m as j, c as R, e as U, p as l, u as E, t as J, C as y, h as w, F as K, D as L, g as M, a as N, i as Y, s as _, j as G, b as H, d as I, k as o, r as x, l as P } from "./bundle-mjs-BTgoI2Ah.js";
2
+ import { a as Q } from "./slot-E9j-JIta.js";
3
+ function B(a, e) {
4
+ return a === e || (a == null ? void 0 : a[z]) === e;
5
5
  }
6
- function B(a = {}, t, s, c) {
7
- return S(() => {
8
- var i, n;
6
+ function A(a = {}, e, s, c) {
7
+ return q(() => {
8
+ var i, r;
9
9
  return D(() => {
10
- i = n, n = [], F(() => {
11
- a !== s(...n) && (t(a, ...n), i && E(s(...i), a) && t(null, ...i));
10
+ i = r, r = [], F(() => {
11
+ a !== s(...r) && (e(a, ...r), i && B(s(...i), a) && e(null, ...i));
12
12
  });
13
13
  }), () => {
14
14
  T(() => {
15
- n && E(s(...n), a) && t(null, ...n);
15
+ r && B(s(...r), a) && e(null, ...r);
16
16
  });
17
17
  };
18
18
  }), a;
19
19
  }
20
- const Z = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], audio[controls], video[controls], details, summary, [tabindex]:not([tabindex="-1"])')), $ = (a, t, s) => {
21
- !t() && a.target === a.currentTarget && s(!1);
22
- }, ee = (a, t) => {
23
- a.key === "Escape" && t(!1);
24
- }, te = (a, t, s, c, i) => {
25
- var n;
26
- if (t() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
20
+ const V = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], audio[controls], video[controls], details, summary, [tabindex]:not([tabindex="-1"])')), W = (a, e, s) => {
21
+ !e() && a.target === a.currentTarget && s(!1);
22
+ }, X = (a, e) => {
23
+ a.key === "Escape" && e(!1);
24
+ }, Z = (a, e, s, c, i) => {
25
+ var r;
26
+ if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
27
27
  if (a.preventDefault(), a.target === i()) {
28
- const d = Z(c());
29
- (n = d[d.length - 1]) == null || n.focus();
28
+ const d = V(c());
29
+ (r = d[d.length - 1]) == null || r.focus();
30
30
  } else
31
31
  i().focus();
32
32
  };
33
- var ae = (a, t) => t(!1), se = M('<div class="fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"><div part="content"><button class="absolute right-0 top-0 -translate-x-1/2 translate-y-1/2 z-[2] flex aspect-square w-8 items-center justify-center border border-black/30 text-black-contrast text-lg transition-colors bg-black hover:bg-red focus:bg-red hover:text-red-contrast focus:text-red-contrast rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
34
- function re(a, t) {
35
- U(t, !0);
36
- let s = o(t, "isOpen", 15), c = o(t, "centered", 7), i = o(t, "autoOpen", 7), n = o(t, "label", 7), d = o(t, "alertDialog", 7), k = o(t, "staticBackdrop", 7), m = o(t, "dismissButton", 7), f = o(t, "container", 7), b = o(t, "el", 7), p = o(t, "inertElements", 7);
37
- _(() => {
33
+ var $ = (a, e) => e(!1), tt = J('<div><div part="content"><button class="absolute top-0 right-0 z-[2] flex aspect-square w-8 -translate-x-1/2 translate-y-1/2 items-center justify-center rounded-full border border-black/30 bg-black p-2 text-lg text-black-contrast transition-colors hover:bg-red hover:text-red-contrast focus:bg-red focus:text-red-contrast" aria-label="Close modal"><!></button> <!></div></div>');
34
+ function et(a, e) {
35
+ U(e, !0);
36
+ let s = l(e, "isOpen", 15), c = l(e, "centered", 7), i = l(e, "autoOpen", 7), r = l(e, "label", 7), d = l(e, "alertDialog", 7), k = l(e, "staticBackdrop", 7), m = l(e, "dismissButton", 7), f = l(e, "container", 7), b = l(e, "el", 7), p = l(e, "inertElements", 7);
37
+ E(() => {
38
38
  i() && s(!0);
39
- }), _(() => {
39
+ }), E(() => {
40
40
  if (s()) {
41
41
  window.requestAnimationFrame(() => {
42
42
  window.requestAnimationFrame(() => {
@@ -45,112 +45,121 @@ function re(a, t) {
45
45
  });
46
46
  });
47
47
  });
48
- let e = b();
49
- for (; e !== null && e !== document.body; ) {
50
- const h = e.parentElement;
48
+ let t = b();
49
+ for (; t !== null && t !== document.body; ) {
50
+ const h = t.parentElement;
51
51
  if (h === null) {
52
- const u = e.getRootNode();
52
+ const u = t.getRootNode();
53
53
  if (u instanceof ShadowRoot) {
54
- e = u.host;
54
+ t = u.host;
55
55
  continue;
56
56
  }
57
57
  }
58
58
  if (h !== null)
59
59
  for (const u of h.children)
60
- u !== e && !u.inert && (u.inert = !0, p().push(u));
61
- e = h;
60
+ u !== t && !u.inert && (u.inert = !0, p().push(u));
61
+ t = h;
62
62
  }
63
63
  b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
64
64
  } else {
65
- for (const e of p())
66
- e.removeAttribute("inert");
65
+ for (const t of p())
66
+ t.removeAttribute("inert");
67
67
  p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
68
68
  }
69
69
  document.body.style.overflow = s() ? "hidden" : "";
70
70
  });
71
- var r = se();
72
- y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [ee, s], r.__focusout = [
73
- te,
71
+ var n = tt();
72
+ let O;
73
+ y(n, "tabindex", -1), n.__click = [W, k, s], n.__keyup = [X, s], n.__focusout = [
74
+ Z,
74
75
  s,
75
76
  f,
76
77
  b,
77
78
  m
78
79
  ];
79
- var w = x(r);
80
- const A = Q(() => V(W("z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "translate-y-[calc(-50%_-_50px)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
81
- var g = x(w);
82
- g.__click = [ae, s];
83
- var q = x(g);
84
- G(q, { icon: N }), O(g), B(g, (e) => m(e), () => m());
85
- var C = H(g, 2);
86
- return X(C, t, "default", {}), O(w), O(r), B(r, (e) => f(e), () => f()), J(() => {
87
- y(r, "role", d() ? "alertdialog" : "dialog"), y(r, "aria-modal", s() ? "true" : ""), y(r, "aria-label", n()), v(r, "visible", s()), v(r, "opacity-100", s()), v(r, "invisible", !s()), v(r, "opacity-0", !s()), I(w, P(A));
88
- }), K(a, r), L({
80
+ var v = w(n), g = w(v);
81
+ g.__click = [$, s];
82
+ var S = w(g);
83
+ K(S, { icon: L }), x(g), A(g, (t) => m(t), () => m());
84
+ var C = M(g, 2);
85
+ return Q(C, e, "default", {}), x(v), x(n), A(n, (t) => f(t), () => f()), N(
86
+ (t) => {
87
+ O = _(n, 1, "bg-opacity-50 fixed top-0 left-0 z-[1000] flex h-screen w-screen bg-black transition-[opacity,visibility]", null, O, {
88
+ visible: s(),
89
+ "opacity-100": s(),
90
+ invisible: !s(),
91
+ "opacity-0": !s()
92
+ }), y(n, "role", d() ? "alertdialog" : "dialog"), y(n, "aria-modal", s() ? "true" : ""), y(n, "aria-label", r()), _(v, 1, G(t));
93
+ },
94
+ [
95
+ () => Y("absolute left-1/2 z-1 h-fit max-h-full w-full max-w-full -translate-x-1/2 overflow-auto transition-transform motion-reduce:transition-none sm:w-fit sm:p-8", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "top-1/2 translate-y-[calc(-50%_-_50px)]", s() && c() && "top-1/2 translate-y-[-50%]")
96
+ ]
97
+ ), H(a, n), I({
89
98
  get isOpen() {
90
99
  return s();
91
100
  },
92
- set isOpen(e) {
93
- s(e), l();
101
+ set isOpen(t) {
102
+ s(t), o();
94
103
  },
95
104
  get centered() {
96
105
  return c();
97
106
  },
98
- set centered(e) {
99
- c(e), l();
107
+ set centered(t) {
108
+ c(t), o();
100
109
  },
101
110
  get autoOpen() {
102
111
  return i();
103
112
  },
104
- set autoOpen(e) {
105
- i(e), l();
113
+ set autoOpen(t) {
114
+ i(t), o();
106
115
  },
107
116
  get label() {
108
- return n();
117
+ return r();
109
118
  },
110
- set label(e) {
111
- n(e), l();
119
+ set label(t) {
120
+ r(t), o();
112
121
  },
113
122
  get alertDialog() {
114
123
  return d();
115
124
  },
116
- set alertDialog(e) {
117
- d(e), l();
125
+ set alertDialog(t) {
126
+ d(t), o();
118
127
  },
119
128
  get staticBackdrop() {
120
129
  return k();
121
130
  },
122
- set staticBackdrop(e) {
123
- k(e), l();
131
+ set staticBackdrop(t) {
132
+ k(t), o();
124
133
  },
125
134
  get dismissButton() {
126
135
  return m();
127
136
  },
128
- set dismissButton(e) {
129
- m(e), l();
137
+ set dismissButton(t) {
138
+ m(t), o();
130
139
  },
131
140
  get container() {
132
141
  return f();
133
142
  },
134
- set container(e) {
135
- f(e), l();
143
+ set container(t) {
144
+ f(t), o();
136
145
  },
137
146
  get el() {
138
147
  return b();
139
148
  },
140
- set el(e) {
141
- b(e), l();
149
+ set el(t) {
150
+ b(t), o();
142
151
  },
143
152
  get inertElements() {
144
153
  return p();
145
154
  },
146
- set inertElements(e) {
147
- p(e), l();
155
+ set inertElements(t) {
156
+ p(t), o();
148
157
  }
149
158
  });
150
159
  }
151
- z(["click", "keyup", "focusout"]);
160
+ j(["click", "keyup", "focusout"]);
152
161
  customElements.define("uofg-modal", R(
153
- re,
162
+ et,
154
163
  {
155
164
  label: {
156
165
  attribute: "label",
@@ -188,21 +197,21 @@ customElements.define("uofg-modal", R(
188
197
  !0,
189
198
  (a) => class extends a {
190
199
  constructor() {
191
- super(), Y(this.shadowRoot), this.el = this, this.inertElements = [];
200
+ super(), P(this.shadowRoot), this.el = this, this.inertElements = [];
192
201
  }
193
202
  connectedCallback() {
194
203
  super.connectedCallback();
195
204
  }
196
205
  disconnectedCallback() {
197
206
  super.disconnectedCallback();
198
- for (const t of this.inertElements)
199
- t.removeAttribute("inert");
207
+ for (const e of this.inertElements)
208
+ e.removeAttribute("inert");
200
209
  }
201
210
  getState() {
202
211
  return this.isOpen;
203
212
  }
204
- setState(t) {
205
- this.isOpen = t;
213
+ setState(e) {
214
+ this.isOpen = e;
206
215
  }
207
216
  toggle() {
208
217
  return this.isOpen = !this.isOpen, this.isOpen;
@@ -216,5 +225,5 @@ customElements.define("uofg-modal", R(
216
225
  }
217
226
  ));
218
227
  export {
219
- re as default
228
+ et as default
220
229
  };
@@ -1 +1 @@
1
- :root{font-size:62.5%}body{font-size:1.6rem;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:-moz-fit-content!important;height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width: 1024px){uofg-header:not(:defined){height:14rem!important;background:linear-gradient(180deg,#fff,#fff 28%,#000 28%,#000)}}uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:10rem!important;background:linear-gradient(0deg,#ddd,#ddd 50%,#000 50%,#000)}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:18rem!important;background:linear-gradient(180deg,#fff,#fff 22%,#000 22%,#000 78%,#ddd 78%,#ddd)}}uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:11.5rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:14rem!important}}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}
1
+ :root{font-size:62.5%}body{font-size:1.6rem;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width: 1024px){uofg-header:not(:defined){height:14rem!important;background:linear-gradient(180deg,#fff,#fff 28%,#000 28%,#000)}}uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:10rem!important;background:linear-gradient(0deg,#ddd,#ddd 50%,#000 50%,#000)}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:18rem!important;background:linear-gradient(180deg,#fff,#fff 22%,#000 22%,#000 78%,#ddd 78%,#ddd)}}uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:11.5rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:14rem!important}}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}
@@ -1,9 +1,9 @@
1
- import o from "./uofg-header.esm.js";
2
- import f from "./uofg-footer.esm.js";
3
- import r from "./uofg-modal.esm.js";
4
- import t from "./uofg-alert.esm.js";
5
- import m from "./uofg-back-to-top.esm.js";
6
- const i = { UofGHeader: o, UofGFooter: f, UofGModal: r, UofGAlert: t, UofGBackToTop: m };
1
+ import o from "./uofg-alert.esm.js";
2
+ import f from "./uofg-back-to-top.esm.js";
3
+ import r from "./uofg-footer.esm.js";
4
+ import t from "./uofg-header.esm.js";
5
+ import m from "./uofg-modal.esm.js";
6
+ const i = { UofGHeader: t, UofGFooter: r, UofGModal: m, UofGAlert: o, UofGBackToTop: f };
7
7
  export {
8
8
  i as default
9
9
  };
@@ -1,4 +1,4 @@
1
- import { B as w, A as d, aD as f, aE as v, aF as n } from "./bundle-mjs-BDxvNl4x.js";
1
+ import { ag as n, z as w, y as d, aC as f, aD as v } from "./bundle-mjs-BTgoI2Ah.js";
2
2
  function m(a, e, c = e) {
3
3
  var u = a === "x", s = () => n(() => {
4
4
  r = !0, clearTimeout(t), t = setTimeout(l, 100), c(window[u ? "scrollX" : "scrollY"]);
package/package.json CHANGED
@@ -1,74 +1,52 @@
1
1
  {
2
2
  "name": "@uoguelph/web-components",
3
- "version": "1.9.0-rc.9",
3
+ "version": "1.9.1-rc.1",
4
4
  "description": "University of Guelph Web Components Library",
5
- "module": "dist/uofg-web-components/uofg-web-components.esm.js",
6
5
  "type": "module",
7
- "unpkg": "dist/uofg-web-components/uofg-web-components.esm.js",
8
6
  "files": [
9
- "dist/"
7
+ "./dist"
10
8
  ],
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/uofg-web-components/uofg-web-components.esm.js",
12
+ "default": "./dist/uofg-web-components/uofg-web-components.esm.js"
13
+ },
14
+ "./*": {
15
+ "import": "./dist/uofg-web-components/*.esm.js",
16
+ "default": "./dist/uofg-web-components/*.esm.js"
17
+ },
18
+ "./style": "./dist/uofg-web-components/uofg-web-components.css"
19
+ },
11
20
  "scripts": {
12
- "dev": "vite",
13
- "build": "vite build",
14
- "format": "npx prettier --write .",
15
- "prepublishOnly": "npm run build && npmignore --auto",
16
- "storybook": "storybook dev -p 6006",
17
- "build-storybook": "storybook build",
18
- "chromatic": "export $(cat .env | xargs) && npx chromatic --project-token=$CHROMACTIC_PROJECT_TOKEN"
21
+ "build": "NODE_ENV=production vite build",
22
+ "prepack": "npm run build"
19
23
  },
20
24
  "devDependencies": {
21
- "@chromatic-com/storybook": "^3.2.4",
22
25
  "@fortawesome/free-brands-svg-icons": "^6.4.0",
23
26
  "@fortawesome/free-regular-svg-icons": "^6.4.0",
24
27
  "@fortawesome/free-solid-svg-icons": "^6.4.0",
25
- "@storybook/addon-a11y": "^8.5.0",
26
- "@storybook/addon-essentials": "^8.5.0",
27
- "@storybook/addon-interactions": "^8.5.0",
28
- "@storybook/addon-links": "^8.5.0",
29
- "@storybook/addon-svelte-csf": "^5.0.0-next.23",
30
- "@storybook/blocks": "^8.5.0",
31
- "@storybook/svelte": "^8.5.0",
32
- "@storybook/svelte-vite": "^8.5.0",
33
- "@storybook/test": "^8.5.0",
34
- "@sveltejs/vite-plugin-svelte": "^4.0.0",
28
+ "@sveltejs/vite-plugin-svelte": "^5.0.3",
29
+ "@tailwindcss/vite": "^4.0.6",
30
+ "@uoguelph/tailwind-theme": "^1.0.0-rc.1",
35
31
  "autoprefixer": "^10.4.18",
36
- "eslint": "^8.57.0",
32
+ "eslint": "^9.19.0",
37
33
  "eslint-plugin-storybook": "^0.11.2",
38
34
  "eslint-plugin-svelte": "^2.45.1",
39
- "npmignore": "^0.3.1",
40
35
  "postcss": "^8.4.35",
41
- "prettier": "^3.3.2",
42
- "prettier-plugin-svelte": "^3.2.6",
43
- "prettier-plugin-tailwindcss": "^0.5.12",
44
- "storybook": "^8.4.0",
45
36
  "svelte": "^5.0.0",
46
37
  "svelte-check": "^4.0.0",
47
- "tailwind-merge": "^2.3.0",
48
- "tailwindcss": "^3.4.1",
49
- "vite": "^5.4.4",
50
- "vite-plugin-full-reload": "^1.1.0"
51
- },
52
- "publishConfig": {
53
- "ignore": [
54
- "!dist/",
55
- "!loader/",
56
- "src/",
57
- "public/",
58
- "docs/"
59
- ],
60
- "access": "public"
38
+ "tailwind-merge": "^3.0.1",
39
+ "tailwindcss": "^4.0.6",
40
+ "vite": "^6.0.0"
61
41
  },
62
42
  "license": "0BSD",
63
43
  "author": "",
64
44
  "repository": {
65
45
  "type": "git",
66
- "url": "git+https://github.com/ccswbs/web-components.git"
46
+ "url": "git+https://github.com/ccswbs/uofg-components.git"
67
47
  },
68
48
  "bugs": {
69
- "url": "https://github.com/ccswbs/web-components/issues"
49
+ "url": "https://github.com/ccswbs/uofg-components/issues"
70
50
  },
71
- "dependencies": {
72
- "tailwind-join": "^0.2.2"
73
- }
51
+ "gitHead": "14bf8b35e4a6061567c40379d1cb1b6bf5630ce4"
74
52
  }