analytica-frontend-lib 1.0.35 → 1.0.36

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.
@@ -0,0 +1,283 @@
1
+ "use client";
2
+
3
+ // src/components/Radio/Radio.tsx
4
+ import {
5
+ forwardRef,
6
+ useState,
7
+ useId
8
+ } from "react";
9
+
10
+ // src/components/Text/Text.tsx
11
+ import { jsx } from "react/jsx-runtime";
12
+ var Text = ({
13
+ children,
14
+ size = "md",
15
+ weight = "normal",
16
+ color = "text-text-950",
17
+ as,
18
+ className = "",
19
+ ...props
20
+ }) => {
21
+ let sizeClasses = "";
22
+ let weightClasses = "";
23
+ const sizeClassMap = {
24
+ "2xs": "text-2xs",
25
+ xs: "text-xs",
26
+ sm: "text-sm",
27
+ md: "text-md",
28
+ lg: "text-lg",
29
+ xl: "text-xl",
30
+ "2xl": "text-2xl",
31
+ "3xl": "text-3xl",
32
+ "4xl": "text-4xl",
33
+ "5xl": "text-5xl",
34
+ "6xl": "text-6xl"
35
+ };
36
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
37
+ const weightClassMap = {
38
+ hairline: "font-hairline",
39
+ light: "font-light",
40
+ normal: "font-normal",
41
+ medium: "font-medium",
42
+ semibold: "font-semibold",
43
+ bold: "font-bold",
44
+ extrabold: "font-extrabold",
45
+ black: "font-black"
46
+ };
47
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
48
+ const baseClasses = "font-primary";
49
+ const Component = as ?? "p";
50
+ return /* @__PURE__ */ jsx(
51
+ Component,
52
+ {
53
+ className: `${baseClasses} ${sizeClasses} ${weightClasses} ${color} ${className}`,
54
+ ...props,
55
+ children
56
+ }
57
+ );
58
+ };
59
+ var Text_default = Text;
60
+
61
+ // src/components/Radio/Radio.tsx
62
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
63
+ var SIZE_CLASSES = {
64
+ small: {
65
+ radio: "w-5 h-5",
66
+ // 20px x 20px
67
+ textSize: "sm",
68
+ spacing: "gap-1.5",
69
+ // 6px
70
+ borderWidth: "border-2",
71
+ dotSize: "w-1.5 h-1.5",
72
+ // 6px inner dot
73
+ labelHeight: "h-5"
74
+ },
75
+ medium: {
76
+ radio: "w-6 h-6",
77
+ // 24px x 24px
78
+ textSize: "md",
79
+ spacing: "gap-2",
80
+ // 8px
81
+ borderWidth: "border-2",
82
+ dotSize: "w-2 h-2",
83
+ // 8px inner dot
84
+ labelHeight: "h-6"
85
+ },
86
+ large: {
87
+ radio: "w-7 h-7",
88
+ // 28px x 28px
89
+ textSize: "lg",
90
+ spacing: "gap-2",
91
+ // 8px
92
+ borderWidth: "border-2",
93
+ // 2px border (consistent with others)
94
+ dotSize: "w-2.5 h-2.5",
95
+ // 10px inner dot
96
+ labelHeight: "h-7"
97
+ },
98
+ extraLarge: {
99
+ radio: "w-8 h-8",
100
+ // 32px x 32px (larger than large)
101
+ textSize: "xl",
102
+ spacing: "gap-3",
103
+ // 12px
104
+ borderWidth: "border-2",
105
+ // 2px border (consistent with others)
106
+ dotSize: "w-3 h-3",
107
+ // 12px inner dot
108
+ labelHeight: "h-8"
109
+ }
110
+ };
111
+ var BASE_RADIO_CLASSES = "rounded-full border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none";
112
+ var STATE_CLASSES = {
113
+ default: {
114
+ unchecked: "border-border-400 bg-background hover:border-border-500",
115
+ checked: "border-primary-950 bg-background hover:border-primary-800"
116
+ },
117
+ hovered: {
118
+ unchecked: "border-border-500 bg-background",
119
+ // #8C8D8D hover state for unchecked
120
+ checked: "border-info-700 bg-background"
121
+ // Adjust checked border for hover
122
+ },
123
+ focused: {
124
+ unchecked: "border-border-400 bg-background",
125
+ // #A5A3A3 for unchecked radio
126
+ checked: "border-primary-950 bg-background"
127
+ // #124393 for checked radio
128
+ },
129
+ invalid: {
130
+ unchecked: "border-border-400 bg-background",
131
+ // #A5A3A3 for unchecked radio
132
+ checked: "border-primary-950 bg-background"
133
+ // #124393 for checked radio
134
+ },
135
+ disabled: {
136
+ unchecked: "border-border-400 bg-background cursor-not-allowed",
137
+ // #A5A3A3 for unchecked radio
138
+ checked: "border-primary-950 bg-background cursor-not-allowed"
139
+ // #124393 for checked radio
140
+ }
141
+ };
142
+ var DOT_CLASSES = {
143
+ default: "bg-primary-950",
144
+ hovered: "bg-info-700",
145
+ // #1C61B2 hover state for checked dot
146
+ focused: "bg-primary-950",
147
+ // #124393 for focused checked dot
148
+ invalid: "bg-primary-950",
149
+ // #124393 for invalid checked dot
150
+ disabled: "bg-primary-950"
151
+ // #124393 for disabled checked dot
152
+ };
153
+ var Radio = forwardRef(
154
+ ({
155
+ label,
156
+ size = "medium",
157
+ state = "default",
158
+ errorMessage,
159
+ helperText,
160
+ className = "",
161
+ labelClassName = "",
162
+ checked: checkedProp,
163
+ defaultChecked = false,
164
+ disabled,
165
+ id,
166
+ name,
167
+ value,
168
+ onChange,
169
+ ...props
170
+ }, ref) => {
171
+ const generatedId = useId();
172
+ const inputId = id ?? `radio-${generatedId}`;
173
+ const [internalChecked, setInternalChecked] = useState(defaultChecked);
174
+ const isControlled = checkedProp !== void 0;
175
+ const checked = isControlled ? checkedProp : internalChecked;
176
+ const handleChange = (event) => {
177
+ const newChecked = event.target.checked;
178
+ if (!isControlled) {
179
+ setInternalChecked(newChecked);
180
+ }
181
+ onChange?.(event);
182
+ };
183
+ const currentState = disabled ? "disabled" : state;
184
+ const sizeClasses = SIZE_CLASSES[size];
185
+ const actualRadioSize = sizeClasses.radio;
186
+ const actualDotSize = sizeClasses.dotSize;
187
+ const radioVariant = checked ? "checked" : "unchecked";
188
+ const stylingClasses = STATE_CLASSES[currentState][radioVariant];
189
+ const getBorderWidth = () => {
190
+ if (currentState === "focused") {
191
+ return "border-2";
192
+ }
193
+ return sizeClasses.borderWidth;
194
+ };
195
+ const borderWidthClass = getBorderWidth();
196
+ const radioClasses = `${BASE_RADIO_CLASSES} ${actualRadioSize} ${borderWidthClass} ${stylingClasses} ${className}`;
197
+ const dotClasses = `${actualDotSize} rounded-full ${DOT_CLASSES[currentState]} transition-all duration-200`;
198
+ const isWrapperNeeded = currentState === "focused" || currentState === "invalid";
199
+ const wrapperBorderColor = currentState === "focused" ? "border-indicator-info" : "border-indicator-error";
200
+ const getTextColor = () => {
201
+ if (currentState === "disabled") {
202
+ return checked ? "text-text-900" : "text-text-600";
203
+ }
204
+ if (currentState === "focused") {
205
+ return "text-text-900";
206
+ }
207
+ return checked ? "text-text-900" : "text-text-600";
208
+ };
209
+ const getCursorClass = () => {
210
+ return currentState === "disabled" ? "cursor-not-allowed" : "cursor-pointer";
211
+ };
212
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
213
+ /* @__PURE__ */ jsxs(
214
+ "div",
215
+ {
216
+ className: `flex flex-row items-center ${isWrapperNeeded ? `p-1 border-2 ${wrapperBorderColor} rounded-lg gap-1.5` : sizeClasses.spacing} ${disabled ? "opacity-40" : ""}`,
217
+ children: [
218
+ /* @__PURE__ */ jsx2(
219
+ "input",
220
+ {
221
+ ref,
222
+ type: "radio",
223
+ id: inputId,
224
+ checked,
225
+ disabled,
226
+ name,
227
+ value,
228
+ onChange: handleChange,
229
+ className: "sr-only",
230
+ ...props
231
+ }
232
+ ),
233
+ /* @__PURE__ */ jsx2("label", { htmlFor: inputId, className: radioClasses, children: checked && /* @__PURE__ */ jsx2("div", { className: dotClasses }) }),
234
+ label && /* @__PURE__ */ jsx2(
235
+ "div",
236
+ {
237
+ className: `flex flex-row items-center ${sizeClasses.labelHeight}`,
238
+ children: /* @__PURE__ */ jsx2(
239
+ Text_default,
240
+ {
241
+ as: "label",
242
+ htmlFor: inputId,
243
+ size: sizeClasses.textSize,
244
+ weight: "normal",
245
+ className: `${getCursorClass()} select-none leading-normal flex items-center font-roboto ${labelClassName}`,
246
+ color: getTextColor(),
247
+ children: label
248
+ }
249
+ )
250
+ }
251
+ )
252
+ ]
253
+ }
254
+ ),
255
+ errorMessage && /* @__PURE__ */ jsx2(
256
+ Text_default,
257
+ {
258
+ size: "sm",
259
+ weight: "normal",
260
+ className: "mt-1.5",
261
+ color: "text-error-600",
262
+ children: errorMessage
263
+ }
264
+ ),
265
+ helperText && !errorMessage && /* @__PURE__ */ jsx2(
266
+ Text_default,
267
+ {
268
+ size: "sm",
269
+ weight: "normal",
270
+ className: "mt-1.5",
271
+ color: "text-text-500",
272
+ children: helperText
273
+ }
274
+ )
275
+ ] });
276
+ }
277
+ );
278
+ Radio.displayName = "Radio";
279
+ var Radio_default = Radio;
280
+ export {
281
+ Radio_default as default
282
+ };
283
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Radio/Radio.tsx","../../src/components/Text/Text.tsx"],"sourcesContent":["'use client';\n\nimport {\n InputHTMLAttributes,\n ReactNode,\n forwardRef,\n useState,\n useId,\n ChangeEvent,\n} from 'react';\nimport Text from '../Text/Text';\n\n/**\n * Radio size variants\n */\ntype RadioSize = 'small' | 'medium' | 'large' | 'extraLarge';\n\n/**\n * Radio visual state\n */\ntype RadioState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';\n\n/**\n * Size configurations using Tailwind classes\n */\nconst SIZE_CLASSES = {\n small: {\n radio: 'w-5 h-5', // 20px x 20px\n textSize: 'sm' as const,\n spacing: 'gap-1.5', // 6px\n borderWidth: 'border-2',\n dotSize: 'w-1.5 h-1.5', // 6px inner dot\n labelHeight: 'h-5',\n },\n medium: {\n radio: 'w-6 h-6', // 24px x 24px\n textSize: 'md' as const,\n spacing: 'gap-2', // 8px\n borderWidth: 'border-2',\n dotSize: 'w-2 h-2', // 8px inner dot\n labelHeight: 'h-6',\n },\n large: {\n radio: 'w-7 h-7', // 28px x 28px\n textSize: 'lg' as const,\n spacing: 'gap-2', // 8px\n borderWidth: 'border-2', // 2px border (consistent with others)\n dotSize: 'w-2.5 h-2.5', // 10px inner dot\n labelHeight: 'h-7',\n },\n extraLarge: {\n radio: 'w-8 h-8', // 32px x 32px (larger than large)\n textSize: 'xl' as const,\n spacing: 'gap-3', // 12px\n borderWidth: 'border-2', // 2px border (consistent with others)\n dotSize: 'w-3 h-3', // 12px inner dot\n labelHeight: 'h-8',\n },\n} as const;\n\n/**\n * Focused state maintains the same sizes as default state\n * Only adds wrapper styling, does not change radio/dot sizes\n */\n\n/**\n * Base radio styling classes using design system colors\n */\nconst BASE_RADIO_CLASSES =\n 'rounded-full border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none';\n\n/**\n * State-based styling classes using design system colors from styles.css\n */\nconst STATE_CLASSES = {\n default: {\n unchecked: 'border-border-400 bg-background hover:border-border-500',\n checked: 'border-primary-950 bg-background hover:border-primary-800',\n },\n hovered: {\n unchecked: 'border-border-500 bg-background', // #8C8D8D hover state for unchecked\n checked: 'border-info-700 bg-background', // Adjust checked border for hover\n },\n focused: {\n unchecked: 'border-border-400 bg-background', // #A5A3A3 for unchecked radio\n checked: 'border-primary-950 bg-background', // #124393 for checked radio\n },\n invalid: {\n unchecked: 'border-border-400 bg-background', // #A5A3A3 for unchecked radio\n checked: 'border-primary-950 bg-background', // #124393 for checked radio\n },\n disabled: {\n unchecked: 'border-border-400 bg-background cursor-not-allowed', // #A5A3A3 for unchecked radio\n checked: 'border-primary-950 bg-background cursor-not-allowed', // #124393 for checked radio\n },\n} as const;\n\n/**\n * Dot styling classes for the inner dot when checked\n */\nconst DOT_CLASSES = {\n default: 'bg-primary-950',\n hovered: 'bg-info-700', // #1C61B2 hover state for checked dot\n focused: 'bg-primary-950', // #124393 for focused checked dot\n invalid: 'bg-primary-950', // #124393 for invalid checked dot\n disabled: 'bg-primary-950', // #124393 for disabled checked dot\n} as const;\n\n/**\n * Radio component props interface\n */\nexport type RadioProps = {\n /** Label text to display next to the radio */\n label?: ReactNode;\n /** Size variant of the radio */\n size?: RadioSize;\n /** Visual state of the radio */\n state?: RadioState;\n /** Error message to display */\n errorMessage?: string;\n /** Helper text to display */\n helperText?: string;\n /** Additional CSS classes */\n className?: string;\n /** Label CSS classes */\n labelClassName?: string;\n /** Radio group name */\n name?: string;\n /** Radio value */\n value?: string;\n /** Default checked state for uncontrolled radios */\n defaultChecked?: boolean;\n} & Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'defaultChecked'\n>;\n\n/**\n * Radio component for Analytica Ensino platforms\n *\n * A radio button component with essential states, sizes and themes.\n * Uses the Analytica Ensino Design System colors from styles.css with automatic\n * light/dark mode support. Includes Text component integration for consistent typography.\n *\n * @example\n * ```tsx\n * // Basic radio\n * <Radio name=\"option\" value=\"1\" label=\"Option 1\" />\n *\n * // Small size\n * <Radio size=\"small\" name=\"option\" value=\"2\" label=\"Small option\" />\n *\n * // Invalid state\n * <Radio state=\"invalid\" name=\"option\" value=\"3\" label=\"Required field\" />\n *\n * // Disabled state\n * <Radio disabled name=\"option\" value=\"4\" label=\"Disabled option\" />\n *\n * // Default checked (uncontrolled)\n * <Radio defaultChecked name=\"option\" value=\"5\" label=\"Initially checked\" />\n * ```\n */\nconst Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n size = 'medium',\n state = 'default',\n errorMessage,\n helperText,\n className = '',\n labelClassName = '',\n checked: checkedProp,\n defaultChecked = false,\n disabled,\n id,\n name,\n value,\n onChange,\n ...props\n },\n ref\n ) => {\n // Generate unique ID if not provided\n const generatedId = useId();\n const inputId = id ?? `radio-${generatedId}`;\n\n // Handle controlled vs uncontrolled behavior\n const [internalChecked, setInternalChecked] = useState(defaultChecked);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n // Handle change events\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const newChecked = event.target.checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(event);\n };\n\n // Determine current state based on props\n const currentState = disabled ? 'disabled' : state;\n\n // Get size classes\n const sizeClasses = SIZE_CLASSES[size];\n\n // Focused state maintains original sizes, only adds wrapper\n const actualRadioSize = sizeClasses.radio;\n const actualDotSize = sizeClasses.dotSize;\n\n // Determine radio visual variant\n const radioVariant = checked ? 'checked' : 'unchecked';\n\n // Get styling classes\n const stylingClasses = STATE_CLASSES[currentState][radioVariant];\n\n // Border width logic - consistent across all states and sizes\n const getBorderWidth = () => {\n if (currentState === 'focused') {\n return 'border-2'; // Consistent border for all focused radios inside wrapper\n }\n return sizeClasses.borderWidth;\n };\n\n const borderWidthClass = getBorderWidth();\n\n // Get final radio classes\n const radioClasses = `${BASE_RADIO_CLASSES} ${actualRadioSize} ${borderWidthClass} ${stylingClasses} ${className}`;\n\n // Get dot classes\n const dotClasses = `${actualDotSize} rounded-full ${DOT_CLASSES[currentState]} transition-all duration-200`;\n\n // Determine if wrapper is needed only for focused or invalid states\n const isWrapperNeeded =\n currentState === 'focused' || currentState === 'invalid';\n const wrapperBorderColor =\n currentState === 'focused'\n ? 'border-indicator-info' // #5399EC for focused\n : 'border-indicator-error'; // #B91C1C for invalid\n\n // Determine text color based on state and checked status\n const getTextColor = () => {\n if (currentState === 'disabled') {\n return checked ? 'text-text-900' : 'text-text-600'; // #262627 for disabled checked, #737373 for disabled unchecked\n }\n\n if (currentState === 'focused') {\n return 'text-text-900'; // #262627 for focused (both checked and unchecked)\n }\n\n return checked ? 'text-text-900' : 'text-text-600'; // #262627 for checked, #737373 for unchecked\n };\n\n // Determine cursor class based on disabled state\n const getCursorClass = () => {\n return currentState === 'disabled'\n ? 'cursor-not-allowed'\n : 'cursor-pointer';\n };\n\n return (\n <div className=\"flex flex-col\">\n <div\n className={`flex flex-row items-center ${\n isWrapperNeeded\n ? `p-1 border-2 ${wrapperBorderColor} rounded-lg gap-1.5` // Wrapper apenas para focused/invalid\n : sizeClasses.spacing\n } ${disabled ? 'opacity-40' : ''}`}\n >\n {/* Hidden native input for accessibility and form submission */}\n <input\n ref={ref}\n type=\"radio\"\n id={inputId}\n checked={checked}\n disabled={disabled}\n name={name}\n value={value}\n onChange={handleChange}\n className=\"sr-only\"\n {...props}\n />\n\n {/* Custom styled radio */}\n <label htmlFor={inputId} className={radioClasses}>\n {/* Show dot when checked */}\n {checked && <div className={dotClasses} />}\n </label>\n\n {/* Label text */}\n {label && (\n <div\n className={`flex flex-row items-center ${sizeClasses.labelHeight}`}\n >\n <Text\n as=\"label\"\n htmlFor={inputId}\n size={sizeClasses.textSize}\n weight=\"normal\"\n className={`${getCursorClass()} select-none leading-normal flex items-center font-roboto ${labelClassName}`}\n color={getTextColor()}\n >\n {label}\n </Text>\n </div>\n )}\n </div>\n\n {/* Error message */}\n {errorMessage && (\n <Text\n size=\"sm\"\n weight=\"normal\"\n className=\"mt-1.5\"\n color=\"text-error-600\"\n >\n {errorMessage}\n </Text>\n )}\n\n {/* Helper text */}\n {helperText && !errorMessage && (\n <Text\n size=\"sm\"\n weight=\"normal\"\n className=\"mt-1.5\"\n color=\"text-text-500\"\n >\n {helperText}\n </Text>\n )}\n </div>\n );\n }\n);\n\nRadio.displayName = 'Radio';\n\nexport default Radio;\n","import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';\n\n/**\n * Base text component props\n */\ntype BaseTextProps = {\n /** Content to be displayed */\n children?: ReactNode;\n /** Text size variant */\n size?:\n | '2xs'\n | 'xs'\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'\n | '2xl'\n | '3xl'\n | '4xl'\n | '5xl'\n | '6xl';\n /** Font weight variant */\n weight?:\n | 'hairline'\n | 'light'\n | 'normal'\n | 'medium'\n | 'semibold'\n | 'bold'\n | 'extrabold'\n | 'black';\n /** Color variant - white for light backgrounds, black for dark backgrounds */\n color?: string;\n /** Additional CSS classes to apply */\n className?: string;\n};\n\n/**\n * Polymorphic text component props that ensures type safety based on the 'as' prop\n */\ntype TextProps<T extends ElementType = 'p'> = BaseTextProps & {\n /** HTML tag to render */\n as?: T;\n} & Omit<ComponentPropsWithoutRef<T>, keyof BaseTextProps>;\n\n/**\n * Text component for Analytica Ensino platforms\n *\n * A flexible polymorphic text component with multiple sizes, weights, and colors.\n * Automatically adapts to dark and light themes with full type safety.\n * Fully compatible with Next.js 15 and React 19.\n *\n * @param children - The content to display\n * @param size - The text size variant (2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl)\n * @param weight - The font weight variant (hairline, light, normal, medium, semibold, bold, extrabold, black)\n * @param color - The color variant - adapts to theme\n * @param as - The HTML tag to render - determines allowed attributes via TypeScript\n * @param className - Additional CSS classes\n * @param props - HTML attributes valid for the chosen tag only\n * @returns A styled text element with type-safe attributes\n *\n * @example\n * ```tsx\n * <Text size=\"lg\" weight=\"bold\" color=\"text-info-800\">\n * This is a large, bold text\n * </Text>\n *\n * <Text as=\"a\" href=\"/link\" target=\"_blank\">\n * Link with type-safe anchor attributes\n * </Text>\n *\n * <Text as=\"button\" onClick={handleClick} disabled>\n * Button with type-safe button attributes\n * </Text>\n * ```\n */\nconst Text = <T extends ElementType = 'p'>({\n children,\n size = 'md',\n weight = 'normal',\n color = 'text-text-950',\n as,\n className = '',\n ...props\n}: TextProps<T>) => {\n let sizeClasses = '';\n let weightClasses = '';\n\n // Text size classes mapping\n const sizeClassMap = {\n '2xs': 'text-2xs',\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-md',\n lg: 'text-lg',\n xl: 'text-xl',\n '2xl': 'text-2xl',\n '3xl': 'text-3xl',\n '4xl': 'text-4xl',\n '5xl': 'text-5xl',\n '6xl': 'text-6xl',\n } as const;\n\n sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;\n\n // Font weight classes mapping\n const weightClassMap = {\n hairline: 'font-hairline',\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extrabold: 'font-extrabold',\n black: 'font-black',\n } as const;\n\n weightClasses = weightClassMap[weight] ?? weightClassMap.normal;\n\n const baseClasses = 'font-primary';\n const Component = as ?? ('p' as ElementType);\n\n return (\n <Component\n className={`${baseClasses} ${sizeClasses} ${weightClasses} ${color} ${className}`}\n {...props}\n >\n {children}\n </Component>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AAW,eAAe,EAAE;AAAA,UAGhC;AAAA,4BAAAA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,MAAK;AAAA,gBACL,IAAI;AAAA,gBACJ;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,UAAU;AAAA,gBACV,WAAU;AAAA,gBACT,GAAG;AAAA;AAAA,YACN;AAAA,YAGA,gBAAAA,KAAC,WAAM,SAAS,SAAS,WAAW,cAEjC,qBAAW,gBAAAA,KAAC,SAAI,WAAW,YAAY,GAC1C;AAAA,YAGC,SACC,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,8BAA8B,YAAY,WAAW;AAAA,gBAEhE,0BAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,IAAG;AAAA,oBACH,SAAS;AAAA,oBACT,MAAM,YAAY;AAAA,oBAClB,QAAO;AAAA,oBACP,WAAW,GAAG,eAAe,CAAC,6DAA6D,cAAc;AAAA,oBACzG,OAAO,aAAa;AAAA,oBAEnB;AAAA;AAAA,gBACH;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MAEJ;AAAA,MAGC,gBACC,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,WAAU;AAAA,UACV,OAAM;AAAA,UAEL;AAAA;AAAA,MACH;AAAA,MAID,cAAc,CAAC,gBACd,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,WAAU;AAAA,UACV,OAAM;AAAA,UAEL;AAAA;AAAA,MACH;AAAA,OAEJ;AAAA,EAEJ;AACF;AAEA,MAAM,cAAc;AAEpB,IAAO,gBAAQ;","names":["jsx"]}
package/dist/index.css CHANGED
@@ -27,6 +27,7 @@
27
27
  --color-white: #fff;
