@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.
Files changed (164) hide show
  1. package/dist/Accordion.d.ts +42 -21
  2. package/dist/Accordion.d.ts.map +1 -0
  3. package/dist/Accordion.js +1 -2
  4. package/dist/Accordion.js.map +1 -1
  5. package/dist/Autocomplete.d.ts +101 -60
  6. package/dist/Autocomplete.d.ts.map +1 -0
  7. package/dist/Autocomplete.js +1 -2
  8. package/dist/Autocomplete.js.map +1 -1
  9. package/dist/Badge.d.ts +27 -16
  10. package/dist/Badge.d.ts.map +1 -0
  11. package/dist/Badge.js +1 -1
  12. package/dist/Badge.js.map +1 -1
  13. package/dist/Breadcrumb.d.ts +45 -23
  14. package/dist/Breadcrumb.d.ts.map +1 -0
  15. package/dist/Breadcrumb.js +1 -1
  16. package/dist/Breadcrumb.js.map +1 -1
  17. package/dist/Button-CDQ6ik0P.js +2 -0
  18. package/dist/Button-CDQ6ik0P.js.map +1 -0
  19. package/dist/Button-DdE0vCfo.js +2 -0
  20. package/dist/Button-DdE0vCfo.js.map +1 -0
  21. package/dist/Button-Dt1TGgrL.d.ts +26 -0
  22. package/dist/Button-Dt1TGgrL.d.ts.map +1 -0
  23. package/dist/Button.d.ts +3 -17
  24. package/dist/Button.js +1 -2
  25. package/dist/Card.d.ts +56 -30
  26. package/dist/Card.d.ts.map +1 -0
  27. package/dist/Card.js +1 -1
  28. package/dist/Card.js.map +1 -1
  29. package/dist/Code.d.ts +19 -13
  30. package/dist/Code.d.ts.map +1 -0
  31. package/dist/Code.js +1 -1
  32. package/dist/Code.js.map +1 -1
  33. package/dist/Combobox.d.ts +111 -63
  34. package/dist/Combobox.d.ts.map +1 -0
  35. package/dist/Combobox.js +1 -2
  36. package/dist/Combobox.js.map +1 -1
  37. package/dist/Field.d.ts +63 -46
  38. package/dist/Field.d.ts.map +1 -0
  39. package/dist/Field.js +1 -2
  40. package/dist/Field.js.map +1 -1
  41. package/dist/Fieldset.d.ts +34 -22
  42. package/dist/Fieldset.d.ts.map +1 -0
  43. package/dist/Fieldset.js +1 -2
  44. package/dist/Fieldset.js.map +1 -1
  45. package/dist/Highlight.d.ts +20 -15
  46. package/dist/Highlight.d.ts.map +1 -0
  47. package/dist/Highlight.js +1 -2
  48. package/dist/Highlight.js.map +1 -1
  49. package/dist/Indicator.d.ts +20 -12
  50. package/dist/Indicator.d.ts.map +1 -0
  51. package/dist/Indicator.js +1 -1
  52. package/dist/Indicator.js.map +1 -1
  53. package/dist/Input.d.ts +22 -14
  54. package/dist/Input.d.ts.map +1 -0
  55. package/dist/Input.js +1 -2
  56. package/dist/Input.js.map +1 -1
  57. package/dist/Label.d.ts +12 -8
  58. package/dist/Label.d.ts.map +1 -0
  59. package/dist/Label.js +1 -1
  60. package/dist/Label.js.map +1 -1
  61. package/dist/LinkButton-9nnOzX_0.js +2 -0
  62. package/dist/LinkButton-9nnOzX_0.js.map +1 -0
  63. package/dist/LinkButton.d.ts +2 -35
  64. package/dist/LinkButton.js +1 -2
  65. package/dist/Mark.d.ts +19 -12
  66. package/dist/Mark.d.ts.map +1 -0
  67. package/dist/Mark.js +1 -1
  68. package/dist/Mark.js.map +1 -1
  69. package/dist/Marquee.d.ts +27 -16
  70. package/dist/Marquee.d.ts.map +1 -0
  71. package/dist/Marquee.js +5 -2
  72. package/dist/Marquee.js.map +1 -1
  73. package/dist/Prose.d.ts +19 -12
  74. package/dist/Prose.d.ts.map +1 -0
  75. package/dist/Prose.js +1 -1
  76. package/dist/Prose.js.map +1 -1
  77. package/dist/RadioGroup.d.ts +62 -38
  78. package/dist/RadioGroup.d.ts.map +1 -0
  79. package/dist/RadioGroup.js +1 -2
  80. package/dist/RadioGroup.js.map +1 -1
  81. package/dist/Select.d.ts +129 -73
  82. package/dist/Select.d.ts.map +1 -0
  83. package/dist/Select.js +1 -2
  84. package/dist/Select.js.map +1 -1
  85. package/dist/Separator.d.ts +17 -12
  86. package/dist/Separator.d.ts.map +1 -0
  87. package/dist/Separator.js +1 -1
  88. package/dist/Separator.js.map +1 -1
  89. package/dist/SpotIllustration.d.ts +71 -50
  90. package/dist/SpotIllustration.d.ts.map +1 -0
  91. package/dist/SpotIllustration.js +1 -2
  92. package/dist/SpotIllustration.js.map +1 -1
  93. package/dist/Steps.d.ts +102 -62
  94. package/dist/Steps.d.ts.map +1 -0
  95. package/dist/Steps.js +1 -2
  96. package/dist/Steps.js.map +1 -1
  97. package/dist/Textarea.d.ts +22 -13
  98. package/dist/Textarea.d.ts.map +1 -0
  99. package/dist/Textarea.js +1 -2
  100. package/dist/Textarea.js.map +1 -1
  101. package/dist/index-0w-ydb3o.d.ts +50 -0
  102. package/dist/index-0w-ydb3o.d.ts.map +1 -0
  103. package/dist/index-C3_4djmE.d.ts +17 -0
  104. package/dist/index-C3_4djmE.d.ts.map +1 -0
  105. package/dist/index.d.ts +47 -49
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +23 -23
  108. package/dist/index.js.map +1 -1
  109. package/dist/variants-DTAwzBl3.js +2 -0
  110. package/dist/variants-DTAwzBl3.js.map +1 -0
  111. package/package.json +6 -5
  112. package/dist/Button-fnIVmjIB.d.ts +0 -18
  113. package/dist/Button.js.map +0 -1
  114. package/dist/LinkButton.js.map +0 -1
  115. package/dist/_chunks/chunk-3H22EQQ6.js +0 -2
  116. package/dist/_chunks/chunk-3H22EQQ6.js.map +0 -1
  117. package/dist/_chunks/chunk-42UB7PQB.js +0 -3
  118. package/dist/_chunks/chunk-42UB7PQB.js.map +0 -1
  119. package/dist/_chunks/chunk-4LGCF3SN.js +0 -3
  120. package/dist/_chunks/chunk-4LGCF3SN.js.map +0 -1
  121. package/dist/_chunks/chunk-AFSDN4WI.js +0 -2
  122. package/dist/_chunks/chunk-AFSDN4WI.js.map +0 -1
  123. package/dist/_chunks/chunk-BQEJDV7D.js +0 -3
  124. package/dist/_chunks/chunk-BQEJDV7D.js.map +0 -1
  125. package/dist/_chunks/chunk-DRVUAPKN.js +0 -2
  126. package/dist/_chunks/chunk-DRVUAPKN.js.map +0 -1
  127. package/dist/_chunks/chunk-EKOEXSAP.js +0 -2
  128. package/dist/_chunks/chunk-EKOEXSAP.js.map +0 -1
  129. package/dist/_chunks/chunk-FQNVMKKV.js +0 -7
  130. package/dist/_chunks/chunk-FQNVMKKV.js.map +0 -1
  131. package/dist/_chunks/chunk-IEDKSZAQ.js +0 -3
  132. package/dist/_chunks/chunk-IEDKSZAQ.js.map +0 -1
  133. package/dist/_chunks/chunk-JBHYUOI2.js +0 -3
  134. package/dist/_chunks/chunk-JBHYUOI2.js.map +0 -1
  135. package/dist/_chunks/chunk-JGTZ3GCR.js +0 -2
  136. package/dist/_chunks/chunk-JGTZ3GCR.js.map +0 -1
  137. package/dist/_chunks/chunk-LHNOY24C.js +0 -2
  138. package/dist/_chunks/chunk-LHNOY24C.js.map +0 -1
  139. package/dist/_chunks/chunk-LMV3JECI.js +0 -3
  140. package/dist/_chunks/chunk-LMV3JECI.js.map +0 -1
  141. package/dist/_chunks/chunk-MDRAL676.js +0 -3
  142. package/dist/_chunks/chunk-MDRAL676.js.map +0 -1
  143. package/dist/_chunks/chunk-N2HGY7W7.js +0 -3
  144. package/dist/_chunks/chunk-N2HGY7W7.js.map +0 -1
  145. package/dist/_chunks/chunk-NRVNUMJE.js +0 -2
  146. package/dist/_chunks/chunk-NRVNUMJE.js.map +0 -1
  147. package/dist/_chunks/chunk-OIAETOZT.js +0 -3
  148. package/dist/_chunks/chunk-OIAETOZT.js.map +0 -1
  149. package/dist/_chunks/chunk-OIZX63GZ.js +0 -2
  150. package/dist/_chunks/chunk-OIZX63GZ.js.map +0 -1
  151. package/dist/_chunks/chunk-OPR5JL7N.js +0 -3
  152. package/dist/_chunks/chunk-OPR5JL7N.js.map +0 -1
  153. package/dist/_chunks/chunk-SCS7WZ6Z.js +0 -3
  154. package/dist/_chunks/chunk-SCS7WZ6Z.js.map +0 -1
  155. package/dist/_chunks/chunk-VSKUGXQG.js +0 -3
  156. package/dist/_chunks/chunk-VSKUGXQG.js.map +0 -1
  157. package/dist/_chunks/chunk-WOU2B425.js +0 -3
  158. package/dist/_chunks/chunk-WOU2B425.js.map +0 -1
  159. package/dist/_chunks/chunk-XERFFH3S.js +0 -3
  160. package/dist/_chunks/chunk-XERFFH3S.js.map +0 -1
  161. package/dist/_chunks/chunk-XRFHVFJ5.js +0 -3
  162. package/dist/_chunks/chunk-XRFHVFJ5.js.map +0 -1
  163. package/dist/_chunks/chunk-ZXR32FYA.js +0 -2
  164. package/dist/_chunks/chunk-ZXR32FYA.js.map +0 -1
