@intlayer/design-system 8.3.1 → 8.3.3
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/esm/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs +1 -1
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
- package/dist/esm/components/IDE/IDE.mjs +1 -1
- package/dist/esm/components/IDE/IDE.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/MaxHeightSmoother/index.mjs +1 -1
- package/dist/esm/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/esm/components/SwitchSelector/index.mjs +1 -1
- package/dist/esm/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/useOAuth2.mjs +1 -1
- package/dist/esm/hooks/useAuth/useSession.mjs +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +1 -1
- package/dist/types/components/Browser/Browser.content.d.ts +8 -8
- package/dist/types/components/Button/Button.d.ts +4 -4
- package/dist/types/components/Carousel/index.content.d.ts +3 -3
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +1 -1
- package/dist/types/components/Container/index.d.ts +7 -7
- package/dist/types/components/CopyButton/CopyButton.content.d.ts +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +12 -12
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +4 -4
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +27 -27
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +16 -16
- package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +12 -12
- package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +16 -16
- package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +4 -4
- package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +3 -3
- package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +2 -2
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +15 -15
- package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +1 -1
- package/dist/types/components/IDE/CodeBlockShiki.d.ts.map +1 -1
- package/dist/types/components/IDE/code.content.d.ts +2 -2
- package/dist/types/components/IDE/copyCode.content.d.ts +2 -2
- package/dist/types/components/IDE/selectors.content.d.ts +6 -6
- package/dist/types/components/Input/Checkbox.d.ts +3 -3
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Link/Link.d.ts +3 -3
- package/dist/types/components/Loader/index.content.d.ts +1 -1
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +8 -8
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -6
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts +0 -12
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
- package/dist/types/components/MaxHeightSmoother/index.d.ts +80 -100
- package/dist/types/components/MaxHeightSmoother/index.d.ts.map +1 -1
- package/dist/types/components/Pagination/pagination.content.d.ts +5 -5
- package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +2 -2
- package/dist/types/components/SwitchSelector/index.d.ts +3 -1
- package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/types/components/Table/table.content.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +2 -2
- package/dist/types/components/Terminal/terminal.content.d.ts +2 -2
- package/package.json +25 -25
|
@@ -24,7 +24,7 @@ declare const localeSwitcherContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
27
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -67,7 +67,7 @@ declare const localeSwitcherContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
70
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|
|
@@ -110,7 +110,7 @@ declare const localeSwitcherContent: {
|
|
|
110
110
|
vi: string;
|
|
111
111
|
uk: string;
|
|
112
112
|
}, {
|
|
113
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
113
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
114
114
|
} & {
|
|
115
115
|
translation: {
|
|
116
116
|
en: string;
|
|
@@ -154,7 +154,7 @@ declare const localeSwitcherContent: {
|
|
|
154
154
|
vi: string;
|
|
155
155
|
uk: string;
|
|
156
156
|
}, {
|
|
157
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
157
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
158
158
|
} & {
|
|
159
159
|
translation: {
|
|
160
160
|
en: string;
|
|
@@ -197,7 +197,7 @@ declare const localeSwitcherContent: {
|
|
|
197
197
|
vi: string;
|
|
198
198
|
uk: string;
|
|
199
199
|
}, {
|
|
200
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
200
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
201
201
|
} & {
|
|
202
202
|
translation: {
|
|
203
203
|
en: string;
|
|
@@ -240,7 +240,7 @@ declare const localeSwitcherContent: {
|
|
|
240
240
|
vi: string;
|
|
241
241
|
uk: string;
|
|
242
242
|
}, {
|
|
243
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
243
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
244
244
|
} & {
|
|
245
245
|
translation: {
|
|
246
246
|
en: string;
|
|
@@ -285,7 +285,7 @@ declare const localeSwitcherContent: {
|
|
|
285
285
|
vi: string;
|
|
286
286
|
uk: string;
|
|
287
287
|
}, {
|
|
288
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
288
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
289
289
|
} & {
|
|
290
290
|
translation: {
|
|
291
291
|
en: string;
|
|
@@ -328,7 +328,7 @@ declare const localeSwitcherContent: {
|
|
|
328
328
|
vi: string;
|
|
329
329
|
uk: string;
|
|
330
330
|
}, {
|
|
331
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
331
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
332
332
|
} & {
|
|
333
333
|
translation: {
|
|
334
334
|
en: string;
|
|
@@ -24,7 +24,7 @@ declare const localeSwitcherContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
27
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -67,7 +67,7 @@ declare const localeSwitcherContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
70
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|
|
@@ -110,7 +110,7 @@ declare const localeSwitcherContent: {
|
|
|
110
110
|
vi: string;
|
|
111
111
|
uk: string;
|
|
112
112
|
}, {
|
|
113
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
113
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
114
114
|
} & {
|
|
115
115
|
translation: {
|
|
116
116
|
en: string;
|
|
@@ -154,7 +154,7 @@ declare const localeSwitcherContent: {
|
|
|
154
154
|
vi: string;
|
|
155
155
|
uk: string;
|
|
156
156
|
}, {
|
|
157
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
157
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
158
158
|
} & {
|
|
159
159
|
translation: {
|
|
160
160
|
en: string;
|
|
@@ -197,7 +197,7 @@ declare const localeSwitcherContent: {
|
|
|
197
197
|
vi: string;
|
|
198
198
|
uk: string;
|
|
199
199
|
}, {
|
|
200
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
200
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
201
201
|
} & {
|
|
202
202
|
translation: {
|
|
203
203
|
en: string;
|
|
@@ -240,7 +240,7 @@ declare const localeSwitcherContent: {
|
|
|
240
240
|
vi: string;
|
|
241
241
|
uk: string;
|
|
242
242
|
}, {
|
|
243
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
243
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
244
244
|
} & {
|
|
245
245
|
translation: {
|
|
246
246
|
en: string;
|
|
@@ -14,11 +14,6 @@ declare const baseMarkdownComponents: {
|
|
|
14
14
|
h5: (props: ComponentProps<"h5">) => react_jsx_runtime0.JSX.Element;
|
|
15
15
|
h6: (props: ComponentProps<"h6">) => react_jsx_runtime0.JSX.Element;
|
|
16
16
|
strong: (props: ComponentProps<"strong">) => react_jsx_runtime0.JSX.Element;
|
|
17
|
-
code: ({
|
|
18
|
-
className,
|
|
19
|
-
children,
|
|
20
|
-
...rest
|
|
21
|
-
}: ComponentProps<"code">) => react_jsx_runtime0.JSX.Element;
|
|
22
17
|
blockquote: ({
|
|
23
18
|
className,
|
|
24
19
|
...props
|
|
@@ -37,7 +32,6 @@ declare const baseMarkdownComponents: {
|
|
|
37
32
|
src,
|
|
38
33
|
...props
|
|
39
34
|
}: ComponentProps<"img">) => react_jsx_runtime0.JSX.Element;
|
|
40
|
-
a: (props: ComponentProps<"a">) => react_jsx_runtime0.JSX.Element;
|
|
41
35
|
pre: (props: ComponentProps<"pre">) => react_jsx_runtime0.JSX.Element;
|
|
42
36
|
table: (props: ComponentProps<typeof Table>) => react_jsx_runtime0.JSX.Element;
|
|
43
37
|
th: ({
|
|
@@ -92,11 +86,6 @@ declare const getIntlayerMarkdownOptions: (_isDarkMode?: boolean) => {
|
|
|
92
86
|
h5: (props: ComponentProps<"h5">) => react_jsx_runtime0.JSX.Element;
|
|
93
87
|
h6: (props: ComponentProps<"h6">) => react_jsx_runtime0.JSX.Element;
|
|
94
88
|
strong: (props: ComponentProps<"strong">) => react_jsx_runtime0.JSX.Element;
|
|
95
|
-
code: ({
|
|
96
|
-
className,
|
|
97
|
-
children,
|
|
98
|
-
...rest
|
|
99
|
-
}: ComponentProps<"code">) => react_jsx_runtime0.JSX.Element;
|
|
100
89
|
blockquote: ({
|
|
101
90
|
className,
|
|
102
91
|
...props
|
|
@@ -115,7 +104,6 @@ declare const getIntlayerMarkdownOptions: (_isDarkMode?: boolean) => {
|
|
|
115
104
|
src,
|
|
116
105
|
...props
|
|
117
106
|
}: ComponentProps<"img">) => react_jsx_runtime0.JSX.Element;
|
|
118
|
-
a: (props: ComponentProps<"a">) => react_jsx_runtime0.JSX.Element;
|
|
119
107
|
pre: (props: ComponentProps<"pre">) => react_jsx_runtime0.JSX.Element;
|
|
120
108
|
table: (props: ComponentProps<typeof Table>) => react_jsx_runtime0.JSX.Element;
|
|
121
109
|
th: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkDownRender.d.ts","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"MarkDownRender.d.ts","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"mappings":"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"}
|
|
@@ -20,9 +20,9 @@ interface MaxHeightSmootherProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
20
20
|
* MaxHeightSmoother Component
|
|
21
21
|
*
|
|
22
22
|
* A sophisticated container component that provides smooth height transitions
|
|
23
|
-
* for collapsible content.
|
|
24
|
-
*
|
|
25
|
-
* and
|
|
23
|
+
* for collapsible content. Implemented entirely in CSS — no client-side
|
|
24
|
+
* JavaScript, hooks, or event listeners — making it compatible with React
|
|
25
|
+
* Server Components and Next.js App Router without `'use client'`.
|
|
26
26
|
*
|
|
27
27
|
* @component
|
|
28
28
|
* @example
|
|
@@ -38,125 +38,105 @@ interface MaxHeightSmootherProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
38
|
* @example
|
|
39
39
|
* Hover-triggered expansion:
|
|
40
40
|
* ```tsx
|
|
41
|
-
* <MaxHeightSmoother isOverable
|
|
42
|
-
* <
|
|
43
|
-
* <p>This content expands when you hover over the container.</p>
|
|
44
|
-
* <p>Perfect for preview cards or tooltips.</p>
|
|
45
|
-
* </div>
|
|
41
|
+
* <MaxHeightSmoother isOverable>
|
|
42
|
+
* <p>This content expands when you hover over the container.</p>
|
|
46
43
|
* </MaxHeightSmoother>
|
|
47
44
|
* ```
|
|
48
45
|
*
|
|
49
46
|
* @example
|
|
50
|
-
*
|
|
47
|
+
* Focus-triggered expansion (keyboard accessible):
|
|
51
48
|
* ```tsx
|
|
52
|
-
* <MaxHeightSmoother isFocusable
|
|
53
|
-
* <
|
|
54
|
-
* <h3>Expandable Section</h3>
|
|
55
|
-
* <p>Tab to focus this container to expand the content.</p>
|
|
56
|
-
* <p>Great for accessible progressive disclosure.</p>
|
|
57
|
-
* </div>
|
|
49
|
+
* <MaxHeightSmoother isFocusable>
|
|
50
|
+
* <p>Tab to focus this container to expand the content.</p>
|
|
58
51
|
* </MaxHeightSmoother>
|
|
59
52
|
* ```
|
|
60
53
|
*
|
|
61
54
|
* @example
|
|
62
55
|
* With minimum height for preview:
|
|
63
56
|
* ```tsx
|
|
64
|
-
* <MaxHeightSmoother
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* className="border rounded-lg p-4"
|
|
68
|
-
* >
|
|
69
|
-
* <div>
|
|
70
|
-
* <h3>Article Preview</h3>
|
|
71
|
-
* <p>This article preview shows the first few lines...</p>
|
|
72
|
-
* <p>Hover to see the full content with smooth expansion.</p>
|
|
73
|
-
* <p>The minHeight ensures some content is always visible.</p>
|
|
74
|
-
* </div>
|
|
57
|
+
* <MaxHeightSmoother isOverable minHeight={100} className="border rounded-lg p-4">
|
|
58
|
+
* <h3>Article Preview</h3>
|
|
59
|
+
* <p>This shows a preview of the content. Hover to see all.</p>
|
|
75
60
|
* </MaxHeightSmoother>
|
|
76
61
|
* ```
|
|
77
62
|
*
|
|
78
63
|
* @example
|
|
79
|
-
* Combined hover and focus
|
|
64
|
+
* Combined hover and focus:
|
|
80
65
|
* ```tsx
|
|
81
|
-
* <MaxHeightSmoother
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* minHeight={80}
|
|
85
|
-
* >
|
|
86
|
-
* <div>
|
|
87
|
-
* <h4>Interactive Card</h4>
|
|
88
|
-
* <p>Expands on both hover and keyboard focus.</p>
|
|
89
|
-
* <p>Accessible to both mouse and keyboard users.</p>
|
|
90
|
-
* </div>
|
|
66
|
+
* <MaxHeightSmoother isOverable isFocusable minHeight={80}>
|
|
67
|
+
* <h4>Interactive Card</h4>
|
|
68
|
+
* <p>Expands on both hover and keyboard focus.</p>
|
|
91
69
|
* </MaxHeightSmoother>
|
|
92
70
|
* ```
|
|
93
71
|
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* -
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* -
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* -
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* -
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* -
|
|
138
|
-
* -
|
|
139
|
-
* -
|
|
140
|
-
* -
|
|
141
|
-
*
|
|
72
|
+
* ## Animation Strategies
|
|
73
|
+
*
|
|
74
|
+
* ### Strategy A — `grid-template-rows` (`minHeight === 0`)
|
|
75
|
+
* Transitions between `grid-rows-[0fr]` and `grid-rows-[1fr]`.
|
|
76
|
+
* Clean and performant; no fixed height ceiling required.
|
|
77
|
+
* Requires `min-h-0` on the inner wrapper so the grid track can fully collapse.
|
|
78
|
+
*
|
|
79
|
+
* ### Strategy B — `max-height` via CSS custom properties (`minHeight > 0`)
|
|
80
|
+
* When a visible preview floor is required, `grid-template-rows` produces a
|
|
81
|
+
* "dead time" artifact: the track silently grows from 0 → minHeight before
|
|
82
|
+
* anything visible happens, resulting in a perceived snap.
|
|
83
|
+
*
|
|
84
|
+
* `max-height` sidesteps this entirely — the transition starts from the
|
|
85
|
+
* already-visible floor value, producing a single continuous expansion.
|
|
86
|
+
*
|
|
87
|
+
* The collapsed floor (`--mhs-collapsed`) and expanded ceiling
|
|
88
|
+
* (`--mhs-expanded`) are injected as CSS variables via inline style,
|
|
89
|
+
* NOT as `max-height` directly. This lets Tailwind own `max-height`
|
|
90
|
+
* entirely, so `:hover` and `:focus-within` can override it freely
|
|
91
|
+
* without fighting inline-style specificity.
|
|
92
|
+
*
|
|
93
|
+
* Both variables are consumer-overridable via CSS:
|
|
94
|
+
* ```css
|
|
95
|
+
* .my-container {
|
|
96
|
+
* --mhs-collapsed: 80px;
|
|
97
|
+
* --mhs-expanded: 1200px;
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* Trade-off: easing is applied over [minHeight → 3000px], not the real
|
|
102
|
+
* content height. For typical content this is imperceptible. If pixel-perfect
|
|
103
|
+
* easing is critical, use a JS-measured height with a controlled `isHidden`
|
|
104
|
+
* prop and a `style={{ maxHeight }}` override instead.
|
|
105
|
+
*
|
|
106
|
+
* ## Interaction Modes
|
|
107
|
+
*
|
|
108
|
+
* 1. **Controlled** — Pass `isHidden` for external state control (e.g. accordion)
|
|
109
|
+
* 2. **Hover** — Set `isOverable` for mouse hover expansion
|
|
110
|
+
* 3. **Focus** — Set `isFocusable` for keyboard focus expansion
|
|
111
|
+
* 4. **Combined** — Use `isOverable` and `isFocusable` together
|
|
112
|
+
*
|
|
113
|
+
* ## Accessibility
|
|
114
|
+
*
|
|
115
|
+
* - `role="button"` and `tabIndex={0}` when `isFocusable` is true
|
|
116
|
+
* - `aria-expanded` reflects the current disclosure state
|
|
117
|
+
* - Focus expansion via `:focus-within` CSS pseudo-class
|
|
118
|
+
* - `motion-reduce:transition-none` respects `prefers-reduced-motion`
|
|
119
|
+
*
|
|
120
|
+
* Note: because this component relies on CSS pseudo-classes for interaction,
|
|
121
|
+
* keyboard toggle (Enter / Space) is not supported in uncontrolled mode.
|
|
122
|
+
* For full keyboard toggle behaviour, manage `isHidden` externally and
|
|
123
|
+
* wire an `onClick` / `onKeyDown` handler on the parent.
|
|
124
|
+
*
|
|
125
|
+
* ## Performance
|
|
126
|
+
*
|
|
127
|
+
* - Pure CSS animations — no JavaScript timers or DOM measurements
|
|
128
|
+
* - No `'use client'` directive required
|
|
129
|
+
* - Compatible with React Server Components and Next.js App Router
|
|
130
|
+
* - GPU-accelerated transitions
|
|
142
131
|
*
|
|
143
132
|
* @param props - Component props extending HTML div attributes
|
|
144
133
|
* @param props.children - Content to render within the container
|
|
145
|
-
* @param props.isHidden - Controlled collapse state (true=collapsed, false=expanded)
|
|
146
|
-
* @param props.isOverable - Enable hover-to-expand
|
|
147
|
-
* @param props.isFocusable - Enable focus-to-expand
|
|
148
|
-
* @param props.minHeight - Minimum height in pixels for collapsed state (default: 0)
|
|
149
|
-
* @param props.className - Additional CSS classes
|
|
150
|
-
* @param props.style - Inline styles (
|
|
151
|
-
* @param props.role - ARIA role (automatically set to "button" when focusable)
|
|
152
|
-
* @param props.tabIndex - Tab index (automatically set to 0 when focusable)
|
|
153
|
-
* @param props.aria-hidden - ARIA hidden state (controlled by isHidden when focusable)
|
|
154
|
-
* @param props.onClick - Click event handler
|
|
155
|
-
* @param props.onMouseEnter - Mouse enter event handler
|
|
156
|
-
* @param props.onMouseLeave - Mouse leave event handler
|
|
157
|
-
* @param props.onFocus - Focus event handler
|
|
158
|
-
* @param props.onBlur - Blur event handler
|
|
159
|
-
* @param props...rest - All other standard HTML div attributes
|
|
134
|
+
* @param props.isHidden - Controlled collapse state (`true` = collapsed, `false` = expanded)
|
|
135
|
+
* @param props.isOverable - Enable hover-to-expand behaviour
|
|
136
|
+
* @param props.isFocusable - Enable focus-to-expand behaviour with keyboard navigation
|
|
137
|
+
* @param props.minHeight - Minimum height in pixels for the collapsed state (default: 0)
|
|
138
|
+
* @param props.className - Additional CSS classes
|
|
139
|
+
* @param props.style - Inline styles (CSS variable overrides will be merged)
|
|
160
140
|
*
|
|
161
141
|
* @returns A smooth height-transitioning container with configurable interaction modes
|
|
162
142
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/MaxHeightSmoother/index.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/MaxHeightSmoother/index.tsx"],"mappings":";;;;;AAC0E;UAKhE,sBAAA,SAA+B,cAAA,CAAe,cAAA;;EAEtD,QAAA,EAAU,SAAA;EAAA;EAEV,QAAA;EAJqD;EAMrD,UAAA;EANuC;EAQvC,WAAA;EANA;EAQA,SAAA;AAAA;;;;;;AA+HF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,iBAAA,EAAmB,EAAA,CAAG,sBAAA"}
|
|
@@ -25,7 +25,7 @@ declare const paginationContent: {
|
|
|
25
25
|
vi: string;
|
|
26
26
|
uk: string;
|
|
27
27
|
}, {
|
|
28
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
28
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
29
29
|
} & {
|
|
30
30
|
translation: {
|
|
31
31
|
en: string;
|
|
@@ -68,7 +68,7 @@ declare const paginationContent: {
|
|
|
68
68
|
vi: string;
|
|
69
69
|
zh: string;
|
|
70
70
|
}, {
|
|
71
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
71
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
72
72
|
} & {
|
|
73
73
|
translation: {
|
|
74
74
|
ar: string;
|
|
@@ -111,7 +111,7 @@ declare const paginationContent: {
|
|
|
111
111
|
vi: string;
|
|
112
112
|
uk: string;
|
|
113
113
|
}, {
|
|
114
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
114
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
115
115
|
} & {
|
|
116
116
|
translation: {
|
|
117
117
|
en: string;
|
|
@@ -154,7 +154,7 @@ declare const paginationContent: {
|
|
|
154
154
|
vi: string;
|
|
155
155
|
uk: string;
|
|
156
156
|
}, {
|
|
157
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
157
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
158
158
|
} & {
|
|
159
159
|
translation: {
|
|
160
160
|
en: string;
|
|
@@ -197,7 +197,7 @@ declare const paginationContent: {
|
|
|
197
197
|
vi: string;
|
|
198
198
|
uk: string;
|
|
199
199
|
}, {
|
|
200
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
200
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
201
201
|
} & {
|
|
202
202
|
translation: {
|
|
203
203
|
en: string;
|
|
@@ -24,7 +24,7 @@ declare const rightDrawerContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
27
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -67,7 +67,7 @@ declare const rightDrawerContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
70
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|
|
@@ -15,6 +15,7 @@ type SwitchSelectorProps<T = boolean> = {
|
|
|
15
15
|
defaultValue?: T;
|
|
16
16
|
onChange?: (choice: T) => void;
|
|
17
17
|
className?: string;
|
|
18
|
+
itemClassName?: string;
|
|
18
19
|
hoverable?: boolean;
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
} & VariantProps<typeof switchSelectorVariant> & VariantProps<typeof choiceVariant>;
|
|
@@ -37,7 +38,7 @@ declare enum SwitchSelectorSize {
|
|
|
37
38
|
LG = "lg"
|
|
38
39
|
}
|
|
39
40
|
declare const choiceVariant: (props?: {
|
|
40
|
-
size?: "
|
|
41
|
+
size?: "sm" | "md" | "lg";
|
|
41
42
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
42
43
|
/**
|
|
43
44
|
*
|
|
@@ -64,6 +65,7 @@ declare const SwitchSelector: <T>({
|
|
|
64
65
|
color,
|
|
65
66
|
size,
|
|
66
67
|
className,
|
|
68
|
+
itemClassName,
|
|
67
69
|
hoverable,
|
|
68
70
|
disabled
|
|
69
71
|
}: SwitchSelectorProps<T>) => react_jsx_runtime0.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"mappings":";;;;;;KAaY,oBAAA;EACV,OAAA,EAAS,SAAA;EACT,KAAA,EAAO,CAAA;AAAA,IACL,cAAA,CAAe,iBAAA;AAAA,KACP,qBAAA,MAA2B,oBAAA,CAAqB,CAAA;AAAA,KAOhD,mBAAA;EACV,OAAA,GAAU,qBAAA,CAAsB,CAAA;EAChC,KAAA,GAAQ,CAAA;EACR,YAAA,GAAe,CAAA;EACf,QAAA,IAAY,MAAA,EAAQ,CAAA;EACpB,SAAA;EACA,SAAA;EACA,QAAA;AAAA,IACE,YAAA,QAAoB,qBAAA,IACtB,YAAA,QAAoB,aAAA;AAAA,aAEV,mBAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,cAGI,qBAAA,GAAqB,KAAA;;;IAwB1B,+BAAA,CAAA,SAAA;AAAA,aAEW,kBAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,cAGI,aAAA,GAAa,KAAA;;IAclB,+BAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cA2CY,cAAA;EAAsB,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,SAAA;EAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"mappings":";;;;;;KAaY,oBAAA;EACV,OAAA,EAAS,SAAA;EACT,KAAA,EAAO,CAAA;AAAA,IACL,cAAA,CAAe,iBAAA;AAAA,KACP,qBAAA,MAA2B,oBAAA,CAAqB,CAAA;AAAA,KAOhD,mBAAA;EACV,OAAA,GAAU,qBAAA,CAAsB,CAAA;EAChC,KAAA,GAAQ,CAAA;EACR,YAAA,GAAe,CAAA;EACf,QAAA,IAAY,MAAA,EAAQ,CAAA;EACpB,SAAA;EACA,aAAA;EACA,SAAA;EACA,QAAA;AAAA,IACE,YAAA,QAAoB,qBAAA,IACtB,YAAA,QAAoB,aAAA;AAAA,aAEV,mBAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,cAGI,qBAAA,GAAqB,KAAA;;;IAwB1B,+BAAA,CAAA,SAAA;AAAA,aAEW,kBAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,cAGI,aAAA,GAAa,KAAA;;IAclB,+BAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cA2CY,cAAA;EAAsB,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA,GAWhC,mBAAA,CAAoB,CAAA,MAAE,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -15,7 +15,7 @@ declare enum TabSelectorColor {
|
|
|
15
15
|
TEXT = "text"
|
|
16
16
|
}
|
|
17
17
|
declare const tabSelectorVariant: (props?: {
|
|
18
|
-
color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "
|
|
18
|
+
color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "text" | "dark";
|
|
19
19
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
20
20
|
type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
|
|
21
21
|
key: string | number;
|
|
@@ -24,7 +24,7 @@ declare const tableContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
27
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -185,9 +185,9 @@ declare enum TagBackground {
|
|
|
185
185
|
WITH = "with"
|
|
186
186
|
}
|
|
187
187
|
declare const containerVariants: (props?: {
|
|
188
|
-
roundedSize?: "
|
|
188
|
+
roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
|
|
189
189
|
color?: "primary" | "neutral" | "text" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
|
|
190
|
-
size?: "
|
|
190
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
191
191
|
border?: "none" | "with";
|
|
192
192
|
background?: "none" | "with";
|
|
193
193
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
@@ -24,7 +24,7 @@ declare const terminalContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
27
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -67,7 +67,7 @@ declare const terminalContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType: _intlayer_types_nodeType0.NodeType.Translation
|
|
70
|
+
nodeType: "translation" | _intlayer_types_nodeType0.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|