@uoguelph/web-components 1.9.0-rc.8 → 1.9.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,42 @@
1
- import { z as q, A as D, B as F, C as T, S as z, o as j, c as R, p as U, a as o, u as _, D as y, F as J, b as K, d as L, e as M, f as N, j as x, E as Y, h as l, i as G, k as H, t as v, s as I, l as P, m as Q, n as V, r as O } from "./font-awesome-icon-DS3QHgPg.js";
2
- import { a as W } from "./slot-C9Xuadhw.js";
3
- import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
4
- function E(a, e) {
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) {
5
4
  return a === e || (a == null ? void 0 : a[z]) === e;
6
5
  }
7
- function B(a = {}, e, s, c) {
6
+ function A(a = {}, e, s, c) {
8
7
  return q(() => {
9
- var i, n;
8
+ var i, r;
10
9
  return D(() => {
11
- i = n, n = [], F(() => {
12
- a !== s(...n) && (e(a, ...n), i && E(s(...i), a) && e(null, ...i));
10
+ i = r, r = [], F(() => {
11
+ a !== s(...r) && (e(a, ...r), i && B(s(...i), a) && e(null, ...i));
13
12
  });
14
13
  }), () => {
15
14
  T(() => {
16
- n && E(s(...n), a) && e(null, ...n);
15
+ r && B(s(...r), a) && e(null, ...r);
17
16
  });
18
17
  };
19
18
  }), a;
20
19
  }
21
- 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, e, s) => {
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) => {
22
21
  !e() && a.target === a.currentTarget && s(!1);
23
- }, tt = (a, e) => {
22
+ }, X = (a, e) => {
24
23
  a.key === "Escape" && e(!1);
25
- }, et = (a, e, s, c, i) => {
26
- var n;
24
+ }, Z = (a, e, s, c, i) => {
25
+ var r;
27
26
  if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
28
27
  if (a.preventDefault(), a.target === i()) {
29
- const d = Z(c());
30
- (n = d[d.length - 1]) == null || n.focus();
28
+ const d = V(c());
29
+ (r = d[d.length - 1]) == null || r.focus();
31
30
  } else
32
31
  i().focus();
33
32
  };
34
- var at = (a, e) => e(!1), st = N('<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>');
35
- function rt(a, e) {
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) {
36
35
  U(e, !0);
37
- let s = o(e, "isOpen", 15), c = o(e, "centered", 7), i = o(e, "autoOpen", 7), n = o(e, "label", 7), d = o(e, "alertDialog", 7), k = o(e, "staticBackdrop", 7), m = o(e, "dismissButton", 7), f = o(e, "container", 7), b = o(e, "el", 7), p = o(e, "inertElements", 7);
38
- _(() => {
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(() => {
39
38
  i() && s(!0);
40
- }), _(() => {
39
+ }), E(() => {
41
40
  if (s()) {
42
41
  window.requestAnimationFrame(() => {
43
42
  window.requestAnimationFrame(() => {
@@ -69,89 +68,98 @@ function rt(a, e) {
69
68
  }
70
69
  document.body.style.overflow = s() ? "hidden" : "";
71
70
  });
72
- var r = st();
73
- y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [tt, s], r.__focusout = [
74
- et,
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,
75
75
  s,
76
76
  f,
77
77
  b,
78
78
  m
79
79
  ];
80
- var w = x(r);
81
- const A = Q(() => V(X("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")));
82
- var g = x(w);
83
- g.__click = [at, s];
84
- var C = x(g);
85
- J(C, { icon: Y }), O(g), B(g, (t) => m(t), () => m());
86
- var S = H(g, 2);
87
- return W(S, e, "default", {}), O(w), O(r), B(r, (t) => f(t), () => f()), K(() => {
88
- 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));
89
- }), L(a, r), M({
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({
90
98
  get isOpen() {
91
99
  return s();
92
100
  },
93
101
  set isOpen(t) {
94
- s(t), l();
102
+ s(t), o();
95
103
  },
96
104
  get centered() {
97
105
  return c();
98
106
  },
99
107
  set centered(t) {
100
- c(t), l();
108
+ c(t), o();
101
109
  },
102
110
  get autoOpen() {
103
111
  return i();
104
112
  },
105
113
  set autoOpen(t) {
106
- i(t), l();
114
+ i(t), o();
107
115
  },
108
116
  get label() {
109
- return n();
117
+ return r();
110
118
  },
111
119
  set label(t) {
112
- n(t), l();
120
+ r(t), o();
113
121
  },
114
122
  get alertDialog() {
115
123
  return d();
116
124
  },
117
125
  set alertDialog(t) {
118
- d(t), l();
126
+ d(t), o();
119
127
  },
120
128
  get staticBackdrop() {
121
129
  return k();
122
130
  },
123
131
  set staticBackdrop(t) {
124
- k(t), l();
132
+ k(t), o();
125
133
  },
126
134
  get dismissButton() {
127
135
  return m();
128
136
  },
129
137
  set dismissButton(t) {
130
- m(t), l();
138
+ m(t), o();
131
139
  },
132
140
  get container() {
133
141
  return f();
134
142
  },
135
143
  set container(t) {
136
- f(t), l();
144
+ f(t), o();
137
145
  },
138
146
  get el() {
139
147
  return b();
140
148
  },
141
149
  set el(t) {
142
- b(t), l();
150
+ b(t), o();
143
151
  },
144
152
  get inertElements() {
145
153
  return p();
146
154
  },
147
155
  set inertElements(t) {
148
- p(t), l();
156
+ p(t), o();
149
157
  }
150
158
  });
151
159
  }
152
160
  j(["click", "keyup", "focusout"]);
153
161
  customElements.define("uofg-modal", R(
154
- rt,
162
+ et,
155
163
  {
156
164
  label: {
157
165
  attribute: "label",
@@ -189,7 +197,7 @@ customElements.define("uofg-modal", R(
189
197
  !0,
190
198
  (a) => class extends a {
191
199
  constructor() {
192
- super(), G(this.shadowRoot), this.el = this, this.inertElements = [];
200
+ super(), P(this.shadowRoot), this.el = this, this.inertElements = [];
193
201
  }
194
202
  connectedCallback() {
195
203
  super.connectedCallback();
@@ -217,5 +225,5 @@ customElements.define("uofg-modal", R(
217
225
  }
218
226
  ));
219
227
  export {
220
- rt as default
228
+ et as default
221
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 { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-DS3QHgPg.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.8",
3
+ "version": "1.9.1-rc.0",
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.0",
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": "7ac6a7335730c5c1c52c410f8de5546f337d6603"
74
52
  }
@@ -1,17 +0,0 @@
1
- function u() {
2
- let t = 0, r, n, e = "";
3
- for (; t < arguments.length; )
4
- (r = arguments[t++]) && (n = l(r)) && (e && (e += " "), e += n);
5
- return e;
6
- }
7
- const l = (t) => {
8
- if (typeof t == "string")
9
- return t;
10
- let r, n = "";
11
- for (let e = 0; e < t.length; e++)
12
- t[e] && (r = l(t[e])) && (n && (n += " "), n += r);
13
- return n;
14
- };
15
- export {
16
- u as t
17
- };