28
28
  --spacing: 0.25rem;
29
29
  --container-md: 28rem;
30
+ --container-lg: 32rem;
30
31
  --container-4xl: 56rem;
31
32
  --text-xs: 0.75rem;
32
33
  --text-xs--line-height: calc(1 / 0.75);
@@ -62,6 +63,7 @@
62
63
  --radius-lg: 0.5rem;
63
64
  --radius-xl: 0.75rem;
64
65
  --radius-4xl: 2rem;
66
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
65
67
  --default-transition-duration: 150ms;
66
68
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
67
69
  --default-font-family: var(--font-sans);
@@ -88,6 +90,7 @@
88
90
  --color-background-50: #f6f6f6;
89
91
  --color-background-100: #f2f1f1;
90
92
  --color-background-200: #dcdbdb;
93
+ --color-background-300: #d5d4d4;
91
94
  --color-background-500: #8e8e8e;
92
95
  --color-background-800: #414040;
93
96
  --color-background-950: #121212;
@@ -342,6 +345,9 @@
342
345
  .pointer-events-none {
343
346
  pointer-events: none;
344
347
  }
348
+ .visible {
349
+ visibility: visible;
350
+ }
345
351
  .sr-only {
346
352
  position: absolute;
347
353
  width: 1px;
@@ -362,6 +368,9 @@
362
368
  .relative {
363
369
  position: relative;
364
370
  }
371
+ .inset-0 {
372
+ inset: calc(var(--spacing) * 0);
373
+ }
365
374
  .top-1\/2 {
366
375
  top: calc(1/2 * 100%);
367
376
  }
@@ -530,6 +539,9 @@
530
539
  width: calc(var(--spacing) * 16);
531
540
  height: calc(var(--spacing) * 16);
532
541
  }
