@webiny/admin-ui 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.eb196ccd2f

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 (73) hide show
  1. package/Alert/Alert.d.ts +1 -1
  2. package/Button/IconButton.d.ts +1 -1
  3. package/Card/components/CardRoot.d.ts +3 -3
  4. package/Command/Command.d.ts +5 -5
  5. package/Dialog/components/DialogContent.d.ts +1 -1
  6. package/Dialog/components/DialogFooter.d.ts +1 -1
  7. package/Dialog/components/DialogTitle.d.ts +1 -1
  8. package/Grid/Grid.d.ts +4 -4
  9. package/Heading/Heading.d.ts +1 -1
  10. package/Link/Link.d.ts +1 -1
  11. package/RadioGroup/primitives/RadioGroupPrimitive.js +1 -1
  12. package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
  13. package/Separator/Separator.d.ts +2 -2
  14. package/Skeleton/Skeleton.d.ts +1 -1
  15. package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
  16. package/Tag/Tag.d.ts +1 -1
  17. package/Tags/Tags.d.ts +24 -0
  18. package/Tags/Tags.js +59 -0
  19. package/Tags/Tags.js.map +1 -0
  20. package/Tags/Tags.stories.d.ts +13 -0
  21. package/Tags/Tags.stories.js +92 -0
  22. package/Tags/Tags.stories.js.map +1 -0
  23. package/Tags/domain/TagItem.d.ts +18 -0
  24. package/Tags/domain/TagItem.js +26 -0
  25. package/Tags/domain/TagItem.js.map +1 -0
  26. package/Tags/domain/TagItemDto.d.ts +5 -0
  27. package/Tags/domain/TagItemDto.js +3 -0
  28. package/Tags/domain/TagItemDto.js.map +1 -0
  29. package/Tags/domain/TagItemFormatted.d.ts +5 -0
  30. package/Tags/domain/TagItemFormatted.js +3 -0
  31. package/Tags/domain/TagItemFormatted.js.map +1 -0
  32. package/Tags/domain/TagItemMapper.d.ts +5 -0
  33. package/Tags/domain/TagItemMapper.js +11 -0
  34. package/Tags/domain/TagItemMapper.js.map +1 -0
  35. package/Tags/domain/index.d.ts +4 -0
  36. package/Tags/domain/index.js +6 -0
  37. package/Tags/domain/index.js.map +1 -0
  38. package/Tags/index.d.ts +1 -0
  39. package/Tags/index.js +3 -0
  40. package/Tags/index.js.map +1 -0
  41. package/Tags/primitives/TagsPrimitive.d.ts +81 -0
  42. package/Tags/primitives/TagsPrimitive.js +54 -0
  43. package/Tags/primitives/TagsPrimitive.js.map +1 -0
  44. package/Tags/primitives/TagsPrimitive.stories.d.ts +26 -0
  45. package/Tags/primitives/TagsPrimitive.stories.js +185 -0
  46. package/Tags/primitives/TagsPrimitive.stories.js.map +1 -0
  47. package/Tags/primitives/index.d.ts +1 -0
  48. package/Tags/primitives/index.js +3 -0
  49. package/Tags/primitives/index.js.map +1 -0
  50. package/Tags/primitives/presenters/TagsInputPresenter.d.ts +22 -0
  51. package/Tags/primitives/presenters/TagsInputPresenter.js +22 -0
  52. package/Tags/primitives/presenters/TagsInputPresenter.js.map +1 -0
  53. package/Tags/primitives/presenters/TagsPresenter.d.ts +42 -0
  54. package/Tags/primitives/presenters/TagsPresenter.js +68 -0
  55. package/Tags/primitives/presenters/TagsPresenter.js.map +1 -0
  56. package/Tags/primitives/presenters/TagsPresenter.test.d.ts +1 -0
  57. package/Tags/primitives/presenters/TagsPresenter.test.js +220 -0
  58. package/Tags/primitives/presenters/TagsPresenter.test.js.map +1 -0
  59. package/Tags/primitives/presenters/TagsValuesPresenter.d.ts +28 -0
  60. package/Tags/primitives/presenters/TagsValuesPresenter.js +41 -0
  61. package/Tags/primitives/presenters/TagsValuesPresenter.js.map +1 -0
  62. package/Tags/primitives/presenters/index.d.ts +3 -0
  63. package/Tags/primitives/presenters/index.js +5 -0
  64. package/Tags/primitives/presenters/index.js.map +1 -0
  65. package/Tags/primitives/useTags.d.ts +15 -0
  66. package/Tags/primitives/useTags.js +36 -0
  67. package/Tags/primitives/useTags.js.map +1 -0
  68. package/Textarea/Textarea.d.ts +1 -1
  69. package/Textarea/Textarea.js.map +1 -1
  70. package/index.d.ts +1 -0
  71. package/index.js +1 -0
  72. package/index.js.map +1 -1
  73. package/package.json +9 -8
package/Alert/Alert.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { type VariantProps } from "../utils";
3
3
  import { type ButtonProps } from "../Button";
