@cryptlex/web-components 6.5.0-alpha00 → 6.5.1
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/components/alert.d.ts +2 -2
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/data-table-commons.d.ts +1 -34
- package/dist/components/data-table-commons.js +1 -1
- package/dist/components/data-table-commons.js.map +1 -1
- package/dist/components/data-table-filter.js +1 -1
- package/dist/components/data-table.d.ts +83 -50
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/datefield.js +1 -1
- package/dist/components/datefield.js.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/disclosure.js +1 -1
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/icons.d.ts +38 -0
- package/dist/components/icons.js +167 -0
- package/dist/components/icons.js.map +1 -0
- package/dist/components/id-search.d.ts +3 -2
- package/dist/components/id-search.js +1 -1
- package/dist/components/id-search.js.map +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/key-value-card.js +1 -1
- package/dist/components/key-value-card.js.map +1 -1
- package/dist/components/list-box.js +1 -1
- package/dist/components/list-box.js.map +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/loader.js.map +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/menu.js.map +1 -1
- package/dist/components/multi-select.js +1 -1
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/numberfield.js +1 -1
- package/dist/components/numberfield.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/searchfield.js +1 -1
- package/dist/components/searchfield.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/sidebar.d.ts +1 -0
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/table-of-contents.d.ts +2 -2
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table-of-contents.js.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textfield.js +1 -1
- package/dist/components/textfield.js.map +1 -1
- package/dist/components/timeline.d.ts +2 -2
- package/dist/components/timeline.js +1 -1
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/utils/form-hook.js +1 -1
- package/dist/utils/form-hook.js.map +1 -1
- package/dist/utils/primitives.d.ts +1 -8
- package/dist/utils/primitives.js +1 -1
- package/dist/utils/primitives.js.map +1 -1
- package/dist/utils/resource-names.js +1 -1
- package/dist/utils/resource-names.js.map +1 -1
- package/dist/utils/resources.d.ts +2 -0
- package/dist/utils/resources.js +2 -0
- package/dist/utils/resources.js.map +1 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../lib/components/tabs.tsx"],"sourcesContent":["'use client';\nimport { useEffect, useRef } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n TabPanelProps as AriaTabPanelProps,\n TabProps as AriaTabProps,\n Tabs as AriaTabs,\n TabsProps as AriaTabsProps,\n composeRenderProps,\n} from 'react-aria-components';\nimport { classNames } from '../utils/primitives';\n\nexport function Tabs({ className, ...props }: AriaTabsProps) {\n return (\n <AriaTabs\n className={composeRenderProps(className, className =>\n classNames(\n 'group flex flex-col gap-2',\n /* Orientation */\n 'data-[orientation=vertical]:flex-row',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function TabList<T extends object>({ className, ...props }: AriaTabListProps<T>) {\n const listRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const tabList = listRef.current;\n if (!tabList) return;\n\n const observer = new MutationObserver(() => {\n const activeTab = tabList.querySelector<HTMLElement>('[data-selected]');\n\n if (activeTab) {\n requestAnimationFrame(() => {\n activeTab.scrollIntoView({\n behavior: 'smooth',\n inline: 'center',\n block: 'nearest',\n });\n });\n }\n });\n\n observer.observe(tabList, {\n attributes: true,\n subtree: true,\n attributeFilter: ['data-selected'],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <AriaTabList\n ref={listRef}\n className={composeRenderProps(className, className =>\n classNames(\n 'inline-flex items-center text-muted-foreground overflow-auto',\n /* Orientation */\n 'data-[orientation=horizontal]:border-b data-[orientation=vertical]:h-auto data-[orientation=vertical]:border-e data-[orientation=vertical]:flex-col',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function Tab({ className, ...props }: AriaTabProps) {\n return (\n <AriaTab\n className={composeRenderProps(className, className =>\n classNames(\n 'btn btn-ghost leading-none text-accent h-input truncate inline-flex items-center px-3 body-sm font-medium transition-all',\n /* Selected */\n 'data-[selected]:bg-primary/20 data-[selected]:text-primary',\n /* Orientation */\n 'group-data-[orientation=vertical]:w-full',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function TabPanel({ className, ...props }: AriaTabPanelProps) {\n return (\n <AriaTabPanel\n className={composeRenderProps(className, className =>\n classNames(\n 'ring-offset-background',\n /* Focus Visible */\n 'focus-ring',\n className\n )\n )}\n {...props}\n />\n );\n}\n"],"names":["Tabs","className","props","jsx","AriaTabs","composeRenderProps","classNames","TabList","listRef","useRef","useEffect","tabList","observer","activeTab","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../lib/components/tabs.tsx"],"sourcesContent":["'use client';\nimport { useEffect, useRef } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n TabPanelProps as AriaTabPanelProps,\n TabProps as AriaTabProps,\n Tabs as AriaTabs,\n TabsProps as AriaTabsProps,\n composeRenderProps,\n} from 'react-aria-components';\nimport { classNames } from '../utils/primitives';\n\nexport function Tabs({ className, ...props }: AriaTabsProps) {\n return (\n <AriaTabs\n className={composeRenderProps(className, className =>\n classNames(\n 'group flex flex-col gap-2',\n /* Orientation */\n 'data-[orientation=vertical]:flex-row',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function TabList<T extends object>({ className, ...props }: AriaTabListProps<T>) {\n const listRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const tabList = listRef.current;\n if (!tabList) return;\n\n const observer = new MutationObserver(() => {\n const activeTab = tabList.querySelector<HTMLElement>('[data-selected]');\n\n if (activeTab) {\n requestAnimationFrame(() => {\n activeTab.scrollIntoView({\n behavior: 'smooth',\n inline: 'center',\n block: 'nearest',\n });\n });\n }\n });\n\n observer.observe(tabList, {\n attributes: true,\n subtree: true,\n attributeFilter: ['data-selected'],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <AriaTabList\n ref={listRef}\n className={composeRenderProps(className, className =>\n classNames(\n 'inline-flex items-center text-muted-foreground overflow-auto',\n /* Orientation */\n 'data-[orientation=horizontal]:border-b data-[orientation=vertical]:h-auto data-[orientation=vertical]:border-e data-[orientation=vertical]:flex-col',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function Tab({ className, ...props }: AriaTabProps) {\n return (\n <AriaTab\n className={composeRenderProps(className, className =>\n classNames(\n 'btn btn-ghost leading-none text-accent h-input truncate inline-flex items-center px-3 body-sm font-medium transition-all',\n /* Selected */\n 'data-[selected]:bg-primary/20 data-[selected]:text-primary',\n /* Orientation */\n 'group-data-[orientation=vertical]:w-full',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport function TabPanel({ className, ...props }: AriaTabPanelProps) {\n return (\n <AriaTabPanel\n className={composeRenderProps(className, className =>\n classNames(\n 'ring-offset-background',\n /* Focus Visible */\n 'focus-ring',\n className\n )\n )}\n {...props}\n />\n );\n}\n"],"names":["Tabs","className","props","jsx","AriaTabs","composeRenderProps","classNames","TabList","listRef","useRef","useEffect","tabList","observer","activeTab","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"mappings":"+RAeO,SAASA,EAAK,CAAE,UAAAC,EAAW,GAAGC,GAAwB,CACzD,OACIC,EAACC,EAAA,CACG,UAAWC,EAAmBJ,EAAWA,GACrCK,EACI,4BAEA,uCACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASK,EAA0B,CAAE,UAAAN,EAAW,GAAGC,GAA8B,CACpF,MAAMM,EAAUC,EAAuB,IAAI,EAE3C,OAAAC,EAAU,IAAM,CACZ,MAAMC,EAAUH,EAAQ,QACxB,GAAI,CAACG,EAAS,OAEd,MAAMC,EAAW,IAAI,iBAAiB,IAAM,CACxC,MAAMC,EAAYF,EAAQ,cAA2B,iBAAiB,EAElEE,GACA,sBAAsB,IAAM,CACxBA,EAAU,eAAe,CACrB,SAAU,SACV,OAAQ,SACR,MAAO,SAAA,CACV,CACL,CAAC,CAET,CAAC,EAED,OAAAD,EAAS,QAAQD,EAAS,CACtB,WAAY,GACZ,QAAS,GACT,gBAAiB,CAAC,eAAe,CAAA,CACpC,EAEM,IAAMC,EAAS,WAAA,CAC1B,EAAG,CAAA,CAAE,EAGDT,EAACW,EAAA,CACG,IAAKN,EACL,UAAWH,EAAmBJ,EAAWA,GACrCK,EACI,+DAEA,sJACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASa,EAAI,CAAE,UAAAd,EAAW,GAAGC,GAAuB,CACvD,OACIC,EAACa,EAAA,CACG,UAAWX,EAAmBJ,EAAWA,GACrCK,EACI,2HAEA,6DAEA,2CACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASe,EAAS,CAAE,UAAAhB,EAAW,GAAGC,GAA4B,CACjE,OACIC,EAACe,EAAA,CACG,UAAWb,EAAmBJ,EAAWA,GACrCK,EACI,yBAEA,aACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{TextField as u,composeRenderProps as i,TextArea as f,Input as p}from"react-aria-components";import{useTfFieldContext as c}from"../utils/form-utils.js";import{getFieldErrorMessage as d,classNames as n}from"../utils/primitives.js";import{FormField as g}from"./field.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"class-variance-authority";import"
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{TextField as u,composeRenderProps as i,TextArea as f,Input as p}from"react-aria-components";import{useTfFieldContext as c}from"../utils/form-utils.js";import{getFieldErrorMessage as d,classNames as n}from"../utils/primitives.js";import{FormField as g}from"./field.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"lodash-es";import"class-variance-authority";import"./icons.js";const b=u;function x({className:r,...o}){return t(p,{className:i(r,e=>n("flex input-dim w-full border border-input bg-popover ring-offset-background file:border-0 file:bg-transparent file:body-sm file:font-medium placeholder:text-muted-foreground","disabled-muted","focus-ring",e)),...o})}function T({className:r,...o}){return t(f,{className:i(r,e=>n("flex min-h-32 w-full border border-input bg-popover px-3 py-2 body-sm ring-offset-background placeholder:text-muted-foreground","focus-ring","disabled-muted",e)),...o})}function h({label:r,description:o,errorMessage:e,textArea:l,className:m,...a}){return t(b,{className:i(m,s=>n("group form-field",s)),...a,children:t(g,{label:r,errorMessage:e,description:o,children:l?t(T,{}):t(x,{})})})}function j({isDisabled:r,...o}){const e=c({disabled:r});return t(h,{isDisabled:r||e.form.state.isSubmitting,value:e.state.value,id:e.name,name:e.name,onBlur:e.handleBlur,onChange:e.handleChange,isInvalid:!!d(e),errorMessage:d(e),...o})}export{h as TextField,j as TfTextField};
|
|
2
2
|
//# sourceMappingURL=textfield.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textfield.js","sources":["../../lib/components/textfield.tsx"],"sourcesContent":["import {\n Input as AriaInput,\n InputProps as AriaInputProps,\n TextArea as AriaTextArea,\n TextAreaProps as AriaTextAreaProps,\n TextField as AriaTextField,\n TextFieldProps as AriaTextFieldProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport { useTfFieldContext } from '../utils/form-utils';\nimport { classNames, getFieldErrorMessage } from '../utils/primitives';\nimport { FormField, type FormFieldProps } from './field';\n\nconst ATextField = AriaTextField;\n\nfunction Input({ className, ...props }: AriaInputProps) {\n return (\n <AriaInput\n className={composeRenderProps(className, className =>\n classNames(\n 'flex input-dim w-full border border-input bg-popover ring-offset-background file:border-0 file:bg-transparent file:body-sm file:font-medium placeholder:text-muted-foreground',\n /* Disabled */\n 'disabled-muted',\n /* Focused */\n 'focus-ring',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nfunction TextArea({ className, ...props }: AriaTextAreaProps) {\n return (\n <AriaTextArea\n className={composeRenderProps(className, className =>\n classNames(\n 'flex min-h-32 w-full border border-input bg-popover px-3 py-2 body-sm ring-offset-background placeholder:text-muted-foreground',\n /* Focused */\n 'focus-ring',\n /* Disabled */\n 'disabled-muted',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport interface TextFieldProps extends AriaTextFieldProps, FormFieldProps {\n textArea?: boolean;\n}\n\nexport function TextField({ label, description, errorMessage, textArea, className, ...props }: TextFieldProps) {\n return (\n <ATextField\n className={composeRenderProps(className, className => classNames('group form-field', className))}\n {...props}\n >\n <FormField label={label} errorMessage={errorMessage} description={description}>\n {textArea ? <TextArea /> : <Input />}\n </FormField>\n </ATextField>\n );\n}\n\nexport function TfTextField({ isDisabled, ...props }: React.ComponentProps<typeof TextField>) {\n const field = useTfFieldContext<string>({ disabled: isDisabled });\n\n return (\n <TextField\n isDisabled={isDisabled || field.form.state.isSubmitting}\n value={field.state.value}\n id={field.name}\n name={field.name}\n onBlur={field.handleBlur}\n onChange={field.handleChange}\n isInvalid={!!getFieldErrorMessage(field)}\n errorMessage={getFieldErrorMessage(field)}\n {...props}\n />\n );\n}\n"],"names":["ATextField","AriaTextField","Input","className","props","jsx","AriaInput","composeRenderProps","classNames","TextArea","AriaTextArea","TextField","label","description","errorMessage","textArea","FormField","TfTextField","isDisabled","field","useTfFieldContext","getFieldErrorMessage"],"mappings":"
|
|
1
|
+
{"version":3,"file":"textfield.js","sources":["../../lib/components/textfield.tsx"],"sourcesContent":["import {\n Input as AriaInput,\n InputProps as AriaInputProps,\n TextArea as AriaTextArea,\n TextAreaProps as AriaTextAreaProps,\n TextField as AriaTextField,\n TextFieldProps as AriaTextFieldProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport { useTfFieldContext } from '../utils/form-utils';\nimport { classNames, getFieldErrorMessage } from '../utils/primitives';\nimport { FormField, type FormFieldProps } from './field';\n\nconst ATextField = AriaTextField;\n\nfunction Input({ className, ...props }: AriaInputProps) {\n return (\n <AriaInput\n className={composeRenderProps(className, className =>\n classNames(\n 'flex input-dim w-full border border-input bg-popover ring-offset-background file:border-0 file:bg-transparent file:body-sm file:font-medium placeholder:text-muted-foreground',\n /* Disabled */\n 'disabled-muted',\n /* Focused */\n 'focus-ring',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nfunction TextArea({ className, ...props }: AriaTextAreaProps) {\n return (\n <AriaTextArea\n className={composeRenderProps(className, className =>\n classNames(\n 'flex min-h-32 w-full border border-input bg-popover px-3 py-2 body-sm ring-offset-background placeholder:text-muted-foreground',\n /* Focused */\n 'focus-ring',\n /* Disabled */\n 'disabled-muted',\n className\n )\n )}\n {...props}\n />\n );\n}\n\nexport interface TextFieldProps extends AriaTextFieldProps, FormFieldProps {\n textArea?: boolean;\n}\n\nexport function TextField({ label, description, errorMessage, textArea, className, ...props }: TextFieldProps) {\n return (\n <ATextField\n className={composeRenderProps(className, className => classNames('group form-field', className))}\n {...props}\n >\n <FormField label={label} errorMessage={errorMessage} description={description}>\n {textArea ? <TextArea /> : <Input />}\n </FormField>\n </ATextField>\n );\n}\n\nexport function TfTextField({ isDisabled, ...props }: React.ComponentProps<typeof TextField>) {\n const field = useTfFieldContext<string>({ disabled: isDisabled });\n\n return (\n <TextField\n isDisabled={isDisabled || field.form.state.isSubmitting}\n value={field.state.value}\n id={field.name}\n name={field.name}\n onBlur={field.handleBlur}\n onChange={field.handleChange}\n isInvalid={!!getFieldErrorMessage(field)}\n errorMessage={getFieldErrorMessage(field)}\n {...props}\n />\n );\n}\n"],"names":["ATextField","AriaTextField","Input","className","props","jsx","AriaInput","composeRenderProps","classNames","TextArea","AriaTextArea","TextField","label","description","errorMessage","textArea","FormField","TfTextField","isDisabled","field","useTfFieldContext","getFieldErrorMessage"],"mappings":"0dAcA,MAAMA,EAAaC,EAEnB,SAASC,EAAM,CAAE,UAAAC,EAAW,GAAGC,GAAyB,CACpD,OACIC,EAACC,EAAA,CACG,UAAWC,EAAmBJ,EAAWA,GACrCK,EACI,gLAEA,iBAEA,aACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEA,SAASK,EAAS,CAAE,UAAAN,EAAW,GAAGC,GAA4B,CAC1D,OACIC,EAACK,EAAA,CACG,UAAWH,EAAmBJ,EAAWA,GACrCK,EACI,iIAEA,aAEA,iBACAL,CAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAMO,SAASO,EAAU,CAAE,MAAAC,EAAO,YAAAC,EAAa,aAAAC,EAAc,SAAAC,EAAU,UAAAZ,EAAW,GAAGC,GAAyB,CAC3G,OACIC,EAACL,EAAA,CACG,UAAWO,EAAmBJ,EAAWA,GAAaK,EAAW,mBAAoBL,CAAS,CAAC,EAC9F,GAAGC,EAEJ,SAAAC,EAACW,EAAA,CAAU,MAAAJ,EAAc,aAAAE,EAA4B,YAAAD,EAChD,SAAAE,EAAWV,EAACI,EAAA,CAAA,CAAS,EAAKJ,EAACH,EAAA,CAAA,CAAM,CAAA,CACtC,CAAA,CAAA,CAGZ,CAEO,SAASe,EAAY,CAAE,WAAAC,EAAY,GAAGd,GAAiD,CAC1F,MAAMe,EAAQC,EAA0B,CAAE,SAAUF,EAAY,EAEhE,OACIb,EAACM,EAAA,CACG,WAAYO,GAAcC,EAAM,KAAK,MAAM,aAC3C,MAAOA,EAAM,MAAM,MACnB,GAAIA,EAAM,KACV,KAAMA,EAAM,KACZ,OAAQA,EAAM,WACd,SAAUA,EAAM,aAChB,UAAW,CAAC,CAACE,EAAqBF,CAAK,EACvC,aAAcE,EAAqBF,CAAK,EACvC,GAAGf,CAAA,CAAA,CAGhB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import {
|
|
2
|
+
import { CtxIcon } from './icons';
|
|
3
3
|
export declare function Timeline({ className, ...props }: React.ComponentProps<'ol'>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare function TimelineItem({ className, ...props }: React.ComponentProps<'li'> & {}): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const timelineIconVariants: (props?: ({
|
|
6
6
|
variant?: "destructive" | "success" | "muted" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export declare function TimelineIcon({ icon: Icon, className, variant, ...props }: Omit<React.ComponentProps<'div'>, 'children'> & VariantProps<typeof timelineIconVariants> & {
|
|
9
|
-
icon:
|
|
9
|
+
icon: CtxIcon;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare function TimelineDate({ className, date, dateFormatter, ...props }: Omit<React.ComponentProps<'time'>, 'dateTime' | 'children'> & {
|
|
12
12
|
date: Date;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i,jsxs as c}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";import{classNames as n}from"../utils/primitives.js";import"clsx";function
|
|
1
|
+
import{jsx as i,jsxs as c}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";import{classNames as n}from"../utils/primitives.js";import"clsx";import"lodash-es";function p({className:t,...e}){return i("ol",{className:n("grid grid-col-1 gap-icon",t),...e})}function v({className:t,...e}){return i("li",{className:n("grid grid-cols-[4rem_2rem_1fr] grid-rows-subgrid list-none gap-icon",t),...e})}const l=a("p-1 rounded-full",{variants:{variant:{destructive:"text-destructive-foreground bg-destructive",success:"text-success-foreground bg-success",muted:"text-muted-foreground bg-muted"}},defaultVariants:{variant:"muted"}});function x({icon:t,className:e,variant:r,...s}){return c("div",{...s,className:"flex flex-col items-center gap-2",children:[i("div",{className:n(l({variant:r,className:e})),children:i(t,{className:"size-icon "})}),i("div",{className:"h-full w-[1px]"})]})}function N({className:t,date:e,dateFormatter:r,...s}){const o=`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getFullYear()}`;return i("time",{...s,dateTime:e.toISOString(),className:n("font-mono leading-none text-muted",t),children:r?r(e):o})}function T({className:t,...e}){return i("section",{className:n("",t),...e})}export{p as Timeline,T as TimelineContent,N as TimelineDate,x as TimelineIcon,v as TimelineItem,l as timelineIconVariants};
|
|
2
2
|
//# sourceMappingURL=timeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.js","sources":["../../lib/components/timeline.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport
|
|
1
|
+
{"version":3,"file":"timeline.js","sources":["../../lib/components/timeline.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { classNames } from '../utils/primitives';\nimport type { CtxIcon } from './icons';\n\nexport function Timeline({ className, ...props }: React.ComponentProps<'ol'>) {\n return <ol className={classNames('grid grid-col-1 gap-icon', className)} {...props} />;\n}\n\nexport function TimelineItem({ className, ...props }: React.ComponentProps<'li'> & {}) {\n return (\n <li\n className={classNames('grid grid-cols-[4rem_2rem_1fr] grid-rows-subgrid list-none gap-icon', className)}\n {...props}\n />\n );\n}\n\nexport const timelineIconVariants = cva(`p-1 rounded-full`, {\n variants: {\n variant: {\n destructive: 'text-destructive-foreground bg-destructive',\n success: 'text-success-foreground bg-success',\n muted: 'text-muted-foreground bg-muted',\n },\n },\n defaultVariants: {\n variant: 'muted',\n },\n});\n\nexport function TimelineIcon({\n icon: Icon,\n className,\n variant,\n ...props\n}: Omit<React.ComponentProps<'div'>, 'children'> &\n VariantProps<typeof timelineIconVariants> & {\n icon: CtxIcon;\n }) {\n return (\n <div {...props} className=\"flex flex-col items-center gap-2\">\n <div className={classNames(timelineIconVariants({ variant, className }))}>\n <Icon className=\"size-icon \" />\n </div>\n <div className=\"h-full w-[1px]\" />\n </div>\n );\n}\n\nexport function TimelineDate({\n className,\n date,\n dateFormatter,\n ...props\n}: Omit<React.ComponentProps<'time'>, 'dateTime' | 'children'> & {\n date: Date;\n dateFormatter?: (d: Date) => string;\n}) {\n const defaultDateDisplay = `${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`;\n return (\n <time\n {...props}\n dateTime={date.toISOString()}\n className={classNames('font-mono leading-none text-muted', className)}\n >\n {dateFormatter ? dateFormatter(date) : defaultDateDisplay}\n </time>\n );\n}\n\nexport function TimelineContent({ className, ...props }: React.ComponentProps<'section'>) {\n return <section className={classNames('', className)} {...props} />;\n}\n"],"names":["Timeline","className","props","jsx","classNames","TimelineItem","timelineIconVariants","cva","TimelineIcon","Icon","variant","jsxs","TimelineDate","date","dateFormatter","defaultDateDisplay","TimelineContent"],"mappings":"oLAIO,SAASA,EAAS,CAAE,UAAAC,EAAW,GAAGC,GAAqC,CAC1E,OAAOC,EAAC,MAAG,UAAWC,EAAW,2BAA4BH,CAAS,EAAI,GAAGC,EAAO,CACxF,CAEO,SAASG,EAAa,CAAE,UAAAJ,EAAW,GAAGC,GAA0C,CACnF,OACIC,EAAC,KAAA,CACG,UAAWC,EAAW,sEAAuEH,CAAS,EACrG,GAAGC,CAAA,CAAA,CAGhB,CAEO,MAAMI,EAAuBC,EAAI,mBAAoB,CACxD,SAAU,CACN,QAAS,CACL,YAAa,6CACb,QAAS,qCACT,MAAO,gCAAA,CACX,EAEJ,gBAAiB,CACb,QAAS,OAAA,CAEjB,CAAC,EAEM,SAASC,EAAa,CACzB,KAAMC,EACN,UAAAR,EACA,QAAAS,EACA,GAAGR,CACP,EAGO,CACH,OACIS,EAAC,MAAA,CAAK,GAAGT,EAAO,UAAU,mCACtB,SAAA,CAAAC,EAAC,MAAA,CAAI,UAAWC,EAAWE,EAAqB,CAAE,QAAAI,EAAS,UAAAT,CAAA,CAAW,CAAC,EACnE,SAAAE,EAACM,EAAA,CAAK,UAAU,aAAa,EACjC,EACAN,EAAC,MAAA,CAAI,UAAU,gBAAA,CAAiB,CAAA,EACpC,CAER,CAEO,SAASS,EAAa,CACzB,UAAAX,EACA,KAAAY,EACA,cAAAC,EACA,GAAGZ,CACP,EAGG,CACC,MAAMa,EAAqB,IAAIF,EAAK,SAAA,EAAa,GAAG,SAAA,EAAW,SAAS,EAAG,GAAG,CAAC,IAAIA,EAAK,aAAa,GACrG,OACIV,EAAC,OAAA,CACI,GAAGD,EACJ,SAAUW,EAAK,YAAA,EACf,UAAWT,EAAW,oCAAqCH,CAAS,EAEnE,SAAAa,EAAgBA,EAAcD,CAAI,EAAIE,CAAA,CAAA,CAGnD,CAEO,SAASC,EAAgB,CAAE,UAAAf,EAAW,GAAGC,GAA0C,CACtF,OAAOC,EAAC,WAAQ,UAAWC,EAAW,GAAIH,CAAS,EAAI,GAAGC,EAAO,CACrE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{TooltipTrigger as r,Tooltip as m,composeRenderProps as p}from"react-aria-components";import{classNames as n}from"../utils/primitives.js";import"clsx";const
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{TooltipTrigger as r,Tooltip as m,composeRenderProps as p}from"react-aria-components";import{classNames as n}from"../utils/primitives.js";import"clsx";import"lodash-es";const c=r,T=({className:o,offset:t=4,...e})=>a(m,{offset:t,className:p(o,i=>n("z-50 overflow-hidden border bg-popover px-3 py-1.5 body-sm text-popover-foreground shadow-md animate-in fade-in-0","data-[entering]:zoom-in-95","data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95","data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2",i)),...e});export{T as Tooltip,c as TooltipTrigger};
|
|
2
2
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../lib/components/tooltip.tsx"],"sourcesContent":["import {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n composeRenderProps,\n type TooltipProps as AriaTooltipProps,\n} from 'react-aria-components';\n\nimport { classNames } from '../utils/primitives';\n\nconst TooltipTrigger = AriaTooltipTrigger;\nconst Tooltip = ({ className, offset = 4, ...props }: AriaTooltipProps) => (\n <AriaTooltip\n offset={offset}\n className={composeRenderProps(className, className =>\n classNames(\n 'z-50 overflow-hidden border bg-popover px-3 py-1.5 body-sm text-popover-foreground shadow-md animate-in fade-in-0',\n /* Entering */\n 'data-[entering]:zoom-in-95',\n /* Exiting */\n 'data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95',\n /* Placement */\n 'data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2',\n className\n )\n )}\n {...props}\n />\n);\n\nexport { Tooltip, TooltipTrigger };\n"],"names":["TooltipTrigger","AriaTooltipTrigger","Tooltip","className","offset","props","jsx","AriaTooltip","composeRenderProps","classNames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../lib/components/tooltip.tsx"],"sourcesContent":["import {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n composeRenderProps,\n type TooltipProps as AriaTooltipProps,\n} from 'react-aria-components';\n\nimport { classNames } from '../utils/primitives';\n\nconst TooltipTrigger = AriaTooltipTrigger;\nconst Tooltip = ({ className, offset = 4, ...props }: AriaTooltipProps) => (\n <AriaTooltip\n offset={offset}\n className={composeRenderProps(className, className =>\n classNames(\n 'z-50 overflow-hidden border bg-popover px-3 py-1.5 body-sm text-popover-foreground shadow-md animate-in fade-in-0',\n /* Entering */\n 'data-[entering]:zoom-in-95',\n /* Exiting */\n 'data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95',\n /* Placement */\n 'data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2',\n className\n )\n )}\n {...props}\n />\n);\n\nexport { Tooltip, TooltipTrigger };\n"],"names":["TooltipTrigger","AriaTooltipTrigger","Tooltip","className","offset","props","jsx","AriaTooltip","composeRenderProps","classNames"],"mappings":"uNASA,MAAMA,EAAiBC,EACjBC,EAAU,CAAC,CAAE,UAAAC,EAAW,OAAAC,EAAS,EAAG,GAAGC,KACzCC,EAACC,EAAA,CACG,OAAAH,EACA,UAAWI,EAAmBL,EAAWA,GACrCM,EACI,oHAEA,6BAEA,kFAEA,kLACAN,CAAA,CACJ,EAEH,GAAGE,CAAA,CACR"}
|
package/dist/utils/form-hook.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createFormHook as o}from"@tanstack/react-form";import{Button as m}from"../components/button.js";import{TfCheckbox as r}from"../components/checkbox.js";import{TfMultiSelect as t}from"../components/multi-select.js";import{TfNumberField as i}from"../components/numberfield.js";import{TfSingleSelect as p}from"../components/select.js";import{TfTextField as e}from"../components/textfield.js";import{formContext as f,fieldContext as n}from"./form-context.js";import"react/jsx-runtime";import"class-variance-authority";import"react-aria-components";import"./primitives.js";import"clsx";import"../components/loader.js";import"
|
|
1
|
+
import{createFormHook as o}from"@tanstack/react-form";import{Button as m}from"../components/button.js";import{TfCheckbox as r}from"../components/checkbox.js";import{TfMultiSelect as t}from"../components/multi-select.js";import{TfNumberField as i}from"../components/numberfield.js";import{TfSingleSelect as p}from"../components/select.js";import{TfTextField as e}from"../components/textfield.js";import{formContext as f,fieldContext as n}from"./form-context.js";import"react/jsx-runtime";import"class-variance-authority";import"react-aria-components";import"./primitives.js";import"clsx";import"lodash-es";import"../components/loader.js";import"../components/icons.js";import"react";import"../components/field.js";import"./form-utils.js";import"../components/menu.js";import"../components/list-box.js";import"../components/popover.js";const{useAppForm:v}=o({fieldComponents:{TfTextField:e,TfNumberField:i,TfMultiSelect:t,TfSingleSelect:p,TfCheckbox:r},formComponents:{Button:m},fieldContext:n,formContext:f});export{v as useAppForm};
|
|
2
2
|
//# sourceMappingURL=form-hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-hook.js","sources":["../../lib/utils/form-hook.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/react-form';\nimport { Button } from '../components/button';\nimport { TfCheckbox } from '../components/checkbox';\nimport { TfMultiSelect } from '../components/multi-select';\nimport { TfNumberField } from '../components/numberfield';\nimport { TfSingleSelect } from '../components/select';\nimport { TfTextField } from '../components/textfield';\nimport { fieldContext, formContext } from '../utils/form-context';\n\n/** Don't put this in the same file as form-context.tsx, this causes circular dependencies. */\n/** TODO, lazy loading when fieldComponents are large */\n/**\n * Builder for form logic and user interfaces\n */\nexport const { useAppForm } = createFormHook({\n fieldComponents: {\n TfTextField,\n TfNumberField,\n TfMultiSelect,\n TfSingleSelect,\n TfCheckbox,\n },\n formComponents: {\n Button,\n },\n fieldContext,\n formContext,\n});\n"],"names":["useAppForm","createFormHook","TfTextField","TfNumberField","TfMultiSelect","TfSingleSelect","TfCheckbox","Button","fieldContext","formContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-hook.js","sources":["../../lib/utils/form-hook.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/react-form';\nimport { Button } from '../components/button';\nimport { TfCheckbox } from '../components/checkbox';\nimport { TfMultiSelect } from '../components/multi-select';\nimport { TfNumberField } from '../components/numberfield';\nimport { TfSingleSelect } from '../components/select';\nimport { TfTextField } from '../components/textfield';\nimport { fieldContext, formContext } from '../utils/form-context';\n\n/** Don't put this in the same file as form-context.tsx, this causes circular dependencies. */\n/** TODO, lazy loading when fieldComponents are large */\n/**\n * Builder for form logic and user interfaces\n */\nexport const { useAppForm } = createFormHook({\n fieldComponents: {\n TfTextField,\n TfNumberField,\n TfMultiSelect,\n TfSingleSelect,\n TfCheckbox,\n },\n formComponents: {\n Button,\n },\n fieldContext,\n formContext,\n});\n"],"names":["useAppForm","createFormHook","TfTextField","TfNumberField","TfMultiSelect","TfSingleSelect","TfCheckbox","Button","fieldContext","formContext"],"mappings":"k0BAcO,KAAM,CAAE,WAAAA,CAAA,EAAeC,EAAe,CACzC,gBAAiB,CACb,YAAAC,EACA,cAAAC,EACA,cAAAC,EACA,eAAAC,EACA,WAAAC,CAAA,EAEJ,eAAgB,CACZ,OAAAC,CAAA,EAEJ,aAAAC,EACA,YAAAC,CACJ,CAAC"}
|
|
@@ -31,14 +31,7 @@ export type JwtDecode = {
|
|
|
31
31
|
export type CtxPortals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @param input camelCase
|
|
35
|
-
* @returns title case for the camelCase string
|
|
36
34
|
*/
|
|
37
|
-
export declare function
|
|
35
|
+
export declare function toTitleCase(input?: string): string;
|
|
38
36
|
export declare function pluralizeTimes(resourceName: string, count: number): string;
|
|
39
|
-
/**
|
|
40
|
-
* Converts a string from 'camelCase' to 'Title Case'
|
|
41
|
-
* @param input String to convert to `Title Case`
|
|
42
|
-
*/
|
|
43
|
-
export declare function convertCamelCaseToTitleCase(input: string): string;
|
|
44
37
|
export declare function getFieldErrorMessage(field: FieldApi<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>): string;
|
package/dist/utils/primitives.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{clsx as n}from"clsx";function
|
|
1
|
+
import{clsx as n}from"clsx";import{startCase as r}from"lodash-es";function c(...e){return n(e)}const o="--primary-hue";function s(){return document.documentElement.style.getPropertyValue(o)}function m(e){document.documentElement.style.setProperty(o,e)}const i="AT",a="RT";function f(){if(typeof window<"u"&&window.localStorage)try{localStorage.removeItem(a),localStorage.removeItem(i),window.location.replace("/auth/login")}catch(e){console.error("Logout failed:",e)}}function d(e){return r(e)}function g(e,t){return t>1?/y$/.test(e)?e==="Day"?"Days":e.replace(/y$/,"ies"):e.concat("s"):e}function p(e){return e?.state.meta.errors.map(t=>t?.message).join(",")}export{c as classNames,p as getFieldErrorMessage,s as getThemeHue,f as logout,g as pluralizeTimes,m as setThemeHue,d as toTitleCase};
|
|
2
2
|
//# sourceMappingURL=primitives.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.js","sources":["../../lib/utils/primitives.ts"],"sourcesContent":["import type { FieldApi } from '@tanstack/react-form';\nimport { clsx, type ClassValue } from 'clsx';\n\n/** Classnames */\nexport function classNames(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n\n/**\n * This is the variable name representing the primary hue.\n * Referenced in tokens.scss -> token.css\n */\nconst PRIMARY_HUE_PROPERTY = '--primary-hue';\n\n/**\n *\n * @returns\n */\nexport function getThemeHue() {\n return document.documentElement.style.getPropertyValue(PRIMARY_HUE_PROPERTY);\n}\n\n/**\n * @param hue the hue value to set in the document style\n */\nexport function setThemeHue(hue: number) {\n document.documentElement.style.setProperty(\n PRIMARY_HUE_PROPERTY,\n // In this case, it must be a number.\n hue as unknown as string\n );\n}\n\nconst ACCESS_TOKEN = 'AT';\nconst REFRESH_TOKEN = 'RT';\nexport function logout() {\n if (typeof window !== 'undefined' && window.localStorage) {\n try {\n localStorage.removeItem(REFRESH_TOKEN);\n localStorage.removeItem(ACCESS_TOKEN);\n window.location.replace('/auth/login');\n } catch (error) {\n console.error('Logout failed:', error);\n }\n }\n}\n\nexport type JwtDecode = {\n aud: string;\n email: string;\n exp: number;\n iat: number;\n jti: string;\n region: string;\n role: string;\n role_type: string;\n scope: string[];\n sub: string;\n teat: number;\n tenantid: string;\n token_usage: string;\n sadmin?: string;\n};\n\nexport type CtxPortals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';\n\n/**\n *\n
|
|
1
|
+
{"version":3,"file":"primitives.js","sources":["../../lib/utils/primitives.ts"],"sourcesContent":["import type { FieldApi } from '@tanstack/react-form';\nimport { clsx, type ClassValue } from 'clsx';\nimport { startCase } from 'lodash-es';\n\n/** Classnames */\nexport function classNames(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n\n/**\n * This is the variable name representing the primary hue.\n * Referenced in tokens.scss -> token.css\n */\nconst PRIMARY_HUE_PROPERTY = '--primary-hue';\n\n/**\n *\n * @returns\n */\nexport function getThemeHue() {\n return document.documentElement.style.getPropertyValue(PRIMARY_HUE_PROPERTY);\n}\n\n/**\n * @param hue the hue value to set in the document style\n */\nexport function setThemeHue(hue: number) {\n document.documentElement.style.setProperty(\n PRIMARY_HUE_PROPERTY,\n // In this case, it must be a number.\n hue as unknown as string\n );\n}\n\nconst ACCESS_TOKEN = 'AT';\nconst REFRESH_TOKEN = 'RT';\nexport function logout() {\n if (typeof window !== 'undefined' && window.localStorage) {\n try {\n localStorage.removeItem(REFRESH_TOKEN);\n localStorage.removeItem(ACCESS_TOKEN);\n window.location.replace('/auth/login');\n } catch (error) {\n console.error('Logout failed:', error);\n }\n }\n}\n\nexport type JwtDecode = {\n aud: string;\n email: string;\n exp: number;\n iat: number;\n jti: string;\n region: string;\n role: string;\n role_type: string;\n scope: string[];\n sub: string;\n teat: number;\n tenantid: string;\n token_usage: string;\n sadmin?: string;\n};\n\nexport type CtxPortals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';\n\n/**\n *\n */\nexport function toTitleCase(input?: string): string {\n return startCase(input);\n}\n\nexport function pluralizeTimes(resourceName: string, count: number) {\n if (count > 1) {\n if (/y$/.test(resourceName)) {\n if (resourceName === 'Day') return 'Days';\n return resourceName.replace(/y$/, 'ies');\n }\n return resourceName.concat('s');\n }\n return resourceName;\n}\n\nexport function getFieldErrorMessage(\n field: FieldApi<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>\n): string {\n return field?.state.meta.errors.map(e => e?.message).join(',');\n}\n"],"names":["classNames","inputs","clsx","PRIMARY_HUE_PROPERTY","getThemeHue","setThemeHue","hue","ACCESS_TOKEN","REFRESH_TOKEN","logout","error","toTitleCase","input","startCase","pluralizeTimes","resourceName","count","getFieldErrorMessage","field","e"],"mappings":"kEAKO,SAASA,KAAcC,EAAsB,CAChD,OAAOC,EAAKD,CAAM,CACtB,CAMA,MAAME,EAAuB,gBAMtB,SAASC,GAAc,CAC1B,OAAO,SAAS,gBAAgB,MAAM,iBAAiBD,CAAoB,CAC/E,CAKO,SAASE,EAAYC,EAAa,CACrC,SAAS,gBAAgB,MAAM,YAC3BH,EAEAG,CAAA,CAER,CAEA,MAAMC,EAAe,KACfC,EAAgB,KACf,SAASC,GAAS,CACrB,GAAI,OAAO,OAAW,KAAe,OAAO,aACxC,GAAI,CACA,aAAa,WAAWD,CAAa,EACrC,aAAa,WAAWD,CAAY,EACpC,OAAO,SAAS,QAAQ,aAAa,CACzC,OAASG,EAAO,CACZ,QAAQ,MAAM,iBAAkBA,CAAK,CACzC,CAER,CAwBO,SAASC,EAAYC,EAAwB,CAChD,OAAOC,EAAUD,CAAK,CAC1B,CAEO,SAASE,EAAeC,EAAsBC,EAAe,CAChE,OAAIA,EAAQ,EACJ,KAAK,KAAKD,CAAY,EAClBA,IAAiB,MAAc,OAC5BA,EAAa,QAAQ,KAAM,KAAK,EAEpCA,EAAa,OAAO,GAAG,EAE3BA,CACX,CAEO,SAASE,EACZC,EACM,CACN,OAAOA,GAAO,MAAM,KAAK,OAAO,OAASC,GAAG,OAAO,EAAE,KAAK,GAAG,CACjE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{createContext as n,use as i}from"react";import{
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{createContext as n,use as i}from"react";import{toTitleCase as l}from"./primitives.js";import"clsx";import"lodash-es";const t={"product.displayName":"Product"},y=["access-token","account","activation","activation-log","admin-role","audit-log","automated-email","automated-email-event-log","card","feature-flag","invoice","license","license-template","maintenance-policy","organization","plan","product","product-version","profile","release","release-channel","release-file","release-platform","report","role","role-claim","saml-configuration","segment","sending-domain","setting","tag","team-member","trial","trial-policy","user","user-group","webhook","webhook-event-log","webhook-trigger","reseller","oidc-configuration","organization-claim","reseller-claim"],h={account:"Your organization account.",product:"Products are the software products you want to license",license:"Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.","access-token":"Access Tokens are used to authenticate your API requests.",activation:"Activations, also known as devices/machines/seats are the devices consuming licenses.","activation-log":"Activation Log is a log entry of activation/deactivation of a particular license.",trial:"Trial/Trial Activation is a device that has activated a trial of your product.","audit-log":"Audit logs contain all the changes made to your account.","automated-email":"Automated Email allow you to send marketing emails based on events on the linked product.","automated-email-event-log":"Automated email event log is the log of all the automated email events for your product.",card:"The payment card for your account.","feature-flag":"Feature flags define features that make up tiers for your products.",invoice:"","license-template":"License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.","maintenance-policy":"Maintenance policies represent support contracts and can be linked to licenses.",plan:"","product-version":"Product Versions are sets of Feature Flags that define the tiers of your products.","release-channel":"Release channel is the release channel for your product.","release-file":"Release files are files within your created releases.","release-platform":'Release Platforms differentiate the target platform for your release. Common platforms include "Windows", "macOS", and "Linux".',release:"Releases help you to manage different versions of your app, and secure distribute it to licensed users.",report:"Analytics data for your account","role-claim":"",role:"Roles define permissions for your team.","saml-configuration":"",segment:"Sets of filters that can be saved to filter resources.","trial-policy":"Trial policies are templates for creating trials for your products.","webhook-event-log":"Webhook Event Logs are logs of events that have occured on webhooks.","webhook-trigger":"",webhook:"Webhooks are HTTP callbacks which are triggered by specific events.",organization:"",profile:"",setting:"",tag:"Tags allow you to manage your licenses and customers on the dashboard.","team-member":"Team members can access the account based on their roles.",user:"A user refers to your customer whom you want to license your product.","sending-domain":"Allows Cryptlex to send emails on your behalf using your From Email address","admin-role":"Roles that have type admin","user-group":"Groups of users that you can assign licenses to.",reseller:"Resellers allow you to delegate user management to third parties or partners","oidc-configuration":"","organization-claim":"","reseller-claim":""},a={id:"ID",createdAt:"Creation Date",scopes:"Permissions",updatedAt:"Last Updated",expiresAt:"Expiration Date",lastSeenAt:"Last Seen",os:"OS",osVersion:"OS Version",key:"License Key",vmName:"VM Name",container:"Container",allowedIpRange:"Allowed IP Range",allowedIpRanges:"Allowed IP Ranges",allowedIpAddresses:"Allowed IP Addresses",disallowedIpAddresses:"Disallowed IP Addresses",allowVmActivation:"Allow VM Activation",disableGeoLocation:"Disable Geolocation","user.id":"User ID",userId:"User",productId:"Product",downloads:"Total Downloads",claims:"Permissions",googleSsoEnabled:"Google Login Enabled",lastAttemptedAt:"Last Attempt Date",url:"URL","trialPolicy.name":"Trial Policy Name","licensePolicy.name":"License Template Name",licensePolicy:"License Template",eventLog:"Audit Log",cc:"CC Recepients",bcc:"BCC Recepients",ipAddress:"IP Address",resellerId:"Reseller",productVersionId:"Product Version",releaseId:"Release",maintenancePolicyId:"Maintenance Policy",webhookId:"Webhook",automatedEmailId:"Automated Email","location.countryName":"Country","location.ipAddress":"IP Address","location.countryCode":"Country",organizationId:"Organization","address.country":"Country","address.addressLine1":"Address Line 1","address.addressLine2":"Address Line 2",responseStatusCode:"HTTP Status Code",resourceId:"Resource ID",Sso:"SAML SSO 2.0","reseller.name":"Reseller",sendingDomain:"Email Sending Domain"};function c(e,o){return o!=="admin-portal"&&e in t?t[e]:e in a?a[e]:l(e)}const r=n("admin-portal");function A({projectName:e,children:o}){return s(r.Provider,{value:e,children:o})}function d(){return i(r)}function v(){const e=d();return o=>c(o,e)}export{A as ProjectProvider,h as RESOURCE_DEFINITIONS,y as RESOURCE_NAMES,d as useProjectName,v as useResourceFormatter};
|
|
2
2
|
//# sourceMappingURL=resource-names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-names.js","sources":["../../lib/utils/resource-names.tsx"],"sourcesContent":["import { createContext, use } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"resource-names.js","sources":["../../lib/utils/resource-names.tsx"],"sourcesContent":["import { createContext, use } from 'react';\nimport { toTitleCase, type CtxPortals } from './primitives';\n\n// Display names specific to customer and reseller portal\nconst OTHER_PORTALS_DISPLAY_NAME: Record<string, string> = {\n 'product.displayName': 'Product',\n};\n\n/** Resource Name should ALWAYS be in singular form */\nexport const RESOURCE_NAMES = [\n 'access-token',\n 'account',\n 'activation',\n 'activation-log',\n 'admin-role',\n 'audit-log',\n 'automated-email',\n 'automated-email-event-log',\n 'card',\n 'feature-flag',\n 'invoice',\n 'license',\n 'license-template',\n 'maintenance-policy',\n 'organization',\n 'plan',\n 'product',\n 'product-version',\n 'profile',\n 'release',\n 'release-channel',\n 'release-file',\n 'release-platform',\n 'report',\n 'role',\n 'role-claim',\n 'saml-configuration',\n 'segment',\n 'sending-domain',\n 'setting',\n 'tag',\n 'team-member',\n 'trial',\n 'trial-policy',\n 'user',\n 'user-group',\n 'webhook',\n 'webhook-event-log',\n 'webhook-trigger',\n 'reseller',\n 'oidc-configuration',\n 'organization-claim',\n 'reseller-claim',\n] as const;\nexport type ResourceName = (typeof RESOURCE_NAMES)[number];\nexport const RESOURCE_DEFINITIONS: Record<ResourceName, string> = {\n account: 'Your organization account.',\n product: 'Products are the software products you want to license',\n license:\n 'Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.',\n 'access-token': 'Access Tokens are used to authenticate your API requests.',\n activation: 'Activations, also known as devices/machines/seats are the devices consuming licenses.',\n 'activation-log': 'Activation Log is a log entry of activation/deactivation of a particular license.',\n trial: 'Trial/Trial Activation is a device that has activated a trial of your product.',\n 'audit-log': 'Audit logs contain all the changes made to your account.',\n 'automated-email': 'Automated Email allow you to send marketing emails based on events on the linked product.',\n 'automated-email-event-log':\n 'Automated email event log is the log of all the automated email events for your product.',\n card: 'The payment card for your account.',\n 'feature-flag': 'Feature flags define features that make up tiers for your products.',\n invoice: '',\n 'license-template':\n 'License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.',\n 'maintenance-policy': 'Maintenance policies represent support contracts and can be linked to licenses.',\n plan: '',\n 'product-version': 'Product Versions are sets of Feature Flags that define the tiers of your products.',\n 'release-channel': 'Release channel is the release channel for your product.',\n 'release-file': 'Release files are files within your created releases.',\n 'release-platform':\n 'Release Platforms differentiate the target platform for your release. Common platforms include \"Windows\", \"macOS\", and \"Linux\".',\n release: 'Releases help you to manage different versions of your app, and secure distribute it to licensed users.',\n report: 'Analytics data for your account',\n 'role-claim': '',\n role: 'Roles define permissions for your team.',\n 'saml-configuration': '',\n segment: 'Sets of filters that can be saved to filter resources.',\n 'trial-policy': 'Trial policies are templates for creating trials for your products.',\n 'webhook-event-log': 'Webhook Event Logs are logs of events that have occured on webhooks.',\n 'webhook-trigger': '',\n webhook: 'Webhooks are HTTP callbacks which are triggered by specific events.',\n organization: '',\n profile: '',\n setting: '',\n tag: 'Tags allow you to manage your licenses and customers on the dashboard.',\n 'team-member': 'Team members can access the account based on their roles.',\n user: 'A user refers to your customer whom you want to license your product.',\n 'sending-domain': 'Allows Cryptlex to send emails on your behalf using your From Email address',\n 'admin-role': 'Roles that have type admin',\n 'user-group': 'Groups of users that you can assign licenses to.',\n reseller: 'Resellers allow you to delegate user management to third parties or partners',\n 'oidc-configuration': '',\n 'organization-claim': '',\n 'reseller-claim': '',\n};\n\nconst RESOURCE_DISPLAY_NAMES: Record<string, string> = {\n id: 'ID',\n createdAt: 'Creation Date',\n scopes: 'Permissions',\n updatedAt: 'Last Updated',\n expiresAt: 'Expiration Date',\n lastSeenAt: 'Last Seen',\n os: 'OS',\n osVersion: 'OS Version',\n key: 'License Key',\n vmName: 'VM Name',\n container: 'Container',\n allowedIpRange: 'Allowed IP Range',\n allowedIpRanges: 'Allowed IP Ranges',\n allowedIpAddresses: 'Allowed IP Addresses',\n disallowedIpAddresses: 'Disallowed IP Addresses',\n allowVmActivation: 'Allow VM Activation',\n disableGeoLocation: 'Disable Geolocation',\n 'user.id': 'User ID',\n userId: 'User',\n productId: 'Product',\n downloads: 'Total Downloads',\n claims: 'Permissions',\n googleSsoEnabled: 'Google Login Enabled',\n lastAttemptedAt: 'Last Attempt Date',\n url: 'URL',\n 'trialPolicy.name': 'Trial Policy Name',\n 'licensePolicy.name': 'License Template Name',\n licensePolicy: 'License Template',\n eventLog: 'Audit Log',\n cc: 'CC Recepients',\n bcc: 'BCC Recepients',\n ipAddress: 'IP Address',\n resellerId: 'Reseller',\n productVersionId: 'Product Version',\n releaseId: 'Release',\n maintenancePolicyId: 'Maintenance Policy',\n webhookId: 'Webhook',\n automatedEmailId: 'Automated Email',\n 'location.countryName': 'Country',\n 'location.ipAddress': 'IP Address',\n 'location.countryCode': 'Country',\n organizationId: 'Organization',\n 'address.country': 'Country',\n 'address.addressLine1': 'Address Line 1',\n 'address.addressLine2': 'Address Line 2',\n responseStatusCode: 'HTTP Status Code',\n resourceId: 'Resource ID',\n Sso: 'SAML SSO 2.0',\n 'reseller.name': 'Reseller',\n sendingDomain: 'Email Sending Domain',\n};\n\nfunction getResourceDisplayName(resourceName: string, portal: CtxPortals) {\n if (portal !== 'admin-portal' && resourceName in OTHER_PORTALS_DISPLAY_NAME) {\n return OTHER_PORTALS_DISPLAY_NAME[resourceName];\n } else if (resourceName in RESOURCE_DISPLAY_NAMES) {\n return RESOURCE_DISPLAY_NAMES[resourceName];\n } else {\n return toTitleCase(resourceName);\n }\n}\n\nconst ProjectContext = createContext<CtxPortals>('admin-portal');\n\nexport function ProjectProvider({ projectName, children }: { projectName: CtxPortals; children: React.ReactNode }) {\n return <ProjectContext.Provider value={projectName}>{children}</ProjectContext.Provider>;\n}\n\nexport function useProjectName(): CtxPortals {\n const projectName = use(ProjectContext);\n return projectName;\n}\n\n// TODO, create story with complete map of resource -> formatter output\nexport function useResourceFormatter(): (resourceName: string) => string {\n const portal = useProjectName();\n return (resourceName: string) => getResourceDisplayName(resourceName, portal);\n}\n"],"names":["OTHER_PORTALS_DISPLAY_NAME","RESOURCE_NAMES","RESOURCE_DEFINITIONS","RESOURCE_DISPLAY_NAMES","getResourceDisplayName","resourceName","portal","toTitleCase","ProjectContext","createContext","ProjectProvider","projectName","children","useProjectName","use","useResourceFormatter"],"mappings":"oKAIA,MAAMA,EAAqD,CACvD,sBAAuB,SAC3B,EAGaC,EAAiB,CAC1B,eACA,UACA,aACA,iBACA,aACA,YACA,kBACA,4BACA,OACA,eACA,UACA,UACA,mBACA,qBACA,eACA,OACA,UACA,kBACA,UACA,UACA,kBACA,eACA,mBACA,SACA,OACA,aACA,qBACA,UACA,iBACA,UACA,MACA,cACA,QACA,eACA,OACA,aACA,UACA,oBACA,kBACA,WACA,qBACA,qBACA,gBACJ,EAEaC,EAAqD,CAC9D,QAAS,6BACT,QAAS,yDACT,QACI,wIACJ,eAAgB,4DAChB,WAAY,wFACZ,iBAAkB,oFAClB,MAAO,iFACP,YAAa,2DACb,kBAAmB,4FACnB,4BACI,2FACJ,KAAM,qCACN,eAAgB,sEAChB,QAAS,GACT,mBACI,kIACJ,qBAAsB,kFACtB,KAAM,GACN,kBAAmB,qFACnB,kBAAmB,2DACnB,eAAgB,wDAChB,mBACI,kIACJ,QAAS,0GACT,OAAQ,kCACR,aAAc,GACd,KAAM,0CACN,qBAAsB,GACtB,QAAS,yDACT,eAAgB,sEAChB,oBAAqB,uEACrB,kBAAmB,GACnB,QAAS,sEACT,aAAc,GACd,QAAS,GACT,QAAS,GACT,IAAK,yEACL,cAAe,4DACf,KAAM,wEACN,iBAAkB,8EAClB,aAAc,6BACd,aAAc,mDACd,SAAU,+EACV,qBAAsB,GACtB,qBAAsB,GACtB,iBAAkB,EACtB,EAEMC,EAAiD,CACnD,GAAI,KACJ,UAAW,gBACX,OAAQ,cACR,UAAW,eACX,UAAW,kBACX,WAAY,YACZ,GAAI,KACJ,UAAW,aACX,IAAK,cACL,OAAQ,UACR,UAAW,YACX,eAAgB,mBAChB,gBAAiB,oBACjB,mBAAoB,uBACpB,sBAAuB,0BACvB,kBAAmB,sBACnB,mBAAoB,sBACpB,UAAW,UACX,OAAQ,OACR,UAAW,UACX,UAAW,kBACX,OAAQ,cACR,iBAAkB,uBAClB,gBAAiB,oBACjB,IAAK,MACL,mBAAoB,oBACpB,qBAAsB,wBACtB,cAAe,mBACf,SAAU,YACV,GAAI,gBACJ,IAAK,iBACL,UAAW,aACX,WAAY,WACZ,iBAAkB,kBAClB,UAAW,UACX,oBAAqB,qBACrB,UAAW,UACX,iBAAkB,kBAClB,uBAAwB,UACxB,qBAAsB,aACtB,uBAAwB,UACxB,eAAgB,eAChB,kBAAmB,UACnB,uBAAwB,iBACxB,uBAAwB,iBACxB,mBAAoB,mBACpB,WAAY,cACZ,IAAK,eACL,gBAAiB,WACjB,cAAe,sBACnB,EAEA,SAASC,EAAuBC,EAAsBC,EAAoB,CACtE,OAAIA,IAAW,gBAAkBD,KAAgBL,EACtCA,EAA2BK,CAAY,EACvCA,KAAgBF,EAChBA,EAAuBE,CAAY,EAEnCE,EAAYF,CAAY,CAEvC,CAEA,MAAMG,EAAiBC,EAA0B,cAAc,EAExD,SAASC,EAAgB,CAAE,YAAAC,EAAa,SAAAC,GAAoE,CAC/G,SAAQJ,EAAe,SAAf,CAAwB,MAAOG,EAAc,SAAAC,EAAS,CAClE,CAEO,SAASC,GAA6B,CAEzC,OADoBC,EAAIN,CAAc,CAE1C,CAGO,SAASO,GAAyD,CACrE,MAAMT,EAASO,EAAA,EACf,OAAQR,GAAyBD,EAAuBC,EAAcC,CAAM,CAChF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CTX_RESOURCES: readonly ["account", "activation", "automatedEmail", "billingAddress", "entitlementSet", "feature", "featureEntitlement", "featureFlag", "license", "licenseTemplate", "maintenancePolicy", "oidcConfiguration", "oidcRoleMapping", "organization", "paymentMethod", "personalAccessToken", "plan", "product", "productVersion", "release", "releaseChannel", "releaseFile", "releasePlatform", "reseller", "role", "samlConfiguration", "segment", "sendingDomain", "tag", "trialActivation", "trialPolicy", "user", "userGroup", "webhook"];
|
|
2
|
+
export type CtxResourceName = (typeof CTX_RESOURCES)[number];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=["account","activation","automatedEmail","billingAddress","entitlementSet","feature","featureEntitlement","featureFlag","license","licenseTemplate","maintenancePolicy","oidcConfiguration","oidcRoleMapping","organization","paymentMethod","personalAccessToken","plan","product","productVersion","release","releaseChannel","releaseFile","releasePlatform","reseller","role","samlConfiguration","segment","sendingDomain","tag","trialActivation","trialPolicy","user","userGroup","webhook"];export{e as CTX_RESOURCES};
|
|
2
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sources":["../../lib/utils/resources.ts"],"sourcesContent":["export const CTX_RESOURCES = [\n 'account',\n 'activation',\n 'automatedEmail',\n 'billingAddress',\n 'entitlementSet',\n 'feature',\n 'featureEntitlement',\n 'featureFlag',\n 'license',\n 'licenseTemplate',\n 'maintenancePolicy',\n 'oidcConfiguration',\n 'oidcRoleMapping',\n 'organization',\n 'paymentMethod',\n 'personalAccessToken',\n 'plan',\n 'product',\n 'productVersion',\n 'release',\n 'releaseChannel',\n 'releaseFile',\n 'releasePlatform',\n 'reseller',\n 'role',\n 'samlConfiguration',\n 'segment',\n 'sendingDomain',\n 'tag',\n 'trialActivation',\n 'trialPolicy',\n 'user',\n 'userGroup',\n 'webhook',\n] as const;\n\nexport type CtxResourceName = (typeof CTX_RESOURCES)[number];\n"],"names":["CTX_RESOURCES"],"mappings":"AAAO,MAAMA,EAAgB,CACzB,UACA,aACA,iBACA,iBACA,iBACA,UACA,qBACA,cACA,UACA,kBACA,oBACA,oBACA,kBACA,eACA,gBACA,sBACA,OACA,UACA,iBACA,UACA,iBACA,cACA,kBACA,WACA,OACA,oBACA,UACA,gBACA,MACA,kBACA,cACA,OACA,YACA,SACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptlex/web-components",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.1",
|
|
4
4
|
"description": "React component library for Cryptlex web applications",
|
|
5
5
|
"author": "Cryptlex",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"*.{ts,tsx,css,scss,json}": "prettier --write"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@cryptlex/web-api-types": "1.
|
|
46
|
+
"@cryptlex/web-api-types": "1.45.0",
|
|
47
47
|
"@dnd-kit/core": "6.3.1",
|
|
48
48
|
"@dnd-kit/sortable": "10.0.0",
|
|
49
49
|
"@dnd-kit/utilities": "3.2.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"date-fns": "3.0.0",
|
|
58
58
|
"input-otp": "1.4.1",
|
|
59
59
|
"lodash-es": "4.17.21",
|
|
60
|
-
"
|
|
60
|
+
"@types/lodash-es": "4.17.12",
|
|
61
61
|
"openapi-fetch": "0.14.0",
|
|
62
62
|
"react": "^19.1.0",
|
|
63
63
|
"react-aria-components": "1.11.0",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"@storybook/addon-onboarding": "9.0.18",
|
|
76
76
|
"@storybook/react-vite": "9.0.18",
|
|
77
77
|
"@tailwindcss/vite": "^4.1.11",
|
|
78
|
-
"@types/lodash-es": "4.17.12",
|
|
79
78
|
"@types/node": "^22.7.8",
|
|
80
79
|
"@types/react": "^19.1.0",
|
|
81
80
|
"@types/react-dom": "^19.1.0",
|
|
82
81
|
"@vitejs/plugin-react": "4.7.0",
|
|
83
82
|
"husky": "^9.1.7",
|
|
84
83
|
"lint-staged": "^16.1.4",
|
|
84
|
+
"lucide-react": "0.453.0",
|
|
85
85
|
"prettier": "3.6.2",
|
|
86
86
|
"rollup-preserve-directives": "1.1.3",
|
|
87
87
|
"sass": "1.80.6",
|