package/dist/Field.d.ts CHANGED
@@ -1,71 +1,88 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
3
- import { InputProps } from './Input.js';
4
- import { LabelProps } from './Label.js';
5
- import { TextareaProps } from './Textarea.js';
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
- invalid?: boolean;
11
- required?: boolean;
12
- disabled?: boolean;
13
- fieldId: string;
14
- labelId: string;
15
- helperTextId: string;
16
- errorTextId: string;
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
- invalid?: boolean;
21
- required?: boolean;
22
- disabled?: boolean;
19
+ invalid?: boolean;
20
+ required?: boolean;
21
+ disabled?: boolean;
23
22
  }
24
- declare function FieldRoot({ className, invalid, required, disabled, ...props }: FieldRootProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
31
+ var displayName: string;
27
32
  }
28
33
  interface FieldLabelProps extends LabelProps {
29
- showIndicator?: boolean;
34
+ showIndicator?: boolean;
30
35
  }
31
- declare function FieldLabel({ htmlFor, showIndicator, children, ...props }: FieldLabelProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
43
+ var displayName: string;
34
44
  }
35
45
  declare function useFieldInputProps(): {
36
- id: string | undefined;
37
- disabled: true | undefined;
38
- 'aria-invalid': true | undefined;
39
- 'aria-required': true | undefined;
40
- 'aria-describedby': string | undefined;
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): react_jsx_runtime.JSX.Element;
52
+ declare function FieldInput(props: InputProps): _$react_jsx_runtime0.JSX.Element;
43
53
  declare namespace FieldInput {
44
- var displayName: string;
54
+ var displayName: string;
45
55
  }