542
+ .h-1 {
543
+ height: calc(var(--spacing) * 1);
544
+ }
533
545
  .h-1\.5 {
534
546
  height: calc(var(--spacing) * 1.5);
535
547
  }
@@ -626,6 +638,9 @@
626
638
  .w-\[1em\] {
627
639
  width: 1em;
628
640
  }
641
+ .w-\[70px\] {
642
+ width: 70px;
643
+ }
629
644
  .w-\[288px\] {
630
645
  width: 288px;
631
646
  }
@@ -644,6 +659,9 @@
644
659
  .max-w-\[390px\] {
645
660
  max-width: 390px;
646
661
  }
662
+ .max-w-lg {
663
+ max-width: var(--container-lg);
664
+ }
647
665
  .max-w-md {
648
666
  max-width: var(--container-md);
649
667
  }
@@ -659,6 +677,12 @@
659
677
  .flex-1 {
660
678
  flex: 1;
661
679
  }
680
+ .flex-none {
681
+ flex: none;
682
+ }
683
+ .flex-grow {
684
+ flex-grow: 1;
685
+ }
662
686
  .caption-bottom {
663
687
  caption-side: bottom;
664
688
  }
@@ -760,6 +784,13 @@
760
784
  margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
761
785
  }
762
786
  }
