@mintlify/components 0.4.1 → 0.4.3

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,45 @@
1
- import { jsxs as i, jsx as p } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as p } from "react/jsx-runtime";
2
2
  import { cn as g } from "../../utils/cn.js";
3
3
  /* empty css */
4
4
  import { Icon as f } from "../icon/icon.js";
5
5
  function j({
6
- children: s,
7
- color: o = "gray",
6
+ children: d,
7
+ color: e = "gray",
8
8
  shape: m = "rounded",
9
- size: t = "md",
10
- stroke: d = !1,
11
- disabled: r = !1,
12
- icon: a,
9
+ size: a = "md",
10
+ stroke: r = !1,
11
+ disabled: s = !1,
12
+ icon: t,
13
13
  iconType: n,
14
- className: c
14
+ className: i
15
15
  }) {
16
- const e = typeof a == "string" ? /* @__PURE__ */ p(
16
+ const o = typeof t == "string" ? /* @__PURE__ */ p(
17
17
  f,
18
18
  {
19
- icon: a,
19
+ icon: t,
20
20
  iconType: n,
21
21
  className: "mt-badge-icon",
22
- size: l[t]
22
+ size: l[a]
23
23
  }
24
- ) : a;
25
- return /* @__PURE__ */ i(
24
+ ) : t;
25
+ return /* @__PURE__ */ c(
26
26
  "span",
27
27
  {
28
28
  "data-shape": m,
29
- "data-stroke": d,
30
- "data-disabled": r,
29
+ "data-stroke": r,
30
+ "data-disabled": s,
31
+ "data-color": e,
32
+ "data-size": a,
33
+ "aria-disabled": s,
31
34
  className: g(
32
35
  "mt-badge",
33
- `mt-badge-${o}`,
34
- `mt-badge-${t}`,
35
- c
36
+ `mt-badge-${e}`,
37
+ `mt-badge-${a}`,
38
+ i
36
39
  ),
37
40
  children: [
38
- !!e && e,
39
- s
41
+ !!o && o,
42
+ d
40
43
  ]
41
44
  }
42
45
  );
@@ -1,47 +1,99 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { cn as n } from "../../utils/cn.js";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { cn as u } from "../../utils/cn.js";
3
+ import { isAbsoluteUrl as d } from "../../utils/isAbsoluteUrl.js";
4
+ import { MINTLIFY_ICONS_CDN_URL as a } from "../../constants/index.js";
5
+ import { FONT_AWESOME_BRANDS as g } from "../../constants/font-awesome-brands.js";
3
6
  /* empty css */
4
- function g({
7
+ function W({
5
8
  icon: t,
6
- iconType: e = "regular",
7
- color: a,
9
+ iconType: e,
10
+ iconLibrary: s,
11
+ color: o,
8
12
  size: r = 16,
9
- className: s
13
+ className: n,
14
+ style: i
10
15
  }) {
11
- const h = t.startsWith("<svg"), m = t.startsWith("http") || t.startsWith("/");
12
- return h ? /* @__PURE__ */ i(
13
- "span",
14
- {
15
- className: n("mt-icon", s),
16
- style: {
17
- color: a,
18
- width: r,
19
- height: r
20
- },
21
- dangerouslySetInnerHTML: { __html: t }
22
- }
23
- ) : m ? /* @__PURE__ */ i(
24
- "img",
25
- {
26
- src: t,
27
- alt: "",
28
- className: n("mt-icon", s),
29
- style: {
30
- width: r,
31
- height: r
16
+ if (e && !p.includes(e))
17
+ return console.warn(
18
+ `Invalid iconType ${e} expected a string equal to one of: ${p.join(
19
+ ", "
20
+ )}`
21
+ ), null;
22
+ if (typeof t == "string" && (d(t) || t.startsWith("/")))
23
+ return t.startsWith(a) || t.startsWith("https://mintlify.b-cdn.net") ? /* @__PURE__ */ l(
24
+ "svg",
25
+ {
26
+ className: u("mt-icon", n),
27
+ style: {
28
+ WebkitMaskImage: `url(${t})`,
29
+ WebkitMaskRepeat: "no-repeat",
30
+ WebkitMaskPosition: "center",
31
+ maskImage: `url(${t})`,
32
+ maskRepeat: "no-repeat",
33
+ maskPosition: "center",
34
+ maskSize: "100%",
35
+ backgroundColor: o || "currentColor",
36
+ width: r,
37
+ height: r,
38
+ ...i
39
+ }
32
40
  }
33
- }
34
- ) : /* @__PURE__ */ i(
35
- "i",
41
+ ) : /* @__PURE__ */ l(
42
+ "img",
43
+ {
44
+ src: t,
45
+ alt: t,
46
+ className: u("mt-icon", n),
47
+ style: {
48
+ width: r,
49
+ height: r,
50
+ ...i
51
+ }
52
+ }
53
+ );
54
+ const m = k(t.toLowerCase(), e, s);
55
+ return /* @__PURE__ */ l(
56
+ "svg",
36
57
  {
37
- className: n("mt-icon", `fa-${e}`, `fa-${t}`, s),
58
+ className: u("mt-icon", n),
38
59
  style: {
39
- color: a,
40
- fontSize: r
60
+ WebkitMaskImage: `url(${m})`,
61
+ WebkitMaskRepeat: "no-repeat",
62
+ WebkitMaskPosition: "center",
63
+ maskImage: `url(${m})`,
64
+ maskRepeat: "no-repeat",
65
+ maskPosition: "center",
66
+ maskSize: s === "lucide" ? "100%" : void 0,
67
+ backgroundColor: o || "currentColor",
68
+ width: r,
69
+ height: r,
70
+ ...i
41
71
  }
42
72
  }
43
73
  );
44
74
  }
75
+ function h(t) {
76
+ return t ? g.includes(t.toLowerCase()) : !1;
77
+ }
78
+ function k(t, e, s) {
79
+ return h(t) ? `${a}/v7.1.0/brands/${t}.svg` : s === "lucide" ? `${a}/lucide/v0.545.0/${t}.svg` : `${a}/v7.1.0/${e ?? "regular"}/${t}.svg`;
80
+ }
81
+ const C = ["fontawesome", "lucide"], p = [
82
+ "brands",
83
+ "duotone",
84
+ "light",
85
+ "regular",
86
+ "sharp-duotone-solid",
87
+ "sharp-light",
88
+ "sharp-regular",
89
+ "sharp-solid",
90
+ "sharp-thin",
91
+ "solid",
92
+ "thin"
93
+ ];
45
94
  export {
46
- g as Icon
95
+ W as Icon,
96
+ k as getIconUrl,
97
+ C as iconLibraries,
98
+ p as iconTypes
47
99
  };
@@ -0,0 +1,556 @@
1
+ const e = [
2
+ "viadeo-square",
3
+ "supple",
4
+ "x-twitter",
5
+ "bootstrap",
6
+ "weixin",
7
+ "connectdevelop",
8
+ "medium",
9
+ "square-facebook",
10
+ "ioxhost",
11
+ "snapchat-ghost",
12
+ "fonticons",
13
+ "figma",
14
+ "reddit-alien",
15
+ "angrycreative",
16
+ "imdb",
17
+ "steam",
18
+ "square-xing",
19
+ "d-and-d-beyond",
20
+ "font-awesome-logo-full",
21
+ "tumblr",
22
+ "pied-piper-square",
23
+ "bandcamp",
24
+ "red-river",
25
+ "square-lastfm",
26
+ "stackpath",
27
+ "square-hacker-news",
28
+ "strava",
29
+ "dropbox",
30
+ "meta",
31
+ "microsoft",
32
+ "creative-commons-nd",
33
+ "square-tumblr",
34
+ "dyalog",
35
+ "squarespace",
36
+ "google-plus-square",
37
+ "whatsapp-square",
38
+ "accusoft",
39
+ "lastfm",
40
+ "phoenix-squadron",
41
+ "square-snapchat",
42
+ "yelp",
43
+ "cloudflare",
44
+ "deviantart",
45
+ "airbnb",
46
+ "usps",
47
+ "envira",
48
+ "fulcrum",
49
+ "linux",
50
+ "foursquare",
51
+ "bilibili",
52
+ "drupal",
53
+ "cc-stripe",
54
+ "square-youtube",
55
+ "edge-legacy",
56
+ "dev",
57
+ "speakap",
58
+ "android",
59
+ "git-square",
60
+ "ethereum",
61
+ "shirtsinbulk",
62
+ "black-tie",
63
+ "odnoklassniki",
64
+ "fonticons-fi",
65
+ "cc-amex",
66
+ "js",
67
+ "galactic-senate",
68
+ "reacteurope",
69
+ "openid",
70
+ "gitlab",
71
+ "sourcetree",
72
+ "gg",
73
+ "joget",
74
+ "weibo",
75
+ "aws",
76
+ "sass",
77
+ "cc-paypal",
78
+ "superpowers",
79
+ "rust",
80
+ "sellcast",
81
+ "java",
82
+ "orcid",
83
+ "tencent-weibo",
84
+ "trade-federation",
85
+ "viber",
86
+ "ello",
87
+ "wix",
88
+ "mizuni",
89
+ "leanpub",
90
+ "bitbucket",
91
+ "pagelines",
92
+ "creative-commons",
93
+ "github",
94
+ "viacoin",
95
+ "freebsd",
96
+ "rebel",
97
+ "square-steam",
98
+ "fedex",
99
+ "usb",
100
+ "empire",
101
+ "simplybuilt",
102
+ "google-drive",
103
+ "microblog",
104
+ "square-figma",
105
+ "etsy",
106
+ "bimobject",
107
+ "app-store-ios",
108
+ "gripfire",
109
+ "500px",
110
+ "speaker-deck",
111
+ "deskpro",
112
+ "critical-role",
113
+ "square-github",
114
+ "vimeo-v",
115
+ "stripe-s",
116
+ "keybase",
117
+ "yandex-international",
118
+ "umbraco",
119
+ "joomla",
120
+ "google-play",
121
+ "uniregistry",
122
+ "d-and-d",
123
+ "vsco",
124
+ "kaggle",
125
+ "cash-app",
126
+ "hubspot",
127
+ "confluence",
128
+ "square-gitlab",
129
+ "tidal",
130
+ "youtube-square",
131
+ "servicestack",
132
+ "reddit-square",
133
+ "npm",
134
+ "square-font-awesome",
135
+ "tor-browser",
136
+ "square-whatsapp",
137
+ "creative-commons-nc",
138
+ "galactic-republic",
139
+ "square-instagram",
140
+ "raspberry-pi",
141
+ "instagram-square",
142
+ "tumblr-square",
143
+ "mastodon",
144
+ "letterboxd",
145
+ "square-git",
146
+ "42-group",
147
+ "angular",
148
+ "untappd",
149
+ "apper",
150
+ "git-alt",
151
+ "sitrox",
152
+ "behance-square",
153
+ "vk",
154
+ "vimeo",
155
+ "discourse",
156
+ "hotjar",
157
+ "symfony",
158
+ "slack-hash",
159
+ "square-odnoklassniki",
160
+ "skyatlas",
161
+ "hacker-news",
162
+ "files-pinwheel",
163
+ "flutter",
164
+ "instagram",
165
+ "y-combinator",
166
+ "linktree",
167
+ "shopify",
168
+ "webflow",
169
+ "mendeley",
170
+ "odysee",
171
+ "wodu",
172
+ "fort-awesome-alt",
173
+ "threads",
174
+ "square-linkedin",
175
+ "r-project",
176
+ "edge",
177
+ "yammer",
178
+ "11ty",
179
+ "bots",
180
+ "fly",
181
+ "openai",
182
+ "safari",
183
+ "square-behance",
184
+ "pied-piper-hat",
185
+ "audible",
186
+ "yoast",
187
+ "fort-awesome",
188
+ "square-dribbble",
189
+ "python",
190
+ "pix",
191
+ "cc-apple-pay",
192
+ "docker",
193
+ "git",
194
+ "blogger",
195
+ "itch-io",
196
+ "opensuse",
197
+ "nfc-symbol",
198
+ "creative-commons-nc-eu",
199
+ "schlix",
200
+ "mailchimp",
201
+ "neos",
202
+ "creative-commons-pd",
203
+ "pinterest-p",
204
+ "square-letterboxd",
205
+ "digg",
206
+ "bitcoin",
207
+ "whmcs",
208
+ "delicious",
209
+ "bluesky",
210
+ "hackerrank",
211
+ "vimeo-square",
212
+ "disqus",
213
+ "telegram",
214
+ "cc-discover",
215
+ "centercode",
216
+ "erlang",
217
+ "medrt",
218
+ "salesforce",
219
+ "notion",
220
+ "meetup",
221
+ "square-vimeo",
222
+ "wizards-of-the-coast",
223
+ "markdown",
224
+ "instalod",
225
+ "padlet",
226
+ "goodreads",
227
+ "dribbble-square",
228
+ "unity",
229
+ "creative-commons-sampling-plus",
230
+ "invision",
231
+ "mix",
232
+ "square-x-twitter",
233
+ "gratipay",
234
+ "magento",
235
+ "bluetooth",
236
+ "houzz",
237
+ "expeditedssl",
238
+ "the-red-yeti",
239
+ "canadian-maple-leaf",
240
+ "sith",
241
+ "algolia",
242
+ "ussunnah",
243
+ "tex",
244
+ "sellsy",
245
+ "jira",
246
+ "spotify",
247
+ "intercom",
248
+ "wolf-pack-battalion",
249
+ "square-twitter",
250
+ "flipboard",
251
+ "google-wallet",
252
+ "shopware",
253
+ "jxl",
254
+ "phoenix-framework",
255
+ "wirsindhandwerk",
256
+ "kickstarter-k",
257
+ "gitlab-square",
258
+ "cc-jcb",
259
+ "researchgate",
260
+ "lyft",
261
+ "wpressr",
262
+ "lastfm-square",
263
+ "octopus-deploy",
264
+ "periscope",
265
+ "modx",
266
+ "kickstarter",
267
+ "slideshare",
268
+ "snapchat",
269
+ "font-awesome",
270
+ "buy-n-large",
271
+ "readme",
272
+ "creative-commons-nc-jp",
273
+ "themeisle",
274
+ "html5",
275
+ "replyd",
276
+ "cuttlefish",
277
+ "rockrms",
278
+ "ravelry",
279
+ "stubber",
280
+ "quora",
281
+ "font-awesome-alt",
282
+ "monero",
283
+ "hire-a-helper",
284
+ "github-alt",
285
+ "creative-commons-share",
286
+ "yarn",
287
+ "cc-visa",
288
+ "dochub",
289
+ "github-square",
290
+ "laravel",
291
+ "digital-ocean",
292
+ "xing-square",
293
+ "earlybirds",
294
+ "centos",
295
+ "bluetooth-b",
296
+ "teamspeak",
297
+ "square-google-plus",
298
+ "wpexplorer",
299
+ "first-order-alt",
300
+ "ubuntu",
301
+ "opencart",
302
+ "pied-piper",
303
+ "paypal",
304
+ "suse",
305
+ "wpbeginner",
306
+ "deezer",
307
+ "blogger-b",
308
+ "rocketchat",
309
+ "unsplash",
310
+ "draft2digital",
311
+ "playstation",
312
+ "facebook",
313
+ "amazon-pay",
314
+ "square-font-awesome-stroke",
315
+ "amazon",
316
+ "quinscape",
317
+ "free-code-camp",
318
+ "vine",
319
+ "pinterest",
320
+ "creative-commons-sa",
321
+ "css",
322
+ "creative-commons-pd-alt",
323
+ "stack-overflow",
324
+ "page4",
325
+ "mdb",
326
+ "osi",
327
+ "yandex",
328
+ "whatsapp",
329
+ "google",
330
+ "chromecast",
331
+ "line",
332
+ "battle-net",
333
+ "affiliatetheme",
334
+ "brave",
335
+ "atlassian",
336
+ "aviato",
337
+ "bity",
338
+ "php",
339
+ "stumbleupon-circle",
340
+ "stripe",
341
+ "jedi-order",
342
+ "think-peaks",
343
+ "buromobelexperte",
344
+ "phabricator",
345
+ "apple-pay",
346
+ "artstation",
347
+ "font-awesome-flag",
348
+ "scribd",
349
+ "stack-exchange",
350
+ "fedora",
351
+ "jenkins",
352
+ "studiovinari",
353
+ "glide",
354
+ "adn",
355
+ "square-web-awesome",
356
+ "pixelfed",
357
+ "css3-alt",
358
+ "xing",
359
+ "medapps",
360
+ "redhat",
361
+ "uncharted",
362
+ "fantasy-flight-games",
363
+ "facebook-f",
364
+ "perbyte",
365
+ "hips",
366
+ "google-pay",
367
+ "twitch",
368
+ "cc-diners-club",
369
+ "supportnow",
370
+ "windows",
371
+ "rev",
372
+ "btc",
373
+ "creative-commons-zero",
374
+ "elementor",
375
+ "shoelace",
376
+ "square-pied-piper",
377
+ "mintbit",
378
+ "youtube",
379
+ "accessible-icon",
380
+ "gg-circle",
381
+ "lumon-drop",
382
+ "app-store",
383
+ "codiepie",
384
+ "stumbleupon",
385
+ "nutritionix",
386
+ "linkedin-in",
387
+ "jsfiddle",
388
+ "yahoo",
389
+ "grav",
390
+ "firefox-browser",
391
+ "sticker-mule",
392
+ "kakao-talk",
393
+ "goodreads-g",
394
+ "uber",
395
+ "sketch",
396
+ "creative-commons-remix",
397
+ "itunes-note",
398
+ "gulp",
399
+ "keycdn",
400
+ "diaspora",
401
+ "cotton-bureau",
402
+ "reddit",
403
+ "alipay",
404
+ "google-scholar",
405
+ "cloudscale",
406
+ "buysellads",
407
+ "steam-symbol",
408
+ "asymmetrik",
409
+ "angellist",
410
+ "wpforms",
411
+ "linode",
412
+ "js-square",
413
+ "guilded",
414
+ "avianex",
415
+ "evernote",
416
+ "codepen",
417
+ "dribbble",
418
+ "cc-amazon-pay",
419
+ "xbox",
420
+ "trello",
421
+ "adversal",
422
+ "dhl",
423
+ "hornbill",
424
+ "square-bluesky",
425
+ "themeco",
426
+ "square-kickstarter",
427
+ "google-plus",
428
+ "contao",
429
+ "linkedin",
430
+ "ideal",
431
+ "mandalorian",
432
+ "hashnode",
433
+ "old-republic",
434
+ "qq",
435
+ "vaadin",
436
+ "uikit",
437
+ "lumon",
438
+ "react",
439
+ "creative-commons-by",
440
+ "square-pinterest",
441
+ "watchman-monitoring",
442
+ "optin-monster",
443
+ "twitter",
444
+ "less",
445
+ "dailymotion",
446
+ "patreon",
447
+ "swift",
448
+ "discord",
449
+ "hacker-news-square",
450
+ "opera",
451
+ "gitter",
452
+ "buffer",
453
+ "css3",
454
+ "renren",
455
+ "square-reddit",
456
+ "ns8",
457
+ "sistrix",
458
+ "rendact",
459
+ "duolingo",
460
+ "vuejs",
461
+ "debian",
462
+ "facebook-square",
463
+ "eleventy",
464
+ "mixcloud",
465
+ "firstdraft",
466
+ "slack",
467
+ "zhihu",
468
+ "soundcloud",
469
+ "product-hunt",
470
+ "wikipedia-w",
471
+ "space-awesome",
472
+ "pied-piper-pp",
473
+ "creative-commons-sampling",
474
+ "hooli",
475
+ "first-order",
476
+ "glide-g",
477
+ "ember",
478
+ "gitkraken",
479
+ "dart-lang",
480
+ "steam-square",
481
+ "wsh",
482
+ "square-threads",
483
+ "skype",
484
+ "gofore",
485
+ "ebay",
486
+ "cpanel",
487
+ "wordpress",
488
+ "square-upwork",
489
+ "w3c",
490
+ "korvue",
491
+ "cloudversify",
492
+ "square-web-awesome-stroke",
493
+ "web-awesome",
494
+ "grunt",
495
+ "viadeo",
496
+ "wordpress-simple",
497
+ "blackberry",
498
+ "facebook-messenger",
499
+ "pushed",
500
+ "hive",
501
+ "pandora",
502
+ "amilia",
503
+ "pied-piper-alt",
504
+ "nfc-directional",
505
+ "innosoft",
506
+ "cloudsmith",
507
+ "chrome",
508
+ "forumbee",
509
+ "snapchat-square",
510
+ "node-js",
511
+ "maxcdn",
512
+ "apple",
513
+ "pixiv",
514
+ "napster",
515
+ "nimblr",
516
+ "vnv",
517
+ "waze",
518
+ "telegram-plane",
519
+ "odnoklassniki-square",
520
+ "google-plus-g",
521
+ "palfed",
522
+ "screenpal",
523
+ "weebly",
524
+ "autoprefixer",
525
+ "searchengin",
526
+ "square-viadeo",
527
+ "pinterest-square",
528
+ "brave-reverse",
529
+ "megaport",
530
+ "typo3",
531
+ "deploydog",
532
+ "node",
533
+ "cc-mastercard",
534
+ "tiktok",
535
+ "twitter-square",
536
+ "dashcube",
537
+ "get-pocket",
538
+ "golang",
539
+ "ups",
540
+ "medium-m",
541
+ "behance",
542
+ "resolving",
543
+ "internet-explorer",
544
+ "signal-messenger",
545
+ "staylinked",
546
+ "cmplid",
547
+ "firefox",
548
+ "flickr",
549
+ "mixer",
550
+ "square-js",
551
+ "upwork",
552
+ "itunes"
553
+ ];
554
+ export {
555
+ e as FONT_AWESOME_BRANDS
556
+ };
@@ -0,0 +1,4 @@
1
+ const t = "https://d3gk2c5xim1je2.cloudfront.net";
2
+ export {
3
+ t as MINTLIFY_ICONS_CDN_URL
4
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { JSX as JSX_2 } from 'react/jsx-runtime';
2
3
  import { ReactNode } from 'react';
3
4
 
@@ -379,17 +380,49 @@ declare const focus_2: {
379
380
  };
380
381
  export { focus_2 as focus }
381
382
 
382
- export declare function Icon({ icon, iconType, color, size, className, }: IconProps): JSX_2.Element;
383
+ export declare function getIconUrl(icon: string, iconType?: IconType, iconLibrary?: IconLibrary): string;
384
+
385
+ export declare function Icon({ icon, iconType, iconLibrary, color, size, className, style, }: IconProps): JSX_2.Element | null;
386
+
387
+ export declare const iconLibraries: readonly ["fontawesome", "lucide"];
388
+
389
+ export declare type IconLibrary = "fontawesome" | "lucide";
383
390
 
384
391
  export declare interface IconProps {
392
+ /**
393
+ * Icon name or custom URL.
394
+ * Supports Font Awesome icons, Lucide icons, or any custom URL.
395
+ */
385
396
  icon: string;
397
+ /**
398
+ * Icon style variant.
399
+ * @default "regular"
400
+ * @see {@link IconType}
401
+ */
386
402
  iconType?: IconType;
403
+ /**
404
+ * Icon library to use.
405
+ * @default "fontawesome"
406
+ * @see {@link IconLibrary}
407
+ */
408
+ iconLibrary?: IconLibrary;
409
+ /**
410
+ * Icon color.
411
+ * @default "currentColor"
412
+ */
387
413
  color?: string;
414
+ /**
415
+ * Icon size in pixels.
416
+ * @default 16
417
+ */
388
418
  size?: number;
389
419
  className?: string;
420
+ style?: CSSProperties;
390
421
  }
391
422
 
392
- export declare type IconType = "regular" | "solid" | "light" | "thin" | "sharp-solid" | "duotone" | "brands";
423
+ export declare type IconType = "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin";
424
+
425
+ export declare const iconTypes: readonly IconType[];
393
426
 
394
427
  export declare const shadows: {
395
428
  "xs-light": string;
package/dist/index.js CHANGED
@@ -1,12 +1,15 @@
1
- /* empty css */
2
- import { colors as s, designTokens as f, focus as m, shadows as p } from "./styles/design-tokens.js";
3
- import { Badge as c } from "./components/badge/badge.js";
4
- import { Icon as n } from "./components/icon/icon.js";
1
+ /* empty css */
2
+ import { Badge as s } from "./components/badge/badge.js";
3
+ import { Icon as i, getIconUrl as n, iconLibraries as p, iconTypes as t } from "./components/icon/icon.js";
4
+ import { colors as m, designTokens as a, focus as d, shadows as g } from "./styles/design-tokens.js";
5
5
  export {
6
- c as Badge,
7
- n as Icon,
8
- s as colors,
9
- f as designTokens,
10
- m as focus,
11
- p as shadows
6
+ s as Badge,
7
+ i as Icon,
8
+ m as colors,
9
+ a as designTokens,
10
+ d as focus,
11
+ n as getIconUrl,
12
+ p as iconLibraries,
13
+ t as iconTypes,
14
+ g as shadows
12
15
  };
@@ -0,0 +1,11 @@
1
+ const e = (t) => {
2
+ if (!t || typeof t != "string") return !1;
3
+ try {
4
+ return URL.canParse(t);
5
+ } catch {
6
+ return !1;
7
+ }
8
+ };
9
+ export {
10
+ e as isAbsoluteUrl
11
+ };
package/package.json CHANGED
@@ -1,12 +1,23 @@
1
1
  {
2
2
  "name": "@mintlify/components",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Mintlify Headless UI components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
- "sideEffects": false,
9
+ "sideEffects": [
10
+ "*.css"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./styles.css": "./dist/styles.css",
19
+ "./*.css": "./dist/components/*/*.css"
20
+ },
10
21
  "files": [
11
22
  "dist",
12
23
  "README.md",
File without changes