@fluid-app/portal-sdk 0.1.455 → 0.1.456

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 (68) hide show
  1. package/dist/{AlertWidget-CdWJXZn1.mjs → AlertWidget-BtkVIGr9.mjs} +2 -2
  2. package/dist/{AlertWidget-CdWJXZn1.mjs.map → AlertWidget-BtkVIGr9.mjs.map} +1 -1
  3. package/dist/{AlertWidget-BJekf1r1.cjs → AlertWidget-C5sAMhqU.cjs} +2 -2
  4. package/dist/{AlertWidget-BJekf1r1.cjs.map → AlertWidget-C5sAMhqU.cjs.map} +1 -1
  5. package/dist/{ContactsScreen-DsHXXYfF.cjs → ContactsScreen-BTCUeDHl.cjs} +1 -1
  6. package/dist/{ContactsScreen-TO0LAuHz.cjs → ContactsScreen-Cu6-ckm9.cjs} +23 -13
  7. package/dist/ContactsScreen-Cu6-ckm9.cjs.map +1 -0
  8. package/dist/{ContactsScreen-DhMQm4w2.mjs → ContactsScreen-D0l3-Xof.mjs} +23 -13
  9. package/dist/ContactsScreen-D0l3-Xof.mjs.map +1 -0
  10. package/dist/{FluidProvider-CA_HAl9a.mjs → FluidProvider-CbA8KrhD.mjs} +2 -2
  11. package/dist/{FluidProvider-CA_HAl9a.mjs.map → FluidProvider-CbA8KrhD.mjs.map} +1 -1
  12. package/dist/{FluidProvider-BULkBuyn.cjs → FluidProvider-JiGJqJQe.cjs} +2 -2
  13. package/dist/{FluidProvider-BULkBuyn.cjs.map → FluidProvider-JiGJqJQe.cjs.map} +1 -1
  14. package/dist/{MessagingScreen-DWH9xBbq.cjs → MessagingScreen-BeUhzBWr.cjs} +2 -2
  15. package/dist/{MessagingScreen-DWH9xBbq.cjs.map → MessagingScreen-BeUhzBWr.cjs.map} +1 -1
  16. package/dist/{MessagingScreen-CYOGaqKX.mjs → MessagingScreen-BtdVeSR5.mjs} +2 -2
  17. package/dist/{MessagingScreen-CYOGaqKX.mjs.map → MessagingScreen-BtdVeSR5.mjs.map} +1 -1
  18. package/dist/{MessagingScreen-B_nyIg2b.cjs → MessagingScreen-D6Bxoq0a.cjs} +5 -5
  19. package/dist/{MessagingScreen-BG6clVDQ.mjs → MessagingScreen-Dt6Rwk7_.mjs} +5 -5
  20. package/dist/{OrdersScreen-DMlrdteQ.mjs → OrdersScreen-1kPmXJga.mjs} +5 -5
  21. package/dist/{OrdersScreen-Dh_nsi8j.cjs → OrdersScreen-BSwESoF3.cjs} +2 -2
  22. package/dist/{OrdersScreen-Dh_nsi8j.cjs.map → OrdersScreen-BSwESoF3.cjs.map} +1 -1
  23. package/dist/{OrdersScreen-CfchcnYB.cjs → OrdersScreen-BirJq38x.cjs} +5 -5
  24. package/dist/{OrdersScreen-CBF6uZSk.mjs → OrdersScreen-fZFg1l1W.mjs} +2 -2
  25. package/dist/{OrdersScreen-CBF6uZSk.mjs.map → OrdersScreen-fZFg1l1W.mjs.map} +1 -1
  26. package/dist/{ProfileScreen-CbYASEr9.mjs → ProfileScreen-Bqv7MNPH.mjs} +6 -6
  27. package/dist/{ProfileScreen-CXqMOEza.cjs → ProfileScreen-BvxuA9P4.cjs} +3 -3
  28. package/dist/{ProfileScreen-CXqMOEza.cjs.map → ProfileScreen-BvxuA9P4.cjs.map} +1 -1
  29. package/dist/{ProfileScreen-t2V-W4Dv.cjs → ProfileScreen-CirvTBwX.cjs} +6 -6
  30. package/dist/{ProfileScreen-DlPK9S_Q.mjs → ProfileScreen-Dj1pTzLz.mjs} +3 -3
  31. package/dist/{ProfileScreen-DlPK9S_Q.mjs.map → ProfileScreen-Dj1pTzLz.mjs.map} +1 -1
  32. package/dist/{ShopScreen-BWDYXw4Q.cjs → ShopScreen-3ryiBWeh.cjs} +5 -5
  33. package/dist/{ShopScreen-BnuiYHKY.mjs → ShopScreen-BKWFrPHB.mjs} +2 -2
  34. package/dist/{ShopScreen-BnuiYHKY.mjs.map → ShopScreen-BKWFrPHB.mjs.map} +1 -1
  35. package/dist/{ShopScreen-CrObPeSv.cjs → ShopScreen-C3vwiETG.cjs} +2 -2
  36. package/dist/{ShopScreen-CrObPeSv.cjs.map → ShopScreen-C3vwiETG.cjs.map} +1 -1
  37. package/dist/{ShopScreen-1vtAE4X7.mjs → ShopScreen-CfvCqYJ9.mjs} +5 -5
  38. package/dist/{SubscriptionsScreen-BlB3Ppoa.cjs → SubscriptionsScreen-COBaRHDG.cjs} +6 -6
  39. package/dist/{SubscriptionsScreen-Bjdz5fx-.cjs → SubscriptionsScreen-DWB0E5Hu.cjs} +3 -3
  40. package/dist/{SubscriptionsScreen-Bjdz5fx-.cjs.map → SubscriptionsScreen-DWB0E5Hu.cjs.map} +1 -1
  41. package/dist/{SubscriptionsScreen-DyjmAOvJ.mjs → SubscriptionsScreen-Dv7PjXwb.mjs} +3 -3
  42. package/dist/{SubscriptionsScreen-DyjmAOvJ.mjs.map → SubscriptionsScreen-Dv7PjXwb.mjs.map} +1 -1
  43. package/dist/{SubscriptionsScreen-CBIjEFKA.mjs → SubscriptionsScreen-G64lYG5v.mjs} +6 -6
  44. package/dist/{TextWidget-CY71e66E.cjs → TextWidget-CNks2l1S.cjs} +4 -3
  45. package/dist/TextWidget-CNks2l1S.cjs.map +1 -0
  46. package/dist/{TextWidget-B-2RFD_g.mjs → TextWidget-cnDl92rJ.mjs} +4 -3
  47. package/dist/TextWidget-cnDl92rJ.mjs.map +1 -0
  48. package/dist/{build-widget-registry-L8a9-O3A.cjs → build-widget-registry-7slNHtKU.cjs} +5 -5
  49. package/dist/{build-widget-registry-L8a9-O3A.cjs.map → build-widget-registry-7slNHtKU.cjs.map} +1 -1
  50. package/dist/{build-widget-registry-Dy8S7Ggy.mjs → build-widget-registry-BZjLacQ8.mjs} +5 -5
  51. package/dist/{build-widget-registry-Dy8S7Ggy.mjs.map → build-widget-registry-BZjLacQ8.mjs.map} +1 -1
  52. package/dist/index.cjs +23 -23
  53. package/dist/index.d.cts +7 -0
  54. package/dist/index.d.cts.map +1 -1
  55. package/dist/index.d.mts +7 -0
  56. package/dist/index.d.mts.map +1 -1
  57. package/dist/index.mjs +23 -23
  58. package/dist/{use-portal-card-add-3ds-flow-Dt29-X8z.cjs → use-portal-card-add-3ds-flow-C_Frj80d.cjs} +2 -2
  59. package/dist/{use-portal-card-add-3ds-flow-Dt29-X8z.cjs.map → use-portal-card-add-3ds-flow-C_Frj80d.cjs.map} +1 -1
  60. package/dist/{use-portal-card-add-3ds-flow-B4wqRVNt.mjs → use-portal-card-add-3ds-flow-tvSUKAvl.mjs} +2 -2
  61. package/dist/{use-portal-card-add-3ds-flow-B4wqRVNt.mjs.map → use-portal-card-add-3ds-flow-tvSUKAvl.mjs.map} +1 -1
  62. package/dist/utils/build-remote-widget-plugin-manifests.cjs +3 -3
  63. package/dist/utils/build-remote-widget-plugin-manifests.mjs +3 -3
  64. package/package.json +15 -15
  65. package/dist/ContactsScreen-DhMQm4w2.mjs.map +0 -1
  66. package/dist/ContactsScreen-TO0LAuHz.cjs.map +0 -1
  67. package/dist/TextWidget-B-2RFD_g.mjs.map +0 -1
  68. package/dist/TextWidget-CY71e66E.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextWidget-B-2RFD_g.mjs","names":[],"sources":["../../widgets/src/widgets/TextWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getFontWeightField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n FontWeightOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { AlignCenter, AlignLeft, AlignRight } from \"lucide-react\";\n\ntype TextAlignment = \"left\" | \"center\" | \"right\";\n\nconst textAlignmentClasses: Record<TextAlignment, string> = {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n} as const;\n\ntype TextWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleFontWeight?: FontWeightOptions;\n titleColor?: ColorOptions;\n titleAlignment?: TextAlignment;\n\n // Description\n description?: string;\n descriptionFontSize?: FontSizeOptions;\n descriptionFontWeight?: FontWeightOptions;\n descriptionColor?: ColorOptions;\n descriptionAlignment?: TextAlignment;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n};\n\nexport function TextWidget({\n titleEnabled = true,\n title = \"Text Widget\",\n titleFontSize = \"xl\",\n titleFontWeight = \"bold\",\n titleColor = \"foreground\",\n titleAlignment = \"left\",\n description = \"This is a text widget\",\n descriptionFontSize = \"md\",\n descriptionFontWeight = \"normal\",\n descriptionColor = \"foreground\",\n descriptionAlignment = \"left\",\n background = {\n type: \"solid\",\n color: \"background\",\n },\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n className,\n ...props\n}: TextWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && (\n <h2\n className={`text-${titleFontSize} text-${titleColor} ${textAlignmentClasses[titleAlignment]} font-header font-${titleFontWeight}`}\n >\n {title}\n </h2>\n )}\n <p\n className={`text-${descriptionFontSize} text-${descriptionColor} ${textAlignmentClasses[descriptionAlignment]} font-${descriptionFontWeight}`}\n >\n {description}\n </p>\n </div>\n );\n}\n\nexport const textWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"TextWidget\",\n displayName: \"Text Widget\",\n tabsConfig: [{ id: \"content\", label: \"Content\" }],\n dataSourceTargetProps: [\"title\", \"description\"],\n fields: [\n // Content Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the text\",\n defaultValue: true,\n tab: \"content\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The title\",\n defaultValue: \"Heads up!\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"xl\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getFontWeightField({\n key: \"titleFontWeight\",\n label: \"Title Font Weight\",\n description: \"Font weight for the title\",\n defaultValue: \"bold\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"The color of the title\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n {\n key: \"titleAlignment\",\n label: \"Alignment\",\n type: \"buttonGroup\",\n description: \"Text alignment for the title\",\n options: [\n { icon: AlignLeft, ariaLabel: \"Align left\", value: \"left\" },\n { icon: AlignCenter, ariaLabel: \"Align center\", value: \"center\" },\n { icon: AlignRight, ariaLabel: \"Align right\", value: \"right\" },\n ],\n defaultValue: \"left\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n // Content Tab - Description Group\n {\n key: \"description\",\n label: \"Description\",\n type: \"textarea\",\n description: \"The text message\",\n rows: 3,\n defaultValue:\n \"You can add components and dependencies to your app using the cli.\",\n tab: \"content\",\n group: \"Description\",\n },\n getFontSizeField({\n key: \"descriptionFontSize\",\n label: \"Description Font Size\",\n description: \"Font size for the text\",\n defaultValue: \"md\",\n tab: \"content\",\n group: \"Description\",\n }),\n getFontWeightField({\n key: \"descriptionFontWeight\",\n label: \"Description Font Weight\",\n description: \"Font weight for the text\",\n defaultValue: \"normal\",\n tab: \"content\",\n group: \"Description\",\n }),\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"The color of the text\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Description\",\n }),\n {\n key: \"descriptionAlignment\",\n label: \"Alignment\",\n type: \"buttonGroup\",\n description: \"Text alignment for the description\",\n options: [\n { icon: AlignLeft, ariaLabel: \"Align left\", value: \"left\" },\n { icon: AlignCenter, ariaLabel: \"Align center\", value: \"center\" },\n { icon: AlignRight, ariaLabel: \"Align right\", value: \"right\" },\n ],\n defaultValue: \"left\",\n tab: \"content\",\n group: \"Description\",\n },\n // Content Tab - Style Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the text container\",\n defaultValue: \"background\",\n tab: \"content\",\n group: \"Style\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"The padding of the text container\",\n defaultValue: 4,\n tab: \"content\",\n group: \"Style\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n description: \"The border radius of the text container\",\n label: \"Border Radius\",\n tab: \"content\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"The border width of the text container\",\n defaultValue: \"none\",\n tab: \"content\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"The border color of the text container\",\n defaultValue: \"muted\",\n tab: \"content\",\n group: \"Design\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;;AA2BA,MAAM,uBAAsD;CAC1D,MAAM;CACN,QAAQ;CACR,OAAO;CACR;AA0BD,SAAgB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L,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,aAAa;GACb,OAAO;GACP,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextWidget-CY71e66E.cjs","names":["borderWidthClasses","borderColorClasses","getFontSizeField","getFontWeightField","getColorField","AlignLeft","AlignCenter","AlignRight","getPaddingField","getBorderRadiusField","getBorderWidthField","getBorderColorField"],"sources":["../../widgets/src/widgets/TextWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getFontWeightField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n FontWeightOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { AlignCenter, AlignLeft, AlignRight } from \"lucide-react\";\n\ntype TextAlignment = \"left\" | \"center\" | \"right\";\n\nconst textAlignmentClasses: Record<TextAlignment, string> = {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n} as const;\n\ntype TextWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleFontWeight?: FontWeightOptions;\n titleColor?: ColorOptions;\n titleAlignment?: TextAlignment;\n\n // Description\n description?: string;\n descriptionFontSize?: FontSizeOptions;\n descriptionFontWeight?: FontWeightOptions;\n descriptionColor?: ColorOptions;\n descriptionAlignment?: TextAlignment;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n};\n\nexport function TextWidget({\n titleEnabled = true,\n title = \"Text Widget\",\n titleFontSize = \"xl\",\n titleFontWeight = \"bold\",\n titleColor = \"foreground\",\n titleAlignment = \"left\",\n description = \"This is a text widget\",\n descriptionFontSize = \"md\",\n descriptionFontWeight = \"normal\",\n descriptionColor = \"foreground\",\n descriptionAlignment = \"left\",\n background = {\n type: \"solid\",\n color: \"background\",\n },\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n className,\n ...props\n}: TextWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && (\n <h2\n className={`text-${titleFontSize} text-${titleColor} ${textAlignmentClasses[titleAlignment]} font-header font-${titleFontWeight}`}\n >\n {title}\n </h2>\n )}\n <p\n className={`text-${descriptionFontSize} text-${descriptionColor} ${textAlignmentClasses[descriptionAlignment]} font-${descriptionFontWeight}`}\n >\n {description}\n </p>\n </div>\n );\n}\n\nexport const textWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"TextWidget\",\n displayName: \"Text Widget\",\n tabsConfig: [{ id: \"content\", label: \"Content\" }],\n dataSourceTargetProps: [\"title\", \"description\"],\n fields: [\n // Content Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the text\",\n defaultValue: true,\n tab: \"content\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The title\",\n defaultValue: \"Heads up!\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"xl\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getFontWeightField({\n key: \"titleFontWeight\",\n label: \"Title Font Weight\",\n description: \"Font weight for the title\",\n defaultValue: \"bold\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"The color of the title\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n {\n key: \"titleAlignment\",\n label: \"Alignment\",\n type: \"buttonGroup\",\n description: \"Text alignment for the title\",\n options: [\n { icon: AlignLeft, ariaLabel: \"Align left\", value: \"left\" },\n { icon: AlignCenter, ariaLabel: \"Align center\", value: \"center\" },\n { icon: AlignRight, ariaLabel: \"Align right\", value: \"right\" },\n ],\n defaultValue: \"left\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n // Content Tab - Description Group\n {\n key: \"description\",\n label: \"Description\",\n type: \"textarea\",\n description: \"The text message\",\n rows: 3,\n defaultValue:\n \"You can add components and dependencies to your app using the cli.\",\n tab: \"content\",\n group: \"Description\",\n },\n getFontSizeField({\n key: \"descriptionFontSize\",\n label: \"Description Font Size\",\n description: \"Font size for the text\",\n defaultValue: \"md\",\n tab: \"content\",\n group: \"Description\",\n }),\n getFontWeightField({\n key: \"descriptionFontWeight\",\n label: \"Description Font Weight\",\n description: \"Font weight for the text\",\n defaultValue: \"normal\",\n tab: \"content\",\n group: \"Description\",\n }),\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"The color of the text\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Description\",\n }),\n {\n key: \"descriptionAlignment\",\n label: \"Alignment\",\n type: \"buttonGroup\",\n description: \"Text alignment for the description\",\n options: [\n { icon: AlignLeft, ariaLabel: \"Align left\", value: \"left\" },\n { icon: AlignCenter, ariaLabel: \"Align center\", value: \"center\" },\n { icon: AlignRight, ariaLabel: \"Align right\", value: \"right\" },\n ],\n defaultValue: \"left\",\n tab: \"content\",\n group: \"Description\",\n },\n // Content Tab - Style Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the text container\",\n defaultValue: \"background\",\n tab: \"content\",\n group: \"Style\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"The padding of the text container\",\n defaultValue: 4,\n tab: \"content\",\n group: \"Style\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n description: \"The border radius of the text container\",\n label: \"Border Radius\",\n tab: \"content\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"The border width of the text container\",\n defaultValue: \"none\",\n tab: \"content\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"The border color of the text container\",\n defaultValue: \"muted\",\n tab: \"content\",\n group: \"Design\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;;AA2BA,MAAM,uBAAsD;CAC1D,MAAM;CACN,QAAQ;CACR,OAAO;CACR;AA0BD,SAAgB,WAAW,EACzB,eAAe,MACf,QAAQ,eACR,gBAAgB,MAChB,kBAAkB,QAClB,aAAa,cACb,iBAAiB,QACjB,cAAc,yBACd,sBAAsB,MACtB,wBAAwB,UACxB,mBAAmB,cACnB,uBAAuB,QACvB,aAAa;CACX,MAAM;CACN,OAAO;CACR,EACD,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,S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