@ndla/primitives 0.0.17 → 0.0.18
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/panda.buildinfo.json +12 -10
- package/dist/styles.css +18 -10
- package/es/Accordion.js +58 -30
- package/es/Button.js +1 -1
- package/es/Card/Card.js +77 -0
- package/es/Checkbox.js +12 -4
- package/es/Combobox.js +30 -10
- package/es/Dialog.js +9 -3
- package/es/Menu.js +21 -7
- package/es/Pagination.js +15 -5
- package/es/Popover.js +30 -10
- package/es/RadioGroup.js +12 -4
- package/es/Select.js +36 -12
- package/es/Slider.js +15 -5
- package/es/Switch.js +9 -3
- package/es/Tabs.js +15 -5
- package/es/TagsInput.js +27 -9
- package/es/Toast.js +9 -3
- package/es/Tooltip.js +15 -5
- package/es/createStyleContext.js +4 -10
- package/es/index.js +2 -1
- package/lib/Accordion.d.ts +41 -2
- package/lib/Accordion.js +58 -30
- package/lib/Badge.d.ts +1 -0
- package/lib/Button.d.ts +1 -1
- package/lib/Button.js +1 -1
- package/lib/Card/Card.d.ts +19 -0
- package/lib/Card/Card.js +83 -0
- package/lib/Checkbox.js +12 -4
- package/lib/Combobox.d.ts +45 -13
- package/lib/Combobox.js +30 -10
- package/lib/Dialog.js +9 -3
- package/lib/Menu.js +21 -7
- package/lib/Pagination.d.ts +6 -2
- package/lib/Pagination.js +15 -5
- package/lib/Popover.js +30 -10
- package/lib/RadioGroup.js +12 -4
- package/lib/Select.js +36 -12
- package/lib/Slider.js +15 -5
- package/lib/Switch.js +9 -3
- package/lib/Tabs.d.ts +4 -1
- package/lib/Tabs.js +15 -5
- package/lib/TagsInput.d.ts +15 -2
- package/lib/TagsInput.js +27 -9
- package/lib/Toast.js +9 -3
- package/lib/Tooltip.js +15 -5
- package/lib/createStyleContext.d.ts +5 -2
- package/lib/createStyleContext.js +4 -10
- package/lib/index.d.ts +5 -4
- package/lib/index.js +37 -0
- package/package.json +3 -3
package/lib/Combobox.js
CHANGED
|
@@ -153,7 +153,9 @@ const {
|
|
|
153
153
|
withProvider,
|
|
154
154
|
withContext
|
|
155
155
|
} = (0, _createStyleContext.createStyleContext)(comboboxRecipe);
|
|
156
|
-
const InternalComboboxRoot = withProvider(_react.Combobox.Root, "root"
|
|
156
|
+
const InternalComboboxRoot = withProvider(_react.Combobox.Root, "root", {
|
|
157
|
+
baseComponent: true
|
|
158
|
+
});
|
|
157
159
|
const ComboboxRoot = _ref => {
|
|
158
160
|
let {
|
|
159
161
|
...props
|
|
@@ -167,10 +169,18 @@ const ComboboxRoot = _ref => {
|
|
|
167
169
|
);
|
|
168
170
|
};
|
|
169
171
|
exports.ComboboxRoot = ComboboxRoot;
|
|
170
|
-
const ComboboxClearTrigger = exports.ComboboxClearTrigger = withContext(_react.Combobox.ClearTrigger, "clearTrigger"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
172
|
+
const ComboboxClearTrigger = exports.ComboboxClearTrigger = withContext(_react.Combobox.ClearTrigger, "clearTrigger", {
|
|
173
|
+
baseComponent: true
|
|
174
|
+
});
|
|
175
|
+
const ComboboxContent = exports.ComboboxContent = withContext(_react.Combobox.Content, "content", {
|
|
176
|
+
baseComponent: true
|
|
177
|
+
});
|
|
178
|
+
const ComboboxControl = exports.ComboboxControl = withContext(_react.Combobox.Control, "control", {
|
|
179
|
+
baseComponent: true
|
|
180
|
+
});
|
|
181
|
+
const ComboboxInput = exports.ComboboxInput = withContext(_react.Combobox.Input, "input", {
|
|
182
|
+
baseComponent: true
|
|
183
|
+
});
|
|
174
184
|
const InternalComboboxItemGroupLabel = withContext(_react.Combobox.ItemGroupLabel, "itemGroupLabel");
|
|
175
185
|
const ComboboxItemGroupLabel = _ref2 => {
|
|
176
186
|
let {
|
|
@@ -194,9 +204,15 @@ const ComboboxItemGroupLabel = _ref2 => {
|
|
|
194
204
|
});
|
|
195
205
|
};
|
|
196
206
|
exports.ComboboxItemGroupLabel = ComboboxItemGroupLabel;
|
|
197
|
-
const ComboboxItemGroup = exports.ComboboxItemGroup = withContext(_react.Combobox.ItemGroup, "itemGroup"
|
|
198
|
-
|
|
199
|
-
|
|
207
|
+
const ComboboxItemGroup = exports.ComboboxItemGroup = withContext(_react.Combobox.ItemGroup, "itemGroup", {
|
|
208
|
+
baseComponent: true
|
|
209
|
+
});
|
|
210
|
+
const ComboboxItemIndicator = exports.ComboboxItemIndicator = withContext(_react.Combobox.ItemIndicator, "itemIndicator", {
|
|
211
|
+
baseComponent: true
|
|
212
|
+
});
|
|
213
|
+
const ComboboxItem = exports.ComboboxItem = withContext(_react.Combobox.Item, "item", {
|
|
214
|
+
baseComponent: true
|
|
215
|
+
});
|
|
200
216
|
const InternalComboboxItemText = withContext(_react.Combobox.ItemText, "itemText");
|
|
201
217
|
const ComboboxItemText = _ref3 => {
|
|
202
218
|
let {
|
|
@@ -235,5 +251,9 @@ const ComboboxLabel = _ref4 => {
|
|
|
235
251
|
});
|
|
236
252
|
};
|
|
237
253
|
exports.ComboboxLabel = ComboboxLabel;
|
|
238
|
-
const ComboboxPositioner = exports.ComboboxPositioner = withContext(_react.Combobox.Positioner, "positioner"
|
|
239
|
-
|
|
254
|
+
const ComboboxPositioner = exports.ComboboxPositioner = withContext(_react.Combobox.Positioner, "positioner", {
|
|
255
|
+
baseComponent: true
|
|
256
|
+
});
|
|
257
|
+
const ComboboxTrigger = exports.ComboboxTrigger = withContext(_react.Combobox.Trigger, "trigger", {
|
|
258
|
+
baseComponent: true
|
|
259
|
+
});
|
package/lib/Dialog.js
CHANGED
|
@@ -272,9 +272,15 @@ const DialogRoot = _ref => {
|
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
exports.DialogRoot = DialogRoot;
|
|
275
|
-
const DialogBackdrop = exports.DialogBackdrop = withContext(_react2.Dialog.Backdrop, "backdrop"
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
const DialogBackdrop = exports.DialogBackdrop = withContext(_react2.Dialog.Backdrop, "backdrop", {
|
|
276
|
+
baseComponent: true
|
|
277
|
+
});
|
|
278
|
+
const DialogStandaloneContent = exports.DialogStandaloneContent = withContext(_react2.Dialog.Content, "content", {
|
|
279
|
+
baseComponent: true
|
|
280
|
+
});
|
|
281
|
+
const DialogPositioner = exports.DialogPositioner = withContext(_react2.Dialog.Positioner, "positioner", {
|
|
282
|
+
baseComponent: true
|
|
283
|
+
});
|
|
278
284
|
const DialogContent = exports.DialogContent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
279
285
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DialogBackdrop, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPositioner, {
|
|
280
286
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogStandaloneContent, {
|
package/lib/Menu.js
CHANGED
|
@@ -148,7 +148,9 @@ const MenuRoot = _ref => {
|
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
150
|
exports.MenuRoot = MenuRoot;
|
|
151
|
-
const MenuContent = exports.MenuContent = withContext(_react2.Menu.Content, "content"
|
|
151
|
+
const MenuContent = exports.MenuContent = withContext(_react2.Menu.Content, "content", {
|
|
152
|
+
baseComponent: true
|
|
153
|
+
});
|
|
152
154
|
const InternalMenuItemGroupLabel = withContext(_react2.Menu.ItemGroupLabel, "itemGroupLabel");
|
|
153
155
|
const MenuItemGroupLabel = _ref2 => {
|
|
154
156
|
let {
|
|
@@ -168,8 +170,12 @@ const MenuItemGroupLabel = _ref2 => {
|
|
|
168
170
|
});
|
|
169
171
|
};
|
|
170
172
|
exports.MenuItemGroupLabel = MenuItemGroupLabel;
|
|
171
|
-
const MenuItemGroup = exports.MenuItemGroup = withContext(_react2.Menu.ItemGroup, "itemGroup"
|
|
172
|
-
|
|
173
|
+
const MenuItemGroup = exports.MenuItemGroup = withContext(_react2.Menu.ItemGroup, "itemGroup", {
|
|
174
|
+
baseComponent: true
|
|
175
|
+
});
|
|
176
|
+
const InternalMenuItem = withContext(_react2.Menu.Item, "item", {
|
|
177
|
+
baseComponent: true
|
|
178
|
+
});
|
|
173
179
|
const MenuItem = exports.MenuItem = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
174
180
|
let {
|
|
175
181
|
css: cssProp = {},
|
|
@@ -184,8 +190,12 @@ const MenuItem = exports.MenuItem = /*#__PURE__*/(0, _react.forwardRef)((_ref3,
|
|
|
184
190
|
ref: ref
|
|
185
191
|
});
|
|
186
192
|
});
|
|
187
|
-
const MenuPositioner = exports.MenuPositioner = withContext(_react2.Menu.Positioner, "positioner"
|
|
188
|
-
|
|
193
|
+
const MenuPositioner = exports.MenuPositioner = withContext(_react2.Menu.Positioner, "positioner", {
|
|
194
|
+
baseComponent: true
|
|
195
|
+
});
|
|
196
|
+
const InternalMenuTriggerItem = withContext(_react2.Menu.TriggerItem, "triggerItem", {
|
|
197
|
+
baseComponent: true
|
|
198
|
+
});
|
|
189
199
|
const MenuTriggerItem = exports.MenuTriggerItem = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
|
|
190
200
|
let {
|
|
191
201
|
css: cssProp = {},
|
|
@@ -200,5 +210,9 @@ const MenuTriggerItem = exports.MenuTriggerItem = /*#__PURE__*/(0, _react.forwar
|
|
|
200
210
|
ref: ref
|
|
201
211
|
});
|
|
202
212
|
});
|
|
203
|
-
const MenuTrigger = exports.MenuTrigger = withContext(_react2.Menu.Trigger, "trigger"
|
|
204
|
-
|
|
213
|
+
const MenuTrigger = exports.MenuTrigger = withContext(_react2.Menu.Trigger, "trigger", {
|
|
214
|
+
baseComponent: true
|
|
215
|
+
});
|
|
216
|
+
const MenuSeparator = exports.MenuSeparator = withContext(_react2.Menu.Separator, "separator", {
|
|
217
|
+
baseComponent: true
|
|
218
|
+
});
|
package/lib/Pagination.d.ts
CHANGED
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Pagination } from "@ark-ui/react";
|
|
9
9
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
|
-
|
|
10
|
+
interface RootProps extends Pagination.RootProps {
|
|
11
|
+
translations: Pagination.RootProps["translations"];
|
|
12
|
+
}
|
|
13
|
+
export type PaginationRootProps = JsxStyleProps & RootProps;
|
|
11
14
|
export declare const PaginationRoot: import("react").ForwardRefExoticComponent<{
|
|
12
15
|
consumeCss?: boolean | undefined;
|
|
13
|
-
} & import("@ndla/styled-system/types").WithCss &
|
|
16
|
+
} & import("@ndla/styled-system/types").WithCss & RootProps & import("react").RefAttributes<HTMLElement>>;
|
|
14
17
|
export declare const PaginationItem: import("react").ForwardRefExoticComponent<{
|
|
15
18
|
consumeCss?: boolean | undefined;
|
|
16
19
|
} & import("@ndla/styled-system/types").WithCss & Pagination.ItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -23,3 +26,4 @@ export declare const PaginationPrevTrigger: import("react").ForwardRefExoticComp
|
|
|
23
26
|
export declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<{
|
|
24
27
|
consumeCss?: boolean | undefined;
|
|
25
28
|
} & import("@ndla/styled-system/types").WithCss & Pagination.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
export {};
|
package/lib/Pagination.js
CHANGED
|
@@ -35,8 +35,18 @@ const {
|
|
|
35
35
|
withProvider,
|
|
36
36
|
withContext
|
|
37
37
|
} = (0, _createStyleContext.createStyleContext)(paginationRecipe);
|
|
38
|
-
const PaginationRoot = exports.PaginationRoot = withProvider(_react.Pagination.Root, "root"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
38
|
+
const PaginationRoot = exports.PaginationRoot = withProvider(_react.Pagination.Root, "root", {
|
|
39
|
+
baseComponent: true
|
|
40
|
+
});
|
|
41
|
+
const PaginationItem = exports.PaginationItem = withContext(_react.Pagination.Item, "item", {
|
|
42
|
+
baseComponent: true
|
|
43
|
+
});
|
|
44
|
+
const PaginationEllipsis = exports.PaginationEllipsis = withContext(_react.Pagination.Ellipsis, "ellipsis", {
|
|
45
|
+
baseComponent: true
|
|
46
|
+
});
|
|
47
|
+
const PaginationPrevTrigger = exports.PaginationPrevTrigger = withContext(_react.Pagination.PrevTrigger, "prevTrigger", {
|
|
48
|
+
baseComponent: true
|
|
49
|
+
});
|
|
50
|
+
const PaginationNextTrigger = exports.PaginationNextTrigger = withContext(_react.Pagination.NextTrigger, "nextTrigger", {
|
|
51
|
+
baseComponent: true
|
|
52
|
+
});
|
package/lib/Popover.js
CHANGED
|
@@ -62,25 +62,45 @@ const PopoverRoot = _ref => {
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
exports.PopoverRoot = PopoverRoot;
|
|
65
|
-
const PopoverAnchor = exports.PopoverAnchor = withContext(_react.Popover.Anchor, "anchor"
|
|
66
|
-
|
|
65
|
+
const PopoverAnchor = exports.PopoverAnchor = withContext(_react.Popover.Anchor, "anchor", {
|
|
66
|
+
baseComponent: true
|
|
67
|
+
});
|
|
68
|
+
const PopoverArrowStandalone = exports.PopoverArrowStandalone = withContext(_react.Popover.Arrow, "arrow", {
|
|
69
|
+
baseComponent: true
|
|
70
|
+
});
|
|
67
71
|
const PopoverArrow = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverArrowStandalone, {
|
|
68
72
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverArrowTip, {
|
|
69
73
|
...props
|
|
70
74
|
})
|
|
71
75
|
});
|
|
72
76
|
exports.PopoverArrow = PopoverArrow;
|
|
73
|
-
const PopoverArrowTip = exports.PopoverArrowTip = withContext(_react.Popover.ArrowTip, "arrowTip"
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
const PopoverArrowTip = exports.PopoverArrowTip = withContext(_react.Popover.ArrowTip, "arrowTip", {
|
|
78
|
+
baseComponent: true
|
|
79
|
+
});
|
|
80
|
+
const PopoverCloseTrigger = exports.PopoverCloseTrigger = withContext(_react.Popover.CloseTrigger, "closeTrigger", {
|
|
81
|
+
baseComponent: true
|
|
82
|
+
});
|
|
83
|
+
const PopoverContentStandalone = exports.PopoverContentStandalone = withContext(_react.Popover.Content, "content", {
|
|
84
|
+
baseComponent: true
|
|
85
|
+
});
|
|
76
86
|
const PopoverContent = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverPositioner, {
|
|
77
87
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverContentStandalone, {
|
|
78
88
|
...props
|
|
79
89
|
})
|
|
80
90
|
});
|
|
81
91
|
exports.PopoverContent = PopoverContent;
|
|
82
|
-
const PopoverDescription = exports.PopoverDescription = withContext(_react.Popover.Description, "description"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
92
|
+
const PopoverDescription = exports.PopoverDescription = withContext(_react.Popover.Description, "description", {
|
|
93
|
+
baseComponent: true
|
|
94
|
+
});
|
|
95
|
+
const PopoverIndicator = exports.PopoverIndicator = withContext(_react.Popover.Indicator, "indicator", {
|
|
96
|
+
baseComponent: true
|
|
97
|
+
});
|
|
98
|
+
const PopoverPositioner = exports.PopoverPositioner = withContext(_react.Popover.Positioner, "positioner", {
|
|
99
|
+
baseComponent: true
|
|
100
|
+
});
|
|
101
|
+
const PopoverTitle = exports.PopoverTitle = withContext(_react.Popover.Title, "title", {
|
|
102
|
+
baseComponent: true
|
|
103
|
+
});
|
|
104
|
+
const PopoverTrigger = exports.PopoverTrigger = withContext(_react.Popover.Trigger, "trigger", {
|
|
105
|
+
baseComponent: true
|
|
106
|
+
});
|
package/lib/RadioGroup.js
CHANGED
|
@@ -96,10 +96,18 @@ const {
|
|
|
96
96
|
withProvider,
|
|
97
97
|
withContext
|
|
98
98
|
} = (0, _createStyleContext.createStyleContext)(radioGroupRecipe);
|
|
99
|
-
const RadioGroupRoot = exports.RadioGroupRoot = withProvider(_react2.RadioGroup.Root, "root"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const
|
|
99
|
+
const RadioGroupRoot = exports.RadioGroupRoot = withProvider(_react2.RadioGroup.Root, "root", {
|
|
100
|
+
baseComponent: true
|
|
101
|
+
});
|
|
102
|
+
const RadioGroupIndicator = exports.RadioGroupIndicator = withContext(_react2.RadioGroup.Indicator, "indicator", {
|
|
103
|
+
baseComponent: true
|
|
104
|
+
});
|
|
105
|
+
const RadioGroupItemControl = exports.RadioGroupItemControl = withContext(_react2.RadioGroup.ItemControl, "itemControl", {
|
|
106
|
+
baseComponent: true
|
|
107
|
+
});
|
|
108
|
+
const RadioGroupItem = exports.RadioGroupItem = withContext(_react2.RadioGroup.Item, "item", {
|
|
109
|
+
baseComponent: true
|
|
110
|
+
});
|
|
103
111
|
const InternalRadioGroupItemText = withContext(_react2.RadioGroup.ItemText, "itemText");
|
|
104
112
|
const RadioGroupItemText = _ref => {
|
|
105
113
|
let {
|
package/lib/Select.js
CHANGED
|
@@ -138,7 +138,9 @@ const {
|
|
|
138
138
|
withProvider,
|
|
139
139
|
withContext
|
|
140
140
|
} = (0, _createStyleContext.createStyleContext)(selectRecipe);
|
|
141
|
-
const InternalSelectRoot = withProvider(_react2.Select.Root, "root"
|
|
141
|
+
const InternalSelectRoot = withProvider(_react2.Select.Root, "root", {
|
|
142
|
+
baseComponent: true
|
|
143
|
+
});
|
|
142
144
|
const SelectRoot = _ref => {
|
|
143
145
|
let {
|
|
144
146
|
lazyMount = true,
|
|
@@ -156,10 +158,18 @@ const SelectRoot = _ref => {
|
|
|
156
158
|
);
|
|
157
159
|
};
|
|
158
160
|
exports.SelectRoot = SelectRoot;
|
|
159
|
-
const SelectClearTrigger = exports.SelectClearTrigger = withContext(_react2.Select.ClearTrigger, "clearTrigger"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const
|
|
161
|
+
const SelectClearTrigger = exports.SelectClearTrigger = withContext(_react2.Select.ClearTrigger, "clearTrigger", {
|
|
162
|
+
baseComponent: true
|
|
163
|
+
});
|
|
164
|
+
const SelectContent = exports.SelectContent = withContext(_react2.Select.Content, "content", {
|
|
165
|
+
baseComponent: true
|
|
166
|
+
});
|
|
167
|
+
const SelectControl = exports.SelectControl = withContext(_react2.Select.Control, "control", {
|
|
168
|
+
baseComponent: true
|
|
169
|
+
});
|
|
170
|
+
const SelectIndicator = exports.SelectIndicator = withContext(_react2.Select.Indicator, "indicator", {
|
|
171
|
+
baseComponent: true
|
|
172
|
+
});
|
|
163
173
|
const SelectItemGroupLabel = exports.SelectItemGroupLabel = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
|
|
164
174
|
let {
|
|
165
175
|
children,
|
|
@@ -179,10 +189,18 @@ const SelectItemGroupLabel = exports.SelectItemGroupLabel = /*#__PURE__*/(0, _re
|
|
|
179
189
|
});
|
|
180
190
|
});
|
|
181
191
|
const InternalSelectItemGroupLabel = withContext(_react2.Select.ItemGroupLabel, "itemGroupLabel");
|
|
182
|
-
const SelectItemGroup = exports.SelectItemGroup = withContext(_react2.Select.ItemGroup, "itemGroup"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const
|
|
192
|
+
const SelectItemGroup = exports.SelectItemGroup = withContext(_react2.Select.ItemGroup, "itemGroup", {
|
|
193
|
+
baseComponent: true
|
|
194
|
+
});
|
|
195
|
+
const SelectItemIndicator = exports.SelectItemIndicator = withContext(_react2.Select.ItemIndicator, "itemIndicator", {
|
|
196
|
+
baseComponent: true
|
|
197
|
+
});
|
|
198
|
+
const SelectItem = exports.SelectItem = withContext(_react2.Select.Item, "item", {
|
|
199
|
+
baseComponent: true
|
|
200
|
+
});
|
|
201
|
+
const SelectItemText = exports.SelectItemText = withContext(_react2.Select.ItemText, "itemText", {
|
|
202
|
+
baseComponent: true
|
|
203
|
+
});
|
|
186
204
|
const InternalSelectLabel = withContext(_react2.Select.Label, "label");
|
|
187
205
|
const SelectLabel = exports.SelectLabel = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
188
206
|
let {
|
|
@@ -198,6 +216,12 @@ const SelectLabel = exports.SelectLabel = /*#__PURE__*/(0, _react.forwardRef)((_
|
|
|
198
216
|
})
|
|
199
217
|
});
|
|
200
218
|
});
|
|
201
|
-
const SelectPositioner = exports.SelectPositioner = withContext(_react2.Select.Positioner, "positioner"
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
const SelectPositioner = exports.SelectPositioner = withContext(_react2.Select.Positioner, "positioner", {
|
|
220
|
+
baseComponent: true
|
|
221
|
+
});
|
|
222
|
+
const SelectTrigger = exports.SelectTrigger = withContext(_react2.Select.Trigger, "trigger", {
|
|
223
|
+
baseComponent: true
|
|
224
|
+
});
|
|
225
|
+
const SelectValueText = exports.SelectValueText = withContext(_react2.Select.ValueText, "valueText", {
|
|
226
|
+
baseComponent: true
|
|
227
|
+
});
|
package/lib/Slider.js
CHANGED
|
@@ -85,11 +85,21 @@ const {
|
|
|
85
85
|
withProvider,
|
|
86
86
|
withContext
|
|
87
87
|
} = (0, _createStyleContext.createStyleContext)(sliderRecipe);
|
|
88
|
-
const SliderRoot = exports.SliderRoot = withProvider(_react.Slider.Root, "root"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
88
|
+
const SliderRoot = exports.SliderRoot = withProvider(_react.Slider.Root, "root", {
|
|
89
|
+
baseComponent: true
|
|
90
|
+
});
|
|
91
|
+
const SliderControl = exports.SliderControl = withContext(_react.Slider.Control, "control", {
|
|
92
|
+
baseComponent: true
|
|
93
|
+
});
|
|
94
|
+
const SliderTrack = exports.SliderTrack = withContext(_react.Slider.Track, "track", {
|
|
95
|
+
baseComponent: true
|
|
96
|
+
});
|
|
97
|
+
const SliderRange = exports.SliderRange = withContext(_react.Slider.Range, "range", {
|
|
98
|
+
baseComponent: true
|
|
99
|
+
});
|
|
100
|
+
const SliderThumb = exports.SliderThumb = withContext(_react.Slider.Thumb, "thumb", {
|
|
101
|
+
baseComponent: true
|
|
102
|
+
});
|
|
93
103
|
const InternalSliderLabel = withContext(_react.Slider.Label, "label");
|
|
94
104
|
const SliderLabel = _ref => {
|
|
95
105
|
let {
|
package/lib/Switch.js
CHANGED
|
@@ -103,9 +103,15 @@ const {
|
|
|
103
103
|
withProvider,
|
|
104
104
|
withContext
|
|
105
105
|
} = (0, _createStyleContext.createStyleContext)(switchRecipe);
|
|
106
|
-
const SwitchRoot = exports.SwitchRoot = withProvider(_react.Switch.Root, "root"
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const SwitchRoot = exports.SwitchRoot = withProvider(_react.Switch.Root, "root", {
|
|
107
|
+
baseComponent: true
|
|
108
|
+
});
|
|
109
|
+
const SwitchControl = exports.SwitchControl = withContext(_react.Switch.Control, "control", {
|
|
110
|
+
baseComponent: true
|
|
111
|
+
});
|
|
112
|
+
const SwitchThumb = exports.SwitchThumb = withContext(_react.Switch.Thumb, "thumb", {
|
|
113
|
+
baseComponent: true
|
|
114
|
+
});
|
|
109
115
|
const InternalSwitchLabel = withContext(_react.Switch.Label, "label");
|
|
110
116
|
const SwitchLabel = _ref => {
|
|
111
117
|
let {
|
package/lib/Tabs.d.ts
CHANGED
|
@@ -130,7 +130,10 @@ declare const tabsRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeF
|
|
|
130
130
|
};
|
|
131
131
|
}>;
|
|
132
132
|
export type TabsVariantProps = RecipeVariantProps<typeof tabsRecipe>;
|
|
133
|
-
|
|
133
|
+
interface RootProps extends Tabs.RootProps {
|
|
134
|
+
translations: Tabs.RootProps["translations"];
|
|
135
|
+
}
|
|
136
|
+
export type TabsRootProps = RootProps & TabsVariantProps & JsxStyleProps;
|
|
134
137
|
export declare const TabsRoot: ({ lazyMount, unmountOnExit, ...props }: TabsRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
135
138
|
export declare const TabsContent: import("react").ForwardRefExoticComponent<Tabs.ContentProps & {
|
|
136
139
|
consumeCss?: boolean | undefined;
|
package/lib/Tabs.js
CHANGED
|
@@ -207,7 +207,9 @@ const {
|
|
|
207
207
|
withProvider,
|
|
208
208
|
withContext
|
|
209
209
|
} = (0, _createStyleContext.createStyleContext)(tabsRecipe);
|
|
210
|
-
const InternalTabsRoot = withProvider(_react.Tabs.Root, "root"
|
|
210
|
+
const InternalTabsRoot = withProvider(_react.Tabs.Root, "root", {
|
|
211
|
+
baseComponent: true
|
|
212
|
+
});
|
|
211
213
|
const TabsRoot = _ref => {
|
|
212
214
|
let {
|
|
213
215
|
lazyMount = true,
|
|
@@ -221,10 +223,18 @@ const TabsRoot = _ref => {
|
|
|
221
223
|
});
|
|
222
224
|
};
|
|
223
225
|
exports.TabsRoot = TabsRoot;
|
|
224
|
-
const TabsContent = exports.TabsContent = withContext(_react.Tabs.Content, "content"
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const
|
|
226
|
+
const TabsContent = exports.TabsContent = withContext(_react.Tabs.Content, "content", {
|
|
227
|
+
baseComponent: true
|
|
228
|
+
});
|
|
229
|
+
const TabsIndicator = exports.TabsIndicator = withContext(_react.Tabs.Indicator, "indicator", {
|
|
230
|
+
baseComponent: true
|
|
231
|
+
});
|
|
232
|
+
const TabsList = exports.TabsList = withContext(_react.Tabs.List, "list", {
|
|
233
|
+
baseComponent: true
|
|
234
|
+
});
|
|
235
|
+
const InternalTabsTrigger = withContext(_react.Tabs.Trigger, "trigger", {
|
|
236
|
+
baseComponent: true
|
|
237
|
+
});
|
|
228
238
|
const TabsTrigger = _ref2 => {
|
|
229
239
|
let {
|
|
230
240
|
className,
|
package/lib/TagsInput.d.ts
CHANGED
|
@@ -8,34 +8,47 @@
|
|
|
8
8
|
import { TagsInput } from "@ark-ui/react";
|
|
9
9
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
10
|
import { TextProps } from "./Text";
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
interface RootProps extends TagsInput.RootProps {
|
|
12
|
+
translations: TagsInput.RootProps["translations"];
|
|
13
|
+
}
|
|
14
|
+
export type TagsInputRootProps = RootProps & JsxStyleProps;
|
|
15
|
+
export declare const TagsInputRoot: import("react").ForwardRefExoticComponent<RootProps & {
|
|
13
16
|
consumeCss?: boolean | undefined;
|
|
14
17
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export type TagsInputClearTriggerProps = TagsInput.ClearTriggerProps & JsxStyleProps;
|
|
15
19
|
export declare const TagsInputClearTrigger: import("react").ForwardRefExoticComponent<TagsInput.ClearTriggerProps & {
|
|
16
20
|
consumeCss?: boolean | undefined;
|
|
17
21
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export type TagsInputControlProps = TagsInput.ControlProps & JsxStyleProps;
|
|
18
23
|
export declare const TagsInputControl: import("react").ForwardRefExoticComponent<TagsInput.ControlProps & {
|
|
19
24
|
consumeCss?: boolean | undefined;
|
|
20
25
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export type TagsInputInputProps = TagsInput.InputProps & JsxStyleProps;
|
|
21
27
|
export declare const TagsInputInput: import("react").ForwardRefExoticComponent<TagsInput.InputProps & {
|
|
22
28
|
consumeCss?: boolean | undefined;
|
|
23
29
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export type TagsInputItemDeleteTriggerProps = TagsInput.ItemDeleteTriggerProps & JsxStyleProps;
|
|
24
31
|
export declare const TagsInputItemDeleteTrigger: import("react").ForwardRefExoticComponent<TagsInput.ItemDeleteTriggerProps & {
|
|
25
32
|
consumeCss?: boolean | undefined;
|
|
26
33
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLButtonElement>>;
|
|
34
|
+
export type TagsInputItemInputProps = TagsInput.ItemInputProps & JsxStyleProps;
|
|
27
35
|
export declare const TagsInputItemInput: import("react").ForwardRefExoticComponent<TagsInput.ItemInputProps & {
|
|
28
36
|
consumeCss?: boolean | undefined;
|
|
29
37
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLInputElement>>;
|
|
38
|
+
export type TagsInputItemPreviewProps = TagsInput.ItemPreviewProps & JsxStyleProps;
|
|
30
39
|
export declare const TagsInputItemPreview: import("react").ForwardRefExoticComponent<TagsInput.ItemPreviewProps & {
|
|
31
40
|
consumeCss?: boolean | undefined;
|
|
32
41
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export type TagsInputItemProps = TagsInput.ItemProps & JsxStyleProps;
|
|
33
43
|
export declare const TagsInputItem: import("react").ForwardRefExoticComponent<TagsInput.ItemProps & {
|
|
34
44
|
consumeCss?: boolean | undefined;
|
|
35
45
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export type TagsInputItemTextProps = TagsInput.ItemTextProps & JsxStyleProps;
|
|
36
47
|
export declare const TagsInputItemText: import("react").ForwardRefExoticComponent<TagsInput.ItemTextProps & {
|
|
37
48
|
consumeCss?: boolean | undefined;
|
|
38
49
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
|
50
|
+
export type TagsInputLabelProps = TagsInput.LabelProps & JsxStyleProps & TextProps;
|
|
39
51
|
export declare const TagsInputLabel: import("react").ForwardRefExoticComponent<TagsInput.LabelProps & {
|
|
40
52
|
consumeCss?: boolean | undefined;
|
|
41
53
|
} & import("@ndla/styled-system/types").WithCss & TextProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
54
|
+
export {};
|
package/lib/TagsInput.js
CHANGED
|
@@ -100,15 +100,33 @@ const {
|
|
|
100
100
|
withProvider,
|
|
101
101
|
withContext
|
|
102
102
|
} = (0, _createStyleContext.createStyleContext)(tagsInputRecipe);
|
|
103
|
-
const TagsInputRoot = exports.TagsInputRoot = withProvider(_react2.TagsInput.Root, "root"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
const TagsInputRoot = exports.TagsInputRoot = withProvider(_react2.TagsInput.Root, "root", {
|
|
104
|
+
baseComponent: true
|
|
105
|
+
});
|
|
106
|
+
const TagsInputClearTrigger = exports.TagsInputClearTrigger = withContext(_react2.TagsInput.ClearTrigger, "clearTrigger", {
|
|
107
|
+
baseComponent: true
|
|
108
|
+
});
|
|
109
|
+
const TagsInputControl = exports.TagsInputControl = withContext(_react2.TagsInput.Control, "control", {
|
|
110
|
+
baseComponent: true
|
|
111
|
+
});
|
|
112
|
+
const TagsInputInput = exports.TagsInputInput = withContext(_react2.TagsInput.Input, "input", {
|
|
113
|
+
baseComponent: true
|
|
114
|
+
});
|
|
115
|
+
const TagsInputItemDeleteTrigger = exports.TagsInputItemDeleteTrigger = withContext(_react2.TagsInput.ItemDeleteTrigger, "itemDeleteTrigger", {
|
|
116
|
+
baseComponent: true
|
|
117
|
+
});
|
|
118
|
+
const TagsInputItemInput = exports.TagsInputItemInput = withContext(_react2.TagsInput.ItemInput, "itemInput", {
|
|
119
|
+
baseComponent: true
|
|
120
|
+
});
|
|
121
|
+
const TagsInputItemPreview = exports.TagsInputItemPreview = withContext(_react2.TagsInput.ItemPreview, "itemPreview", {
|
|
122
|
+
baseComponent: true
|
|
123
|
+
});
|
|
124
|
+
const TagsInputItem = exports.TagsInputItem = withContext(_react2.TagsInput.Item, "item", {
|
|
125
|
+
baseComponent: true
|
|
126
|
+
});
|
|
127
|
+
const TagsInputItemText = exports.TagsInputItemText = withContext(_react2.TagsInput.ItemText, "itemText", {
|
|
128
|
+
baseComponent: true
|
|
129
|
+
});
|
|
112
130
|
const InternalTagsInputLabel = withContext(_react2.TagsInput.Label, "label");
|
|
113
131
|
const TagsInputLabel = exports.TagsInputLabel = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
114
132
|
let {
|
package/lib/Toast.js
CHANGED
|
@@ -50,9 +50,15 @@ const {
|
|
|
50
50
|
withProvider,
|
|
51
51
|
withContext
|
|
52
52
|
} = (0, _createStyleContext.createStyleContext)(toastRecipe);
|
|
53
|
-
const ToastRoot = exports.ToastRoot = withProvider(_react.Toast.Root, "root"
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const ToastRoot = exports.ToastRoot = withProvider(_react.Toast.Root, "root", {
|
|
54
|
+
baseComponent: true
|
|
55
|
+
});
|
|
56
|
+
const ToastActionTrigger = exports.ToastActionTrigger = withContext(_react.Toast.ActionTrigger, "actionTrigger", {
|
|
57
|
+
baseComponent: true
|
|
58
|
+
});
|
|
59
|
+
const ToastCloseTrigger = exports.ToastCloseTrigger = withContext(_react.Toast.CloseTrigger, "closeTrigger", {
|
|
60
|
+
baseComponent: true
|
|
61
|
+
});
|
|
56
62
|
const InternalToastDescription = withContext(_react.Toast.Description, "description");
|
|
57
63
|
const ToastDescription = _ref => {
|
|
58
64
|
let {
|
package/lib/Tooltip.js
CHANGED
|
@@ -42,9 +42,15 @@ const {
|
|
|
42
42
|
withContext
|
|
43
43
|
} = (0, _createStyleContext.createStyleContext)(tooltipRecipe);
|
|
44
44
|
const TooltipRoot = exports.TooltipRoot = withRootProvider(_react2.Tooltip.Root);
|
|
45
|
-
const TooltipArrow = exports.TooltipArrow = withContext(_react2.Tooltip.Arrow, "arrow"
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const TooltipArrow = exports.TooltipArrow = withContext(_react2.Tooltip.Arrow, "arrow", {
|
|
46
|
+
baseComponent: true
|
|
47
|
+
});
|
|
48
|
+
const TooltipArrowTip = exports.TooltipArrowTip = withContext(_react2.Tooltip.ArrowTip, "arrowTip", {
|
|
49
|
+
baseComponent: true
|
|
50
|
+
});
|
|
51
|
+
const TooltipContentStandalone = exports.TooltipContentStandalone = withContext(_react2.Tooltip.Content, "content", {
|
|
52
|
+
baseComponent: true
|
|
53
|
+
});
|
|
48
54
|
const TooltipContent = exports.TooltipContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
49
55
|
let {
|
|
50
56
|
children,
|
|
@@ -60,5 +66,9 @@ const TooltipContent = exports.TooltipContent = /*#__PURE__*/(0, _react.forwardR
|
|
|
60
66
|
})
|
|
61
67
|
});
|
|
62
68
|
});
|
|
63
|
-
const TooltipPositioner = exports.TooltipPositioner = withContext(_react2.Tooltip.Positioner, "positioner"
|
|
64
|
-
|
|
69
|
+
const TooltipPositioner = exports.TooltipPositioner = withContext(_react2.Tooltip.Positioner, "positioner", {
|
|
70
|
+
baseComponent: true
|
|
71
|
+
});
|
|
72
|
+
const TooltipTrigger = exports.TooltipTrigger = withContext(_react2.Tooltip.Trigger, "trigger", {
|
|
73
|
+
baseComponent: true
|
|
74
|
+
});
|
|
@@ -21,9 +21,12 @@ interface BaseStyleContextProps {
|
|
|
21
21
|
asChild?: boolean;
|
|
22
22
|
consumeCss?: boolean;
|
|
23
23
|
}
|
|
24
|
+
interface CreateStyleContextOptions {
|
|
25
|
+
baseComponent?: boolean;
|
|
26
|
+
}
|
|
24
27
|
export declare const createStyleContext: <R extends Recipe>(recipe: R) => {
|
|
25
28
|
withRootProvider: <P extends {}>(Component: ElementType) => (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
withProvider: <T, P_1 extends BaseStyleContextProps & WithCss>(Component: ElementType, slot: Slot<R
|
|
27
|
-
withContext: <T_1, P_2 extends BaseStyleContextProps & WithCss>(Component: ElementType, slot: Slot<R
|
|
29
|
+
withProvider: <T, P_1 extends BaseStyleContextProps & WithCss>(Component: ElementType, slot: Slot<R>, options?: CreateStyleContextOptions) => ForwardRefExoticComponent<PropsWithoutRef<P_1> & RefAttributes<T>>;
|
|
30
|
+
withContext: <T_1, P_2 extends BaseStyleContextProps & WithCss>(Component: ElementType, slot: Slot<R>, options?: CreateStyleContextOptions) => ForwardRefExoticComponent<PropsWithoutRef<P_2> & RefAttributes<T_1>>;
|
|
28
31
|
};
|
|
29
32
|
export {};
|
|
@@ -35,11 +35,8 @@ const createStyleContext = recipe => {
|
|
|
35
35
|
};
|
|
36
36
|
return StyledComponent;
|
|
37
37
|
};
|
|
38
|
-
const withProvider = (Component, slot) => {
|
|
39
|
-
const
|
|
40
|
-
baseComponent: true
|
|
41
|
-
};
|
|
42
|
-
const StyledComponent = (0, _jsx2.styled)(Component, {}, opts);
|
|
38
|
+
const withProvider = (Component, slot, options) => {
|
|
39
|
+
const StyledComponent = (0, _jsx2.styled)(Component, {}, options);
|
|
43
40
|
return /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
44
41
|
let {
|
|
45
42
|
css: cssProp,
|
|
@@ -57,11 +54,8 @@ const createStyleContext = recipe => {
|
|
|
57
54
|
});
|
|
58
55
|
});
|
|
59
56
|
};
|
|
60
|
-
const withContext = (Component, slot) => {
|
|
61
|
-
const
|
|
62
|
-
baseComponent: true
|
|
63
|
-
};
|
|
64
|
-
const StyledComponent = (0, _jsx2.styled)(Component, {}, opts);
|
|
57
|
+
const withContext = (Component, slot, options) => {
|
|
58
|
+
const StyledComponent = (0, _jsx2.styled)(Component, {}, options);
|
|
65
59
|
return /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
|
|
66
60
|
let {
|
|
67
61
|
css: cssProp,
|