welcome-ui 10.5.0 → 10.6.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.
package/dist/Swiper.js CHANGED
@@ -3,7 +3,7 @@ import './Swiper.css';
3
3
  import { jsx as $ } from "react/jsx-runtime";
4
4
  import { a as z, g as pe, c as K, u as fe } from "./index-B6iGEm-i.js";
5
5
  import { useRef as Z, useEffect as W, Children as se, cloneElement as ge, createContext as me, useContext as be, useState as H, useMemo as ee, useCallback as A } from "react";
6
- import { u as we } from "./use-viewport-GQu4vkby.js";
6
+ import { u as we } from "./use-viewport-DuW6YjHT.js";
7
7
  import { Button as oe } from "./Button.js";
8
8
  import { Icon as le } from "./Icon.js";
9
9
  var Y, ae;
package/dist/Table.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_14phd_2{width:100%;overflow:hidden}._content_14phd_6{width:100%;overflow-x:auto}._content_14phd_6 table{width:100%;border-collapse:collapse;border:0}._content_14phd_6 table td{padding:var(--tab-size-icon-lg);text-align:left}._content_14phd_6 table td:first-child{padding-left:0}._content_14phd_6 table td:last-child{padding-right:0}._content_14phd_6 table th{border-bottom:var(--tab-border-width-unchecked) solid var(--tab-color-text-unchecked-pressed);color:var(--color-icon-neutral-subtle);font-weight:var(--font-weight-medium);text-align:left;padding:var(--tab-size-icon-lg);vertical-align:middle}._content_14phd_6 table th:first-child{padding-left:0}._content_14phd_6 table th:last-child{padding-right:0}._content_14phd_6 table tr{border-bottom:var(--tab-border-width-unchecked) solid var(--color-background-neutral-subtlest);background-color:var(--trBackgroundColor, "transparent");color:var(--trColor, "inherit");transition:background-color var(--duration-medium) ease-in-out}._content_14phd_6 table tr:last-child{border:0}._content_14phd_6 table tr._clickable_14phd_48{cursor:pointer}._content_14phd_6 table tr._clickable_14phd_48:hover{background-color:var(--color-background-warm-minimal)}._content_14phd_6 table tr._variant-danger_14phd_54{--trBackgroundColor: var(--color-background-danger-minimal);--trColor: var(--color-background-danger-strongest)}._content_14phd_6 table tr._variant-warning_14phd_58{--trBackgroundColor: var(--color-background-warning-minimal);--trColor: var(--color-icon-warning-secondary)}._content_14phd_6 table tr._variant-success_14phd_62{--trBackgroundColor: var(--color-green-10);--trColor: var(--color-icon-accent-green-tertiary)}._content_14phd_6 table tr._variant-info_14phd_66{--trBackgroundColor: var(--color-background-accent-blue-minimal);--trColor: var(--color-background-accent-blue-strongest)}._indent_14phd_70 table td:first-child,._indent_14phd_70 table th:first-child{padding-left:var(--tab-size-icon-lg)}._indent_14phd_70 table td:last-child,._indent_14phd_70 table th:last-child{padding-right:var(--tab-size-icon-lg)}}
1
+ @layer components{._root_msc2t_2{width:100%;overflow:hidden;border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}._content_msc2t_8{width:100%;overflow-x:auto}._content_msc2t_8 table{--borderWidth: var(--table-cell-border-width);--borderColorChecked: var(--table-cell-color-border-checked);width:100%;border-collapse:collapse}._content_msc2t_8 table tr{font-family:var(--font-family-body);font-size:var(--font-size-sm);border-bottom-color:var(--table-cell-color-border-default);border-bottom-width:var(--borderWidth);border-bottom-style:solid}._content_msc2t_8 table tr[data-clickable=true]{cursor:pointer}._content_msc2t_8 table tr[data-clickable=true]:hover{border-top-width:var(--borderWidth);border-top-style:solid;background-color:var(--table-cell-color-background-hover);border-color:var(--borderColorChecked)}._content_msc2t_8 table th,._content_msc2t_8 table td{padding:var(--table-cell-padding);text-align:left}._content_msc2t_8 table th:has(>[aria-checked]:only-child),._content_msc2t_8 table td:has(>[aria-checked]:only-child){max-width:var(--table-cell-size-checkbox)}._content_msc2t_8 table thead{background-color:var(--table-header-color-background-warm)}._content_msc2t_8 table thead tr{line-height:var(--font-line-height-xs);font-weight:var(--font-weight-medium)}._content_msc2t_8 table tbody tr{line-height:var(--font-line-height-md);font-weight:var(--font-weight-regular)}._content_msc2t_8 table tbody tr[aria-selected=true]{background-color:var(--table-cell-color-background-checked);border-bottom-width:0}._content_msc2t_8 table tbody tr[aria-selected=true]:not(tr[aria-selected=true]+tr[aria-selected=true]){border-top-width:var(--borderWidth);border-top-color:var(--borderColorChecked)}._content_msc2t_8 table tbody tr[aria-selected=true]:not(:has(+tr[aria-selected=true])){border-bottom-width:var(--borderWidth);border-bottom-color:var(--borderColorChecked)}._content_msc2t_8 table:has(tbody tr[data-clickable=true]:first-child:hover) thead tr,._content_msc2t_8 table:has(tbody tr:first-child[aria-selected=true]) thead tr{border-bottom-width:0}._content_msc2t_8 table tr:has(+tr[data-clickable=true]:hover),._content_msc2t_8 table tr:has(+tr[aria-selected=true]){border-bottom-width:0}._withColumnDivider_msc2t_73 table tbody td{border-right-color:var(--table-cell-color-border-default);border-right-width:var(--table-cell-border-width);border-right-style:solid}._withColumnDivider_msc2t_73 table tbody td:last-child{border-right:none}}
package/dist/Table.js CHANGED
@@ -1,47 +1,35 @@
1
1
  "use client";
