@vkzstudio/muza-ui 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +42 -6
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +71 -17
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +66 -20
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +39 -39
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +69 -36
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +38 -7
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +165 -163
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -17
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.d.ts +10 -11
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +103 -19
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +100 -111
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +6 -1
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/index.d.ts +1 -1
- package/dist/components/ExpandableTable/index.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts +22 -0
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +38 -41
- package/dist/components/FileUpload/FileUpload.d.ts +137 -42
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +87 -83
- package/dist/components/FileUpload/FileUpload.stories.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +1 -1
- package/dist/components/Icons/CustomBadges.d.ts +14 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -0
- package/dist/components/Icons/CustomBadges.js +334 -0
- package/dist/components/Icons/CustomIcons.d.ts +24 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +88 -42
- package/dist/components/Icons/CustomLogos.d.ts +29 -0
- package/dist/components/Icons/CustomLogos.d.ts.map +1 -0
- package/dist/components/Icons/CustomLogos.js +593 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +7 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +33 -34
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +24 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +71 -52
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +50 -23
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +18 -17
- package/dist/components/Reorderable/Reorderable.d.ts +48 -1
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +34 -17
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +266 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts +39 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +134 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts +14 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts +2 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +58 -28
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +123 -92
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/utils.d.ts +1 -0
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +5 -2
- package/dist/components/TextEditor/TextEditor.d.ts +82 -46
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/index.d.ts +1 -1
- package/dist/components/TextEditor/index.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +41 -10
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts +69 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.js +64 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts +8 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/index.d.ts +2 -0
- package/dist/components/ToggleCheckButton/index.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts +19 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts +8 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.d.ts +11 -0
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.js +24 -13
- package/dist/index.js +236 -215
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-colors.css +64 -3
- package/dist/styles/token-sizes.css +86 -54
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +16 -5
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AnyExtension } from '@tiptap/core';
|
|
3
3
|
import { Editor } from '@tiptap/react';
|
|
4
|
-
/**
|
|
5
|
-
type HistoryItem = 'undo' | 'redo';
|
|
6
|
-
/** Heading level
|
|
7
|
-
type HeadingLevel = 1 | 2 | 3;
|
|
8
|
-
/**
|
|
9
|
-
type FormattingItem = 'bold' | 'italic' | 'strikethrough';
|
|
10
|
-
/**
|
|
11
|
-
type ListItem = 'bullet' | 'ordered';
|
|
4
|
+
/** Identifier for a history toolbar item. */
|
|
5
|
+
export type HistoryItem = 'undo' | 'redo';
|
|
6
|
+
/** Heading level supported by the editor (H1, H2, H3). */
|
|
7
|
+
export type HeadingLevel = 1 | 2 | 3;
|
|
8
|
+
/** Identifier for a text formatting toolbar item. */
|
|
9
|
+
export type FormattingItem = 'bold' | 'italic' | 'strikethrough';
|
|
10
|
+
/** Identifier for a list toolbar item. */
|
|
11
|
+
export type ListItem = 'bullet' | 'ordered';
|
|
12
12
|
/**
|
|
13
13
|
* Configuration for the TextEditor toolbar.
|
|
14
14
|
* Each property can be:
|
|
@@ -28,17 +28,33 @@ type ListItem = 'bullet' | 'ordered';
|
|
|
28
28
|
* }
|
|
29
29
|
*/
|
|
30
30
|
export interface TextEditorToolbarConfig {
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Controls the history buttons (undo/redo). Pass an array to show only specific items.
|
|
33
|
+
* @default true
|
|
34
|
+
* @see HistoryItem
|
|
35
|
+
*/
|
|
32
36
|
history?: boolean | HistoryItem[];
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Controls the heading buttons (H1/H2/H3). Pass an array to show only specific levels.
|
|
39
|
+
* @default true
|
|
40
|
+
* @see HeadingLevel
|
|
41
|
+
*/
|
|
34
42
|
headings?: boolean | HeadingLevel[];
|
|
35
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Controls the formatting buttons (bold/italic/strikethrough). Pass an array to show only specific items.
|
|
45
|
+
* @default true
|
|
46
|
+
* @see FormattingItem
|
|
47
|
+
*/
|
|
36
48
|
formatting?: boolean | FormattingItem[];
|
|
37
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Controls the list buttons (bullet/ordered). Pass an array to show only specific items.
|
|
51
|
+
* @default true
|
|
52
|
+
* @see ListItem
|
|
53
|
+
*/
|
|
38
54
|
lists?: boolean | ListItem[];
|
|
39
|
-
/**
|
|
55
|
+
/** Controls the link button. When `false`, link pasting is also disabled. @default true */
|
|
40
56
|
link?: boolean;
|
|
41
|
-
/**
|
|
57
|
+
/** Controls the clear-formatting button. @default true */
|
|
42
58
|
clearFormatting?: boolean;
|
|
43
59
|
}
|
|
44
60
|
/**
|
|
@@ -54,90 +70,110 @@ export interface TextEditorToolbarConfig {
|
|
|
54
70
|
* const html = editorRef.current?.getHTML()
|
|
55
71
|
*/
|
|
56
72
|
export interface TextEditorRef {
|
|
57
|
-
/** The underlying TipTap editor instance */
|
|
73
|
+
/** The underlying TipTap editor instance. */
|
|
58
74
|
editor: Editor | null;
|
|
59
|
-
/** Focuses the editor */
|
|
75
|
+
/** Focuses the editor. */
|
|
60
76
|
focus: () => void;
|
|
61
|
-
/** Removes focus from the editor */
|
|
77
|
+
/** Removes focus from the editor. */
|
|
62
78
|
blur: () => void;
|
|
63
|
-
/** Returns the current content as HTML */
|
|
79
|
+
/** Returns the current content as HTML. */
|
|
64
80
|
getHTML: () => string;
|
|
65
|
-
/** Returns the current content as plain text */
|
|
81
|
+
/** Returns the current content as plain text. */
|
|
66
82
|
getText: () => string;
|
|
67
|
-
/** Returns true if the editor has no content */
|
|
83
|
+
/** Returns `true` if the editor has no content. */
|
|
68
84
|
isEmpty: () => boolean;
|
|
69
|
-
/**
|
|
85
|
+
/** Replaces the editor content with the given HTML string. */
|
|
70
86
|
setContent: (html: string) => void;
|
|
71
87
|
}
|
|
72
88
|
/**
|
|
73
89
|
* Props for the TextEditor component.
|
|
74
90
|
*/
|
|
75
91
|
export interface TextEditorProps {
|
|
76
|
-
/** Controlled value
|
|
92
|
+
/** Controlled value as an HTML string. Pair with `onChange` for controlled usage. */
|
|
77
93
|
value?: string;
|
|
78
|
-
/** Initial value for uncontrolled
|
|
94
|
+
/** Initial HTML value for uncontrolled usage. */
|
|
79
95
|
defaultValue?: string;
|
|
80
96
|
/**
|
|
81
|
-
* Fires when content changes. Receives empty string when editor is
|
|
82
|
-
* otherwise HTML
|
|
97
|
+
* Fires when the content changes. Receives an empty string when the editor is
|
|
98
|
+
* empty (no visible text), otherwise the current HTML.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* <TextEditor onChange={(html) => setValue(html)} />
|
|
83
102
|
*/
|
|
84
103
|
onChange?: (html: string) => void;
|
|
85
|
-
/** Fires when the editor loses focus */
|
|
104
|
+
/** Fires when the editor loses focus. */
|
|
86
105
|
onBlur?: () => void;
|
|
87
|
-
/** Fires when the editor gains focus */
|
|
106
|
+
/** Fires when the editor gains focus. */
|
|
88
107
|
onFocus?: () => void;
|
|
89
|
-
/** Placeholder text shown when editor is empty */
|
|
108
|
+
/** Placeholder text shown when the editor is empty. */
|
|
90
109
|
placeholder?: string;
|
|
91
|
-
/** Label displayed above the editor */
|
|
110
|
+
/** Label displayed above the editor. */
|
|
92
111
|
label?: string;
|
|
93
|
-
/** Helper text displayed below the editor */
|
|
112
|
+
/** Helper text displayed below the editor. Replaced by the error message when `error` is a string. */
|
|
94
113
|
hint?: string;
|
|
95
|
-
/** Tooltip content shown next to the label */
|
|
114
|
+
/** Tooltip content shown next to the label. */
|
|
96
115
|
infoTooltip?: string;
|
|
97
|
-
/**
|
|
116
|
+
/** Prevents editing and applies disabled styling. @default false */
|
|
98
117
|
disabled?: boolean;
|
|
99
|
-
/** Allows viewing but not editing content */
|
|
118
|
+
/** Allows viewing but not editing the content. @default false */
|
|
100
119
|
readOnly?: boolean;
|
|
101
120
|
/** Marks the field as required and displays a red asterisk next to the label. @default false */
|
|
102
121
|
required?: boolean;
|
|
103
122
|
/** Hides the required asterisk even when `required` is true. @default false */
|
|
104
123
|
disableRequiredAsterisk?: boolean;
|
|
105
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Error state. A string is shown as the error message below the editor;
|
|
126
|
+
* a boolean only applies the error border styling.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* <TextEditor error="Title is required" />
|
|
130
|
+
* <TextEditor error={!!formErrors.title} />
|
|
131
|
+
*/
|
|
106
132
|
error?: string | boolean;
|
|
107
133
|
/**
|
|
108
|
-
* Toolbar configuration.
|
|
134
|
+
* Toolbar configuration. Controls which toolbar groups are visible.
|
|
109
135
|
* @see TextEditorToolbarConfig
|
|
110
136
|
*/
|
|
111
137
|
toolbar?: TextEditorToolbarConfig;
|
|
112
|
-
/** Additional content rendered at the end of the toolbar */
|
|
138
|
+
/** Additional content rendered at the end of the toolbar. */
|
|
113
139
|
toolbarExtra?: ReactNode;
|
|
114
140
|
/**
|
|
115
141
|
* Additional TipTap extensions to add to the editor.
|
|
142
|
+
*
|
|
116
143
|
* @example
|
|
117
144
|
* import Mention from '@tiptap/extension-mention'
|
|
118
145
|
* <TextEditor extensions={[Mention.configure({ ... })]} />
|
|
119
146
|
*/
|
|
120
147
|
extensions?: AnyExtension[];
|
|
121
148
|
/**
|
|
122
|
-
* Minimum height of the content area in pixels. Clamped to a minimum of
|
|
123
|
-
* to ensure the link bubble menu has enough space.
|
|
149
|
+
* Minimum height of the content area in pixels. Clamped to a minimum of 200px
|
|
150
|
+
* to ensure the link bubble menu has enough space.
|
|
151
|
+
* @default 200
|
|
124
152
|
*/
|
|
125
153
|
minHeight?: number;
|
|
126
|
-
/** Maximum height of the content area
|
|
154
|
+
/** Maximum height of the content area. Enables scrolling when content exceeds it. */
|
|
127
155
|
maxHeight?: number | string;
|
|
128
|
-
/** Enables vertical resizing.
|
|
156
|
+
/** Enables vertical resizing via the content area handle. @default true */
|
|
129
157
|
resizable?: boolean;
|
|
130
|
-
/** Additional class name for the root element */
|
|
158
|
+
/** Additional class name for the root element. */
|
|
131
159
|
className?: string;
|
|
132
|
-
/** Additional class name for the content area */
|
|
160
|
+
/** Additional class name for the scrollable content area. */
|
|
133
161
|
contentClassName?: string;
|
|
134
|
-
/** Disables built-in content formatting styles (headings, paragraphs, lists, links).
|
|
162
|
+
/** Disables built-in content formatting styles (headings, paragraphs, lists, links). @default false */
|
|
135
163
|
unstyled?: boolean;
|
|
136
|
-
/** Additional class name for the TipTap editor element */
|
|
164
|
+
/** Additional class name for the inner TipTap editor element. */
|
|
137
165
|
editorClassName?: string;
|
|
138
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Maximum character count. Blocks input past this limit and enables the counter
|
|
168
|
+
* when `showCharacterCount` is true. Counts plain-text characters only — formatting
|
|
169
|
+
* markup is excluded.
|
|
170
|
+
*/
|
|
139
171
|
maxLength?: number;
|
|
140
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* Displays a character counter (`currentCount/maxLength`) in the label row.
|
|
174
|
+
* Requires `maxLength` to be set.
|
|
175
|
+
* @default false
|
|
176
|
+
*/
|
|
141
177
|
showCharacterCount?: boolean;
|
|
142
178
|
}
|
|
143
179
|
declare const TextEditor: import('react').ForwardRefExoticComponent<TextEditorProps & import('react').RefAttributes<TextEditorRef>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAIhD,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,eAAe,CAAA;AAWrE,
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAIhD,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,eAAe,CAAA;AAWrE,6CAA6C;AAC7C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAEzC,0DAA0D;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEpC,qDAAqD;AACrD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAA;AAEhE,0CAA0C;AAC1C,MAAM,MAAM,QAAQ,GAAG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 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA0JjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAGxC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAgBlC,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,KA6DvB,CAAA;AAGD,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,KAsC9B,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,KAmC1B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAsCjC,CAAA;AAqKD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,KAwD1B,CAAA;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA0DjC,CAAA;AAGD,eAAO,MAAM,QAAQ,EAAE,KA6CtB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KA0CjC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TextEditor, type TextEditorProps, type TextEditorRef, type TextEditorToolbarConfig, } from './TextEditor';
|
|
1
|
+
export { TextEditor, type FormattingItem, type HeadingLevel, type HistoryItem, type ListItem, type TextEditorProps, type TextEditorRef, type TextEditorToolbarConfig, } from './TextEditor';
|
|
2
2
|
export { ToolbarButton, toolbarButtonVariants, type ToolbarButtonProps, } from './ToolbarButton';
|
|
3
3
|
export { ToolbarSeparator, type ToolbarSeparatorProps, } from './ToolbarSeparator';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA"}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Textarea component.
|
|
4
|
+
*
|
|
5
|
+
* Extends native `<textarea>` attributes except `resize`, which is replaced
|
|
6
|
+
* by a typed union controlling the CSS resize behavior via a custom prop.
|
|
7
|
+
*/
|
|
8
|
+
export interface TextareaProps extends Omit<ComponentProps<'textarea'>, 'resize'> {
|
|
9
|
+
/**
|
|
10
|
+
* Controls manual resize behavior via the drag handle.
|
|
11
|
+
* - `'none'` disables resizing
|
|
12
|
+
* - `'vertical'` allows vertical drag only
|
|
13
|
+
* - `'horizontal'` allows horizontal drag only
|
|
14
|
+
* - `'both'` allows both axes
|
|
15
|
+
*
|
|
16
|
+
* Should not be combined with `autoResize`.
|
|
17
|
+
*
|
|
18
|
+
* @default 'none'
|
|
19
|
+
* @example
|
|
20
|
+
* <Textarea resize="vertical" />
|
|
21
|
+
*/
|
|
5
22
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
6
23
|
/** Label text displayed above the textarea. */
|
|
7
24
|
label?: string;
|
|
8
|
-
/** Helper text displayed below the textarea. Replaced by errorMessage when error is true. */
|
|
25
|
+
/** Helper text displayed below the textarea. Replaced by `errorMessage` when `error` is true. */
|
|
9
26
|
hint?: string;
|
|
10
|
-
/** Applies error border styling
|
|
27
|
+
/** Applies error border styling and surfaces `errorMessage` in place of `hint`. @default false */
|
|
11
28
|
error?: boolean;
|
|
12
|
-
/** Error message displayed below textarea when error is true. Overrides hint
|
|
29
|
+
/** Error message displayed below the textarea when `error` is true. Overrides `hint`. */
|
|
13
30
|
errorMessage?: string;
|
|
14
31
|
/** Marks the field as required and displays a red asterisk next to the label. @default false */
|
|
15
32
|
required?: boolean;
|
|
16
33
|
/** Hides the required asterisk even when `required` is true. @default false */
|
|
17
34
|
disableRequiredAsterisk?: boolean;
|
|
18
|
-
/** Name attribute
|
|
35
|
+
/** Name attribute used when submitting the textarea as part of an HTML form. */
|
|
19
36
|
name?: string;
|
|
20
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Automatically grows the textarea height to fit its content on every input event.
|
|
39
|
+
* When enabled, internal overflow is hidden; prefer not to combine with `resize`.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
* @example
|
|
43
|
+
* <Textarea autoResize rows={2} placeholder="Grows as you type" />
|
|
44
|
+
*/
|
|
21
45
|
autoResize?: boolean;
|
|
22
|
-
/** Extra content rendered inline next to the label (e.g. a tooltip icon). */
|
|
46
|
+
/** Extra content rendered inline next to the label (e.g. a tooltip icon). Takes precedence over `infoTooltip`. */
|
|
23
47
|
labelExtra?: ReactNode;
|
|
24
48
|
/** Tooltip content shown in an info icon next to the label. Overridden by `labelExtra` if both are provided. */
|
|
25
49
|
infoTooltip?: string;
|
|
26
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Displays a live character counter (`currentCount/maxLength`) in the label row.
|
|
52
|
+
* Requires `maxLength` to be set; the counter is omitted otherwise.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
* @example
|
|
56
|
+
* <Textarea showCharacterCount maxLength={200} label="Bio" />
|
|
57
|
+
*/
|
|
27
58
|
showCharacterCount?: boolean;
|
|
28
59
|
}
|
|
29
60
|
export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AA+Dd
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AA+Dd;;;;;GAKG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAClD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iGAAiG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,gHAAgH;IAChH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,QAAQ,4HA0GpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAgG/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAgB9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAiBnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAiBlC,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA"}
|
|
@@ -19,7 +19,7 @@ const b = u(
|
|
|
19
19
|
// Active/pressed state (on)
|
|
20
20
|
"data-[state=on]:bg-comp-button-primary-bg-def data-[state=on]:text-comp-button-primary-text-def",
|
|
21
21
|
// Disabled state
|
|
22
|
-
"disabled:pointer-events-none disabled:bg-surface-brand-primary-
|
|
22
|
+
"disabled:pointer-events-none disabled:bg-surface-brand-primary-disabled2 disabled:text-text-dark-disabled"
|
|
23
23
|
],
|
|
24
24
|
{
|
|
25
25
|
variants: {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
declare const toggleCheckButtonVariants: (props?: ({
|
|
4
|
+
error?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Props for the ToggleCheckButton component.
|
|
8
|
+
* Extends Radix Checkbox root props, sharing the Checkbox API for controlled
|
|
9
|
+
* and uncontrolled use and form integration, but rendered as a compact
|
|
10
|
+
* icon-only pill.
|
|
11
|
+
*/
|
|
12
|
+
export interface ToggleCheckButtonProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Root>, 'asChild' | 'children'> {
|
|
13
|
+
/**
|
|
14
|
+
* Controlled checked state. Use with `onCheckedChange` for fully controlled
|
|
15
|
+
* behavior. Accepts `'indeterminate'` for a partially-selected state (e.g.
|
|
16
|
+
* a parent row whose children are mixed).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <ToggleCheckButton checked={allSelected ? true : someSelected ? 'indeterminate' : false} />
|
|
20
|
+
*/
|
|
21
|
+
checked?: boolean | 'indeterminate';
|
|
22
|
+
/** Initial checked state for uncontrolled usage. @default false */
|
|
23
|
+
defaultChecked?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Fires when the checked state changes. Receives `true`, `false`, or
|
|
26
|
+
* `'indeterminate'` — narrow to `boolean` before storing in typical state.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* onCheckedChange={(value) => setChecked(value === true)}
|
|
30
|
+
*/
|
|
31
|
+
onCheckedChange?: (checked: boolean | 'indeterminate') => void;
|
|
32
|
+
/** Prevents interaction and applies disabled styling. @default false */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** Name attribute for form submission. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Value attribute for form submission. */
|
|
37
|
+
value?: string;
|
|
38
|
+
/** Marks the control as required for form submission. @default false */
|
|
39
|
+
required?: boolean;
|
|
40
|
+
/** Custom ID for the underlying button element. */
|
|
41
|
+
id?: string;
|
|
42
|
+
/** Applies error styling (red icon) for validation failure. @default false */
|
|
43
|
+
error?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Accessible name for the icon-only control. Should be supplied unless an
|
|
46
|
+
* external `<label htmlFor>` is associated via `id`.
|
|
47
|
+
*/
|
|
48
|
+
'aria-label'?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A compact icon-only toggle that shares the Checkbox API.
|
|
52
|
+
* Renders a 32×32 circular button showing a check-circle icon that fills in
|
|
53
|
+
* when checked. Because it uses the Radix Checkbox primitive, it integrates
|
|
54
|
+
* with HTML forms exactly like Checkbox (supports `name`, `value`, `required`).
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* const [checked, setChecked] = useState(false)
|
|
59
|
+
*
|
|
60
|
+
* <ToggleCheckButton
|
|
61
|
+
* checked={checked}
|
|
62
|
+
* onCheckedChange={(value) => setChecked(value === true)}
|
|
63
|
+
* aria-label="Mark as done"
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare const ToggleCheckButton: import('react').ForwardRefExoticComponent<Omit<ToggleCheckButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
68
|
+
export { ToggleCheckButton, toggleCheckButtonVariants };
|
|
69
|
+
//# sourceMappingURL=ToggleCheckButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleCheckButton.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleCheckButton/ToggleCheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA+B,MAAM,OAAO,CAAA;AACxE,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAK7D,QAAA,MAAM,yBAAyB;;8EAwB9B,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBACf,SAAQ,IAAI,CACV,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,EAC7C,SAAS,GAAG,UAAU,CACvB;IACD;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;IACnC,mEAAmE;IACnE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,KAAK,IAAI,CAAA;IAC9D,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,iBAAiB,mIAwBrB,CAAA;AAGF,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-checkbox";
|
|
4
|
+
import { cva as l } from "class-variance-authority";
|
|
5
|
+
import { cn as h } from "../../utils/cn.js";
|
|
6
|
+
import { CheckCircleOutline as u, CheckCircleBold as g } from "@solar-icons/react-perf";
|
|
7
|
+
const m = l(
|
|
8
|
+
[
|
|
9
|
+
"group inline-flex size-comp-button-h-xs shrink-0 items-center justify-center rounded-full",
|
|
10
|
+
"cursor-pointer transition-colors",
|
|
11
|
+
"focus-visible-default",
|
|
12
|
+
"[&>svg]:size-icon-small [&>svg]:shrink-0",
|
|
13
|
+
"text-comp-button-toggle-check-icon-def",
|
|
14
|
+
"hover:text-comp-button-toggle-check-icon-hover",
|
|
15
|
+
"focus-visible:text-comp-button-toggle-check-icon-focused",
|
|
16
|
+
"data-[state=checked]:text-comp-button-toggle-check-icon-active",
|
|
17
|
+
"data-[state=checked]:hover:text-comp-button-toggle-check-icon-hover",
|
|
18
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-comp-button-toggle-check-icon-disabled disabled:data-[state=checked]:text-comp-button-toggle-check-icon-disabled"
|
|
19
|
+
],
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
error: {
|
|
23
|
+
true: "text-text-state-error-def hover:text-text-state-error-def focus-visible:text-text-state-error-def data-[state=checked]:text-text-state-error-def data-[state=checked]:hover:text-text-state-error-def",
|
|
24
|
+
false: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
error: !1
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
), f = n(({ className: c, disabled: r, required: e, error: a, ...i }, s) => /* @__PURE__ */ d(
|
|
32
|
+
o.Root,
|
|
33
|
+
{
|
|
34
|
+
ref: s,
|
|
35
|
+
"data-slot": "toggle-check-button",
|
|
36
|
+
className: h(m({ error: a, className: c })),
|
|
37
|
+
disabled: r,
|
|
38
|
+
required: e,
|
|
39
|
+
"aria-required": e,
|
|
40
|
+
...i,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ t(
|
|
43
|
+
u,
|
|
44
|
+
{
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
className: "group-data-[state=checked]:hidden"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ t(
|
|
50
|
+
o.Indicator,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "toggle-check-button-indicator",
|
|
53
|
+
asChild: !0,
|
|
54
|
+
children: /* @__PURE__ */ t(g, { "aria-hidden": "true" })
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
f.displayName = "ToggleCheckButton";
|
|
61
|
+
export {
|
|
62
|
+
f as ToggleCheckButton,
|
|
63
|
+
m as toggleCheckButtonVariants
|
|
64
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ToggleCheckButton } from './ToggleCheckButton';
|
|
3
|
+
declare const meta: Meta<typeof ToggleCheckButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ToggleCheckButton>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllStates: Story;
|
|
8
|
+
//# sourceMappingURL=ToggleCheckButton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleCheckButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleCheckButton/ToggleCheckButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAmCxC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE/C,eAAO,MAAM,OAAO,EAAE,KAuBrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAiEvB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleCheckButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PartnerOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Language {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
icon: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface WebCheckoutNavProps {
|
|
13
|
+
partnerOptions: PartnerOption[];
|
|
14
|
+
languages: Language[];
|
|
15
|
+
}
|
|
16
|
+
export declare const partnerOptions: PartnerOption[];
|
|
17
|
+
export declare const languages: Language[];
|
|
18
|
+
export declare const WebCheckoutNav: ({ partnerOptions, languages, }: WebCheckoutNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=WebCheckoutNav.examples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebCheckoutNav.examples.d.ts","sourceRoot":"","sources":["../../../src/components/WebCheckoutNav/WebCheckoutNav.examples.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AA8BhD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,SAAS,EAAE,QAAQ,EAAE,CAAA;CACtB;AAID,eAAO,MAAM,cAAc,EAAE,aAAa,EAgBzC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAI/B,CAAA;AAID,eAAO,MAAM,cAAc,GAAI,gCAG5B,mBAAmB,4CA6MrB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { WebCheckoutNavProps } from './WebCheckoutNav.examples';
|
|
3
|
+
declare const meta: Meta<WebCheckoutNavProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<WebCheckoutNavProps>;
|
|
6
|
+
export declare const Responsive: Story;
|
|
7
|
+
export declare const SinglePartner: Story;
|
|
8
|
+
//# sourceMappingURL=WebCheckoutNav.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebCheckoutNav.stories.d.ts","sourceRoot":"","sources":["../../../src/components/WebCheckoutNav/WebCheckoutNav.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAEL,KAAK,mBAAmB,EAGzB,MAAM,2BAA2B,CAAA;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAwCnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAA;AAE1C,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA"}
|
|
@@ -44,10 +44,12 @@ export * from './Textarea';
|
|
|
44
44
|
export * from './TextEditor';
|
|
45
45
|
export * from './TimePicker';
|
|
46
46
|
export * from './Toggle';
|
|
47
|
+
export * from './ToggleCheckButton';
|
|
47
48
|
export * from './ToggleGroup';
|
|
48
49
|
export * from './Tooltip';
|
|
49
50
|
export * from './Typography';
|
|
50
51
|
export * from './DataTable';
|
|
51
52
|
export * from './ExpandableTable';
|
|
53
|
+
export * from './ResponsiveLayoutTable';
|
|
52
54
|
export * from './Skeleton';
|
|
53
55
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACv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AAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const useIsMinXs: () => boolean;
|
|
2
|
+
export declare const useIsMaxXs: () => boolean;
|
|
1
3
|
export declare const useIsMinSm: () => boolean;
|
|
2
4
|
export declare const useIsMaxSm: () => boolean;
|
|
3
5
|
export declare const useIsMinMd: () => boolean;
|
|
@@ -10,4 +12,13 @@ export declare const useIsMin2xl: () => boolean;
|
|
|
10
12
|
export declare const useIsMax2xl: () => boolean;
|
|
11
13
|
export declare const useIsMin3xl: () => boolean;
|
|
12
14
|
export declare const useIsMax3xl: () => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Named breakpoint matching the project's Tailwind breakpoint scale.
|
|
17
|
+
*/
|
|
18
|
+
export type ResponsiveBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
19
|
+
/**
|
|
20
|
+
* Returns the current match state of all named breakpoints.
|
|
21
|
+
* Each key is `true` when the viewport is at or above that breakpoint.
|
|
22
|
+
*/
|
|
23
|
+
export declare const useBreakpoints: () => Record<ResponsiveBreakpoint, boolean>;
|
|
13
24
|
//# sourceMappingURL=use-is-breakpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-is-breakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/use-is-breakpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-is-breakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/use-is-breakpoint.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,UAAU,eAEtB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,CAAA;AAET;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,MAAM,CAAC,oBAAoB,EAAE,OAAO,CAQpE,CAAA"}
|