@tiendanube/nube-sdk-ui 0.2.0 → 0.3.0

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/index.cjs CHANGED
@@ -21,8 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  box: () => box,
24
+ button: () => button,
24
25
  check: () => check,
25
26
  col: () => col,
27
+ dialog: () => dialog,
26
28
  field: () => field,
27
29
  fragment: () => fragment,
28
30
  img: () => img,
@@ -85,11 +87,25 @@ var txtarea = (props) => ({
85
87
  type: "txtarea",
86
88
  ...props
87
89
  });
90
+
91
+ // src/components/dialog.ts
92
+ var dialog = (props) => ({
93
+ type: "dialog",
94
+ ...props
95
+ });
96
+
97
+ // src/components/button.ts
98
+ var button = (props) => ({
99
+ type: "button",
100
+ ...props
101
+ });
88
102
  // Annotate the CommonJS export names for ESM import in node:
89
103
  0 && (module.exports = {
90
104
  box,
105
+ button,
91
106
  check,
92
107
  col,
108
+ dialog,
93
109
  field,
94
110
  fragment,
95
111
  img,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/components/box.ts","../src/components/col.ts","../src/components/row.ts","../src/components/field.ts","../src/components/fragment.ts","../src/components/img.ts","../src/components/txt.ts","../src/components/check.ts","../src/components/txtarea.ts"],"sourcesContent":["export * from \"./components/box\";\nexport * from \"./components/col\";\nexport * from \"./components/row\";\nexport * from \"./components/field\";\nexport * from \"./components/fragment\";\nexport * from \"./components/img\";\nexport * from \"./components/txt\";\nexport * from \"./components/check\";\nexport * from \"./components/txtarea\";\n","import type {\n\tNubeComponentBox,\n\tNubeComponentBoxProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `box` component.\n *\n * A `box` is a flexible container that can be used for layout purposes.\n * It supports properties like width, height, padding, margin, and flex-based alignment.\n *\n * @param props - The properties for configuring the box component.\n * @returns A `NubeComponentBox` object representing the box component.\n */\nexport const box = (props: NubeComponentBoxProps): NubeComponentBox => ({\n\ttype: \"box\",\n\t...props,\n});\n","import type {\n\tNubeComponentCol,\n\tNubeComponentColProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `col` (column) component.\n *\n * A `col` is a flexible column container that can be used for structuring layouts.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the column component.\n * @returns A `NubeComponentCol` object representing the column component.\n */\nexport const col = (props: NubeComponentColProps): NubeComponentCol => ({\n\ttype: \"col\",\n\t...props,\n});\n","import type {\n\tNubeComponentRow,\n\tNubeComponentRowProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `row` component.\n *\n * A `row` is a flexible container used for structuring layouts in a horizontal direction.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the row component.\n * @returns A `NubeComponentRow` object representing the row component.\n */\nexport const row = (props: NubeComponentRowProps): NubeComponentRow => ({\n\ttype: \"row\",\n\t...props,\n});\n","import type {\n\tNubeComponentField,\n\tNubeComponentFieldProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `field` component.\n *\n * A `field` represents an input element in a form, such as text fields, dropdowns, or checkboxes.\n * It supports properties like `name`, `label`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the field component.\n * @returns A `NubeComponentField` object representing the form field.\n */\nexport const field = (props: NubeComponentFieldProps): NubeComponentField => ({\n\ttype: \"field\",\n\t...props,\n});\n","import type {\n\tNubeComponentFragment,\n\tNubeComponentFragmentProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `fragment` component.\n *\n * A `fragment` is a logical grouping element that allows multiple children\n * to be wrapped without introducing an additional DOM node.\n *\n * @param props - The properties for configuring the fragment component.\n * @returns A `NubeComponentFragment` object representing the fragment.\n */\nexport const fragment = (\n\tprops: NubeComponentFragmentProps,\n): NubeComponentFragment => ({\n\ttype: \"fragment\",\n\t...props,\n});\n","import type {\n\tNubeComponentImg,\n\tNubeComponentImgProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates an `img` (image) component.\n *\n * The `img` component is used to display images. It supports properties such as\n * `src`, `alt`, `width`, `height`, and responsive `sources` for different screen sizes.\n *\n * @param props - The properties for configuring the image component.\n * @returns A `NubeComponentImg` object representing the image component.\n */\nexport const img = (props: NubeComponentImgProps): NubeComponentImg => ({\n\ttype: \"img\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxt,\n\tNubeComponentTxtProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txt` (text) component.\n *\n * The `txt` component is used to render text with optional styling.\n * It supports properties such as `color`, `background`, `heading` levels (h1-h6),\n * text formatting `modifiers` (bold, italic, etc.), and inline display.\n *\n * @param props - The properties for configuring the text component.\n * @returns A `NubeComponentTxt` object representing the text component.\n */\nexport const txt = (props: NubeComponentTxtProps): NubeComponentTxt => ({\n\ttype: \"txt\",\n\t...props,\n});\n","import type {\n\tNubeComponentCheck,\n\tNubeComponentCheckProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `check` component.\n *\n * A `check` represents a selectable field that can be toggled between checked and unchecked states.\n * It is typically used to allow users to select one or more options.\n * Supports properties such as `name`, `label`, `checked`, and event handlers (`onChange`).\n *\n * @param props - The properties for configuring the checkbox component.\n * @returns A `NubeComponentCheck` object representing the checkbox.\n */\nexport const check = (props: NubeComponentCheckProps): NubeComponentCheck => ({\n\ttype: \"check\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxtArea,\n\tNubeComponentTxtAreaProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txtarea` component.\n *\n * A `txtarea` represents a multi-line text input field that allows users to enter longer texts.\n * It supports properties such as `name`, `value`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the textarea component.\n * @returns A `NubeComponentTxtArea` object representing the textarea component.\n */\nexport const txtarea = (\n\tprops: NubeComponentTxtAreaProps,\n): NubeComponentTxtArea => ({\n\ttype: \"txtarea\",\n\t...props,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,WAAW,CACvB,WAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACFO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACJO,IAAM,UAAU,CACtB,WAC2B;AAAA,EAC3B,MAAM;AAAA,EACN,GAAG;AACJ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/box.ts","../src/components/col.ts","../src/components/row.ts","../src/components/field.ts","../src/components/fragment.ts","../src/components/img.ts","../src/components/txt.ts","../src/components/check.ts","../src/components/txtarea.ts","../src/components/dialog.ts","../src/components/button.ts"],"sourcesContent":["export * from \"./components/box\";\nexport * from \"./components/col\";\nexport * from \"./components/row\";\nexport * from \"./components/field\";\nexport * from \"./components/fragment\";\nexport * from \"./components/img\";\nexport * from \"./components/txt\";\nexport * from \"./components/check\";\nexport * from \"./components/txtarea\";\nexport * from \"./components/dialog\";\nexport * from \"./components/button\";\n","import type {\n\tNubeComponentBox,\n\tNubeComponentBoxProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `box` component.\n *\n * A `box` is a flexible container that can be used for layout purposes.\n * It supports properties like width, height, padding, margin, and flex-based alignment.\n *\n * @param props - The properties for configuring the box component.\n * @returns A `NubeComponentBox` object representing the box component.\n */\nexport const box = (props: NubeComponentBoxProps): NubeComponentBox => ({\n\ttype: \"box\",\n\t...props,\n});\n","import type {\n\tNubeComponentCol,\n\tNubeComponentColProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `col` (column) component.\n *\n * A `col` is a flexible column container that can be used for structuring layouts.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the column component.\n * @returns A `NubeComponentCol` object representing the column component.\n */\nexport const col = (props: NubeComponentColProps): NubeComponentCol => ({\n\ttype: \"col\",\n\t...props,\n});\n","import type {\n\tNubeComponentRow,\n\tNubeComponentRowProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `row` component.\n *\n * A `row` is a flexible container used for structuring layouts in a horizontal direction.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the row component.\n * @returns A `NubeComponentRow` object representing the row component.\n */\nexport const row = (props: NubeComponentRowProps): NubeComponentRow => ({\n\ttype: \"row\",\n\t...props,\n});\n","import type {\n\tNubeComponentField,\n\tNubeComponentFieldProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `field` component.\n *\n * A `field` represents an input element in a form, such as text fields, dropdowns, or checkboxes.\n * It supports properties like `name`, `label`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the field component.\n * @returns A `NubeComponentField` object representing the form field.\n */\nexport const field = (props: NubeComponentFieldProps): NubeComponentField => ({\n\ttype: \"field\",\n\t...props,\n});\n","import type {\n\tNubeComponentFragment,\n\tNubeComponentFragmentProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `fragment` component.\n *\n * A `fragment` is a logical grouping element that allows multiple children\n * to be wrapped without introducing an additional DOM node.\n *\n * @param props - The properties for configuring the fragment component.\n * @returns A `NubeComponentFragment` object representing the fragment.\n */\nexport const fragment = (\n\tprops: NubeComponentFragmentProps,\n): NubeComponentFragment => ({\n\ttype: \"fragment\",\n\t...props,\n});\n","import type {\n\tNubeComponentImg,\n\tNubeComponentImgProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates an `img` (image) component.\n *\n * The `img` component is used to display images. It supports properties such as\n * `src`, `alt`, `width`, `height`, and responsive `sources` for different screen sizes.\n *\n * @param props - The properties for configuring the image component.\n * @returns A `NubeComponentImg` object representing the image component.\n */\nexport const img = (props: NubeComponentImgProps): NubeComponentImg => ({\n\ttype: \"img\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxt,\n\tNubeComponentTxtProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txt` (text) component.\n *\n * The `txt` component is used to render text with optional styling.\n * It supports properties such as `color`, `background`, `heading` levels (h1-h6),\n * text formatting `modifiers` (bold, italic, etc.), and inline display.\n *\n * @param props - The properties for configuring the text component.\n * @returns A `NubeComponentTxt` object representing the text component.\n */\nexport const txt = (props: NubeComponentTxtProps): NubeComponentTxt => ({\n\ttype: \"txt\",\n\t...props,\n});\n","import type {\n\tNubeComponentCheck,\n\tNubeComponentCheckProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `check` component.\n *\n * A `check` represents a selectable field that can be toggled between checked and unchecked states.\n * It is typically used to allow users to select one or more options.\n * Supports properties such as `name`, `label`, `checked`, and event handlers (`onChange`).\n *\n * @param props - The properties for configuring the checkbox component.\n * @returns A `NubeComponentCheck` object representing the checkbox.\n */\nexport const check = (props: NubeComponentCheckProps): NubeComponentCheck => ({\n\ttype: \"check\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxtArea,\n\tNubeComponentTxtAreaProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txtarea` component.\n *\n * A `txtarea` represents a multi-line text input field that allows users to enter longer texts.\n * It supports properties such as `name`, `value`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the textarea component.\n * @returns A `NubeComponentTxtArea` object representing the textarea component.\n */\nexport const txtarea = (\n\tprops: NubeComponentTxtAreaProps,\n): NubeComponentTxtArea => ({\n\ttype: \"txtarea\",\n\t...props,\n});\n","import type {\n\tNubeComponentDialog,\n\tNubeComponentDialogProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `dialog` component.\n *\n * A `dialog` is a modal window used for user interactions,\n * allowing the display of titles, content, and specific actions.\n *\n * @param props - The properties for configuring the dialog component.\n * @returns A `NubeComponentDialog` object representing the dialog component.\n */\nexport const dialog = (\n\tprops: NubeComponentDialogProps,\n): NubeComponentDialog => ({\n\ttype: \"dialog\",\n\t...props,\n});\n","import type {\n\tNubeComponentButton,\n\tNubeComponentButtonProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `button` component.\n *\n * A `button` represents a clickable element typically used to trigger an action or submit a form.\n * It supports properties such as `text`, `onClick`, and style configurations.\n *\n * @param props - The properties for configuring the button component.\n * @returns A `NubeComponentButton` object representing the button component.\n */\nexport const button = (\n\tprops: NubeComponentButtonProps,\n): NubeComponentButton => ({\n\ttype: \"button\",\n\t...props,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,WAAW,CACvB,WAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACFO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACJO,IAAM,UAAU,CACtB,WAC2B;AAAA,EAC3B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,SAAS,CACrB,WAC0B;AAAA,EAC1B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,SAAS,CACrB,WAC0B;AAAA,EAC1B,MAAM;AAAA,EACN,GAAG;AACJ;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { NubeComponentBoxProps, NubeComponentBox, NubeComponentColProps, NubeComponentCol, NubeComponentRowProps, NubeComponentRow, NubeComponentFieldProps, NubeComponentField, NubeComponentFragmentProps, NubeComponentFragment, NubeComponentImgProps, NubeComponentImg, NubeComponentTxtProps, NubeComponentTxt, NubeComponentCheckProps, NubeComponentCheck, NubeComponentTxtAreaProps, NubeComponentTxtArea } from '@tiendanube/nube-sdk-types';
1
+ import { NubeComponentBoxProps, NubeComponentBox, NubeComponentColProps, NubeComponentCol, NubeComponentRowProps, NubeComponentRow, NubeComponentFieldProps, NubeComponentField, NubeComponentFragmentProps, NubeComponentFragment, NubeComponentImgProps, NubeComponentImg, NubeComponentTxtProps, NubeComponentTxt, NubeComponentCheckProps, NubeComponentCheck, NubeComponentTxtAreaProps, NubeComponentTxtArea, NubeComponentDialogProps, NubeComponentDialog, NubeComponentButtonProps, NubeComponentButton } from '@tiendanube/nube-sdk-types';
2
2
 
3
3
  /**
4
4
  * Creates a `box` component.
@@ -101,4 +101,26 @@ declare const check: (props: NubeComponentCheckProps) => NubeComponentCheck;
101
101
  */
102
102
  declare const txtarea: (props: NubeComponentTxtAreaProps) => NubeComponentTxtArea;
103
103
 
104
- export { box, check, col, field, fragment, img, row, txt, txtarea };
104
+ /**
105
+ * Creates a `dialog` component.
106
+ *
107
+ * A `dialog` is a modal window used for user interactions,
108
+ * allowing the display of titles, content, and specific actions.
109
+ *
110
+ * @param props - The properties for configuring the dialog component.
111
+ * @returns A `NubeComponentDialog` object representing the dialog component.
112
+ */
113
+ declare const dialog: (props: NubeComponentDialogProps) => NubeComponentDialog;
114
+
115
+ /**
116
+ * Creates a `button` component.
117
+ *
118
+ * A `button` represents a clickable element typically used to trigger an action or submit a form.
119
+ * It supports properties such as `text`, `onClick`, and style configurations.
120
+ *
121
+ * @param props - The properties for configuring the button component.
122
+ * @returns A `NubeComponentButton` object representing the button component.
123
+ */
124
+ declare const button: (props: NubeComponentButtonProps) => NubeComponentButton;
125
+
126
+ export { box, button, check, col, dialog, field, fragment, img, row, txt, txtarea };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NubeComponentBoxProps, NubeComponentBox, NubeComponentColProps, NubeComponentCol, NubeComponentRowProps, NubeComponentRow, NubeComponentFieldProps, NubeComponentField, NubeComponentFragmentProps, NubeComponentFragment, NubeComponentImgProps, NubeComponentImg, NubeComponentTxtProps, NubeComponentTxt, NubeComponentCheckProps, NubeComponentCheck, NubeComponentTxtAreaProps, NubeComponentTxtArea } from '@tiendanube/nube-sdk-types';
1
+ import { NubeComponentBoxProps, NubeComponentBox, NubeComponentColProps, NubeComponentCol, NubeComponentRowProps, NubeComponentRow, NubeComponentFieldProps, NubeComponentField, NubeComponentFragmentProps, NubeComponentFragment, NubeComponentImgProps, NubeComponentImg, NubeComponentTxtProps, NubeComponentTxt, NubeComponentCheckProps, NubeComponentCheck, NubeComponentTxtAreaProps, NubeComponentTxtArea, NubeComponentDialogProps, NubeComponentDialog, NubeComponentButtonProps, NubeComponentButton } from '@tiendanube/nube-sdk-types';
2
2
 
3
3
  /**
4
4
  * Creates a `box` component.
@@ -101,4 +101,26 @@ declare const check: (props: NubeComponentCheckProps) => NubeComponentCheck;
101
101
  */
102
102
  declare const txtarea: (props: NubeComponentTxtAreaProps) => NubeComponentTxtArea;
103
103
 
104
- export { box, check, col, field, fragment, img, row, txt, txtarea };
104
+ /**
105
+ * Creates a `dialog` component.
106
+ *
107
+ * A `dialog` is a modal window used for user interactions,
108
+ * allowing the display of titles, content, and specific actions.
109
+ *
110
+ * @param props - The properties for configuring the dialog component.
111
+ * @returns A `NubeComponentDialog` object representing the dialog component.
112
+ */
113
+ declare const dialog: (props: NubeComponentDialogProps) => NubeComponentDialog;
114
+
115
+ /**
116
+ * Creates a `button` component.
117
+ *
118
+ * A `button` represents a clickable element typically used to trigger an action or submit a form.
119
+ * It supports properties such as `text`, `onClick`, and style configurations.
120
+ *
121
+ * @param props - The properties for configuring the button component.
122
+ * @returns A `NubeComponentButton` object representing the button component.
123
+ */
124
+ declare const button: (props: NubeComponentButtonProps) => NubeComponentButton;
125
+
126
+ export { box, button, check, col, dialog, field, fragment, img, row, txt, txtarea };
package/dist/index.js CHANGED
@@ -51,10 +51,24 @@ var txtarea = (props) => ({
51
51
  type: "txtarea",
52
52
  ...props
53
53
  });
54
+
55
+ // src/components/dialog.ts
56
+ var dialog = (props) => ({
57
+ type: "dialog",
58
+ ...props
59
+ });
60
+
61
+ // src/components/button.ts
62
+ var button = (props) => ({
63
+ type: "button",
64
+ ...props
65
+ });
54
66
  export {
55
67
  box,
68
+ button,
56
69
  check,
57
70
  col,
71
+ dialog,
58
72
  field,
59
73
  fragment,
60
74
  img,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/box.ts","../src/components/col.ts","../src/components/row.ts","../src/components/field.ts","../src/components/fragment.ts","../src/components/img.ts","../src/components/txt.ts","../src/components/check.ts","../src/components/txtarea.ts"],"sourcesContent":["import type {\n\tNubeComponentBox,\n\tNubeComponentBoxProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `box` component.\n *\n * A `box` is a flexible container that can be used for layout purposes.\n * It supports properties like width, height, padding, margin, and flex-based alignment.\n *\n * @param props - The properties for configuring the box component.\n * @returns A `NubeComponentBox` object representing the box component.\n */\nexport const box = (props: NubeComponentBoxProps): NubeComponentBox => ({\n\ttype: \"box\",\n\t...props,\n});\n","import type {\n\tNubeComponentCol,\n\tNubeComponentColProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `col` (column) component.\n *\n * A `col` is a flexible column container that can be used for structuring layouts.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the column component.\n * @returns A `NubeComponentCol` object representing the column component.\n */\nexport const col = (props: NubeComponentColProps): NubeComponentCol => ({\n\ttype: \"col\",\n\t...props,\n});\n","import type {\n\tNubeComponentRow,\n\tNubeComponentRowProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `row` component.\n *\n * A `row` is a flexible container used for structuring layouts in a horizontal direction.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the row component.\n * @returns A `NubeComponentRow` object representing the row component.\n */\nexport const row = (props: NubeComponentRowProps): NubeComponentRow => ({\n\ttype: \"row\",\n\t...props,\n});\n","import type {\n\tNubeComponentField,\n\tNubeComponentFieldProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `field` component.\n *\n * A `field` represents an input element in a form, such as text fields, dropdowns, or checkboxes.\n * It supports properties like `name`, `label`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the field component.\n * @returns A `NubeComponentField` object representing the form field.\n */\nexport const field = (props: NubeComponentFieldProps): NubeComponentField => ({\n\ttype: \"field\",\n\t...props,\n});\n","import type {\n\tNubeComponentFragment,\n\tNubeComponentFragmentProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `fragment` component.\n *\n * A `fragment` is a logical grouping element that allows multiple children\n * to be wrapped without introducing an additional DOM node.\n *\n * @param props - The properties for configuring the fragment component.\n * @returns A `NubeComponentFragment` object representing the fragment.\n */\nexport const fragment = (\n\tprops: NubeComponentFragmentProps,\n): NubeComponentFragment => ({\n\ttype: \"fragment\",\n\t...props,\n});\n","import type {\n\tNubeComponentImg,\n\tNubeComponentImgProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates an `img` (image) component.\n *\n * The `img` component is used to display images. It supports properties such as\n * `src`, `alt`, `width`, `height`, and responsive `sources` for different screen sizes.\n *\n * @param props - The properties for configuring the image component.\n * @returns A `NubeComponentImg` object representing the image component.\n */\nexport const img = (props: NubeComponentImgProps): NubeComponentImg => ({\n\ttype: \"img\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxt,\n\tNubeComponentTxtProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txt` (text) component.\n *\n * The `txt` component is used to render text with optional styling.\n * It supports properties such as `color`, `background`, `heading` levels (h1-h6),\n * text formatting `modifiers` (bold, italic, etc.), and inline display.\n *\n * @param props - The properties for configuring the text component.\n * @returns A `NubeComponentTxt` object representing the text component.\n */\nexport const txt = (props: NubeComponentTxtProps): NubeComponentTxt => ({\n\ttype: \"txt\",\n\t...props,\n});\n","import type {\n\tNubeComponentCheck,\n\tNubeComponentCheckProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `check` component.\n *\n * A `check` represents a selectable field that can be toggled between checked and unchecked states.\n * It is typically used to allow users to select one or more options.\n * Supports properties such as `name`, `label`, `checked`, and event handlers (`onChange`).\n *\n * @param props - The properties for configuring the checkbox component.\n * @returns A `NubeComponentCheck` object representing the checkbox.\n */\nexport const check = (props: NubeComponentCheckProps): NubeComponentCheck => ({\n\ttype: \"check\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxtArea,\n\tNubeComponentTxtAreaProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txtarea` component.\n *\n * A `txtarea` represents a multi-line text input field that allows users to enter longer texts.\n * It supports properties such as `name`, `value`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the textarea component.\n * @returns A `NubeComponentTxtArea` object representing the textarea component.\n */\nexport const txtarea = (\n\tprops: NubeComponentTxtAreaProps,\n): NubeComponentTxtArea => ({\n\ttype: \"txtarea\",\n\t...props,\n});\n"],"mappings":";AAcO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,WAAW,CACvB,WAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACFO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACJO,IAAM,UAAU,CACtB,WAC2B;AAAA,EAC3B,MAAM;AAAA,EACN,GAAG;AACJ;","names":[]}
1
+ {"version":3,"sources":["../src/components/box.ts","../src/components/col.ts","../src/components/row.ts","../src/components/field.ts","../src/components/fragment.ts","../src/components/img.ts","../src/components/txt.ts","../src/components/check.ts","../src/components/txtarea.ts","../src/components/dialog.ts","../src/components/button.ts"],"sourcesContent":["import type {\n\tNubeComponentBox,\n\tNubeComponentBoxProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `box` component.\n *\n * A `box` is a flexible container that can be used for layout purposes.\n * It supports properties like width, height, padding, margin, and flex-based alignment.\n *\n * @param props - The properties for configuring the box component.\n * @returns A `NubeComponentBox` object representing the box component.\n */\nexport const box = (props: NubeComponentBoxProps): NubeComponentBox => ({\n\ttype: \"box\",\n\t...props,\n});\n","import type {\n\tNubeComponentCol,\n\tNubeComponentColProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `col` (column) component.\n *\n * A `col` is a flexible column container that can be used for structuring layouts.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the column component.\n * @returns A `NubeComponentCol` object representing the column component.\n */\nexport const col = (props: NubeComponentColProps): NubeComponentCol => ({\n\ttype: \"col\",\n\t...props,\n});\n","import type {\n\tNubeComponentRow,\n\tNubeComponentRowProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `row` component.\n *\n * A `row` is a flexible container used for structuring layouts in a horizontal direction.\n * It inherits most properties from `box`, except for the `direction` property.\n *\n * @param props - The properties for configuring the row component.\n * @returns A `NubeComponentRow` object representing the row component.\n */\nexport const row = (props: NubeComponentRowProps): NubeComponentRow => ({\n\ttype: \"row\",\n\t...props,\n});\n","import type {\n\tNubeComponentField,\n\tNubeComponentFieldProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `field` component.\n *\n * A `field` represents an input element in a form, such as text fields, dropdowns, or checkboxes.\n * It supports properties like `name`, `label`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the field component.\n * @returns A `NubeComponentField` object representing the form field.\n */\nexport const field = (props: NubeComponentFieldProps): NubeComponentField => ({\n\ttype: \"field\",\n\t...props,\n});\n","import type {\n\tNubeComponentFragment,\n\tNubeComponentFragmentProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `fragment` component.\n *\n * A `fragment` is a logical grouping element that allows multiple children\n * to be wrapped without introducing an additional DOM node.\n *\n * @param props - The properties for configuring the fragment component.\n * @returns A `NubeComponentFragment` object representing the fragment.\n */\nexport const fragment = (\n\tprops: NubeComponentFragmentProps,\n): NubeComponentFragment => ({\n\ttype: \"fragment\",\n\t...props,\n});\n","import type {\n\tNubeComponentImg,\n\tNubeComponentImgProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates an `img` (image) component.\n *\n * The `img` component is used to display images. It supports properties such as\n * `src`, `alt`, `width`, `height`, and responsive `sources` for different screen sizes.\n *\n * @param props - The properties for configuring the image component.\n * @returns A `NubeComponentImg` object representing the image component.\n */\nexport const img = (props: NubeComponentImgProps): NubeComponentImg => ({\n\ttype: \"img\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxt,\n\tNubeComponentTxtProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txt` (text) component.\n *\n * The `txt` component is used to render text with optional styling.\n * It supports properties such as `color`, `background`, `heading` levels (h1-h6),\n * text formatting `modifiers` (bold, italic, etc.), and inline display.\n *\n * @param props - The properties for configuring the text component.\n * @returns A `NubeComponentTxt` object representing the text component.\n */\nexport const txt = (props: NubeComponentTxtProps): NubeComponentTxt => ({\n\ttype: \"txt\",\n\t...props,\n});\n","import type {\n\tNubeComponentCheck,\n\tNubeComponentCheckProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `check` component.\n *\n * A `check` represents a selectable field that can be toggled between checked and unchecked states.\n * It is typically used to allow users to select one or more options.\n * Supports properties such as `name`, `label`, `checked`, and event handlers (`onChange`).\n *\n * @param props - The properties for configuring the checkbox component.\n * @returns A `NubeComponentCheck` object representing the checkbox.\n */\nexport const check = (props: NubeComponentCheckProps): NubeComponentCheck => ({\n\ttype: \"check\",\n\t...props,\n});\n","import type {\n\tNubeComponentTxtArea,\n\tNubeComponentTxtAreaProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `txtarea` component.\n *\n * A `txtarea` represents a multi-line text input field that allows users to enter longer texts.\n * It supports properties such as `name`, `value`, and event handlers (`onChange`, `onBlur`, `onFocus`).\n *\n * @param props - The properties for configuring the textarea component.\n * @returns A `NubeComponentTxtArea` object representing the textarea component.\n */\nexport const txtarea = (\n\tprops: NubeComponentTxtAreaProps,\n): NubeComponentTxtArea => ({\n\ttype: \"txtarea\",\n\t...props,\n});\n","import type {\n\tNubeComponentDialog,\n\tNubeComponentDialogProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `dialog` component.\n *\n * A `dialog` is a modal window used for user interactions,\n * allowing the display of titles, content, and specific actions.\n *\n * @param props - The properties for configuring the dialog component.\n * @returns A `NubeComponentDialog` object representing the dialog component.\n */\nexport const dialog = (\n\tprops: NubeComponentDialogProps,\n): NubeComponentDialog => ({\n\ttype: \"dialog\",\n\t...props,\n});\n","import type {\n\tNubeComponentButton,\n\tNubeComponentButtonProps,\n} from \"@tiendanube/nube-sdk-types\";\n\n/**\n * Creates a `button` component.\n *\n * A `button` represents a clickable element typically used to trigger an action or submit a form.\n * It supports properties such as `text`, `onClick`, and style configurations.\n *\n * @param props - The properties for configuring the button component.\n * @returns A `NubeComponentButton` object representing the button component.\n */\nexport const button = (\n\tprops: NubeComponentButtonProps,\n): NubeComponentButton => ({\n\ttype: \"button\",\n\t...props,\n});\n"],"mappings":";AAcO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,WAAW,CACvB,WAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACFO,IAAM,MAAM,CAAC,WAAoD;AAAA,EACvE,MAAM;AAAA,EACN,GAAG;AACJ;;;ACHO,IAAM,QAAQ,CAAC,WAAwD;AAAA,EAC7E,MAAM;AAAA,EACN,GAAG;AACJ;;;ACJO,IAAM,UAAU,CACtB,WAC2B;AAAA,EAC3B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,SAAS,CACrB,WAC0B;AAAA,EAC1B,MAAM;AAAA,EACN,GAAG;AACJ;;;ACLO,IAAM,SAAS,CACrB,WAC0B;AAAA,EAC1B,MAAM;AAAA,EACN,GAAG;AACJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiendanube/nube-sdk-ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Library for building declarative interfaces for NubeSDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",