@assure-one/design-system 1.33.0 → 1.35.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.
@@ -556,4 +556,4 @@ declare const systemTokens: {
556
556
  };
557
557
  type SystemTokens = typeof systemTokens;
558
558
 
559
- export { type ColorName as C, type ReferenceTokens as R, type SystemTokens as S, reference as a, spacing as b, colors as c, surfaces as d, systemTokens as e, breakpoints as f, iconSizes as i, layout as l, motion as m, overlays as o, radii as r, shadows as s, typography as t, zIndex as z };
559
+ export { type ColorName as C, type ReferenceTokens as R, type SystemTokens as S, reference as a, breakpoints as b, colors as c, spacing as d, surfaces as e, systemTokens as f, iconSizes as i, layout as l, motion as m, overlays as o, radii as r, shadows as s, typography as t, zIndex as z };
@@ -176,11 +176,18 @@ function installDomPolyfills(options = {}) {
176
176
 
177
177
  // src/testing/toast-recorder.ts
178
178
  var REGION = '[role="region"][aria-live]';
179
+ var TITLE_CLASS = "ds:font-semibold";
180
+ var LOADING_CLASS = "ds:animate-spin";
179
181
  var VARIANT_CLASSES = [
180
- ["bg-success-bg", "success"],
181
- ["bg-warning-bg", "warning"],
182
- ["bg-info/12", "info"]
182
+ ["ds:bg-success-bg", "success"],
183
+ ["ds:bg-warning-bg", "warning"],
184
+ ["ds:bg-info/12", "info"]
183
185
  ];
186
+ function hasClass(root, cls) {
187
+ if (!root) return false;
188
+ if (root.classList.contains(cls)) return true;
189
+ return Array.from(root.querySelectorAll("*")).some((el) => el.classList.contains(cls));
190
+ }
184
191
  function text(node) {
185
192
  return (node?.textContent ?? "").replace(/\s+/g, " ").trim();
186
193
  }
@@ -202,12 +209,12 @@ function read(el) {
202
209
  const chip = el.querySelector('span[aria-hidden="true"]');
203
210
  const body = chip?.nextElementSibling ?? null;
204
211
  const paragraphs = Array.from(body?.querySelectorAll(":scope > p") ?? []);
205
- const title = paragraphs.find((p) => p.classList.contains("font-semibold"));
212
+ const title = paragraphs.find((p) => p.classList.contains(TITLE_CLASS));
206
213
  const description = paragraphs.find((p) => p !== title);
207
214
  const action = body?.querySelector(":scope > button") ?? null;
208
215
  let variant = "default";
209
216
  if (role === "alert") variant = "destructive";
210
- else if (chip?.querySelector(".animate-spin")) variant = "loading";
217
+ else if (hasClass(chip, LOADING_CLASS)) variant = "loading";
211
218
  else {
212
219
  for (const [cls, v] of VARIANT_CLASSES) if (chip?.classList.contains(cls)) variant = v;
213
220
  }
@@ -174,11 +174,18 @@ function installDomPolyfills(options = {}) {
174
174
 
175
175
  // src/testing/toast-recorder.ts
176
176
  var REGION = '[role="region"][aria-live]';
177
+ var TITLE_CLASS = "ds:font-semibold";
178
+ var LOADING_CLASS = "ds:animate-spin";
177
179
  var VARIANT_CLASSES = [
178
- ["bg-success-bg", "success"],
179
- ["bg-warning-bg", "warning"],
180
- ["bg-info/12", "info"]
180
+ ["ds:bg-success-bg", "success"],
181
+ ["ds:bg-warning-bg", "warning"],
182
+ ["ds:bg-info/12", "info"]
181
183
  ];
184
+ function hasClass(root, cls) {
185
+ if (!root) return false;
186
+ if (root.classList.contains(cls)) return true;
187
+ return Array.from(root.querySelectorAll("*")).some((el) => el.classList.contains(cls));
188
+ }
182
189
  function text(node) {
183
190
  return (node?.textContent ?? "").replace(/\s+/g, " ").trim();
184
191
  }
@@ -200,12 +207,12 @@ function read(el) {
200
207
  const chip = el.querySelector('span[aria-hidden="true"]');
201
208
  const body = chip?.nextElementSibling ?? null;
202
209
  const paragraphs = Array.from(body?.querySelectorAll(":scope > p") ?? []);
203
- const title = paragraphs.find((p) => p.classList.contains("font-semibold"));
210
+ const title = paragraphs.find((p) => p.classList.contains(TITLE_CLASS));
204
211
  const description = paragraphs.find((p) => p !== title);
205
212
  const action = body?.querySelector(":scope > button") ?? null;
206
213
  let variant = "default";
207
214
  if (role === "alert") variant = "destructive";
208
- else if (chip?.querySelector(".animate-spin")) variant = "loading";
215
+ else if (hasClass(chip, LOADING_CLASS)) variant = "loading";
209
216
  else {
210
217
  for (const [cls, v] of VARIANT_CLASSES) if (chip?.classList.contains(cls)) variant = v;
211
218
  }
@@ -1,4 +1,4 @@
1
- export { C as ColorName, R as ReferenceTokens, S as SystemTokens, f as breakpoints, c as colors, i as iconSizes, l as layout, m as motion, o as overlays, r as radii, a as reference, s as shadows, b as spacing, d as surfaces, e as systemTokens, t as typography, z as zIndex } from '../system-BDU18fVg.js';
1
+ export { C as ColorName, R as ReferenceTokens, S as SystemTokens, b as breakpoints, c as colors, i as iconSizes, l as layout, m as motion, o as overlays, r as radii, a as reference, s as shadows, d as spacing, e as surfaces, f as systemTokens, t as typography, z as zIndex } from '../system-lyhOUTpa.js';
2
2
 
3
3
  /**
4
4
  * The seed a host supplies per tenant.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assure-one/design-system",
3
- "version": "1.33.0",
3
+ "version": "1.35.0",
4
4
  "description": "Assure One design system — tokens, primitives, and patterns for the Assure Suite.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -27,6 +27,10 @@
27
27
  "types": "./dist/tokens/index.d.ts",
28
28
  "import": "./dist/tokens/index.js"
29
29
  },
30
+ "./icons": {
31
+ "types": "./dist/icons/index.d.ts",
32
+ "import": "./dist/icons/index.js"
33
+ },
30
34
  "./testing": {
31
35
  "import": {
32
36
  "types": "./dist/testing/index.d.ts",
@@ -155,7 +159,11 @@
155
159
  "scripts": {
156
160
  "prebuild": "pnpm tokens:build",
157
161
  "build": "tsup && pnpm build:testing && pnpm build:css && pnpm build:css:entries",
158
- "build:css": "tailwindcss -i ./src/tokens/consumer.css -o ./dist/styles.css --minify",
162
+ "build:css": "tailwindcss -i ./src/tokens/consumer.css -o ./dist/styles.css --minify && node scripts/css/compat.mjs",
163
+ "class-flip": "node scripts/class-flip/run.mjs",
164
+ "class-flip:check": "node scripts/class-flip/run.mjs --check",
165
+ "icons:generate": "node scripts/icons/generate.mjs",
166
+ "icons:check": "node scripts/icons/generate.mjs --check",
159
167
  "build:css:entries": "node scripts/build-css-entries.mjs",
160
168
  "build:testing": "tsup --config tsup.testing.config.ts",
161
169
  "dev": "tsup --watch",