787
+ .space-y-4 {
788
+ :where(& > :not(:last-child)) {
789
+ --tw-space-y-reverse: 0;
790
+ margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));
791
+ margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
792
+ }
793
+ }
763
794
  .space-y-6 {
764
795
  :where(& > :not(:last-child)) {
765
796
  --tw-space-y-reverse: 0;
@@ -923,6 +954,9 @@
923
954
  .bg-background-100 {
924
955
  background-color: var(--color-background-100);
925
956
  }
957
+ .bg-background-300 {
958
+ background-color: var(--color-background-300);
959
+ }
926
960
  .bg-background-muted {
927
961
  background-color: var(--color-background-muted);
928
962
  }
@@ -965,6 +999,9 @@
965
999
  .bg-primary-600 {
966
1000
  background-color: var(--color-primary-600);
967
1001
  }
1002
+ .bg-primary-700 {
1003
+ background-color: var(--color-primary-700);
1004
+ }
968
1005
  .bg-primary-800 {
969
1006
  background-color: var(--color-primary-800);
970
1007
  }
@@ -974,6 +1011,9 @@
974
1011
  .bg-success {
975
1012
  background-color: var(--color-success);
976
1013
  }
1014
+ .bg-success-200 {
1015
+ background-color: var(--color-success-200);
1016
+ }
977
1017
  .bg-success-500 {
978
1018
  background-color: var(--color-success-500);
979
1019
  }
@@ -1055,6 +1095,9 @@
1055
1095
  .pl-10 {
1056
1096
  padding-left: calc(var(--spacing) * 10);
1057
1097
  }
1098
+ .text-center {
1099
+ text-align: center;
1100
+ }
1058
1101
  .text-left {
1059
1102
  text-align: left;
1060
1103
  }
@@ -1203,6 +1246,9 @@
1203
1246
  .text-primary {
1204
1247
  color: var(--color-primary);
1205
1248
  }
1249
+ .text-primary-500 {
1250
+ color: var(--color-primary-500);
1251
+ }
1206
1252
  .text-primary-950 {
1207
1253
  color: var(--color-primary-950);
1208
1254
  }
@@ -1266,6 +1312,15 @@
1266
1312
  .opacity-50 {
1267
1313
  opacity: 50%;
1268
1314
  }
1315
+ .shadow-hard-shadow-3 {
1316
+ --tw-shadow: 2px 2px 8px var(--tw-shadow-color, rgba(38, 38, 38, 0.2));
1317
+ box-shadow:
1318
+ var(--tw-inset-shadow),
1319
+ var(--tw-inset-ring-shadow),
1320
+ var(--tw-ring-offset-shadow),
1321
+ var(--tw-ring-shadow),
1322
+ var(--tw-shadow);
1323
+ }
1269
1324
  .shadow-lg {
1270
1325
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1271
1326
  box-shadow:
@@ -1335,6 +1390,9 @@
1335
1390
  --tw-blur: blur(8px);
1336
1391
  filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
1337
1392
  }
1393
+ .filter {
1394
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
1395
+ }
1338
1396
  .transition-all {
1339
1397
  transition-property: all;
1340
1398
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -1373,6 +1431,14 @@
1373
1431
  --tw-duration: 200ms;
1374
1432
  transition-duration: 200ms;
1375
1433
  }
1434
+ .duration-300 {
1435
+ --tw-duration: 300ms;
1436
+ transition-duration: 300ms;
1437
+ }
1438
+ .ease-out {
1439
+ --tw-ease: var(--ease-out);
1440
+ transition-timing-function: var(--ease-out);
1441
+ }
1376
1442
  .outline-none {
1377
1443
  --tw-outline-style: none;
1378
1444
  outline-style: none;
@@ -2248,6 +2314,7 @@
2248
2314
  @property --tw-drop-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
2249
2315
  @property --tw-drop-shadow-size { syntax: "*"; inherits: false; }
2250
2316
  @property --tw-duration { syntax: "*"; inherits: false; }
2317
+ @property --tw-ease { syntax: "*"; inherits: false; }
2251
2318
  @layer properties {
2252
2319
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
2253
2320
  *,
@@ -2295,6 +2362,7 @@
2295
2362
  --tw-drop-shadow-alpha: 100%;
2296
2363
  --tw-drop-shadow-size: initial;
2297
2364
  --tw-duration: initial;
2365
+ --tw-ease: initial;
2298
2366
  }
2299
2367
  }
2300
2368
  }