46
- declare function FieldTextarea(props: TextareaProps): react_jsx_runtime.JSX.Element;
56
+ declare function FieldTextarea(props: TextareaProps): _$react_jsx_runtime0.JSX.Element;
47
57
  declare namespace FieldTextarea {
48
- var displayName: string;
58
+ var displayName: string;
49
59
  }
50
- interface FieldHelperTextProps extends ComponentProps<'p'> {
51
- }
52
- declare function FieldHelperText({ id, className, ...props }: FieldHelperTextProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
55
- }
56
- interface FieldErrorTextProps extends ComponentProps<'p'> {
67
+ var displayName: string;
57
68
  }
58
- declare function FieldErrorText({ id, className, ...props }: FieldErrorTextProps): react_jsx_runtime.JSX.Element | null;
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
- var displayName: string;
76
+ var displayName: string;
61
77
  }
62
78
  declare const Field: typeof FieldRoot & {
63
- Label: typeof FieldLabel;
64
- Input: typeof FieldInput;
65
- Textarea: typeof FieldTextarea;
66
- HelperText: typeof FieldHelperText;
67
- ErrorText: typeof FieldErrorText;
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, type FieldErrorTextProps, type FieldHelperTextProps, type FieldLabelProps, type FieldProps, type FieldRootProps, useFieldContext, useFieldInputProps };
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,"sources":[],"names":[],"mappings":"","file":"Field.js"}
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"}
@@ -1,36 +1,48 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
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
- invalid?: boolean;
6
+ invalid?: boolean;
6
7
  }