4
4
  declare const alertVariants: (props?: ({
5
- type?: "success" | "info" | "warning" | "danger" | null | undefined;
5
+ type?: "info" | "success" | "warning" | "danger" | null | undefined;
6
6
  variant?: "strong" | "subtle" | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
@@ -3,7 +3,7 @@ import { type VariantProps } from "../utils";
3
3
  declare const iconButtonVariants: (props?: ({
4
4
  variant?: "primary" | "secondary" | "tertiary" | "ghost" | "ghost-negative" | null | undefined;
5
5
  size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxs" | null | undefined;
6
- iconSize?: "default" | "lg" | null | undefined;
6
+ iconSize?: "lg" | "default" | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof iconButtonVariants> {
9
9
  icon?: React.ReactNode;
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import type { VariantProps } from "../../utils";
3
3
  declare const cardRootVariants: (props?: ({
4
- padding?: "standard" | "compact" | "comfortable" | null | undefined;
5
- elevation?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
6
- borderRadius?: "none" | "sm" | "md" | null | undefined;
4
+ padding?: "standard" | "comfortable" | "compact" | null | undefined;
5
+ elevation?: "sm" | "md" | "none" | "lg" | "xl" | "xs" | null | undefined;
6
+ borderRadius?: "sm" | "md" | "none" | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  interface CardRootProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof cardRootVariants> {
9
9
  }
@@ -8,14 +8,14 @@ declare const Command: (({ className, ...props }: React.ComponentPropsWithoutRef
8
8
  ref?: React.Ref<HTMLDivElement> | undefined;
9
9
  } & {
10
10
  asChild?: boolean | undefined;
11
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref">) => React.JSX.Element;
11
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref">) => React.JSX.Element;
12
12
  Group: ({ className, ...props }: Omit<{
13
13
  children?: React.ReactNode;
14
14
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
15
15
  ref?: React.Ref<HTMLDivElement> | undefined;
16
16
  } & {
17
17
  asChild?: boolean | undefined;
18
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
18
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
19
19
  heading?: React.ReactNode;
20
20
  value?: string | undefined;
21
21
  forceMount?: boolean | undefined;
@@ -28,7 +28,7 @@ declare const Command: (({ className, ...props }: React.ComponentPropsWithoutRef
28
28
  ref?: React.Ref<HTMLDivElement> | undefined;
29
29
  } & {
30
30
  asChild?: boolean | undefined;
31
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
31
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
32
32
  label?: string | undefined;
33
33
  } & React.RefAttributes<HTMLDivElement>, "ref">) => React.JSX.Element;
34
34
  Loading: (props: Omit<{
@@ -37,7 +37,7 @@ declare const Command: (({ className, ...props }: React.ComponentPropsWithoutRef
37
37
  ref?: React.Ref<HTMLDivElement> | undefined;
38
38
  } & {
39
39
  asChild?: boolean | undefined;
40
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
40
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
41
41
  progress?: number | undefined;
42
42
  label?: string | undefined;
43
43
  } & React.RefAttributes<HTMLDivElement>, "ref">) => React.JSX.Element;
@@ -45,7 +45,7 @@ declare const Command: (({ className, ...props }: React.ComponentPropsWithoutRef
45
45
  ref?: React.Ref<HTMLDivElement> | undefined;
46
46
  } & {
47
47
  asChild?: boolean | undefined;
48
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
48
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
49
49
  alwaysRender?: boolean | undefined;
50
50
  } & React.RefAttributes<HTMLDivElement>, "ref">) => React.JSX.Element;
51
51
  };
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Dialog as DialogPrimitive } from "radix-ui";
3
3
  import { type VariantProps } from "../../utils";
4
4
  declare const dialogContentVariants: (props?: ({
5
- size?: "full" | "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof dialogContentVariants> {
8
8
  dismissible?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "../../utils";
3
3
  declare const dialogFooterVariants: (props?: ({
4
- size?: "full" | "sm" | "md" | "lg" | "xl" | null | undefined;
4
+ size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
5
5
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
6
  export interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dialogFooterVariants> {
7
7
  actions?: React.ReactNode;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Dialog as DialogPrimitive } from "radix-ui";
3
3
  import { type VariantProps } from "../../utils";
4
4
  declare const dialogTitleVariants: (props?: ({
5
- size?: "full" | "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  export type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & VariantProps<typeof dialogTitleVariants>;
8
8
  export declare const DialogTitle: ({ className, size, ...props }: DialogTitleProps) => React.JSX.Element;
package/Grid/Grid.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../utils";
3
3
  declare const columnVariants: (props?: ({
4
- span?: "auto" | 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 9 | 11 | null | undefined;
5
- offset?: 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 9 | 11 | null | undefined;
6
- align?: "top" | "bottom" | "middle" | null | undefined;
4
+ span?: 1 | 4 | 2 | 3 | 5 | 12 | 6 | 8 | 10 | "auto" | 9 | 7 | 11 | null | undefined;
5
+ offset?: 1 | 4 | 2 | 3 | 5 | 6 | 8 | 10 | 9 | 7 | 11 | null | undefined;
6
+ align?: "bottom" | "top" | "middle" | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  interface ColumnProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof columnVariants> {
9
9
  children?: React.ReactNode;
@@ -28,7 +28,7 @@ declare const Column: (({ span, align, children, className, offset, ...props }:
28
28
  }>) => (props: unknown) => React.JSX.Element;
29
29
  };
30
30
  declare const gridVariants: (props?: ({
31
- gap?: "small" | "none" | "compact" | "comfortable" | "micro" | "spacious" | null | undefined;
31
+ gap?: "none" | "small" | "comfortable" | "compact" | "micro" | "spacious" | null | undefined;
32
32
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
33
33
  interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
34
34
  children: React.ReactElement<ColumnProps, typeof Column> | Array<React.ReactElement<ColumnProps, typeof Column>>;
@@ -3,7 +3,7 @@ import { type VariantProps } from "../utils";
3
3
  export type HeadingTags = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
4
  export type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
5
5
  declare const headingVariants: (props?: ({
6
- level?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
6
+ level?: 1 | 4 | 2 | 3 | 5 | 6 | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
9
9
  as?: HeadingTags;
package/Link/Link.d.ts CHANGED
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { type VariantProps } from "../utils";
3
3
  import { type LinkProps as WebinyReactRouterLinkProps } from "@webiny/react-router";
4
4
  declare const linkVariants: (props?: ({
5
- size?: "inherit" | "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | "xl" | "inherit" | null | undefined;
6
6
  variant?: "primary" | "secondary" | "primary-negative" | "secondary-negative" | null | undefined;
7
7
  underline?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -27,7 +27,7 @@ const RadioGroupRenderer = ({
27
27
  disabled
28
28
  }) => {
29
29
  return /*#__PURE__*/React.createElement(RadioGroupRoot, {
30
- value: value,
30
+ value: value ?? "",
31
31
  onValueChange: value => changeValue(value),
32
32
  disabled: disabled
33
33
  }, items.map(item => /*#__PURE__*/React.createElement(Radio, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","RadioGroup","RadioGroupPrimitives","cn","Radio","useRadioGroup","RadioGroupRoot","className","props","createElement","Root","Object","assign","RadioGroupRenderer","items","changeValue","value","disabled","onValueChange","map","item","id","key","label","RadioGroupPrimitive","vm","DeprecatedRadioGroup"],"sources":["RadioGroupPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { RadioGroup as RadioGroupPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils\";\nimport { Radio } from \"./Radio\";\nimport type { RadioItemParams, RadioItemFormatted } from \"../domains\";\nimport { useRadioGroup } from \"./useRadioGroup\";\n\n/**\n * Radio Group Root\n */\nconst RadioGroupRoot = ({ className, ...props }: RadioGroupPrimitives.RadioGroupProps) => {\n return (\n <RadioGroupPrimitives.Root\n className={cn(\"wby-grid wby-gap-sm-extra wby-py-xs-plus\", className)}\n {...props}\n />\n );\n};\n\n/**\n * Radio Group Renderer\n */\ninterface RadioGroupPrimitiveProps\n extends Omit<\n RadioGroupPrimitives.RadioGroupProps,\n \"defaultValue\" | \"onChange\" | \"onValueChange\" | \"value\"\n > {\n items: RadioItemParams[];\n /**\n * Callback triggered when the selected value changes.\n */\n onChange?: (value: string) => void;\n /**\n * Optional selected item.\n */\n value?: string;\n}\n\ninterface RadioGroupVm {\n items: RadioItemFormatted[];\n}\n\ninterface RadioGroupRendererProps extends Omit<RadioGroupPrimitiveProps, \"onChange\"> {\n items: RadioItemFormatted[];\n changeValue: (value: string) => void;\n}\n\nconst RadioGroupRenderer = ({ items, changeValue, value, disabled }: RadioGroupRendererProps) => {\n return (\n <RadioGroupRoot\n value={value}\n onValueChange={value => changeValue(value)}\n disabled={disabled}\n >\n {items.map(item => (\n <Radio\n id={item.id}\n value={item.value}\n key={item.id}\n label={item.label}\n disabled={item.disabled}\n />\n ))}\n </RadioGroupRoot>\n );\n};\n\n/**\n * Radio Group Primitive\n */\nconst RadioGroupPrimitive = (props: RadioGroupPrimitiveProps) => {\n const { vm, changeValue } = useRadioGroup(props);\n return <RadioGroupRenderer {...props} items={vm.items} changeValue={changeValue} />;\n};\n\n/**\n * @deprecated\n * This component is retained in @webiny/admin-ui and used in @webiny/ui solely as a compatibility layer.\n * It is marked as deprecated because nesting `Radio` components inside `RadioGroup` is no longer the recommended approach.\n * Instead, we now pass an array of `RadioItemDto` directly to `RadioGroup` for better maintainability.\n */\nconst DeprecatedRadioGroup = RadioGroupRoot;\n\nexport {\n RadioGroupPrimitive,\n RadioGroupRenderer,\n DeprecatedRadioGroup,\n type RadioGroupPrimitiveProps,\n type RadioGroupVm\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,IAAIC,oBAAoB,QAAQ,UAAU;AAC7D,SAASC,EAAE;AACX,SAASC,KAAK;AAEd,SAASC,aAAa;;AAEtB;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CAAC;EAAEC,SAAS;EAAE,GAAGC;AAA4C,CAAC,KAAK;EACtF,oBACIR,KAAA,CAAAS,aAAA,CAACP,oBAAoB,CAACQ,IAAI,EAAAC,MAAA,CAAAC,MAAA;IACtBL,SAAS,EAAEJ,EAAE,CAAC,0CAA0C,EAAEI,SAAS;EAAE,GACjEC,KAAK,CACZ,CAAC;AAEV,CAAC;;AAED;AACA;AACA;;AA0BA,MAAMK,kBAAkB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAkC,CAAC,KAAK;EAC7F,oBACIjB,KAAA,CAAAS,aAAA,CAACH,cAAc;IACXU,KAAK,EAAEA,KAAM;IACbE,aAAa,EAAEF,KAAK,IAAID,WAAW,CAACC,KAAK,CAAE;IAC3CC,QAAQ,EAAEA;EAAS,GAElBH,KAAK,CAACK,GAAG,CAACC,IAAI,iBACXpB,KAAA,CAAAS,aAAA,CAACL,KAAK;IACFiB,EAAE,EAAED,IAAI,CAACC,EAAG;IACZL,KAAK,EAAEI,IAAI,CAACJ,KAAM;IAClBM,GAAG,EAAEF,IAAI,CAACC,EAAG;IACbE,KAAK,EAAEH,IAAI,CAACG,KAAM;IAClBN,QAAQ,EAAEG,IAAI,CAACH;EAAS,CAC3B,CACJ,CACW,CAAC;AAEzB,CAAC;;AAED;AACA;AACA;AACA,MAAMO,mBAAmB,GAAIhB,KAA+B,IAAK;EAC7D,MAAM;IAAEiB,EAAE;IAAEV;EAAY,CAAC,GAAGV,aAAa,CAACG,KAAK,CAAC;EAChD,oBAAOR,KAAA,CAAAS,aAAA,CAACI,kBAAkB,EAAAF,MAAA,CAAAC,MAAA,KAAKJ,KAAK;IAAEM,KAAK,EAAEW,EAAE,CAACX,KAAM;IAACC,WAAW,EAAEA;EAAY,EAAE,CAAC;AACvF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMW,oBAAoB,GAAGpB,cAAc;AAE3C,SACIkB,mBAAmB,EACnBX,kBAAkB,EAClBa,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["React","RadioGroup","RadioGroupPrimitives","cn","Radio","useRadioGroup","RadioGroupRoot","className","props","createElement","Root","Object","assign","RadioGroupRenderer","items","changeValue","value","disabled","onValueChange","map","item","id","key","label","RadioGroupPrimitive","vm","DeprecatedRadioGroup"],"sources":["RadioGroupPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { RadioGroup as RadioGroupPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils\";\nimport { Radio } from \"./Radio\";\nimport type { RadioItemParams, RadioItemFormatted } from \"../domains\";\nimport { useRadioGroup } from \"./useRadioGroup\";\n\n/**\n * Radio Group Root\n */\nconst RadioGroupRoot = ({ className, ...props }: RadioGroupPrimitives.RadioGroupProps) => {\n return (\n <RadioGroupPrimitives.Root\n className={cn(\"wby-grid wby-gap-sm-extra wby-py-xs-plus\", className)}\n {...props}\n />\n );\n};\n\n/**\n * Radio Group Renderer\n */\ninterface RadioGroupPrimitiveProps\n extends Omit<\n RadioGroupPrimitives.RadioGroupProps,\n \"defaultValue\" | \"onChange\" | \"onValueChange\" | \"value\"\n > {\n items: RadioItemParams[];\n /**\n * Callback triggered when the selected value changes.\n */\n onChange?: (value: string) => void;\n /**\n * Optional selected item.\n */\n value?: string;\n}\n\ninterface RadioGroupVm {\n items: RadioItemFormatted[];\n}\n\ninterface RadioGroupRendererProps extends Omit<RadioGroupPrimitiveProps, \"onChange\"> {\n items: RadioItemFormatted[];\n changeValue: (value: string) => void;\n}\n\nconst RadioGroupRenderer = ({ items, changeValue, value, disabled }: RadioGroupRendererProps) => {\n return (\n <RadioGroupRoot\n value={value ?? \"\"}\n onValueChange={value => changeValue(value)}\n disabled={disabled}\n >\n {items.map(item => (\n <Radio\n id={item.id}\n value={item.value}\n key={item.id}\n label={item.label}\n disabled={item.disabled}\n />\n ))}\n </RadioGroupRoot>\n );\n};\n\n/**\n * Radio Group Primitive\n */\nconst RadioGroupPrimitive = (props: RadioGroupPrimitiveProps) => {\n const { vm, changeValue } = useRadioGroup(props);\n return <RadioGroupRenderer {...props} items={vm.items} changeValue={changeValue} />;\n};\n\n/**\n * @deprecated\n * This component is retained in @webiny/admin-ui and used in @webiny/ui solely as a compatibility layer.\n * It is marked as deprecated because nesting `Radio` components inside `RadioGroup` is no longer the recommended approach.\n * Instead, we now pass an array of `RadioItemDto` directly to `RadioGroup` for better maintainability.\n */\nconst DeprecatedRadioGroup = RadioGroupRoot;\n\nexport {\n RadioGroupPrimitive,\n RadioGroupRenderer,\n DeprecatedRadioGroup,\n type RadioGroupPrimitiveProps,\n type RadioGroupVm\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,IAAIC,oBAAoB,QAAQ,UAAU;AAC7D,SAASC,EAAE;AACX,SAASC,KAAK;AAEd,SAASC,aAAa;;AAEtB;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CAAC;EAAEC,SAAS;EAAE,GAAGC;AAA4C,CAAC,KAAK;EACtF,oBACIR,KAAA,CAAAS,aAAA,CAACP,oBAAoB,CAACQ,IAAI,EAAAC,MAAA,CAAAC,MAAA;IACtBL,SAAS,EAAEJ,EAAE,CAAC,0CAA0C,EAAEI,SAAS;EAAE,GACjEC,KAAK,CACZ,CAAC;AAEV,CAAC;;AAED;AACA;AACA;;AA0BA,MAAMK,kBAAkB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAkC,CAAC,KAAK;EAC7F,oBACIjB,KAAA,CAAAS,aAAA,CAACH,cAAc;IACXU,KAAK,EAAEA,KAAK,IAAI,EAAG;IACnBE,aAAa,EAAEF,KAAK,IAAID,WAAW,CAACC,KAAK,CAAE;IAC3CC,QAAQ,EAAEA;EAAS,GAElBH,KAAK,CAACK,GAAG,CAACC,IAAI,iBACXpB,KAAA,CAAAS,aAAA,CAACL,KAAK;IACFiB,EAAE,EAAED,IAAI,CAACC,EAAG;IACZL,KAAK,EAAEI,IAAI,CAACJ,KAAM;IAClBM,GAAG,EAAEF,IAAI,CAACC,EAAG;IACbE,KAAK,EAAEH,IAAI,CAACG,KAAM;IAClBN,QAAQ,EAAEG,IAAI,CAACH;EAAS,CAC3B,CACJ,CACW,CAAC;AAEzB,CAAC;;AAED;AACA;AACA;AACA,MAAMO,mBAAmB,GAAIhB,KAA+B,IAAK;EAC7D,MAAM;IAAEiB,EAAE;IAAEV;EAAY,CAAC,GAAGV,aAAa,CAACG,KAAK,CAAC;EAChD,oBAAOR,KAAA,CAAAS,aAAA,CAACI,kBAAkB,EAAAF,MAAA,CAAAC,MAAA,KAAKJ,KAAK;IAAEM,KAAK,EAAEW,EAAE,CAACX,KAAM;IAACC,WAAW,EAAEA;EAAY,EAAE,CAAC;AACvF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMW,oBAAoB,GAAGpB,cAAc;AAE3C,SACIkB,mBAAmB,EACnBX,kBAAkB,EAClBa,oBAAoB","ignoreList":[]}
@@ -2,9 +2,9 @@ import * as React from "react";
2
2
  import { Separator as SeparatorPrimitive } from "radix-ui";
3
3
  import { type VariantProps } from "../utils";
4
4
  declare const separatorVariants: (props?: ({
5
- margin?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
5
+ margin?: "sm" | "md" | "none" | "lg" | "xl" | "xs" | null | undefined;
6
6
  orientation?: "horizontal" | "vertical" | null | undefined;
7
- variant?: "base" | "transparent" | "strong" | "muted" | "dimmed" | null | undefined;
7
+ variant?: "base" | "strong" | "transparent" | "dimmed" | "muted" | null | undefined;
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
9
  type SeparatorProps = SeparatorPrimitive.SeparatorProps & VariantProps<typeof separatorVariants>;
10
10
  declare const Separator: (({ className, orientation, margin, variant, decorative, ...props }: SeparatorProps) => React.JSX.Element) & {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../utils";
3
3
  declare const skeletonVariants: (props?: ({
4
- type?: "area" | "text" | "thumbnail" | null | undefined;
4
+ type?: "text" | "area" | "thumbnail" | null | undefined;
5
5
  size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxl" | "3xl" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "../../../utils";
3
3
  declare const sliderTooltipVariants: (props?: ({
4
- side?: "top" | "bottom" | null | undefined;
4
+ side?: "bottom" | "top" | null | undefined;
5
5
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
6
  type SliderTooltipProps = VariantProps<typeof sliderTooltipVariants> & {
7
7
  textValue: string;
package/Tag/Tag.d.ts CHANGED
@@ -4,7 +4,7 @@ declare const tagVariants: (props?: ({
4
4
  isInteractive?: boolean | null | undefined;
5
5
  isDismissible?: boolean | null | undefined;
6
6
  isDisabled?: boolean | null | undefined;
7
- variant?: "accent" | "success" | "neutral-light" | "neutral-strong" | "neutral-base" | "warning" | "neutral-base-outline" | "neutral-muted" | "neutral-xstrong" | "neutral-dark" | "accent-light" | "success-light" | "destructive" | null | undefined;
7
+ variant?: "accent" | "neutral-light" | "neutral-strong" | "neutral-base" | "success" | "warning" | "neutral-base-outline" | "neutral-muted" | "neutral-xstrong" | "neutral-dark" | "accent-light" | "success-light" | "destructive" | null | undefined;
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
9
  export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content">, VariantProps<typeof tagVariants> {
10
10
  content: React.ReactNode;
package/Tags/Tags.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { type TagsPrimitiveProps } from "./primitives";
3
+ import { type FormComponentProps } from "../FormComponent";
4
+ type TagsProps = TagsPrimitiveProps & FormComponentProps;
5
+ declare const Tags: (({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element) & {
6
+ original: ({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element;
7
+ originalName: string;
8
+ displayName: string;
9
+ } & {
10
+ original: (({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element) & {
11
+ original: ({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element;
12
+ originalName: string;
13
+ displayName: string;
14
+ };
15
+ originalName: string;
16
+ displayName: string;
17
+ } & {
18
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element) & {
19
+ original: ({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element;
20
+ originalName: string;
21
+ displayName: string;
22
+ }>) => (props: unknown) => React.JSX.Element;
23
+ };
24
+ export { Tags, type TagsProps };
package/Tags/Tags.js ADDED
@@ -0,0 +1,59 @@
1
+ import React, { useCallback, useMemo } from "react";
2
+ import { makeDecoratable, generateId } from "../utils";
3
+ import { TagsPrimitive } from "./primitives";
4
+ import { FormComponentDescription, FormComponentErrorMessage, FormComponentLabel, FormComponentNote } from "../FormComponent";
5
+ const DecoratableTags = ({
6
+ label,
7
+ description,
8
+ note,
9
+ required,
10
+ disabled,
11
+ validation,
12
+ validate,
13
+ onBlur: originalOnBlur,
14
+ ...props
15
+ }) => {
16
+ const {
17
+ isValid: validationIsValid,
18
+ message: validationMessage
19
+ } = validation || {};
20
+ const id = useMemo(() => generateId(props.id), [props.id]);
21
+ const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);
22
+ const onBlur = useCallback(async e => {
23
+ if (validate) {
24
+ // Since we are accessing event in an async operation, we need to persist it.
25
+ // See https://reactjs.org/docs/events.html#event-pooling.
26
+ e.persist();
27
+ await validate();
28
+ }
29
+ originalOnBlur && originalOnBlur(e);
30
+ }, [validate, originalOnBlur]);
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ className: "wby-w-full"
33
+ }, /*#__PURE__*/React.createElement(FormComponentLabel, {
34
+ htmlFor: id,
35
+ text: label,
36
+ required: required,
37
+ disabled: disabled,
38
+ invalid: invalid
39
+ }), /*#__PURE__*/React.createElement(FormComponentDescription, {
40
+ text: description,
41
+ disabled: disabled
42
+ }), /*#__PURE__*/React.createElement(TagsPrimitive, Object.assign({}, props, {
43
+ id: id,
44
+ disabled: disabled,
45
+ invalid: invalid,
46
+ onBlur: onBlur
47
+ })), /*#__PURE__*/React.createElement(FormComponentErrorMessage, {
48
+ text: validationMessage,
49
+ invalid: invalid,
50
+ disabled: disabled
51
+ }), /*#__PURE__*/React.createElement(FormComponentNote, {
52
+ text: note,
53
+ disabled: disabled
54
+ }));
55
+ };
56
+ const Tags = makeDecoratable("Tags", DecoratableTags);
57
+ export { Tags };
58
+
59
+ //# sourceMappingURL=Tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useMemo","makeDecoratable","generateId","TagsPrimitive","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","FormComponentNote","DecoratableTags","label","description","note","required","disabled","validation","validate","onBlur","originalOnBlur","props","isValid","validationIsValid","message","validationMessage","id","invalid","e","persist","createElement","className","htmlFor","text","Object","assign","Tags"],"sources":["Tags.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { makeDecoratable, generateId } from \"~/utils\";\nimport { TagsPrimitive, type TagsPrimitiveProps } from \"./primitives\";\n\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote,\n type FormComponentProps\n} from \"~/FormComponent\";\n\ntype TagsProps = TagsPrimitiveProps & FormComponentProps;\n\nconst DecoratableTags = ({\n label,\n description,\n note,\n required,\n disabled,\n validation,\n validate,\n onBlur: originalOnBlur,\n ...props\n}: TagsProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const id = useMemo(() => generateId(props.id), [props.id]);\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n\n const onBlur = useCallback(\n async (e: React.FocusEvent<HTMLInputElement>) => {\n if (validate) {\n // Since we are accessing event in an async operation, we need to persist it.\n // See https://reactjs.org/docs/events.html#event-pooling.\n e.persist();\n await validate();\n }\n originalOnBlur && originalOnBlur(e);\n },\n [validate, originalOnBlur]\n );\n\n return (\n <div className={\"wby-w-full\"}>\n <FormComponentLabel\n htmlFor={id}\n text={label}\n required={required}\n disabled={disabled}\n invalid={invalid}\n />\n <FormComponentDescription text={description} disabled={disabled} />\n <TagsPrimitive\n {...props}\n id={id}\n disabled={disabled}\n invalid={invalid}\n onBlur={onBlur}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={disabled}\n />\n <FormComponentNote text={note} disabled={disabled} />\n </div>\n );\n};\n\nconst Tags = makeDecoratable(\"Tags\", DecoratableTags);\n\nexport { Tags, type TagsProps };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,eAAe,EAAEC,UAAU;AACpC,SAASC,aAAa;AAEtB,SACIC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,EAClBC,iBAAiB;AAMrB,MAAMC,eAAe,GAAGA,CAAC;EACrBC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,MAAM,EAAEC,cAAc;EACtB,GAAGC;AACI,CAAC,KAAK;EACb,MAAM;IAAEC,OAAO,EAAEC,iBAAiB;IAAEC,OAAO,EAAEC;EAAkB,CAAC,GAAGR,UAAU,IAAI,CAAC,CAAC;EACnF,MAAMS,EAAE,GAAGvB,OAAO,CAAC,MAAME,UAAU,CAACgB,KAAK,CAACK,EAAE,CAAC,EAAE,CAACL,KAAK,CAACK,EAAE,CAAC,CAAC;EAC1D,MAAMC,OAAO,GAAGxB,OAAO,CAAC,MAAMoB,iBAAiB,KAAK,KAAK,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAE/E,MAAMJ,MAAM,GAAGjB,WAAW,CACtB,MAAO0B,CAAqC,IAAK;IAC7C,IAAIV,QAAQ,EAAE;MACV;MACA;MACAU,CAAC,CAACC,OAAO,CAAC,CAAC;MACX,MAAMX,QAAQ,CAAC,CAAC;IACpB;IACAE,cAAc,IAAIA,cAAc,CAACQ,CAAC,CAAC;EACvC,CAAC,EACD,CAACV,QAAQ,EAAEE,cAAc,CAC7B,CAAC;EAED,oBACInB,KAAA,CAAA6B,aAAA;IAAKC,SAAS,EAAE;EAAa,gBACzB9B,KAAA,CAAA6B,aAAA,CAACrB,kBAAkB;IACfuB,OAAO,EAAEN,EAAG;IACZO,IAAI,EAAErB,KAAM;IACZG,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA;EAAQ,CACpB,CAAC,eACF1B,KAAA,CAAA6B,aAAA,CAACvB,wBAAwB;IAAC0B,IAAI,EAAEpB,WAAY;IAACG,QAAQ,EAAEA;EAAS,CAAE,CAAC,eACnEf,KAAA,CAAA6B,aAAA,CAACxB,aAAa,EAAA4B,MAAA,CAAAC,MAAA,KACNd,KAAK;IACTK,EAAE,EAAEA,EAAG;IACPV,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA,OAAQ;IACjBR,MAAM,EAAEA;EAAO,EAClB,CAAC,eACFlB,KAAA,CAAA6B,aAAA,CAACtB,yBAAyB;IACtByB,IAAI,EAAER,iBAAkB;IACxBE,OAAO,EAAEA,OAAQ;IACjBX,QAAQ,EAAEA;EAAS,CACtB,CAAC,eACFf,KAAA,CAAA6B,aAAA,CAACpB,iBAAiB;IAACuB,IAAI,EAAEnB,IAAK;IAACE,QAAQ,EAAEA;EAAS,CAAE,CACnD,CAAC;AAEd,CAAC;AAED,MAAMoB,IAAI,GAAGhC,eAAe,CAAC,MAAM,EAAEO,eAAe,CAAC;AAErD,SAASyB,IAAI","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Tags } from "./Tags";
3
+ declare const meta: Meta<typeof Tags>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Tags>;
6
+ export declare const Default: Story;
7
+ export declare const WithLabel: Story;
8
+ export declare const WithRequiredLabel: Story;
9
+ export declare const WithDescription: Story;
10
+ export declare const WithNotes: Story;
11
+ export declare const WithErrors: Story;
12
+ export declare const Disabled: Story;
13
+ export declare const FullExample: Story;
@@ -0,0 +1,92 @@
1
+ import React, { useState } from "react";
2
+ import { Tags } from "./Tags";
3
+ const meta = {
4
+ title: "Components/Form/Tags",
5
+ component: Tags,
6
+ argTypes: {
7
+ onChange: {
8
+ action: "onChange"
9
+ },
10
+ onValueInput: {
11
+ action: "onValueInput"
12
+ },
13
+ onValueAdd: {
14
+ action: "onValueAdd"
15
+ },
16
+ onValueRemove: {
17
+ action: "onValueRemove"
18
+ },
19
+ disabled: {
20
+ control: "boolean",
21
+ defaultValue: false
22
+ }
23
+ },
24
+ parameters: {
25
+ layout: "padded"
26
+ },
27
+ render: args => {
28
+ const [values, setValues] = useState(args.value);
29
+ return /*#__PURE__*/React.createElement(Tags, Object.assign({}, args, {
30
+ value: values,
31
+ onChange: setValues
32
+ }));
33
+ }
34
+ };
35
+ export default meta;
36
+ export const Default = {};
37
+ export const WithLabel = {
38
+ args: {
39
+ ...Default.args,
40
+ label: "Any field label"
41
+ }
42
+ };
43
+ export const WithRequiredLabel = {
44
+ args: {
45
+ ...Default.args,
46
+ label: "Any field label",
47
+ required: true
48
+ }
49
+ };
50
+ export const WithDescription = {
51
+ args: {
52
+ ...Default.args,
53
+ description: "Provide the required information for processing your request."
54
+ }
55
+ };
56
+ export const WithNotes = {
57
+ args: {
58
+ ...Default.args,
59
+ note: "Note: Ensure your selection or input is accurate before proceeding."
60
+ }
61
+ };
62
+ export const WithErrors = {
63
+ args: {
64
+ ...Default.args,
65
+ validation: {
66
+ isValid: false,
67
+ message: "This field is required."
68
+ }
69
+ }
70
+ };
71
+ export const Disabled = {
72
+ args: {
73
+ ...Default.args,
74
+ label: "Any field label",
75
+ disabled: true
76
+ }
77
+ };
78
+ export const FullExample = {
79
+ args: {
80
+ ...Default.args,
81
+ label: "Any field label",
82
+ required: true,
83
+ description: "Provide the required information for processing your request.",
84
+ note: "Note: Ensure your selection or input is accurate before proceeding.",
85
+ validation: {
86
+ isValid: false,
87
+ message: "This field is required."
88
+ }
89
+ }
90
+ };
91
+
92
+ //# sourceMappingURL=Tags.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Tags","meta","title","component","argTypes","onChange","action","onValueInput","onValueAdd","onValueRemove","disabled","control","defaultValue","parameters","layout","render","args","values","setValues","value","createElement","Object","assign","Default","WithLabel","label","WithRequiredLabel","required","WithDescription","description","WithNotes","note","WithErrors","validation","isValid","message","Disabled","FullExample"],"sources":["Tags.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Tags } from \"./Tags\";\n\nconst meta: Meta<typeof Tags> = {\n title: \"Components/Form/Tags\",\n component: Tags,\n argTypes: {\n onChange: { action: \"onChange\" },\n onValueInput: { action: \"onValueInput\" },\n onValueAdd: { action: \"onValueAdd\" },\n onValueRemove: { action: \"onValueRemove\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [values, setValues] = useState(args.value);\n return <Tags {...args} value={values} onChange={setValues} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tags>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithRequiredLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const FullExample: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true,\n description: \"Provide the required information for processing your request.\",\n note: \"Note: Ensure your selection or input is accurate before proceeding.\",\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AAEvC,SAASC,IAAI;AAEb,MAAMC,IAAuB,GAAG;EAC5BC,KAAK,EAAE,sBAAsB;EAC7BC,SAAS,EAAEH,IAAI;EACfI,QAAQ,EAAE;IACNC,QAAQ,EAAE;MAAEC,MAAM,EAAE;IAAW,CAAC;IAChCC,YAAY,EAAE;MAAED,MAAM,EAAE;IAAe,CAAC;IACxCE,UAAU,EAAE;MAAEF,MAAM,EAAE;IAAa,CAAC;IACpCG,aAAa,EAAE;MAAEH,MAAM,EAAE;IAAgB,CAAC;IAC1CI,QAAQ,EAAE;MACNC,OAAO,EAAE,SAAS;MAClBC,YAAY,EAAE;IAClB;EACJ,CAAC;EACDC,UAAU,EAAE;IACRC,MAAM,EAAE;EACZ,CAAC;EACDC,MAAM,EAAEC,IAAI,IAAI;IACZ,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGnB,QAAQ,CAACiB,IAAI,CAACG,KAAK,CAAC;IAChD,oBAAOrB,KAAA,CAAAsB,aAAA,CAACpB,IAAI,EAAAqB,MAAA,CAAAC,MAAA,KAAKN,IAAI;MAAEG,KAAK,EAAEF,MAAO;MAACZ,QAAQ,EAAEa;IAAU,EAAE,CAAC;EACjE;AACJ,CAAC;AAED,eAAejB,IAAI;AAGnB,OAAO,MAAMsB,OAAc,GAAG,CAAC,CAAC;AAEhC,OAAO,MAAMC,SAAgB,GAAG;EAC5BR,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfS,KAAK,EAAE;EACX;AACJ,CAAC;AAED,OAAO,MAAMC,iBAAwB,GAAG;EACpCV,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfS,KAAK,EAAE,iBAAiB;IACxBE,QAAQ,EAAE;EACd;AACJ,CAAC;AAED,OAAO,MAAMC,eAAsB,GAAG;EAClCZ,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfa,WAAW,EAAE;EACjB;AACJ,CAAC;AAED,OAAO,MAAMC,SAAgB,GAAG;EAC5Bd,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfe,IAAI,EAAE;EACV;AACJ,CAAC;AAED,OAAO,MAAMC,UAAiB,GAAG;EAC7BhB,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfiB,UAAU,EAAE;MACRC,OAAO,EAAE,KAAK;MACdC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC;AAED,OAAO,MAAMC,QAAe,GAAG;EAC3BpB,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfS,KAAK,EAAE,iBAAiB;IACxBf,QAAQ,EAAE;EACd;AACJ,CAAC;AAED,OAAO,MAAM2B,WAAkB,GAAG;EAC9BrB,IAAI,EAAE;IACF,GAAGO,OAAO,CAACP,IAAI;IACfS,KAAK,EAAE,iBAAiB;IACxBE,QAAQ,EAAE,IAAI;IACdE,WAAW,EAAE,+DAA+D;IAC5EE,IAAI,EAAE,qEAAqE;IAC3EE,UAAU,EAAE;MACRC,OAAO,EAAE,KAAK;MACdC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ export declare class TagItem {
2
+ private readonly _id;
3
+ private readonly _label;
4
+ protected _protected: boolean;
5
+ protected constructor(data: {
6
+ id: string;
7
+ label: string;
8
+ protected: boolean;
9
+ });
10
+ static create(data: {
11
+ id?: string;
12
+ label: string;
13
+ protected?: boolean;
14
+ }): TagItem;
15
+ get id(): string;
16
+ get label(): string;
17
+ get protected(): boolean;
18
+ }
@@ -0,0 +1,26 @@
1
+ import { generateId } from "../../utils";
2
+ export class TagItem {
3
+ constructor(data) {
4
+ this._id = data.id;
5
+ this._label = data.label;
6
+ this._protected = data.protected;
7
+ }
8
+ static create(data) {
9
+ return new TagItem({
10
+ id: generateId(data.id),
11
+ label: data.label,
12
+ protected: data.protected || false
13
+ });
14
+ }
15
+ get id() {
16
+ return this._id;
17
+ }
18
+ get label() {
19
+ return this._label;
20
+ }
21
+ get protected() {
22
+ return this._protected;
23
+ }
24
+ }
25
+
26
+ //# sourceMappingURL=TagItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["generateId","TagItem","constructor","data","_id","id","_label","label","_protected","protected","create"],"sources":["TagItem.ts"],"sourcesContent":["import { generateId } from \"~/utils\";\n\nexport class TagItem {\n private readonly _id: string;\n private readonly _label: string;\n protected _protected: boolean;\n\n protected constructor(data: { id: string; label: string; protected: boolean }) {\n this._id = data.id;\n this._label = data.label;\n this._protected = data.protected;\n }\n\n static create(data: { id?: string; label: string; protected?: boolean }): TagItem {\n return new TagItem({\n id: generateId(data.id),\n label: data.label,\n protected: data.protected || false\n });\n }\n\n get id() {\n return this._id;\n }\n\n get label() {\n return this._label;\n }\n\n get protected() {\n return this._protected;\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU;AAEnB,OAAO,MAAMC,OAAO,CAAC;EAKPC,WAAWA,CAACC,IAAuD,EAAE;IAC3E,IAAI,CAACC,GAAG,GAAGD,IAAI,CAACE,EAAE;IAClB,IAAI,CAACC,MAAM,GAAGH,IAAI,CAACI,KAAK;IACxB,IAAI,CAACC,UAAU,GAAGL,IAAI,CAACM,SAAS;EACpC;EAEA,OAAOC,MAAMA,CAACP,IAAyD,EAAW;IAC9E,OAAO,IAAIF,OAAO,CAAC;MACfI,EAAE,EAAEL,UAAU,CAACG,IAAI,CAACE,EAAE,CAAC;MACvBE,KAAK,EAAEJ,IAAI,CAACI,KAAK;MACjBE,SAAS,EAAEN,IAAI,CAACM,SAAS,IAAI;IACjC,CAAC,CAAC;EACN;EAEA,IAAIJ,EAAEA,CAAA,EAAG;IACL,OAAO,IAAI,CAACD,GAAG;EACnB;EAEA,IAAIG,KAAKA,CAAA,EAAG;IACR,OAAO,IAAI,CAACD,MAAM;EACtB;EAEA,IAAIG,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACD,UAAU;EAC1B;AACJ","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export interface TagItemDto {
2
+ id?: string;
3
+ label: string;
4
+ protected?: boolean;
5
+ }
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=TagItemDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["TagItemDto.ts"],"sourcesContent":["export interface TagItemDto {\n id?: string;\n label: string;\n protected?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export interface TagItemFormatted {
2
+ id: string;
3
+ label: string;
4
+ protected: boolean;
5
+ }
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=TagItemFormatted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["TagItemFormatted.ts"],"sourcesContent":["export interface TagItemFormatted {\n id: string;\n label: string;\n protected: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import type { TagItem } from "./TagItem";
2
+ import type { TagItemFormatted } from "./TagItemFormatted";
3
+ export declare class TagItemMapper {
4
+ static toFormatted(item: TagItem): TagItemFormatted;
5
+ }
@@ -0,0 +1,11 @@
1
+ export class TagItemMapper {
2
+ static toFormatted(item) {
3
+ return {
4
+ id: item.id,
5
+ label: item.label,
6
+ protected: item.protected
7
+ };
8
+ }
9
+ }
10
+
11
+ //# sourceMappingURL=TagItemMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TagItemMapper","toFormatted","item","id","label","protected"],"sources":["TagItemMapper.ts"],"sourcesContent":["import type { TagItem } from \"./TagItem\";\nimport type { TagItemFormatted } from \"./TagItemFormatted\";\n\nexport class TagItemMapper {\n static toFormatted(item: TagItem): TagItemFormatted {\n return {\n id: item.id,\n label: item.label,\n protected: item.protected\n };\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,aAAa,CAAC;EACvB,OAAOC,WAAWA,CAACC,IAAa,EAAoB;IAChD,OAAO;MACHC,EAAE,EAAED,IAAI,CAACC,EAAE;MACXC,KAAK,EAAEF,IAAI,CAACE,KAAK;MACjBC,SAAS,EAAEH,IAAI,CAACG;IACpB,CAAC;EACL;AACJ","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export * from "./TagItem";
2
+ export * from "./TagItemDto";
3
+ export * from "./TagItemFormatted";
4
+ export * from "./TagItemMapper";
@@ -0,0 +1,6 @@
1
+ export * from "./TagItem";
2
+ export * from "./TagItemDto";
3
+ export * from "./TagItemFormatted";
4
+ export * from "./TagItemMapper";
5
+
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./TagItem\";\nexport * from \"./TagItemDto\";\nexport * from \"./TagItemFormatted\";\nexport * from \"./TagItemMapper\";\n"],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export * from "./Tags";
package/Tags/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./Tags";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Tags\";\n"],"mappings":"AAAA","ignoreList":[]}