@tonyarbor/components 0.1.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/Card.js ADDED
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/Card/index.ts
31
+ var Card_exports = {};
32
+ __export(Card_exports, {
33
+ Card: () => Card
34
+ });
35
+ module.exports = __toCommonJS(Card_exports);
36
+
37
+ // src/Card/Card.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_clsx = require("clsx");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var cardStyles = {
42
+ base: {
43
+ backgroundColor: "#ffffff",
44
+ borderRadius: "8px",
45
+ border: "1px solid #efefef",
46
+ // grey-100 - subtle border
47
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
48
+ },
49
+ padding: {
50
+ none: {
51
+ padding: "0"
52
+ },
53
+ small: {
54
+ padding: "8px"
55
+ // small spacing
56
+ },
57
+ medium: {
58
+ padding: "16px"
59
+ // large spacing
60
+ },
61
+ large: {
62
+ padding: "24px"
63
+ // xlarge spacing
64
+ }
65
+ }
66
+ };
67
+ var Card = React.forwardRef(
68
+ ({ padding = "large", className, style, children, ...props }, ref) => {
69
+ const paddingStyles = cardStyles.padding[padding];
70
+ const combinedStyle = {
71
+ ...cardStyles.base,
72
+ ...paddingStyles,
73
+ ...style
74
+ };
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ "div",
77
+ {
78
+ ref,
79
+ className: (0, import_clsx.clsx)("arbor-card", className),
80
+ style: combinedStyle,
81
+ ...props,
82
+ children
83
+ }
84
+ );
85
+ }
86
+ );
87
+ Card.displayName = "Card";
88
+ // Annotate the CommonJS export names for ESM import in node:
89
+ 0 && (module.exports = {
90
+ Card
91
+ });
92
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Card/index.ts","../src/Card/Card.tsx"],"sourcesContent":["export { Card } from './Card';\nexport type { CardProps } from './Card';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\ntype PaddingVariant = 'none' | 'small' | 'medium' | 'large';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The padding variant of the card\n * @default 'large'\n */\n padding?: PaddingVariant;\n /**\n * The content of the card\n */\n children: React.ReactNode;\n}\n\n// Arbor Design System card styles\nconst cardStyles = {\n base: {\n backgroundColor: '#ffffff',\n borderRadius: '8px',\n border: '1px solid #efefef', // grey-100 - subtle border\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n },\n padding: {\n none: {\n padding: '0',\n },\n small: {\n padding: '8px', // small spacing\n },\n medium: {\n padding: '16px', // large spacing\n },\n large: {\n padding: '24px', // xlarge spacing\n },\n },\n};\n\n/**\n * Card component - Arbor Design System\n *\n * A container component that provides consistent styling for content cards.\n * Uses subtle borders rather than shadows, following Arbor's minimal design approach.\n *\n * @example\n * ```tsx\n * <Card padding=\"large\">\n * <h2>Card Title</h2>\n * <p>Card content goes here</p>\n * </Card>\n * ```\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ padding = 'large', className, style, children, ...props }, ref) => {\n const paddingStyles = cardStyles.padding[padding];\n\n const combinedStyle: React.CSSProperties = {\n ...cardStyles.base,\n ...paddingStyles,\n ...style,\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-card', className)}\n style={combinedStyle}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\n\nCard.displayName = 'Card';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AAiEf;AAhDN,IAAM,aAAa;AAAA,EACjB,MAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,QAAQ;AAAA;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,SAAS;AAAA;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;AAgBO,IAAM,OAAa;AAAA,EACxB,CAAC,EAAE,UAAU,SAAS,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAAQ;AACpE,UAAM,gBAAgB,WAAW,QAAQ,OAAO;AAEhD,UAAM,gBAAqC;AAAA,MACzC,GAAG,WAAW;AAAA,MACd,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAK,cAAc,SAAS;AAAA,QACvC,OAAO;AAAA,QACN,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,KAAK,cAAc;","names":[]}
package/dist/Card.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ Card
3
+ } from "./chunk-ZFKW3P6P.mjs";
4
+ export {
5
+ Card
6
+ };
7
+ //# sourceMappingURL=Card.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+
3
+ type InputSize = 'small' | 'medium';
4
+ type ValidationState = 'default' | 'error' | 'success';
5
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
6
+ /**
7
+ * The size of the input
8
+ * @default 'medium'
9
+ */
10
+ size?: InputSize;
11
+ /**
12
+ * The validation state of the input
13
+ * @default 'default'
14
+ */
15
+ state?: ValidationState;
16
+ /**
17
+ * Optional label for the input
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Optional error message to display
22
+ */
23
+ error?: string;
24
+ /**
25
+ * Optional helper text to display
26
+ */
27
+ helperText?: string;
28
+ }
29
+ /**
30
+ * Input component - Arbor Design System
31
+ *
32
+ * A text input component following Arbor's design specifications.
33
+ * Supports labels, validation states (error/success), and helper text.
34
+ * Uses 8px border radius and Inter font family.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <Input
39
+ * label="Email"
40
+ * type="email"
41
+ * placeholder="you@example.com"
42
+ * helperText="We'll never share your email"
43
+ * />
44
+ * ```
45
+ */
46
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
47
+
48
+ export { Input, type InputProps };
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+
3
+ type InputSize = 'small' | 'medium';
4
+ type ValidationState = 'default' | 'error' | 'success';
5
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
6
+ /**
7
+ * The size of the input
8
+ * @default 'medium'
9
+ */
10
+ size?: InputSize;
11
+ /**
12
+ * The validation state of the input
13
+ * @default 'default'
14
+ */
15
+ state?: ValidationState;
16
+ /**
17
+ * Optional label for the input
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Optional error message to display
22
+ */
23
+ error?: string;
24
+ /**
25
+ * Optional helper text to display
26
+ */
27
+ helperText?: string;
28
+ }
29
+ /**
30
+ * Input component - Arbor Design System
31
+ *
32
+ * A text input component following Arbor's design specifications.
33
+ * Supports labels, validation states (error/success), and helper text.
34
+ * Uses 8px border radius and Inter font family.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <Input
39
+ * label="Email"
40
+ * type="email"
41
+ * placeholder="you@example.com"
42
+ * helperText="We'll never share your email"
43
+ * />
44
+ * ```
45
+ */
46
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
47
+
48
+ export { Input, type InputProps };
package/dist/Input.js ADDED
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/Input/index.ts
31
+ var Input_exports = {};
32
+ __export(Input_exports, {
33
+ Input: () => Input
34
+ });
35
+ module.exports = __toCommonJS(Input_exports);
36
+
37
+ // src/Input/Input.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_clsx = require("clsx");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var inputStyles = {
42
+ base: {
43
+ width: "100%",
44
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
45
+ backgroundColor: "#ffffff",
46
+ borderRadius: "8px",
47
+ transition: "all 0.2s ease-in-out",
48
+ outline: "none",
49
+ margin: "0",
50
+ display: "block"
51
+ },
52
+ sizes: {
53
+ small: {
54
+ height: "32px",
55
+ fontSize: "13px",
56
+ padding: "8px"
57
+ },
58
+ medium: {
59
+ height: "36px",
60
+ fontSize: "13px",
61
+ padding: "8px"
62
+ }
63
+ },
64
+ states: {
65
+ default: {
66
+ border: "1px solid #d1d1d1",
67
+ // grey-300
68
+ color: "#2f2f2f",
69
+ // grey-900
70
+ ":focus": {
71
+ borderColor: "#3cad51",
72
+ // brand-500
73
+ outline: "3px solid rgba(60, 173, 81, 0.2)"
74
+ },
75
+ ":disabled": {
76
+ backgroundColor: "#f8f8f8",
77
+ // grey-050
78
+ borderColor: "#efefef",
79
+ // grey-100
80
+ color: "#7e7e7e",
81
+ // grey-500
82
+ cursor: "not-allowed"
83
+ }
84
+ },
85
+ error: {
86
+ border: "1px solid #c93232",
87
+ // destructive-500
88
+ color: "#2f2f2f",
89
+ ":focus": {
90
+ borderColor: "#c93232",
91
+ outline: "3px solid rgba(201, 50, 50, 0.2)"
92
+ }
93
+ },
94
+ success: {
95
+ border: "1px solid #16a33d",
96
+ // success-500
97
+ color: "#2f2f2f",
98
+ ":focus": {
99
+ borderColor: "#16a33d",
100
+ outline: "3px solid rgba(22, 163, 61, 0.2)"
101
+ }
102
+ }
103
+ }
104
+ };
105
+ var labelStyles = {
106
+ display: "block",
107
+ fontSize: "13px",
108
+ fontWeight: "600",
109
+ color: "#2f2f2f",
110
+ // grey-900
111
+ marginBottom: "4px",
112
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
113
+ };
114
+ var helperTextStyles = {
115
+ fontSize: "13px",
116
+ margin: "0",
117
+ marginTop: "2px",
118
+ color: "#595959",
119
+ // grey-600
120
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
121
+ lineHeight: "1.4"
122
+ };
123
+ var errorTextStyles = {
124
+ ...helperTextStyles,
125
+ color: "#a62323",
126
+ // destructive-600 (accessible)
127
+ display: "flex",
128
+ alignItems: "center",
129
+ gap: "4px"
130
+ };
131
+ var Input = React.forwardRef(
132
+ ({
133
+ size = "medium",
134
+ state = "default",
135
+ label,
136
+ error,
137
+ helperText,
138
+ className,
139
+ style,
140
+ disabled,
141
+ ...props
142
+ }, ref) => {
143
+ const inputId = React.useId();
144
+ const helperTextId = React.useId();
145
+ const errorId = React.useId();
146
+ const [isFocused, setIsFocused] = React.useState(false);
147
+ const sizeStyles = inputStyles.sizes[size];
148
+ const stateStyles = inputStyles.states[error ? "error" : state];
149
+ const inputStyle = {
150
+ ...inputStyles.base,
151
+ ...sizeStyles,
152
+ ...stateStyles,
153
+ ...isFocused && !disabled && stateStyles[":focus"],
154
+ ...disabled && inputStyles.states.default[":disabled"]
155
+ };
156
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_clsx.clsx)("arbor-input-wrapper", className), style, children: [
157
+ label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: inputId, style: labelStyles, children: label }),
158
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
159
+ "input",
160
+ {
161
+ ref,
162
+ id: inputId,
163
+ className: "arbor-input",
164
+ style: inputStyle,
165
+ disabled,
166
+ "aria-invalid": error ? "true" : "false",
167
+ "aria-describedby": error ? errorId : helperText ? helperTextId : void 0,
168
+ onFocus: (e) => {
169
+ setIsFocused(true);
170
+ props.onFocus?.(e);
171
+ },
172
+ onBlur: (e) => {
173
+ setIsFocused(false);
174
+ props.onBlur?.(e);
175
+ },
176
+ ...props
177
+ }
178
+ ),
179
+ error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: errorId, style: errorTextStyles, role: "alert", children: error }),
180
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: helperTextId, style: helperTextStyles, children: helperText })
181
+ ] });
182
+ }
183
+ );
184
+ Input.displayName = "Input";
185
+ // Annotate the CommonJS export names for ESM import in node:
186
+ 0 && (module.exports = {
187
+ Input
188
+ });
189
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Input/index.ts","../src/Input/Input.tsx"],"sourcesContent":["export { Input } from './Input';\nexport type { InputProps } from './Input';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport type InputSize = 'small' | 'medium';\nexport type ValidationState = 'default' | 'error' | 'success';\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /**\n * The size of the input\n * @default 'medium'\n */\n size?: InputSize;\n /**\n * The validation state of the input\n * @default 'default'\n */\n state?: ValidationState;\n /**\n * Optional label for the input\n */\n label?: string;\n /**\n * Optional error message to display\n */\n error?: string;\n /**\n * Optional helper text to display\n */\n helperText?: string;\n}\n\n// Arbor Design System input styles\nconst inputStyles = {\n base: {\n width: '100%',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n backgroundColor: '#ffffff',\n borderRadius: '8px',\n transition: 'all 0.2s ease-in-out',\n outline: 'none',\n margin: '0',\n display: 'block',\n },\n sizes: {\n small: {\n height: '32px',\n fontSize: '13px',\n padding: '8px',\n },\n medium: {\n height: '36px',\n fontSize: '13px',\n padding: '8px',\n },\n },\n states: {\n default: {\n border: '1px solid #d1d1d1', // grey-300\n color: '#2f2f2f', // grey-900\n ':focus': {\n borderColor: '#3cad51', // brand-500\n outline: '3px solid rgba(60, 173, 81, 0.2)',\n },\n ':disabled': {\n backgroundColor: '#f8f8f8', // grey-050\n borderColor: '#efefef', // grey-100\n color: '#7e7e7e', // grey-500\n cursor: 'not-allowed',\n },\n },\n error: {\n border: '1px solid #c93232', // destructive-500\n color: '#2f2f2f',\n ':focus': {\n borderColor: '#c93232',\n outline: '3px solid rgba(201, 50, 50, 0.2)',\n },\n },\n success: {\n border: '1px solid #16a33d', // success-500\n color: '#2f2f2f',\n ':focus': {\n borderColor: '#16a33d',\n outline: '3px solid rgba(22, 163, 61, 0.2)',\n },\n },\n },\n};\n\nconst labelStyles: React.CSSProperties = {\n display: 'block',\n fontSize: '13px',\n fontWeight: '600',\n color: '#2f2f2f', // grey-900\n marginBottom: '4px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n};\n\nconst helperTextStyles: React.CSSProperties = {\n fontSize: '13px',\n margin: '0',\n marginTop: '2px',\n color: '#595959', // grey-600\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n lineHeight: '1.4',\n};\n\nconst errorTextStyles: React.CSSProperties = {\n ...helperTextStyles,\n color: '#a62323', // destructive-600 (accessible)\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n};\n\n/**\n * Input component - Arbor Design System\n *\n * A text input component following Arbor's design specifications.\n * Supports labels, validation states (error/success), and helper text.\n * Uses 8px border radius and Inter font family.\n *\n * @example\n * ```tsx\n * <Input\n * label=\"Email\"\n * type=\"email\"\n * placeholder=\"you@example.com\"\n * helperText=\"We'll never share your email\"\n * />\n * ```\n */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n size = 'medium',\n state = 'default',\n label,\n error,\n helperText,\n className,\n style,\n disabled,\n ...props\n },\n ref\n ) => {\n const inputId = React.useId();\n const helperTextId = React.useId();\n const errorId = React.useId();\n const [isFocused, setIsFocused] = React.useState(false);\n\n const sizeStyles = inputStyles.sizes[size];\n const stateStyles = inputStyles.states[error ? 'error' : state];\n\n const inputStyle: React.CSSProperties = {\n ...inputStyles.base,\n ...sizeStyles,\n ...stateStyles,\n ...(isFocused && !disabled && stateStyles[':focus']),\n ...(disabled && inputStyles.states.default[':disabled']),\n };\n\n return (\n <div className={clsx('arbor-input-wrapper', className)} style={style}>\n {label && (\n <label htmlFor={inputId} style={labelStyles}>\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className=\"arbor-input\"\n style={inputStyle}\n disabled={disabled}\n aria-invalid={error ? 'true' : 'false'}\n aria-describedby={\n error ? errorId : helperText ? helperTextId : undefined\n }\n onFocus={(e) => {\n setIsFocused(true);\n props.onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsFocused(false);\n props.onBlur?.(e);\n }}\n {...props}\n />\n {error && (\n <p id={errorId} style={errorTextStyles} role=\"alert\">\n {error}\n </p>\n )}\n {!error && helperText && (\n <p id={helperTextId} style={helperTextStyles}>\n {helperText}\n </p>\n )}\n </div>\n );\n }\n);\n\nInput.displayName = 'Input';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AAmKf;AApIN,IAAM,cAAc;AAAA,EAClB,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,cAAc;A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;AAEA,MAAM,cAAc;","names":[]}
package/dist/Input.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ Input
3
+ } from "./chunk-NOHUMPXV.mjs";
4
+ export {
5
+ Input
6
+ };
7
+ //# sourceMappingURL=Input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/Tag.d.mts ADDED
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ type TagVariant = 'default' | 'success' | 'error' | 'info' | 'neutral';
4
+ interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
5
+ /**
6
+ * The visual style variant of the tag
7
+ * @default 'default'
8
+ */
9
+ variant?: TagVariant;
10
+ /**
11
+ * The content of the tag
12
+ */
13
+ children: React.ReactNode;
14
+ }
15
+ /**
16
+ * Tag component - Arbor Design System
17
+ *
18
+ * A label component for categorization and status indication.
19
+ * Uses pill shape (99px radius) with semantic color variants.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Tag variant="success">Active</Tag>
24
+ * <Tag variant="error">Overdue</Tag>
25
+ * <Tag variant="info">New</Tag>
26
+ * ```
27
+ */
28
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
29
+
30
+ export { Tag, type TagProps, type TagVariant };
package/dist/Tag.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ type TagVariant = 'default' | 'success' | 'error' | 'info' | 'neutral';
4
+ interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
5
+ /**
6
+ * The visual style variant of the tag
7
+ * @default 'default'
8
+ */
9
+ variant?: TagVariant;
10
+ /**
11
+ * The content of the tag
12
+ */
13
+ children: React.ReactNode;
14
+ }
15
+ /**
16
+ * Tag component - Arbor Design System
17
+ *
18
+ * A label component for categorization and status indication.
19
+ * Uses pill shape (99px radius) with semantic color variants.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Tag variant="success">Active</Tag>
24
+ * <Tag variant="error">Overdue</Tag>
25
+ * <Tag variant="info">New</Tag>
26
+ * ```
27
+ */
28
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
29
+
30
+ export { Tag, type TagProps, type TagVariant };
package/dist/Tag.js ADDED
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/Tag/index.ts
31
+ var Tag_exports = {};
32
+ __export(Tag_exports, {
33
+ Tag: () => Tag
34
+ });
35
+ module.exports = __toCommonJS(Tag_exports);
36
+
37
+ // src/Tag/Tag.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_clsx = require("clsx");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var tagStyles = {
42
+ base: {
43
+ display: "inline-flex",
44
+ alignItems: "center",
45
+ padding: "4px 8px",
46
+ borderRadius: "99px",
47
+ // Pill shape
48
+ fontSize: "11px",
49
+ // Type 1
50
+ fontWeight: "600",
51
+ gap: "4px",
52
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
53
+ lineHeight: "1.2"
54
+ },
55
+ variants: {
56
+ default: {
57
+ backgroundColor: "#fff4e5",
58
+ // caution-100
59
+ color: "#975a00"
60
+ // caution-700
61
+ },
62
+ success: {
63
+ backgroundColor: "#e5f9eb",
64
+ // success-100
65
+ color: "#005a19"
66
+ // success-800
67
+ },
68
+ error: {
69
+ backgroundColor: "#ffeaea",
70
+ // destructive-100
71
+ color: "#a62323"
72
+ // destructive-600
73
+ },
74
+ info: {
75
+ backgroundColor: "#e5f4ff",
76
+ // info-100
77
+ color: "#003d80"
78
+ // info-800
79
+ },
80
+ neutral: {
81
+ backgroundColor: "#f8f8f8",
82
+ // grey-050
83
+ color: "#595959"
84
+ // grey-600
85
+ }
86
+ }
87
+ };
88
+ var Tag = React.forwardRef(
89
+ ({ variant = "default", className, style, children, ...props }, ref) => {
90
+ const variantStyles = tagStyles.variants[variant];
91
+ const combinedStyle = {
92
+ ...tagStyles.base,
93
+ ...variantStyles,
94
+ ...style
95
+ };
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
97
+ "span",
98
+ {
99
+ ref,
100
+ className: (0, import_clsx.clsx)("arbor-tag", `arbor-tag--${variant}`, className),
101
+ style: combinedStyle,
102
+ ...props,
103
+ children
104
+ }
105
+ );
106
+ }
107
+ );
108
+ Tag.displayName = "Tag";
109
+ // Annotate the CommonJS export names for ESM import in node:
110
+ 0 && (module.exports = {
111
+ Tag
112
+ });
113
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Tag/index.ts","../src/Tag/Tag.tsx"],"sourcesContent":["export { Tag } from './Tag';\nexport type { TagProps, TagVariant } from './Tag';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport type TagVariant = 'default' | 'success' | 'error' | 'info' | 'neutral';\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n /**\n * The visual style variant of the tag\n * @default 'default'\n */\n variant?: TagVariant;\n /**\n * The content of the tag\n */\n children: React.ReactNode;\n}\n\n// Arbor Design System tag styles\nconst tagStyles = {\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n padding: '4px 8px',\n borderRadius: '99px', // Pill shape\n fontSize: '11px', // Type 1\n fontWeight: '600',\n gap: '4px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n lineHeight: '1.2',\n },\n variants: {\n default: {\n backgroundColor: '#fff4e5', // caution-100\n color: '#975a00', // caution-700\n },\n success: {\n backgroundColor: '#e5f9eb', // success-100\n color: '#005a19', // success-800\n },\n error: {\n backgroundColor: '#ffeaea', // destructive-100\n color: '#a62323', // destructive-600\n },\n info: {\n backgroundColor: '#e5f4ff', // info-100\n color: '#003d80', // info-800\n },\n neutral: {\n backgroundColor: '#f8f8f8', // grey-050\n color: '#595959', // grey-600\n },\n },\n};\n\n/**\n * Tag component - Arbor Design System\n *\n * A label component for categorization and status indication.\n * Uses pill shape (99px radius) with semantic color variants.\n *\n * @example\n * ```tsx\n * <Tag variant=\"success\">Active</Tag>\n * <Tag variant=\"error\">Overdue</Tag>\n * <Tag variant=\"info\">New</Tag>\n * ```\n */\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(\n ({ variant = 'default', className, style, children, ...props }, ref) => {\n const variantStyles = tagStyles.variants[variant];\n\n const combinedStyle: React.CSSProperties = {\n ...tagStyles.base,\n ...variantStyles,\n ...style,\n };\n\n return (\n <span\n ref={ref}\n className={clsx('arbor-tag', `arbor-tag--${variant}`, className)}\n style={combinedStyle}\n {...props}\n >\n {children}\n </span>\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@ -0,0 +1,7 @@
1
+ import {
2
+ Tag
3
+ } from "./chunk-QCRIECT7.mjs";
4
+ export {
5
+ Tag
6
+ };
7
+ //# sourceMappingURL=Tag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}