7
- declare function FieldsetRoot({ className, invalid, ...props }: FieldsetRootProps): react_jsx_runtime.JSX.Element;
8
+ declare function FieldsetRoot({
9
+ className,
10
+ invalid,
11
+ ...props
12
+ }: FieldsetRootProps): _$react_jsx_runtime0.JSX.Element;
8
13
  declare namespace FieldsetRoot {
9
- var displayName: string;
14
+ var displayName: string;
10
15
  }
11
- interface FieldsetLegendProps extends ComponentProps<'legend'> {
12
- }
13
- declare function FieldsetLegend({ className, ...props }: FieldsetLegendProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
16
- }
17
- interface FieldsetHelperTextProps extends ComponentProps<'p'> {
22
+ var displayName: string;
18
23
  }
19
- declare function FieldsetHelperText({ className, ...props }: FieldsetHelperTextProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
30
+ var displayName: string;
22
31
  }
23
- interface FieldsetErrorTextProps extends ComponentProps<'p'> {
24
- }
25
- declare function FieldsetErrorText({ className, ...props }: FieldsetErrorTextProps): react_jsx_runtime.JSX.Element | null;
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
- var displayName: string;
38
+ var displayName: string;
28
39
  }
29
40
  declare const Fieldset: typeof FieldsetRoot & {
30
- Legend: typeof FieldsetLegend;
31
- HelperText: typeof FieldsetHelperText;
32
- ErrorText: typeof FieldsetErrorText;
41
+ Legend: typeof FieldsetLegend;
42
+ HelperText: typeof FieldsetHelperText;
43
+ ErrorText: typeof FieldsetErrorText;
33
44
  };
34
45
  type FieldsetProps = FieldsetRootProps;
35
-
36
- export { Fieldset, type FieldsetErrorTextProps, type FieldsetHelperTextProps, type FieldsetLegendProps, type FieldsetProps, type FieldsetRootProps };
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
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Fieldset.js"}
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"}
@@ -1,22 +1,27 @@
1
- import { ReactElement } from 'react';
2
- import { MarkProps } from './Mark.js';
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
- text: string;
9
- match: boolean;
6
+ text: string;
7
+ match: boolean;
10
8
  }
11
9
  interface HighlightProps extends Omit<MarkProps, 'children'> {
12
- text: string;
13
- query: string | string[];
14
- ignoreCase?: boolean;
15
- matchAll?: boolean;
10
+ text: string;
11
+ query: string | string[];
12
+ ignoreCase?: boolean;
13
+ matchAll?: boolean;
16
14
  }