2
2
  import './Table.css';
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { forwardRef as p } from "react";
5
- import { c as T } from "./index-B6iGEm-i.js";
6
- const m = "_root_14phd_2", h = "_content_14phd_6", v = "_clickable_14phd_48", y = "_indent_14phd_70", N = {
7
- root: m,
8
- content: h,
9
- clickable: v,
10
- "variant-danger": "_variant-danger_14phd_54",
11
- "variant-warning": "_variant-warning_14phd_58",
12
- "variant-success": "_variant-success_14phd_62",
13
- "variant-info": "_variant-info_14phd_66",
14
- indent: y
15
- }, r = T(N), o = p(
16
- ({ children: a, className: e, indent: n, ...s }, b) => /* @__PURE__ */ t("div", { className: r("root", e), ref: b, ...s, children: /* @__PURE__ */ t("div", { className: r("content", n && "indent"), children: /* @__PURE__ */ t("table", { children: a }) }) })
3
+ import { jsx as e } from "react/jsx-runtime";
4
+ import { forwardRef as b } from "react";
5
+ import { c as h } from "./index-B6iGEm-i.js";
6
+ const p = "_root_msc2t_2", u = "_content_msc2t_8", y = "_withColumnDivider_msc2t_73", N = {
7
+ root: p,
8
+ content: u,
9
+ withColumnDivider: y
10
+ }, s = h(N), n = b(
11
+ ({ children: t, className: a, withColumnDivider: o = !1, ...m }, T) => /* @__PURE__ */ e("div", { className: s("root", a), ref: T, ...m, children: /* @__PURE__ */ e("div", { className: s("content", o && "withColumnDivider"), children: /* @__PURE__ */ e("table", { children: t }) }) })
17
12
  );
18
- o.displayName = "Table";
19
- const c = (a) => /* @__PURE__ */ t("tbody", { ...a });
20
- c.displayName = "Table.Tbody";
21
- const d = (a) => /* @__PURE__ */ t("th", { ...a });
22
- d.displayName = "Table.Th";
23
- const i = (a) => /* @__PURE__ */ t("thead", { ...a });
24
- i.displayName = "Table.Thead";
25
- const l = (a) => /* @__PURE__ */ t("td", { ...a });
26
- l.displayName = "Table.Td";
27
- const _ = ({ className: a, onClick: e, variant: n, ...s }) => /* @__PURE__ */ t(
28
- "tr",
29
- {
30
- className: r(n && `variant-${n}`, !!e && "clickable", a),
31
- onClick: e,
32
- ...s
33
- }
34
- );
35
- _.displayName = "Table.Tr";
36
- const k = Object.assign(o, {
37
- Tbody: c,
38
- Td: l,
39
- Th: d,
40
- Thead: i,
41
- Tr: _
13
+ n.displayName = "Table";
14
+ const r = (t) => /* @__PURE__ */ e("tbody", { ...t });
15
+ r.displayName = "Table.Tbody";
16
+ const l = (t) => /* @__PURE__ */ e("th", { ...t });
17
+ l.displayName = "Table.Th";
18
+ const c = (t) => /* @__PURE__ */ e("thead", { ...t });
19
+ c.displayName = "Table.Thead";
20
+ const i = (t) => /* @__PURE__ */ e("td", { ...t });
21
+ i.displayName = "Table.Td";
22
+ const d = ({ className: t, onClick: a, ...o }) => /* @__PURE__ */ e("tr", { className: t, "data-clickable": !!a, onClick: a, ...o });
23
+ d.displayName = "Table.Tr";
24
+ const w = Object.assign(n, {
25
+ Tbody: r,
26
+ Td: i,
27
+ Th: l,
28
+ Thead: c,
29
+ Tr: d
42
30
  });
43
31
  export {
44
- k as Table,
45
- o as TableComponent,
32
+ w as Table,
33
+ n as TableComponent,
46
34
  N as tableClasses
47
35
  };
@@ -20,7 +20,7 @@ export declare const Table: import('react').ForwardRefExoticComponent<Omit<Table
20
20
  displayName: string;
21
21
  };
22
22
  Tr: {
23
- ({ className, onClick, variant, ...rest }: TableTrProps): import("react/jsx-runtime").JSX.Element;
23
+ ({ className, onClick, ...rest }: TableTrProps): import("react/jsx-runtime").JSX.Element;
24
24
  displayName: string;
25
25
  };
26
26
  };
@@ -3,18 +3,14 @@ export type TableProps = ComponentPropsWithRef<'div'> & HTMLAttributes<HTMLDivEl
3
3
  export type TableTrProps = ComponentPropsWithoutRef<'tr'> & HTMLAttributes<HTMLTableRowElement> & TableTrOptions;
4
4
  interface TableOptions {
5
5
  /**
6
- * Add space on first and last child on the Td and Th component
6
+ * Add vertical divider between columns
7
7
  */
8
- indent?: boolean;
8
+ withColumnDivider?: boolean;
9
9
  }
10
10
  interface TableTrOptions {
11
11
  /**
12
12
  * Change the cursor to pointer to indicate the row is clickable
13
13
  */
14
14
  onClick?: (props?: unknown) => void;
15
- /**
16
- * Change the background color of the row to represent a specific state
17
- */
18
- variant?: 'danger' | 'info' | 'success' | 'warning';
19
15
  }
20
16
  export {};
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { useEffect as s, useLayoutEffect as u, useState as a, useRef as f } from "react";
3
+ const m = typeof window > "u" ? s : u;
4
+ function h() {
5
+ const [n, i] = a({ height: void 0, width: void 0 }), e = f();
6
+ return m(() => {
7
+ const t = new ResizeObserver(([o]) => {
8
+ const { blockSize: r, inlineSize: c } = o.contentBoxSize[0];
9
+ cancelAnimationFrame(e.current), e.current = requestAnimationFrame(() => {
10
+ i({ height: r, width: c });
11
+ });
12
+ });
13
+ return t.observe(document.documentElement), () => {
14
+ cancelAnimationFrame(e.current), t.disconnect();
15
+ };
16
+ }, []), n;
17
+ }
18
+ export {
19
+ h as u
20
+ };
package/dist/utils.js CHANGED
@@ -3,7 +3,7 @@ import './utils.css';
3
3
  import { u, b as f } from "./index-B6iGEm-i.js";
4
4
  import { c as b } from "./index-B6iGEm-i.js";
5
5
  import { f as S } from "./forwardRefWithAs-8eP3ZN15.js";
6
- import { u as p } from "./use-viewport-GQu4vkby.js";
6
+ import { u as p } from "./use-viewport-DuW6YjHT.js";
7
7
  import { useState as a, useCallback as d } from "react";
8
8
  function y(e = "includeThreshold") {
9
9
  const { width: o } = p(), t = u(), i = o ?? (typeof window < "u" ? window.innerWidth : 0), c = (r) => e === "includeThreshold" ? i >= r : i > r, s = Object.keys(t).filter((r) => r !== "xxl").sort((r, n) => t[r] - t[n]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -1,20 +0,0 @@
1
- "use client";
2
- import { useEffect as s, useLayoutEffect as u, useState as f, useRef as d } from "react";
3
- const m = typeof window > "u" ? s : u, S = 300;
4
- function z() {
5
- const [o, i] = f({ height: void 0, width: void 0 }), e = d();
6
- return m(() => {
7
- const t = new ResizeObserver(([n]) => {
8
- const { blockSize: c, inlineSize: r } = n.contentBoxSize[0];
9
- clearTimeout(e.current), e.current = setTimeout(() => {
10
- i({ height: c, width: r });
11
- }, S);
12
- });
13
- return t.observe(document.documentElement), () => {
14
- clearTimeout(e.current), t.disconnect();
15
- };
16
- }, []), o;
17
- }
18
- export {
19
- z as u
20
- };