@versini/ui-button 1.2.0 → 1.3.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,5 +1,19 @@
1
1
  import a from "clsx";
2
- const s = "av-button", p = (t) => {
2
+ const s = "av-button";
3
+ /*!
4
+ @versini/ui-spacing v1.0.0
5
+ © 2024 gizmette.com
6
+ */
7
+ try {
8
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
9
+ version: "1.0.0",
10
+ buildTime: "12/24/2024 06:47 PM EST",
11
+ homepage: "https://github.com/aversini/ui-components",
12
+ license: "MIT"
13
+ });
14
+ } catch {
15
+ }
16
+ const p = (t) => {
3
17
  let e = "";
4
18
  if (typeof t == "number" || typeof t == "string")
5
19
  e = "m-" + t;
@@ -8,7 +22,7 @@ const s = "av-button", p = (t) => {
8
22
  (t == null ? void 0 : t.t) !== void 0 && r.push(`mt-${t.t}`), (t == null ? void 0 : t.r) !== void 0 && r.push(`mr-${t.r}`), (t == null ? void 0 : t.b) !== void 0 && r.push(`mb-${t.b}`), (t == null ? void 0 : t.l) !== void 0 && r.push(`ml-${t.l}`), e = r.join(" ");
9
23
  }
10
24
  return e;
11
- }, f = "icon", x = "button", m = "link", C = ({
25
+ }, f = "icon", x = "button", m = "link", _ = ({
12
26
  type: t,
13
27
  size: e,
14
28
  labelRight: r,
@@ -42,7 +56,7 @@ const s = "av-button", p = (t) => {
42
56
  "h-12 px-4 text-lg font-medium": e === "large" && (r || i)
43
57
  });
44
58
  }
45
- }, B = ({
59
+ }, C = ({
46
60
  mode: t,
47
61
  noBackground: e,
48
62
  noTruncate: r,
@@ -74,7 +88,7 @@ const s = "av-button", p = (t) => {
74
88
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": t === "system",
75
89
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": t === "alt-system"
76
90
  });
77
- }, w = ({
91
+ }, B = ({
78
92
  mode: t,
79
93
  disabled: e,
80
94
  variant: r
@@ -102,7 +116,7 @@ const s = "av-button", p = (t) => {
102
116
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": t === "system",
103
117
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": t === "alt-system"
104
118
  });
105
- }, T = ({
119
+ }, I = ({
106
120
  mode: t,
107
121
  disabled: e,
108
122
  variant: r
@@ -130,7 +144,7 @@ const s = "av-button", p = (t) => {
130
144
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": t === "system",
131
145
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": t === "alt-system"
132
146
  });
133
- }, j = ({
147
+ }, w = ({
134
148
  mode: t,
135
149
  noBorder: e,
136
150
  variant: r
@@ -158,12 +172,12 @@ const s = "av-button", p = (t) => {
158
172
  "border-border-danger-dark dark:border-border-danger-medium": t === "system",
159
173
  "border-border-danger-medium dark:border-border-danger-dark": t === "alt-system"
160
174
  });
161
- }, E = ({ focusMode: t }) => a("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
175
+ }, N = ({ focusMode: t }) => a("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
162
176
  "focus:outline-focus-dark": t === "dark",
163
177
  "focus:outline-focus-light": t === "light",
164
178
  "focus:outline-focus-light dark:focus:outline-focus-dark": t === "alt-system",
165
179
  "focus:outline-focus-dark dark:focus:outline-focus-light": t === "system"
166
- }), _ = ({
180
+ }), T = ({
167
181
  type: t,
168
182
  className: e,
169
183
  raw: r,
@@ -184,12 +198,12 @@ const s = "av-button", p = (t) => {
184
198
  s,
185
199
  e,
186
200
  p(u),
187
- B({ mode: i, variant: c, noBackground: k, noTruncate: v }),
188
- C({ type: t, size: d, labelRight: h, labelLeft: b, align: y }),
189
- j({ mode: i, variant: c, noBorder: l }),
190
- E({ focusMode: n }),
191
- w({ mode: i, variant: c, disabled: o }),
192
- T({ mode: i, variant: c, disabled: o }),
201
+ C({ mode: i, variant: c, noBackground: k, noTruncate: v }),
202
+ _({ type: t, size: d, labelRight: h, labelLeft: b, align: y }),
203
+ w({ mode: i, variant: c, noBorder: l }),
204
+ N({ focusMode: n }),
205
+ B({ mode: i, variant: c, disabled: o }),
206
+ I({ mode: i, variant: c, disabled: o }),
193
207
  {
194
208
  "w-full": g,
195
209
  "disabled:cursor-not-allowed disabled:opacity-50": o
@@ -200,5 +214,5 @@ export {
200
214
  x as TYPE_BUTTON,
201
215
  f as TYPE_ICON,
202
216
  m as TYPE_LINK,
203
- _ as getButtonClasses
217
+ T as getButtonClasses
204
218
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import N from "react";
3
3
  import { BaseButton_private as T } from "../../chunks/BaseButton.BFKIL4GO.js";
4
- import { getButtonClasses as x, TYPE_BUTTON as C } from "../../chunks/utilities.u8fHoETw.js";
4
+ import { getButtonClasses as x, TYPE_BUTTON as C } from "../../chunks/utilities.yQM3BzKE.js";
5
5
  const R = N.forwardRef(
6
6
  ({
7
7
  children: s,
@@ -2,7 +2,7 @@ import { jsxs as g, jsx as c } from "react/jsx-runtime";
2
2
  import I from "clsx";
3
3
  import j from "react";
4
4
  import { BaseButton_private as v } from "../../chunks/BaseButton.BFKIL4GO.js";
5
- import { getButtonClasses as _, TYPE_ICON as E } from "../../chunks/utilities.u8fHoETw.js";
5
+ import { getButtonClasses as _, TYPE_ICON as E } from "../../chunks/utilities.yQM3BzKE.js";
6
6
  const O = j.forwardRef(
7
7
  ({
8
8
  children: r,
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
2
  import b from "clsx";
3
3
  import v from "react";
4
- import { getButtonClasses as V, TYPE_LINK as C } from "../../chunks/utilities.u8fHoETw.js";
4
+ import { getButtonClasses as V, TYPE_LINK as C } from "../../chunks/utilities.yQM3BzKE.js";
5
5
  const L = v.forwardRef(
6
6
  ({
7
7
  children: r,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _versini_ui_private_dist_utilities from '@versini/ui-private/dist/utilities';
1
+ import * as _versini_ui_spacing_types from '@versini/ui-spacing-types';
2
2
  import React from 'react';
3
3
 
4
4
  declare const BUTTON_CLASSNAME = "av-button";
@@ -18,7 +18,7 @@ declare const Button: React.ForwardRefExoticComponent<{
18
18
  noInternalClick?: boolean;
19
19
  raw?: boolean;
20
20
  size?: "small" | "medium" | "large";
21
- } & _versini_ui_private_dist_utilities.SpacingProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
21
+ } & _versini_ui_spacing_types.SpacingTypes.Props & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
22
22
 
23
23
  declare const ButtonIcon: React.ForwardRefExoticComponent<{
24
24
  children: React.ReactNode;
@@ -36,10 +36,12 @@ declare const ButtonIcon: React.ForwardRefExoticComponent<{
36
36
  noInternalClick?: boolean;
37
37
  raw?: boolean;
38
38
  size?: "small" | "medium" | "large";
39
- } & _versini_ui_private_dist_utilities.SpacingProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
39
+ } & _versini_ui_spacing_types.SpacingTypes.Props & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
40
40
 
41
41
  declare const ButtonLink: React.ForwardRefExoticComponent<{
42
42
  noNewWindowIcon?: boolean;
43
+ href?: string;
44
+ target?: "_blank" | "_self" | "_parent" | "_top";
43
45
  } & {
44
46
  children: React.ReactNode;
45
47
  disabled?: boolean;
@@ -55,7 +57,7 @@ declare const ButtonLink: React.ForwardRefExoticComponent<{
55
57
  noInternalClick?: boolean;
56
58
  raw?: boolean;
57
59
  size?: "small" | "medium" | "large";
58
- } & _versini_ui_private_dist_utilities.SpacingProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
60
+ } & _versini_ui_spacing_types.SpacingTypes.Props & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
59
61
 
60
62
  declare const ButtonSort_private: React.ForwardRefExoticComponent<{
61
63
  active?: boolean;
@@ -75,6 +77,6 @@ declare const ButtonSort_private: React.ForwardRefExoticComponent<{
75
77
  noInternalClick?: boolean;
76
78
  raw?: boolean;
77
79
  size?: "small" | "medium" | "large";
78
- } & _versini_ui_private_dist_utilities.SpacingProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
80
+ } & _versini_ui_spacing_types.SpacingTypes.Props & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
79
81
 
80
82
  export { BUTTON_CLASSNAME, Button, ButtonIcon, ButtonLink, ButtonSort_private };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { getButtonClasses as I, TYPE_ICON as v } from "./chunks/utilities.u8fHoETw.js";
2
- import { BUTTON_CLASSNAME as V } from "./chunks/utilities.u8fHoETw.js";
1
+ import { getButtonClasses as I, TYPE_ICON as v } from "./chunks/utilities.yQM3BzKE.js";
2
+ import { BUTTON_CLASSNAME as V } from "./chunks/utilities.yQM3BzKE.js";
3
3
  import { Button as q } from "./components/Button/Button.js";
4
4
  import { ButtonIcon as D } from "./components/Button/ButtonIcon.js";
5
5
  import { ButtonLink as G } from "./components/Button/ButtonLink.js";
@@ -8,13 +8,13 @@ import c from "clsx";
8
8
  import C from "react";
9
9
  import { BaseButton_private as E } from "./chunks/BaseButton.BFKIL4GO.js";
10
10
  /*!
11
- @versini/ui-button v1.2.0
11
+ @versini/ui-button v1.3.0
12
12
  © 2024 gizmette.com
13
13
  */
14
14
  try {
15
15
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
16
- version: "1.2.0",
17
- buildTime: "12/18/2024 12:35 PM EST",
16
+ version: "1.3.0",
17
+ buildTime: "12/24/2024 06:47 PM EST",
18
18
  homepage: "https://github.com/aversini/ui-components",
19
19
  license: "MIT"
20
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-button",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,12 +39,14 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@tailwindcss/typography": "0.5.15",
42
- "@versini/ui-private": "1.5.0",
42
+ "@versini/ui-private": "1.6.0",
43
+ "@versini/ui-spacing": "1.0.0",
44
+ "@versini/ui-spacing-types": "1.0.0",
43
45
  "clsx": "2.1.1",
44
- "tailwindcss": "3.4.15"
46
+ "tailwindcss": "3.4.17"
45
47
  },
46
48
  "sideEffects": [
47
49
  "**/*.css"
48
50
  ],
49
- "gitHead": "413e5c7cd8228d2f135f54fa897101401207229b"
51
+ "gitHead": "cb948414a675c01f3328ed6470ccf4b58f73534f"
50
52
  }