17
- declare function Highlight({ text, query, ignoreCase, matchAll, ...markProps }: HighlightProps): ReactElement;
15
+ declare function Highlight({
16
+ text,
17
+ query,
18
+ ignoreCase,
19
+ matchAll,
20
+ ...markProps
21
+ }: HighlightProps): ReactElement;
18
22
  declare namespace Highlight {
19
- var displayName: string;
23
+ var displayName: string;
20
24
  }
21
-
22
- export { Highlight, type HighlightChunk, type HighlightProps };
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
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Highlight.js"}
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"}
@@ -1,17 +1,25 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { ComponentProps } from "react";
3
3
 
4
- interface RequiredIndicatorProps extends ComponentProps<'span'> {
5
- }
6
- declare function RequiredIndicator({ className, children, ...props }: RequiredIndicatorProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
9
- }
10
- interface OptionalIndicatorProps extends ComponentProps<'span'> {
12
+ var displayName: string;
11
13
  }
12
- declare function OptionalIndicator({ className, children, ...props }: OptionalIndicatorProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
21
+ var displayName: string;
15
22
  }
16
-
17
- export { OptionalIndicator, type OptionalIndicatorProps, RequiredIndicator, type RequiredIndicatorProps };
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
- export{b as OptionalIndicator,a as RequiredIndicator}from'./_chunks/chunk-LMV3JECI.js';//# sourceMappingURL=Indicator.js.map
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
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Indicator.js"}
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 * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import { ComponentProps } from 'react';
4
- import { VariantProps } from 'class-variance-authority';
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
- intent?: "neutral" | "brand" | "brand-secondary" | "accent" | "danger" | "success" | "warning" | "info" | null | undefined;
8
- emphasis?: "normal" | "subtle" | null | undefined;
9
- size?: "sm" | "md" | "lg" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof inputVariants> {
12
- }
13
- declare function Input({ className, intent, emphasis, size, type, ...props }: InputProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
22
+ var displayName: string;
16
23
  }
17
-
18
- export { Input, type InputProps, inputVariants };
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,"sources":[],"names":[],"mappings":"","file":"Input.js"}
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 react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { ComponentProps } from "react";
3
3
 
4
- interface LabelProps extends ComponentProps<'label'> {
5
- }
6
- declare function Label({ className, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
11
+ var displayName: string;
9
12
  }
10
-
11
- export { Label, type LabelProps };
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
- export{a as Label}from'./_chunks/chunk-IEDKSZAQ.js';//# sourceMappingURL=Label.js.map
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,"sources":[],"names":[],"mappings":"","file":"Label.js"}
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"}
@@ -1,35 +1,2 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ElementType, ComponentProps } from 'react';
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 };
@@ -1,2 +1 @@
1
- export{a as LinkButton,b as LinkIconButton}from'./_chunks/chunk-3H22EQQ6.js';import'./_chunks/chunk-NRVNUMJE.js';import'./_chunks/chunk-4LGCF3SN.js';//# sourceMappingURL=LinkButton.js.map
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 * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import { ElementType, ComponentProps } from 'react';
4
- import { VariantProps } from 'class-variance-authority';
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
- intent?: "neutral" | "brand" | "brand-secondary" | "accent" | "danger" | "success" | "warning" | "info" | "neutral-inverted" | null | undefined;
8
- } & class_variance_authority_types.ClassProp) | undefined) => string;
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
- as?: T;
11
- className?: string;
11
+ as?: T;
12
+ className?: string;
12
13
  } & VariantProps<typeof markVariants> & Omit<ComponentProps<T>, 'as' | 'className'>;
13
- declare function Mark<T extends ElementType = 'mark'>({ as, className, intent, ...props }: MarkProps<T>): react_jsx_runtime.JSX.Element;
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
- var displayName: string;
21
+ var displayName: string;
16
22
  }
17
-
18
- export { Mark, type MarkProps, markVariants };
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
- export{b as Mark,a as markVariants}from'./_chunks/chunk-WOU2B425.js';//# sourceMappingURL=Mark.js.map
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,"sources":[],"names":[],"mappings":"","file":"Mark.js"}
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"}