@oztix/roadie-components 2.0.1 → 2.0.2
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/Accordion.d.ts +42 -21
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.js +1 -2
- package/dist/Accordion.js.map +1 -1
- package/dist/Autocomplete.d.ts +101 -60
- package/dist/Autocomplete.d.ts.map +1 -0
- package/dist/Autocomplete.js +1 -2
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Badge.d.ts +27 -16
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Breadcrumb.d.ts +45 -23
- package/dist/Breadcrumb.d.ts.map +1 -0
- package/dist/Breadcrumb.js +1 -1
- package/dist/Breadcrumb.js.map +1 -1
- package/dist/Button-CDQ6ik0P.js +2 -0
- package/dist/Button-CDQ6ik0P.js.map +1 -0
- package/dist/Button-DdE0vCfo.js +2 -0
- package/dist/Button-DdE0vCfo.js.map +1 -0
- package/dist/Button-Dt1TGgrL.d.ts +26 -0
- package/dist/Button-Dt1TGgrL.d.ts.map +1 -0
- package/dist/Button.d.ts +3 -17
- package/dist/Button.js +1 -2
- package/dist/Card.d.ts +56 -30
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.js +1 -1
- package/dist/Card.js.map +1 -1
- package/dist/Code.d.ts +19 -13
- package/dist/Code.d.ts.map +1 -0
- package/dist/Code.js +1 -1
- package/dist/Code.js.map +1 -1
- package/dist/Combobox.d.ts +111 -63
- package/dist/Combobox.d.ts.map +1 -0
- package/dist/Combobox.js +1 -2
- package/dist/Combobox.js.map +1 -1
- package/dist/Field.d.ts +63 -46
- package/dist/Field.d.ts.map +1 -0
- package/dist/Field.js +1 -2
- package/dist/Field.js.map +1 -1
- package/dist/Fieldset.d.ts +34 -22
- package/dist/Fieldset.d.ts.map +1 -0
- package/dist/Fieldset.js +1 -2
- package/dist/Fieldset.js.map +1 -1
- package/dist/Highlight.d.ts +20 -15
- package/dist/Highlight.d.ts.map +1 -0
- package/dist/Highlight.js +1 -2
- package/dist/Highlight.js.map +1 -1
- package/dist/Indicator.d.ts +20 -12
- package/dist/Indicator.d.ts.map +1 -0
- package/dist/Indicator.js +1 -1
- package/dist/Indicator.js.map +1 -1
- package/dist/Input.d.ts +22 -14
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.js +1 -2
- package/dist/Input.js.map +1 -1
- package/dist/Label.d.ts +12 -8
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +1 -1
- package/dist/Label.js.map +1 -1
- package/dist/LinkButton-9nnOzX_0.js +2 -0
- package/dist/LinkButton-9nnOzX_0.js.map +1 -0
- package/dist/LinkButton.d.ts +2 -35
- package/dist/LinkButton.js +1 -2
- package/dist/Mark.d.ts +19 -12
- package/dist/Mark.d.ts.map +1 -0
- package/dist/Mark.js +1 -1
- package/dist/Mark.js.map +1 -1
- package/dist/Marquee.d.ts +27 -16
- package/dist/Marquee.d.ts.map +1 -0
- package/dist/Marquee.js +5 -2
- package/dist/Marquee.js.map +1 -1
- package/dist/Prose.d.ts +19 -12
- package/dist/Prose.d.ts.map +1 -0
- package/dist/Prose.js +1 -1
- package/dist/Prose.js.map +1 -1
- package/dist/RadioGroup.d.ts +62 -38
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.js +1 -2
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.d.ts +129 -73
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.js +1 -2
- package/dist/Select.js.map +1 -1
- package/dist/Separator.d.ts +17 -12
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Separator.js +1 -1
- package/dist/Separator.js.map +1 -1
- package/dist/SpotIllustration.d.ts +71 -50
- package/dist/SpotIllustration.d.ts.map +1 -0
- package/dist/SpotIllustration.js +1 -2
- package/dist/SpotIllustration.js.map +1 -1
- package/dist/Steps.d.ts +102 -62
- package/dist/Steps.d.ts.map +1 -0
- package/dist/Steps.js +1 -2
- package/dist/Steps.js.map +1 -1
- package/dist/Textarea.d.ts +22 -13
- package/dist/Textarea.d.ts.map +1 -0
- package/dist/Textarea.js +1 -2
- package/dist/Textarea.js.map +1 -1
- package/dist/index-0w-ydb3o.d.ts +50 -0
- package/dist/index-0w-ydb3o.d.ts.map +1 -0
- package/dist/index-C3_4djmE.d.ts +17 -0
- package/dist/index-C3_4djmE.d.ts.map +1 -0
- package/dist/index.d.ts +47 -49
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/variants-DTAwzBl3.js +2 -0
- package/dist/variants-DTAwzBl3.js.map +1 -0
- package/package.json +6 -5
- package/dist/Button-fnIVmjIB.d.ts +0 -18
- package/dist/Button.js.map +0 -1
- package/dist/LinkButton.js.map +0 -1
- package/dist/_chunks/chunk-3H22EQQ6.js +0 -2
- package/dist/_chunks/chunk-3H22EQQ6.js.map +0 -1
- package/dist/_chunks/chunk-42UB7PQB.js +0 -3
- package/dist/_chunks/chunk-42UB7PQB.js.map +0 -1
- package/dist/_chunks/chunk-4LGCF3SN.js +0 -3
- package/dist/_chunks/chunk-4LGCF3SN.js.map +0 -1
- package/dist/_chunks/chunk-AFSDN4WI.js +0 -2
- package/dist/_chunks/chunk-AFSDN4WI.js.map +0 -1
- package/dist/_chunks/chunk-BQEJDV7D.js +0 -3
- package/dist/_chunks/chunk-BQEJDV7D.js.map +0 -1
- package/dist/_chunks/chunk-DRVUAPKN.js +0 -2
- package/dist/_chunks/chunk-DRVUAPKN.js.map +0 -1
- package/dist/_chunks/chunk-EKOEXSAP.js +0 -2
- package/dist/_chunks/chunk-EKOEXSAP.js.map +0 -1
- package/dist/_chunks/chunk-FQNVMKKV.js +0 -7
- package/dist/_chunks/chunk-FQNVMKKV.js.map +0 -1
- package/dist/_chunks/chunk-IEDKSZAQ.js +0 -3
- package/dist/_chunks/chunk-IEDKSZAQ.js.map +0 -1
- package/dist/_chunks/chunk-JBHYUOI2.js +0 -3
- package/dist/_chunks/chunk-JBHYUOI2.js.map +0 -1
- package/dist/_chunks/chunk-JGTZ3GCR.js +0 -2
- package/dist/_chunks/chunk-JGTZ3GCR.js.map +0 -1
- package/dist/_chunks/chunk-LHNOY24C.js +0 -2
- package/dist/_chunks/chunk-LHNOY24C.js.map +0 -1
- package/dist/_chunks/chunk-LMV3JECI.js +0 -3
- package/dist/_chunks/chunk-LMV3JECI.js.map +0 -1
- package/dist/_chunks/chunk-MDRAL676.js +0 -3
- package/dist/_chunks/chunk-MDRAL676.js.map +0 -1
- package/dist/_chunks/chunk-N2HGY7W7.js +0 -3
- package/dist/_chunks/chunk-N2HGY7W7.js.map +0 -1
- package/dist/_chunks/chunk-NRVNUMJE.js +0 -2
- package/dist/_chunks/chunk-NRVNUMJE.js.map +0 -1
- package/dist/_chunks/chunk-OIAETOZT.js +0 -3
- package/dist/_chunks/chunk-OIAETOZT.js.map +0 -1
- package/dist/_chunks/chunk-OIZX63GZ.js +0 -2
- package/dist/_chunks/chunk-OIZX63GZ.js.map +0 -1
- package/dist/_chunks/chunk-OPR5JL7N.js +0 -3
- package/dist/_chunks/chunk-OPR5JL7N.js.map +0 -1
- package/dist/_chunks/chunk-SCS7WZ6Z.js +0 -3
- package/dist/_chunks/chunk-SCS7WZ6Z.js.map +0 -1
- package/dist/_chunks/chunk-VSKUGXQG.js +0 -3
- package/dist/_chunks/chunk-VSKUGXQG.js.map +0 -1
- package/dist/_chunks/chunk-WOU2B425.js +0 -3
- package/dist/_chunks/chunk-WOU2B425.js.map +0 -1
- package/dist/_chunks/chunk-XERFFH3S.js +0 -3
- package/dist/_chunks/chunk-XERFFH3S.js.map +0 -1
- package/dist/_chunks/chunk-XRFHVFJ5.js +0 -3
- package/dist/_chunks/chunk-XRFHVFJ5.js.map +0 -1
- package/dist/_chunks/chunk-ZXR32FYA.js +0 -2
- package/dist/_chunks/chunk-ZXR32FYA.js.map +0 -1
package/dist/Field.d.ts
CHANGED
|
@@ -1,71 +1,88 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import 'class-variance-authority/types';
|
|
7
|
-
import 'class-variance-authority';
|
|
1
|
+
import { InputProps } from "./Input.js";
|
|
2
|
+
import { LabelProps } from "./Label.js";
|
|
3
|
+
import { TextareaProps } from "./Textarea.js";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { ComponentProps } from "react";
|
|
8
6
|
|
|
7
|
+
//#region src/components/Field/index.d.ts
|
|
9
8
|
interface FieldContextValue {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
invalid?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
fieldId: string;
|
|
13
|
+
labelId: string;
|
|
14
|
+
helperTextId: string;
|
|
15
|
+
errorTextId: string;
|
|
17
16
|
}
|
|
18
17
|
declare function useFieldContext(): FieldContextValue;
|
|
19
18
|
interface FieldRootProps extends ComponentProps<'div'> {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
23
22
|
}
|
|
24
|
-
declare function FieldRoot({
|
|
23
|
+
declare function FieldRoot({
|
|
24
|
+
className,
|
|
25
|
+
invalid,
|
|
26
|
+
required,
|
|
27
|
+
disabled,
|
|
28
|
+
...props
|
|
29
|
+
}: FieldRootProps): _$react_jsx_runtime0.JSX.Element;
|
|
25
30
|
declare namespace FieldRoot {
|
|
26
|
-
|
|
31
|
+
var displayName: string;
|
|
27
32
|
}
|
|
28
33
|
interface FieldLabelProps extends LabelProps {
|
|
29
|
-
|
|
34
|
+
showIndicator?: boolean;
|
|
30
35
|
}
|
|
31
|
-
declare function FieldLabel({
|
|
36
|
+
declare function FieldLabel({
|
|
37
|
+
htmlFor,
|
|
38
|
+
showIndicator,
|
|
39
|
+
children,
|
|
40
|
+
...props
|
|
41
|
+
}: FieldLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
32
42
|
declare namespace FieldLabel {
|
|
33
|
-
|
|
43
|
+
var displayName: string;
|
|
34
44
|
}
|
|
35
45
|
declare function useFieldInputProps(): {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
id: string | undefined;
|
|
47
|
+
disabled: true | undefined;
|
|
48
|
+
'aria-invalid': true | undefined;
|
|
49
|
+
'aria-required': true | undefined;
|
|
50
|
+
'aria-describedby': string | undefined;
|
|
41
51
|
};
|
|
42
|
-
declare function FieldInput(props: InputProps):
|
|
52
|
+
declare function FieldInput(props: InputProps): _$react_jsx_runtime0.JSX.Element;
|
|
43
53
|
declare namespace FieldInput {
|
|
44
|
-
|
|
54
|
+
var displayName: string;
|
|
45
55
|
}
|
|
46
|
-
declare function FieldTextarea(props: TextareaProps):
|
|
56
|
+
declare function FieldTextarea(props: TextareaProps): _$react_jsx_runtime0.JSX.Element;
|
|
47
57
|
declare namespace FieldTextarea {
|
|
48
|
-
|
|
58
|
+
var displayName: string;
|
|
49
59
|
}
|
|
50
|
-
interface FieldHelperTextProps extends ComponentProps<'p'> {
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
interface FieldHelperTextProps extends ComponentProps<'p'> {}
|
|
61
|
+
declare function FieldHelperText({
|
|
62
|
+
id,
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: FieldHelperTextProps): _$react_jsx_runtime0.JSX.Element;
|
|
53
66
|
declare namespace FieldHelperText {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
interface FieldErrorTextProps extends ComponentProps<'p'> {
|
|
67
|
+
var displayName: string;
|
|
57
68
|
}
|
|
58
|
-
|
|
69
|
+
interface FieldErrorTextProps extends ComponentProps<'p'> {}
|
|
70
|
+
declare function FieldErrorText({
|
|
71
|
+
id,
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}: FieldErrorTextProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
59
75
|
declare namespace FieldErrorText {
|
|
60
|
-
|
|
76
|
+
var displayName: string;
|
|
61
77
|
}
|
|
62
78
|
declare const Field: typeof FieldRoot & {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
Label: typeof FieldLabel;
|
|
80
|
+
Input: typeof FieldInput;
|
|
81
|
+
Textarea: typeof FieldTextarea;
|
|
82
|
+
HelperText: typeof FieldHelperText;
|
|
83
|
+
ErrorText: typeof FieldErrorText;
|
|
68
84
|
};
|
|
69
85
|
type FieldProps = FieldRootProps;
|
|
70
|
-
|
|
71
|
-
export { Field,
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Field, FieldErrorTextProps, FieldHelperTextProps, FieldLabelProps, FieldProps, FieldRootProps, useFieldContext, useFieldInputProps };
|
|
88
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","names":[],"sources":["../src/components/Field/index.tsx"],"mappings":";;;;;;;UAcU,iBAAA;EACR,OAAA;EACA,QAAA;EACA,QAAA;EACA,OAAA;EACA,OAAA;EACA,YAAA;EACA,WAAA;AAAA;AAAA,iBAUc,eAAA,CAAA,GAAe,iBAAA;AAAA,UAMd,cAAA,SAAuB,cAAA;EACtC,OAAA;EACA,QAAA;EACA,QAAA;AAAA;AAAA,iBAGO,SAAA,CAAA;EACP,SAAA;EACA,OAAA;EACA,QAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,cAAA,GAAc,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBANR,SAAA;EAAA,IAAS,WAAA;AAAA;AAAA,UAkCD,eAAA,SAAwB,UAAA;EACvC,aAAA;AAAA;AAAA,iBAGO,UAAA,CAAA;EACP,OAAA;EACA,aAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBALT,UAAA;EAAA,IAAU,WAAA;AAAA;AAAA,iBAkCH,kBAAA,CAAA;;;;;;;iBAeP,UAAA,CAAW,KAAA,EAAO,UAAA,GAAU,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAA5B,UAAA;EAAA,IAAU,WAAA;AAAA;AAAA,iBASV,aAAA,CAAc,KAAA,EAAO,aAAA,GAAa,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAlC,aAAA;EAAA,IAAa,WAAA;AAAA;AAAA,UASL,oBAAA,SAA6B,cAAA;AAAA,iBAErC,eAAA,CAAA;EAAkB,EAAA;EAAI,SAAA;EAAA,GAAc;AAAA,GAAS,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAjE,eAAA;EAAA,IAAe,WAAA;AAAA;AAAA,UAeP,mBAAA,SAA4B,cAAA;AAAA,iBAEpC,cAAA,CAAA;EAAiB,EAAA;EAAI,SAAA;EAAA,GAAc;AAAA,GAAS,mBAAA,GAAmB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAA/D,cAAA;EAAA,IAAc,WAAA;AAAA;AAAA,cAiBV,KAAA,SAAK,SAAA;;;;;;;KAQN,UAAA,GAAa,cAAA"}
|
package/dist/Field.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
export{c as Field,a as useFieldContext,b as useFieldInputProps}from'./_chunks/chunk-N2HGY7W7.js';import'./_chunks/chunk-OIAETOZT.js';import'./_chunks/chunk-LMV3JECI.js';import'./_chunks/chunk-VSKUGXQG.js';import'./_chunks/chunk-IEDKSZAQ.js';import'./_chunks/chunk-4LGCF3SN.js';//# sourceMappingURL=Field.js.map
|
|
1
|
+
"use client";import{OptionalIndicator as e,RequiredIndicator as t}from"./Indicator.js";import{Label as n}from"./Label.js";import{Input as r}from"./Input.js";import{Textarea as i}from"./Textarea.js";import{cn as a}from"@oztix/roadie-core/utils";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{createContext as l,use as u,useId as d}from"react";const f=l({fieldId:``,labelId:``,helperTextId:``,errorTextId:``});function p(){return u(f)}function m({className:e,invalid:t,required:n,disabled:r,...i}){let o=`field-${d()}`;return s(f,{value:{invalid:t,required:n,disabled:r,fieldId:o,labelId:`${o}-label`,helperTextId:`${o}-helper`,errorTextId:`${o}-error`},children:s(`div`,{className:a(`grid gap-1.5`,e),...i})})}m.displayName=`Field`;function h({htmlFor:r,showIndicator:i,children:a,...l}){let{fieldId:d,labelId:p,required:m}=u(f);return c(n,{id:p||void 0,htmlFor:r??(d||void 0),...l,children:[a,i&&(m?c(o,{children:[` `,s(t,{})]}):c(o,{children:[` `,s(e,{})]}))]})}h.displayName=`Field.Label`;function g(){let{invalid:e,required:t,disabled:n,fieldId:r,helperTextId:i,errorTextId:a}=u(f),o=e?a:i;return{id:r||void 0,disabled:n||void 0,"aria-invalid":e||void 0,"aria-required":t||void 0,"aria-describedby":o||void 0}}function _(e){return s(r,{...g(),...e})}_.displayName=`Field.Input`;function v(e){return s(i,{...g(),...e})}v.displayName=`Field.Textarea`;function y({id:e,className:t,...n}){let{helperTextId:r}=u(f);return s(`p`,{id:e??(r||void 0),className:a(`text-sm text-subtle`,t),...n})}y.displayName=`Field.HelperText`;function b({id:e,className:t,...n}){let{invalid:r,errorTextId:i}=u(f);return r?s(`p`,{id:e??(i||void 0),role:`alert`,className:a(`text-sm text-subtle intent-danger`,t),...n}):null}b.displayName=`Field.ErrorText`;const x=Object.assign(m,{Label:h,Input:_,Textarea:v,HelperText:y,ErrorText:b});export{x as Field,p as useFieldContext,g as useFieldInputProps};
|
|
3
2
|
//# sourceMappingURL=Field.js.map
|
package/dist/Field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Field.js","names":[],"sources":["../src/components/Field/index.tsx"],"sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use, useId } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\nimport { Input, type InputProps } from '../Input'\nimport { Label, type LabelProps } from '../Label'\nimport { Textarea, type TextareaProps } from '../Textarea'\n\n/* ─── Context ─── */\n\ninterface FieldContextValue {\n invalid?: boolean\n required?: boolean\n disabled?: boolean\n fieldId: string\n labelId: string\n helperTextId: string\n errorTextId: string\n}\n\nconst FieldContext = createContext<FieldContextValue>({\n fieldId: '',\n labelId: '',\n helperTextId: '',\n errorTextId: ''\n})\n\nexport function useFieldContext() {\n return use(FieldContext)\n}\n\n/* ─── Root ─── */\n\nexport interface FieldRootProps extends ComponentProps<'div'> {\n invalid?: boolean\n required?: boolean\n disabled?: boolean\n}\n\nfunction FieldRoot({\n className,\n invalid,\n required,\n disabled,\n ...props\n}: FieldRootProps) {\n const id = useId()\n const fieldId = `field-${id}`\n const labelId = `${fieldId}-label`\n const helperTextId = `${fieldId}-helper`\n const errorTextId = `${fieldId}-error`\n\n return (\n <FieldContext\n value={{\n invalid,\n required,\n disabled,\n fieldId,\n labelId,\n helperTextId,\n errorTextId\n }}\n >\n <div className={cn('grid gap-1.5', className)} {...props} />\n </FieldContext>\n )\n}\n\nFieldRoot.displayName = 'Field'\n\n/* ─── Label ─── */\n\nexport interface FieldLabelProps extends LabelProps {\n showIndicator?: boolean\n}\n\nfunction FieldLabel({\n htmlFor,\n showIndicator,\n children,\n ...props\n}: FieldLabelProps) {\n const { fieldId, labelId, required } = use(FieldContext)\n return (\n <Label\n id={labelId || undefined}\n htmlFor={htmlFor ?? (fieldId || undefined)}\n {...props}\n >\n {children}\n {showIndicator &&\n (required ? (\n <>\n {' '}\n <RequiredIndicator />\n </>\n ) : (\n <>\n {' '}\n <OptionalIndicator />\n </>\n ))}\n </Label>\n )\n}\n\nFieldLabel.displayName = 'Field.Label'\n\n/* ─── aria helper ─── */\n\nexport function useFieldInputProps() {\n const { invalid, required, disabled, fieldId, helperTextId, errorTextId } =\n use(FieldContext)\n const describedBy = invalid ? errorTextId : helperTextId\n return {\n id: fieldId || undefined,\n disabled: disabled || undefined,\n 'aria-invalid': invalid || undefined,\n 'aria-required': required || undefined,\n 'aria-describedby': describedBy || undefined\n }\n}\n\n/* ─── Input ─── */\n\nfunction FieldInput(props: InputProps) {\n const fieldProps = useFieldInputProps()\n return <Input {...fieldProps} {...props} />\n}\n\nFieldInput.displayName = 'Field.Input'\n\n/* ─── Textarea ─── */\n\nfunction FieldTextarea(props: TextareaProps) {\n const fieldProps = useFieldInputProps()\n return <Textarea {...fieldProps} {...props} />\n}\n\nFieldTextarea.displayName = 'Field.Textarea'\n\n/* ─── Helper text ─── */\n\nexport interface FieldHelperTextProps extends ComponentProps<'p'> {}\n\nfunction FieldHelperText({ id, className, ...props }: FieldHelperTextProps) {\n const { helperTextId } = use(FieldContext)\n return (\n <p\n id={id ?? (helperTextId || undefined)}\n className={cn('text-sm text-subtle', className)}\n {...props}\n />\n )\n}\n\nFieldHelperText.displayName = 'Field.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface FieldErrorTextProps extends ComponentProps<'p'> {}\n\nfunction FieldErrorText({ id, className, ...props }: FieldErrorTextProps) {\n const { invalid, errorTextId } = use(FieldContext)\n if (!invalid) return null\n return (\n <p\n id={id ?? (errorTextId || undefined)}\n role='alert'\n className={cn('text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nFieldErrorText.displayName = 'Field.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const Field = Object.assign(FieldRoot, {\n Label: FieldLabel,\n Input: FieldInput,\n Textarea: FieldTextarea,\n HelperText: FieldHelperText,\n ErrorText: FieldErrorText\n})\n\nexport type FieldProps = FieldRootProps\n"],"mappings":"8WAwBA,MAAM,EAAe,EAAiC,CACpD,QAAS,GACT,QAAS,GACT,aAAc,GACd,YAAa,GACd,CAAC,CAEF,SAAgB,GAAkB,CAChC,OAAO,EAAI,EAAa,CAW1B,SAAS,EAAU,CACjB,YACA,UACA,WACA,WACA,GAAG,GACc,CAEjB,IAAM,EAAU,SADL,GAAO,GAMlB,OACE,EAAC,EAAD,CACE,MAAO,CACL,UACA,WACA,WACA,UACA,QAXU,GAAG,EAAQ,QAYrB,aAXe,GAAG,EAAQ,SAY1B,YAXc,GAAG,EAAQ,QAY1B,UAED,EAAC,MAAD,CAAK,UAAW,EAAG,eAAgB,EAAU,CAAE,GAAI,EAAS,CAAA,CAC/C,CAAA,CAInB,EAAU,YAAc,QAQxB,SAAS,EAAW,CAClB,UACA,gBACA,WACA,GAAG,GACe,CAClB,GAAM,CAAE,UAAS,UAAS,YAAa,EAAI,EAAa,CACxD,OACE,EAAC,EAAD,CACE,GAAI,GAAW,IAAA,GACf,QAAS,IAAY,GAAW,IAAA,IAChC,GAAI,WAHN,CAKG,EACA,IACE,EACC,EAAA,EAAA,CAAA,SAAA,CACG,IACD,EAAC,EAAD,EAAqB,CAAA,CACpB,CAAA,CAAA,CAEH,EAAA,EAAA,CAAA,SAAA,CACG,IACD,EAAC,EAAD,EAAqB,CAAA,CACpB,CAAA,CAAA,EAED,GAIZ,EAAW,YAAc,cAIzB,SAAgB,GAAqB,CACnC,GAAM,CAAE,UAAS,WAAU,WAAU,UAAS,eAAc,eAC1D,EAAI,EAAa,CACb,EAAc,EAAU,EAAc,EAC5C,MAAO,CACL,GAAI,GAAW,IAAA,GACf,SAAU,GAAY,IAAA,GACtB,eAAgB,GAAW,IAAA,GAC3B,gBAAiB,GAAY,IAAA,GAC7B,mBAAoB,GAAe,IAAA,GACpC,CAKH,SAAS,EAAW,EAAmB,CAErC,OAAO,EAAC,EAAD,CAAO,GADK,GAAoB,CACT,GAAI,EAAS,CAAA,CAG7C,EAAW,YAAc,cAIzB,SAAS,EAAc,EAAsB,CAE3C,OAAO,EAAC,EAAD,CAAU,GADE,GAAoB,CACN,GAAI,EAAS,CAAA,CAGhD,EAAc,YAAc,iBAM5B,SAAS,EAAgB,CAAE,KAAI,YAAW,GAAG,GAA+B,CAC1E,GAAM,CAAE,gBAAiB,EAAI,EAAa,CAC1C,OACE,EAAC,IAAD,CACE,GAAI,IAAO,GAAgB,IAAA,IAC3B,UAAW,EAAG,sBAAuB,EAAU,CAC/C,GAAI,EACJ,CAAA,CAIN,EAAgB,YAAc,mBAM9B,SAAS,EAAe,CAAE,KAAI,YAAW,GAAG,GAA8B,CACxE,GAAM,CAAE,UAAS,eAAgB,EAAI,EAAa,CAElD,OADK,EAEH,EAAC,IAAD,CACE,GAAI,IAAO,GAAe,IAAA,IAC1B,KAAK,QACL,UAAW,EAAG,oCAAqC,EAAU,CAC7D,GAAI,EACJ,CAAA,CAPiB,KAWvB,EAAe,YAAc,kBAI7B,MAAa,EAAQ,OAAO,OAAO,EAAW,CAC5C,MAAO,EACP,MAAO,EACP,SAAU,EACV,WAAY,EACZ,UAAW,EACZ,CAAC"}
|
package/dist/Fieldset.d.ts
CHANGED
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ComponentProps } from
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
3
|
|
|
4
|
+
//#region src/components/Fieldset/index.d.ts
|
|
4
5
|
interface FieldsetRootProps extends ComponentProps<'fieldset'> {
|
|
5
|
-
|
|
6
|
+
invalid?: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare function FieldsetRoot({
|
|
8
|
+
declare function FieldsetRoot({
|
|
9
|
+
className,
|
|
10
|
+
invalid,
|
|
11
|
+
...props
|
|
12
|
+
}: FieldsetRootProps): _$react_jsx_runtime0.JSX.Element;
|
|
8
13
|
declare namespace FieldsetRoot {
|
|
9
|
-
|
|
14
|
+
var displayName: string;
|
|
10
15
|
}
|
|
11
|
-
interface FieldsetLegendProps extends ComponentProps<'legend'> {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
interface FieldsetLegendProps extends ComponentProps<'legend'> {}
|
|
17
|
+
declare function FieldsetLegend({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: FieldsetLegendProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
21
|
declare namespace FieldsetLegend {
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
interface FieldsetHelperTextProps extends ComponentProps<'p'> {
|
|
22
|
+
var displayName: string;
|
|
18
23
|
}
|
|
19
|
-
|
|
24
|
+
interface FieldsetHelperTextProps extends ComponentProps<'p'> {}
|
|
25
|
+
declare function FieldsetHelperText({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: FieldsetHelperTextProps): _$react_jsx_runtime0.JSX.Element;
|
|
20
29
|
declare namespace FieldsetHelperText {
|
|
21
|
-
|
|
30
|
+
var displayName: string;
|
|
22
31
|
}
|
|
23
|
-
interface FieldsetErrorTextProps extends ComponentProps<'p'> {
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
interface FieldsetErrorTextProps extends ComponentProps<'p'> {}
|
|
33
|
+
declare function FieldsetErrorText({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: FieldsetErrorTextProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
26
37
|
declare namespace FieldsetErrorText {
|
|
27
|
-
|
|
38
|
+
var displayName: string;
|
|
28
39
|
}
|
|
29
40
|
declare const Fieldset: typeof FieldsetRoot & {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
Legend: typeof FieldsetLegend;
|
|
42
|
+
HelperText: typeof FieldsetHelperText;
|
|
43
|
+
ErrorText: typeof FieldsetErrorText;
|
|
33
44
|
};
|
|
34
45
|
type FieldsetProps = FieldsetRootProps;
|
|
35
|
-
|
|
36
|
-
export { Fieldset,
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Fieldset, FieldsetErrorTextProps, FieldsetHelperTextProps, FieldsetLegendProps, FieldsetProps, FieldsetRootProps };
|
|
48
|
+
//# sourceMappingURL=Fieldset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.d.ts","names":[],"sources":["../src/components/Fieldset/index.tsx"],"mappings":";;;;UAgBiB,iBAAA,SAA0B,cAAA;EACzC,OAAA;AAAA;AAAA,iBAGO,YAAA,CAAA;EAAe,SAAA;EAAW,OAAA;EAAA,GAAY;AAAA,GAAS,iBAAA,GAAiB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAhE,YAAA;EAAA,IAAY,WAAA;AAAA;AAAA,UAeJ,mBAAA,SAA4B,cAAA;AAAA,iBAEpC,cAAA,CAAA;EAAiB,SAAA;EAAA,GAAc;AAAA,GAAS,mBAAA,GAAmB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAA3D,cAAA;EAAA,IAAc,WAAA;AAAA;AAAA,UAaN,uBAAA,SAAgC,cAAA;AAAA,iBAExC,kBAAA,CAAA;EAAqB,SAAA;EAAA,GAAc;AAAA,GAAS,uBAAA,GAAuB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAnE,kBAAA;EAAA,IAAkB,WAAA;AAAA;AAAA,UAQV,sBAAA,SAA+B,cAAA;AAAA,iBAEvC,iBAAA,CAAA;EAAoB,SAAA;EAAA,GAAc;AAAA,GAAS,sBAAA,GAAsB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAjE,iBAAA;EAAA,IAAiB,WAAA;AAAA;AAAA,cAgBb,QAAA,SAAQ,YAAA;;;;;KAMT,aAAA,GAAgB,iBAAA"}
|
package/dist/Fieldset.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
export{a as Fieldset}from'./_chunks/chunk-42UB7PQB.js';//# sourceMappingURL=Fieldset.js.map
|
|
1
|
+
"use client";import{cn as e}from"@oztix/roadie-core/utils";import{jsx as t}from"react/jsx-runtime";import{createContext as n,use as r}from"react";const i=n({});function a({className:n,invalid:r,...a}){return t(i,{value:{invalid:r},children:t(`fieldset`,{className:e(`m-0 border-none p-0 [&>*+*]:mt-6`,n),...a})})}a.displayName=`Fieldset`;function o({className:n,...r}){return t(`legend`,{className:e(`text-lg font-semibold text-strong`,n),...r})}o.displayName=`Fieldset.Legend`;function s({className:n,...r}){return t(`p`,{className:e(`text-sm text-subtle`,n),...r})}s.displayName=`Fieldset.HelperText`;function c({className:n,...a}){let{invalid:o}=r(i);return o?t(`p`,{role:`alert`,className:e(`text-sm text-subtle intent-danger`,n),...a}):null}c.displayName=`Fieldset.ErrorText`;const l=Object.assign(a,{Legend:o,HelperText:s,ErrorText:c});export{l as Fieldset};
|
|
3
2
|
//# sourceMappingURL=Fieldset.js.map
|
package/dist/Fieldset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Fieldset.js","names":[],"sources":["../src/components/Fieldset/index.tsx"],"sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── Context ─── */\n\ninterface FieldsetContextValue {\n invalid?: boolean\n}\n\nconst FieldsetContext = createContext<FieldsetContextValue>({})\n\n/* ─── Root ─── */\n\nexport interface FieldsetRootProps extends ComponentProps<'fieldset'> {\n invalid?: boolean\n}\n\nfunction FieldsetRoot({ className, invalid, ...props }: FieldsetRootProps) {\n return (\n <FieldsetContext value={{ invalid }}>\n <fieldset\n className={cn('m-0 border-none p-0 [&>*+*]:mt-6', className)}\n {...props}\n />\n </FieldsetContext>\n )\n}\n\nFieldsetRoot.displayName = 'Fieldset'\n\n/* ─── Legend ─── */\n\nexport interface FieldsetLegendProps extends ComponentProps<'legend'> {}\n\nfunction FieldsetLegend({ className, ...props }: FieldsetLegendProps) {\n return (\n <legend\n className={cn('text-lg font-semibold text-strong', className)}\n {...props}\n />\n )\n}\n\nFieldsetLegend.displayName = 'Fieldset.Legend'\n\n/* ─── Helper text ─── */\n\nexport interface FieldsetHelperTextProps extends ComponentProps<'p'> {}\n\nfunction FieldsetHelperText({ className, ...props }: FieldsetHelperTextProps) {\n return <p className={cn('text-sm text-subtle', className)} {...props} />\n}\n\nFieldsetHelperText.displayName = 'Fieldset.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface FieldsetErrorTextProps extends ComponentProps<'p'> {}\n\nfunction FieldsetErrorText({ className, ...props }: FieldsetErrorTextProps) {\n const { invalid } = use(FieldsetContext)\n if (!invalid) return null\n return (\n <p\n role='alert'\n className={cn('text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nFieldsetErrorText.displayName = 'Fieldset.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const Fieldset = Object.assign(FieldsetRoot, {\n Legend: FieldsetLegend,\n HelperText: FieldsetHelperText,\n ErrorText: FieldsetErrorText\n})\n\nexport type FieldsetProps = FieldsetRootProps\n"],"mappings":"kJAYA,MAAM,EAAkB,EAAoC,EAAE,CAAC,CAQ/D,SAAS,EAAa,CAAE,YAAW,UAAS,GAAG,GAA4B,CACzE,OACE,EAAC,EAAD,CAAiB,MAAO,CAAE,UAAS,UACjC,EAAC,WAAD,CACE,UAAW,EAAG,mCAAoC,EAAU,CAC5D,GAAI,EACJ,CAAA,CACc,CAAA,CAItB,EAAa,YAAc,WAM3B,SAAS,EAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAAC,SAAD,CACE,UAAW,EAAG,oCAAqC,EAAU,CAC7D,GAAI,EACJ,CAAA,CAIN,EAAe,YAAc,kBAM7B,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OAAO,EAAC,IAAD,CAAG,UAAW,EAAG,sBAAuB,EAAU,CAAE,GAAI,EAAS,CAAA,CAG1E,EAAmB,YAAc,sBAMjC,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,GAAM,CAAE,WAAY,EAAI,EAAgB,CAExC,OADK,EAEH,EAAC,IAAD,CACE,KAAK,QACL,UAAW,EAAG,oCAAqC,EAAU,CAC7D,GAAI,EACJ,CAAA,CANiB,KAUvB,EAAkB,YAAc,qBAIhC,MAAa,EAAW,OAAO,OAAO,EAAc,CAClD,OAAQ,EACR,WAAY,EACZ,UAAW,EACZ,CAAC"}
|
package/dist/Highlight.d.ts
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'class-variance-authority/types';
|
|
5
|
-
import 'class-variance-authority';
|
|
1
|
+
import { MarkProps } from "./Mark.js";
|
|
2
|
+
import { ReactElement } from "react";
|
|
6
3
|
|
|
4
|
+
//#region src/components/Highlight/index.d.ts
|
|
7
5
|
interface HighlightChunk {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
text: string;
|
|
7
|
+
match: boolean;
|
|
10
8
|
}
|
|
11
9
|
interface HighlightProps extends Omit<MarkProps, 'children'> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
text: string;
|
|
11
|
+
query: string | string[];
|
|
12
|
+
ignoreCase?: boolean;
|
|
13
|
+
matchAll?: boolean;
|
|
16
14
|
}
|
|
17
|
-
declare function Highlight({
|
|
15
|
+
declare function Highlight({
|
|
16
|
+
text,
|
|
17
|
+
query,
|
|
18
|
+
ignoreCase,
|
|
19
|
+
matchAll,
|
|
20
|
+
...markProps
|
|
21
|
+
}: HighlightProps): ReactElement;
|
|
18
22
|
declare namespace Highlight {
|
|
19
|
-
|
|
23
|
+
var displayName: string;
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
export { Highlight,
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Highlight, HighlightChunk, HighlightProps };
|
|
27
|
+
//# sourceMappingURL=Highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Highlight.d.ts","names":[],"sources":["../src/components/Highlight/index.tsx"],"mappings":";;;;UAMiB,cAAA;EACf,IAAA;EACA,KAAA;AAAA;AAAA,UAGe,cAAA,SAAuB,IAAA,CAAK,SAAA;EAC3C,IAAA;EACA,KAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,iBAoCc,SAAA,CAAA;EACd,IAAA;EACA,KAAA;EACA,UAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,cAAA,GAAiB,YAAA;AAAA,kBANJ,SAAA;EAAA,IAAS,WAAA;AAAA"}
|
package/dist/Highlight.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
export{a as Highlight}from'./_chunks/chunk-JBHYUOI2.js';import'./_chunks/chunk-WOU2B425.js';//# sourceMappingURL=Highlight.js.map
|
|
1
|
+
"use client";import{Mark as e}from"./Mark.js";import{Fragment as t,jsx as n}from"react/jsx-runtime";import{Fragment as r}from"react";function i(e,t,n=!0,r=!0){let i=(Array.isArray(t)?t:[t]).filter(e=>e.length>0);if(i.length===0)return[{text:e,match:!1}];let a=i.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),o=`${n?`i`:``}${r?`g`:``}`,s=RegExp(`(${a})`,o),c=RegExp(`^(${a})$`,n?`i`:``);return e.split(s).filter(e=>e.length>0).map(e=>({text:e,match:c.test(e)}))}function a({text:a,query:o,ignoreCase:s=!0,matchAll:c=!0,...l}){return!o||Array.isArray(o)&&o.length===0||o===``?n(t,{children:a}):n(t,{children:i(a,o,s,c).map((t,i)=>t.match?n(e,{...l,children:t.text},i):n(r,{children:t.text},i))})}a.displayName=`Highlight`;export{a as Highlight};
|
|
3
2
|
//# sourceMappingURL=Highlight.js.map
|
package/dist/Highlight.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Highlight.js","names":["Fragment"],"sources":["../src/components/Highlight/index.tsx"],"sourcesContent":["'use client'\n\nimport { Fragment, type ReactElement } from 'react'\n\nimport { Mark, type MarkProps } from '../Mark'\n\nexport interface HighlightChunk {\n text: string\n match: boolean\n}\n\nexport interface HighlightProps extends Omit<MarkProps, 'children'> {\n text: string\n query: string | string[]\n ignoreCase?: boolean\n matchAll?: boolean\n}\n\n/**\n * Split text into chunks, marking which parts match the query.\n */\nfunction highlight(\n text: string,\n query: string | string[],\n ignoreCase = true,\n matchAll = true\n): HighlightChunk[] {\n const queries = Array.isArray(query) ? query : [query]\n const validQueries = queries.filter((q) => q.length > 0)\n\n if (validQueries.length === 0) {\n return [{ text, match: false }]\n }\n\n const escaped = validQueries.map((q) =>\n q.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n )\n const pattern = escaped.join('|')\n const flags = `${ignoreCase ? 'i' : ''}${matchAll ? 'g' : ''}`\n const regex = new RegExp(`(${pattern})`, flags)\n\n const testRegex = new RegExp(`^(${pattern})$`, ignoreCase ? 'i' : '')\n const parts = text.split(regex)\n return parts\n .filter((part) => part.length > 0)\n .map((part) => ({\n text: part,\n match: testRegex.test(part)\n }))\n}\n\nexport function Highlight({\n text,\n query,\n ignoreCase = true,\n matchAll = true,\n ...markProps\n}: HighlightProps): ReactElement {\n const isQueryEmpty =\n !query || (Array.isArray(query) && query.length === 0) || query === ''\n\n if (isQueryEmpty) {\n return <>{text}</>\n }\n\n const chunks = highlight(text, query, ignoreCase, matchAll)\n\n return (\n <>\n {chunks.map((chunk, index) =>\n chunk.match ? (\n <Mark key={index} {...markProps}>\n {chunk.text}\n </Mark>\n ) : (\n <Fragment key={index}>{chunk.text}</Fragment>\n )\n )}\n </>\n )\n}\n\nHighlight.displayName = 'Highlight'\n"],"mappings":"qIAqBA,SAAS,EACP,EACA,EACA,EAAa,GACb,EAAW,GACO,CAElB,IAAM,GADU,MAAM,QAAQ,EAAM,CAAG,EAAQ,CAAC,EAAM,EACzB,OAAQ,GAAM,EAAE,OAAS,EAAE,CAExD,GAAI,EAAa,SAAW,EAC1B,MAAO,CAAC,CAAE,OAAM,MAAO,GAAO,CAAC,CAMjC,IAAM,EAHU,EAAa,IAAK,GAChC,EAAE,QAAQ,sBAAuB,OAAO,CACzC,CACuB,KAAK,IAAI,CAC3B,EAAQ,GAAG,EAAa,IAAM,KAAK,EAAW,IAAM,KACpD,EAAY,OAAO,IAAI,EAAQ,GAAI,EAAM,CAEzC,EAAgB,OAAO,KAAK,EAAQ,IAAK,EAAa,IAAM,GAAG,CAErE,OADc,EAAK,MAAM,EAAM,CAE5B,OAAQ,GAAS,EAAK,OAAS,EAAE,CACjC,IAAK,IAAU,CACd,KAAM,EACN,MAAO,EAAU,KAAK,EAAK,CAC5B,EAAE,CAGP,SAAgB,EAAU,CACxB,OACA,QACA,aAAa,GACb,WAAW,GACX,GAAG,GAC4B,CAU/B,MARE,CAAC,GAAU,MAAM,QAAQ,EAAM,EAAI,EAAM,SAAW,GAAM,IAAU,GAG7D,EAAA,EAAA,CAAA,SAAG,EAAQ,CAAA,CAMlB,EAAA,EAAA,CAAA,SAHa,EAAU,EAAM,EAAO,EAAY,EAAS,CAI/C,KAAK,EAAO,IAClB,EAAM,MACJ,EAAC,EAAD,CAAkB,GAAI,WACnB,EAAM,KACF,CAFI,EAEJ,CAEP,EAACA,EAAD,CAAA,SAAuB,EAAM,KAAgB,CAA9B,EAA8B,CAEhD,CACA,CAAA,CAIP,EAAU,YAAc"}
|
package/dist/Indicator.d.ts
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ComponentProps } from
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare function RequiredIndicator({
|
|
4
|
+
//#region src/components/Indicator/index.d.ts
|
|
5
|
+
interface RequiredIndicatorProps extends ComponentProps<'span'> {}
|
|
6
|
+
declare function RequiredIndicator({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: RequiredIndicatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
7
11
|
declare namespace RequiredIndicator {
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
interface OptionalIndicatorProps extends ComponentProps<'span'> {
|
|
12
|
+
var displayName: string;
|
|
11
13
|
}
|
|
12
|
-
|
|
14
|
+
interface OptionalIndicatorProps extends ComponentProps<'span'> {}
|
|
15
|
+
declare function OptionalIndicator({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}: OptionalIndicatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
13
20
|
declare namespace OptionalIndicator {
|
|
14
|
-
|
|
21
|
+
var displayName: string;
|
|
15
22
|
}
|
|
16
|
-
|
|
17
|
-
export { OptionalIndicator,
|
|
23
|
+
//#endregion
|
|
24
|
+
export { OptionalIndicator, OptionalIndicatorProps, RequiredIndicator, RequiredIndicatorProps };
|
|
25
|
+
//# sourceMappingURL=Indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Indicator.d.ts","names":[],"sources":["../src/components/Indicator/index.tsx"],"mappings":";;;;UAMiB,sBAAA,SAA+B,cAAA;AAAA,iBAEhC,iBAAA,CAAA;EACd,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAJT,iBAAA;EAAA,IAAiB,WAAA;AAAA;AAAA,UAoBhB,sBAAA,SAA+B,cAAA;AAAA,iBAEhC,iBAAA,CAAA;EACd,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAJT,iBAAA;EAAA,IAAiB,WAAA;AAAA"}
|
package/dist/Indicator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{cn as e}from"@oztix/roadie-core/utils";import{jsx as t}from"react/jsx-runtime";function n({className:n,children:r,...i}){return t(`span`,{"aria-hidden":`true`,className:e(`text-subtle intent-danger`,n),...i,children:r??`*`})}n.displayName=`RequiredIndicator`;function r({className:n,children:r,...i}){return t(`span`,{className:e(`text-sm text-subtle`,n),...i,children:r??`(optional)`})}r.displayName=`OptionalIndicator`;export{r as OptionalIndicator,n as RequiredIndicator};
|
|
2
2
|
//# sourceMappingURL=Indicator.js.map
|
package/dist/Indicator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Indicator.js","names":[],"sources":["../src/components/Indicator/index.tsx"],"sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── RequiredIndicator ─── */\n\nexport interface RequiredIndicatorProps extends ComponentProps<'span'> {}\n\nexport function RequiredIndicator({\n className,\n children,\n ...props\n}: RequiredIndicatorProps) {\n return (\n <span\n aria-hidden='true'\n className={cn('text-subtle intent-danger', className)}\n {...props}\n >\n {children ?? '*'}\n </span>\n )\n}\n\nRequiredIndicator.displayName = 'RequiredIndicator'\n\n/* ─── OptionalIndicator ─── */\n\nexport interface OptionalIndicatorProps extends ComponentProps<'span'> {}\n\nexport function OptionalIndicator({\n className,\n children,\n ...props\n}: OptionalIndicatorProps) {\n return (\n <span className={cn('text-sm text-subtle', className)} {...props}>\n {children ?? '(optional)'}\n </span>\n )\n}\n\nOptionalIndicator.displayName = 'OptionalIndicator'\n"],"mappings":"sFAQA,SAAgB,EAAkB,CAChC,YACA,WACA,GAAG,GACsB,CACzB,OACE,EAAC,OAAD,CACE,cAAY,OACZ,UAAW,EAAG,4BAA6B,EAAU,CACrD,GAAI,WAEH,GAAY,IACR,CAAA,CAIX,EAAkB,YAAc,oBAMhC,SAAgB,EAAkB,CAChC,YACA,WACA,GAAG,GACsB,CACzB,OACE,EAAC,OAAD,CAAM,UAAW,EAAG,sBAAuB,EAAU,CAAE,GAAI,WACxD,GAAY,aACR,CAAA,CAIX,EAAkB,YAAc"}
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import { ComponentProps } from
|
|
4
|
-
import
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
|
+
//#region src/components/Input/index.d.ts
|
|
6
7
|
declare const inputVariants: (props?: ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} &
|
|
11
|
-
interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof inputVariants> {
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
intent?: "neutral" | "brand" | "brand-secondary" | "accent" | "danger" | "success" | "warning" | "info" | null | undefined;
|
|
9
|
+
emphasis?: "normal" | "subtle" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
|
+
interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof inputVariants> {}
|
|
13
|
+
declare function Input({
|
|
14
|
+
className,
|
|
15
|
+
intent,
|
|
16
|
+
emphasis,
|
|
17
|
+
size,
|
|
18
|
+
type,
|
|
19
|
+
...props
|
|
20
|
+
}: InputProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
21
|
declare namespace Input {
|
|
15
|
-
|
|
22
|
+
var displayName: string;
|
|
16
23
|
}
|
|
17
|
-
|
|
18
|
-
export { Input,
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Input, InputProps, inputVariants };
|
|
26
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","names":[],"sources":["../src/components/Input/index.tsx"],"mappings":";;;;;;cAUa,aAAA,GAAa,KAAA;;;;IAkBxB,iCAAA,CAAA,SAAA;AAAA,UAEe,UAAA,SACP,IAAA,CAAK,cAAA,oBACX,YAAA,QAAoB,aAAA;AAAA,iBAER,KAAA,CAAA;EACd,SAAA;EACA,MAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EAAA,GACG;AAAA,GACF,UAAA,GAAU,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAPG,KAAA;EAAA,IAAK,WAAA;AAAA"}
|
package/dist/Input.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
export{b as Input,a as inputVariants}from'./_chunks/chunk-VSKUGXQG.js';import'./_chunks/chunk-4LGCF3SN.js';//# sourceMappingURL=Input.js.map
|
|
1
|
+
"use client";import{t as e}from"./variants-DTAwzBl3.js";import{cva as t}from"class-variance-authority";import{cn as n}from"@oztix/roadie-core/utils";import{jsx as r}from"react/jsx-runtime";const i=t(`w-full rounded-lg font-sans`,{variants:{intent:e,emphasis:{normal:`emphasis-sunken border border-subtle is-interactive-field`,subtle:`bg-subtle text-normal border border-transparent is-interactive-field`},size:{sm:`h-8 px-1.5 text-base`,md:`h-10 px-2 text-base`,lg:`h-12 px-2 text-base`}},defaultVariants:{emphasis:`normal`,size:`md`}});function a({className:e,intent:t,emphasis:a,size:o,type:s=`text`,...c}){return r(`input`,{type:s,className:n(i({intent:t,emphasis:a,size:o,className:e})),...c})}a.displayName=`Input`;export{a as Input,i as inputVariants};
|
|
3
2
|
//# sourceMappingURL=Input.js.map
|
package/dist/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Input.js","names":[],"sources":["../src/components/Input/index.tsx"],"sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const inputVariants = cva('w-full rounded-lg font-sans', {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal: 'emphasis-sunken border border-subtle is-interactive-field',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n})\n\nexport interface InputProps\n extends Omit<ComponentProps<'input'>, 'size'>,\n VariantProps<typeof inputVariants> {}\n\nexport function Input({\n className,\n intent,\n emphasis,\n size,\n type = 'text',\n ...props\n}: InputProps) {\n return (\n <input\n type={type}\n className={cn(inputVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nInput.displayName = 'Input'\n"],"mappings":"6LAUA,MAAa,EAAgB,EAAI,8BAA+B,CAC9D,SAAU,CACR,OAAQ,EACR,SAAU,CACR,OAAQ,4DACR,OACE,uEACH,CACD,KAAM,CACJ,GAAI,uBACJ,GAAI,sBACJ,GAAI,sBACL,CACF,CACD,gBAAiB,CACf,SAAU,SACV,KAAM,KACP,CACF,CAAC,CAMF,SAAgB,EAAM,CACpB,YACA,SACA,WACA,OACA,OAAO,OACP,GAAG,GACU,CACb,OACE,EAAC,QAAD,CACQ,OACN,UAAW,EAAG,EAAc,CAAE,SAAQ,WAAU,OAAM,YAAW,CAAC,CAAC,CACnE,GAAI,EACJ,CAAA,CAIN,EAAM,YAAc"}
|
package/dist/Label.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ComponentProps } from
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare function Label({
|
|
4
|
+
//#region src/components/Label/index.d.ts
|
|
5
|
+
interface LabelProps extends ComponentProps<'label'> {}
|
|
6
|
+
declare function Label({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: LabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
7
10
|
declare namespace Label {
|
|
8
|
-
|
|
11
|
+
var displayName: string;
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
export { Label,
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Label, LabelProps };
|
|
15
|
+
//# sourceMappingURL=Label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","names":[],"sources":["../src/components/Label/index.tsx"],"mappings":";;;;UAIiB,UAAA,SAAmB,cAAA;AAAA,iBAEpB,KAAA,CAAA;EAAQ,SAAA;EAAA,GAAc;AAAA,GAAS,UAAA,GAAU,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAzC,KAAA;EAAA,IAAK,WAAA;AAAA"}
|
package/dist/Label.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{cn as e}from"@oztix/roadie-core/utils";import{jsx as t}from"react/jsx-runtime";function n({className:n,...r}){return t(`label`,{className:e(`text-sm font-medium text-normal`,n),...r})}n.displayName=`Label`;export{n as Label};
|
|
2
2
|
//# sourceMappingURL=Label.js.map
|
package/dist/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Label.js","names":[],"sources":["../src/components/Label/index.tsx"],"sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport interface LabelProps extends ComponentProps<'label'> {}\n\nexport function Label({ className, ...props }: LabelProps) {\n return (\n <label\n className={cn('text-sm font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nLabel.displayName = 'Label'\n"],"mappings":"sFAMA,SAAgB,EAAM,CAAE,YAAW,GAAG,GAAqB,CACzD,OACE,EAAC,QAAD,CACE,UAAW,EAAG,kCAAmC,EAAU,CAC3D,GAAI,EACJ,CAAA,CAIN,EAAM,YAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./Button-CDQ6ik0P.js";import{cn as t}from"@oztix/roadie-core/utils";import{jsx as n}from"react/jsx-runtime";function r({as:r,className:i,intent:a,emphasis:o,size:s,...c}){return n(r||`a`,{className:t(e({intent:a,emphasis:o,size:s,className:i})),...c})}r.displayName=`LinkButton`;function i({as:r,className:i,intent:a,emphasis:o,size:s=`icon-md`,...c}){return n(r||`a`,{className:t(e({intent:a,emphasis:o,size:s,className:i})),...c})}i.displayName=`LinkIconButton`;export{r as n,i as t};
|
|
2
|
+
//# sourceMappingURL=LinkButton-9nnOzX_0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkButton-9nnOzX_0.js","names":[],"sources":["../src/components/LinkButton/LinkButton.tsx","../src/components/LinkButton/LinkIconButton.tsx"],"sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { buttonVariants } from '../Button/Button'\n\ntype LinkButtonSize = 'xs' | 'sm' | 'md' | 'lg'\n\nexport type LinkButtonProps<T extends ElementType = 'a'> = {\n as?: T\n intent?: VariantProps<typeof buttonVariants>['intent']\n emphasis?: VariantProps<typeof buttonVariants>['emphasis']\n size?: LinkButtonSize\n className?: string\n} & Omit<ComponentProps<T>, 'as' | 'intent' | 'emphasis' | 'size' | 'className'>\n\nexport function LinkButton<T extends ElementType = 'a'>({\n as,\n className,\n intent,\n emphasis,\n size,\n ...props\n}: LinkButtonProps<T>) {\n const Component = as || 'a'\n return (\n <Component\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nLinkButton.displayName = 'LinkButton'\n","import type { ComponentProps, ElementType } from 'react'\n\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { buttonVariants } from '../Button/Button'\n\ntype LinkIconButtonSize = 'icon-xs' | 'icon-sm' | 'icon-md' | 'icon-lg'\n\nexport type LinkIconButtonProps<T extends ElementType = 'a'> = {\n as?: T\n 'aria-label': string\n intent?: VariantProps<typeof buttonVariants>['intent']\n emphasis?: VariantProps<typeof buttonVariants>['emphasis']\n size?: LinkIconButtonSize\n className?: string\n} & Omit<\n ComponentProps<T>,\n 'as' | 'aria-label' | 'intent' | 'emphasis' | 'size' | 'className'\n>\n\nexport function LinkIconButton<T extends ElementType = 'a'>({\n as,\n className,\n intent,\n emphasis,\n size = 'icon-md',\n ...props\n}: LinkIconButtonProps<T>) {\n const Component = as || 'a'\n return (\n <Component\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nLinkIconButton.displayName = 'LinkIconButton'\n"],"mappings":"+HAkBA,SAAgB,EAAwC,CACtD,KACA,YACA,SACA,WACA,OACA,GAAG,GACkB,CAErB,OACE,EAFgB,GAAM,IAEtB,CACE,UAAW,EAAG,EAAe,CAAE,SAAQ,WAAU,OAAM,YAAW,CAAC,CAAC,CACpE,GAAI,EACJ,CAAA,CAIN,EAAW,YAAc,aCbzB,SAAgB,EAA4C,CAC1D,KACA,YACA,SACA,WACA,OAAO,UACP,GAAG,GACsB,CAEzB,OACE,EAFgB,GAAM,IAEtB,CACE,UAAW,EAAG,EAAe,CAAE,SAAQ,WAAU,OAAM,YAAW,CAAC,CAAC,CACpE,GAAI,EACJ,CAAA,CAIN,EAAe,YAAc"}
|
package/dist/LinkButton.d.ts
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { b as buttonVariants } from './Button-fnIVmjIB.js';
|
|
5
|
-
import 'class-variance-authority/types';
|
|
6
|
-
import '@base-ui/react/button';
|
|
7
|
-
|
|
8
|
-
type LinkButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
9
|
-
type LinkButtonProps<T extends ElementType = 'a'> = {
|
|
10
|
-
as?: T;
|
|
11
|
-
intent?: VariantProps<typeof buttonVariants>['intent'];
|
|
12
|
-
emphasis?: VariantProps<typeof buttonVariants>['emphasis'];
|
|
13
|
-
size?: LinkButtonSize;
|
|
14
|
-
className?: string;
|
|
15
|
-
} & Omit<ComponentProps<T>, 'as' | 'intent' | 'emphasis' | 'size' | 'className'>;
|
|
16
|
-
declare function LinkButton<T extends ElementType = 'a'>({ as, className, intent, emphasis, size, ...props }: LinkButtonProps<T>): react_jsx_runtime.JSX.Element;
|
|
17
|
-
declare namespace LinkButton {
|
|
18
|
-
var displayName: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type LinkIconButtonSize = 'icon-xs' | 'icon-sm' | 'icon-md' | 'icon-lg';
|
|
22
|
-
type LinkIconButtonProps<T extends ElementType = 'a'> = {
|
|
23
|
-
as?: T;
|
|
24
|
-
'aria-label': string;
|
|
25
|
-
intent?: VariantProps<typeof buttonVariants>['intent'];
|
|
26
|
-
emphasis?: VariantProps<typeof buttonVariants>['emphasis'];
|
|
27
|
-
size?: LinkIconButtonSize;
|
|
28
|
-
className?: string;
|
|
29
|
-
} & Omit<ComponentProps<T>, 'as' | 'aria-label' | 'intent' | 'emphasis' | 'size' | 'className'>;
|
|
30
|
-
declare function LinkIconButton<T extends ElementType = 'a'>({ as, className, intent, emphasis, size, ...props }: LinkIconButtonProps<T>): react_jsx_runtime.JSX.Element;
|
|
31
|
-
declare namespace LinkIconButton {
|
|
32
|
-
var displayName: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { LinkButton, type LinkButtonProps, LinkIconButton, type LinkIconButtonProps };
|
|
1
|
+
import { i as LinkButtonProps, n as LinkIconButtonProps, r as LinkButton, t as LinkIconButton } from "./index-0w-ydb3o.js";
|
|
2
|
+
export { LinkButton, LinkButtonProps, LinkIconButton, LinkIconButtonProps };
|
package/dist/LinkButton.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=LinkButton.js.map
|
|
1
|
+
import{n as e,t}from"./LinkButton-9nnOzX_0.js";export{e as LinkButton,t as LinkIconButton};
|
package/dist/Mark.d.ts
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { ComponentProps, ElementType } from "react";
|
|
4
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
|
+
//#region src/components/Mark/index.d.ts
|
|
6
7
|
declare const markVariants: (props?: ({
|
|
7
|
-
|
|
8
|
-
} &
|
|
8
|
+
intent?: "neutral" | "brand" | "brand-secondary" | "accent" | "danger" | "success" | "warning" | "info" | "neutral-inverted" | null | undefined;
|
|
9
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
9
10
|
type MarkProps<T extends ElementType = 'mark'> = {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
as?: T;
|
|
12
|
+
className?: string;
|
|
12
13
|
} & VariantProps<typeof markVariants> & Omit<ComponentProps<T>, 'as' | 'className'>;
|
|
13
|
-
declare function Mark<T extends ElementType = 'mark'>({
|
|
14
|
+
declare function Mark<T extends ElementType = 'mark'>({
|
|
15
|
+
as,
|
|
16
|
+
className,
|
|
17
|
+
intent,
|
|
18
|
+
...props
|
|
19
|
+
}: MarkProps<T>): _$react_jsx_runtime0.JSX.Element;
|
|
14
20
|
declare namespace Mark {
|
|
15
|
-
|
|
21
|
+
var displayName: string;
|
|
16
22
|
}
|
|
17
|
-
|
|
18
|
-
export { Mark,
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Mark, MarkProps, markVariants };
|
|
25
|
+
//# sourceMappingURL=Mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mark.d.ts","names":[],"sources":["../src/components/Mark/index.tsx"],"mappings":";;;;;;cAMa,YAAA,GAAY,KAAA;;IAkBxB,iCAAA,CAAA,SAAA;AAAA,KAEW,SAAA,WAAoB,WAAA;EAC9B,EAAA,GAAK,CAAA;EACL,SAAA;AAAA,IACE,YAAA,QAAoB,YAAA,IACtB,IAAA,CAAK,cAAA,CAAe,CAAA;AAAA,iBAIN,IAAA,WAAe,WAAA,UAAA,CAAA;EAC7B,EAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,SAAA,CAAU,CAAA,IAAE,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBALC,IAAA;EAAA,IAAI,WAAA;AAAA"}
|
package/dist/Mark.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{cva as e}from"class-variance-authority";import{cn as t}from"@oztix/roadie-core/utils";import{jsx as n}from"react/jsx-runtime";const r=e(`inline-block justify-self-start self-start px-[0.1em] py-[0.05em]`,{variants:{intent:{neutral:`intent-neutral`,"neutral-inverted":`intent-neutral`,brand:`intent-brand`,"brand-secondary":`intent-brand-secondary`,accent:`intent-accent`,danger:`intent-danger`,success:`intent-success`,warning:`intent-warning`,info:`intent-info`}},defaultVariants:{intent:`info`}}),i=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]);function a({as:e,className:a,intent:o,...s}){let c=e||`mark`,l=typeof c==`string`&&i.has(c),u=o===`neutral-inverted`;return n(c,{className:t(r({intent:o}),u?`bg-neutral-0 text-neutral-13`:`bg-mark text-mark`,l&&`px-[0.4em] py-[0.2em]`,a),...s})}a.displayName=`Mark`;export{a as Mark,r as markVariants};
|
|
2
2
|
//# sourceMappingURL=Mark.js.map
|
package/dist/Mark.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Mark.js","names":[],"sources":["../src/components/Mark/index.tsx"],"sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport const markVariants = cva(\n 'inline-block justify-self-start self-start px-[0.1em] py-[0.05em]',\n {\n variants: {\n intent: {\n neutral: 'intent-neutral',\n 'neutral-inverted': 'intent-neutral',\n brand: 'intent-brand',\n 'brand-secondary': 'intent-brand-secondary',\n accent: 'intent-accent',\n danger: 'intent-danger',\n success: 'intent-success',\n warning: 'intent-warning',\n info: 'intent-info'\n }\n },\n defaultVariants: { intent: 'info' }\n }\n)\n\nexport type MarkProps<T extends ElementType = 'mark'> = {\n as?: T\n className?: string\n} & VariantProps<typeof markVariants> &\n Omit<ComponentProps<T>, 'as' | 'className'>\n\nconst headingElements = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])\n\nexport function Mark<T extends ElementType = 'mark'>({\n as,\n className,\n intent,\n ...props\n}: MarkProps<T>) {\n const Component = as || 'mark'\n const isHeading =\n typeof Component === 'string' && headingElements.has(Component)\n const isNeutralInverted = intent === 'neutral-inverted'\n return (\n <Component\n className={cn(\n markVariants({ intent }),\n isNeutralInverted\n ? 'bg-neutral-0 text-neutral-13'\n : 'bg-mark text-mark',\n isHeading && 'px-[0.4em] py-[0.2em]',\n className\n )}\n {...props}\n />\n )\n}\n\nMark.displayName = 'Mark'\n"],"mappings":"qIAMA,MAAa,EAAe,EAC1B,oEACA,CACE,SAAU,CACR,OAAQ,CACN,QAAS,iBACT,mBAAoB,iBACpB,MAAO,eACP,kBAAmB,yBACnB,OAAQ,gBACR,OAAQ,gBACR,QAAS,iBACT,QAAS,iBACT,KAAM,cACP,CACF,CACD,gBAAiB,CAAE,OAAQ,OAAQ,CACpC,CACF,CAQK,EAAkB,IAAI,IAAI,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAK,CAAC,CAErE,SAAgB,EAAqC,CACnD,KACA,YACA,SACA,GAAG,GACY,CACf,IAAM,EAAY,GAAM,OAClB,EACJ,OAAO,GAAc,UAAY,EAAgB,IAAI,EAAU,CAC3D,EAAoB,IAAW,mBACrC,OACE,EAAC,EAAD,CACE,UAAW,EACT,EAAa,CAAE,SAAQ,CAAC,CACxB,EACI,+BACA,oBACJ,GAAa,wBACb,EACD,CACD,GAAI,EACJ,CAAA,CAIN,EAAK,YAAc"}
|