@algolia/satellite 2.3.0-rc.1 → 2.3.0-rc.11
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/cjs/Actions/Button/PolymorphicButton.js +5 -5
- package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/cjs/Actions/Button/styles.d.ts +1 -0
- package/dist/cjs/Actions/Button/styles.js +15 -10
- package/dist/cjs/Actions/ButtonLink/ButtonLink.d.ts +2 -0
- package/dist/cjs/Actions/ButtonLink/ButtonLink.js +4 -2
- package/dist/cjs/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/cjs/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +3 -3
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +13 -14
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +20 -1
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
- package/dist/{esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → cjs/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +20 -14
- package/dist/{esm/Layout → cjs}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +9 -4
- package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
- package/dist/{esm/Layout → cjs}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +3 -3
- package/dist/cjs/Chat/ChatMessages/ChatMessages.d.ts +141 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +64 -23
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
- package/dist/cjs/Chat/ChatMessages/useLastMessageHeight.d.ts +14 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +21 -14
- package/dist/{esm/Layout → cjs}/Chat/ChatPrompt/ChatPrompt.d.ts +34 -12
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +46 -19
- package/dist/cjs/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +11 -4
- package/dist/cjs/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
- package/dist/cjs/Chat/ChatPrompt/useFocusTyping.js +65 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
- package/dist/cjs/Fields/Checkbox/Checkbox.d.ts +2 -2
- package/dist/cjs/Fields/Checkbox/Checkbox.js +2 -2
- package/dist/cjs/Fields/Dropzone/Dropzone.js +1 -1
- package/dist/cjs/Fields/Form/stories/Complex.js +123 -50
- package/dist/cjs/Fields/Input/Input.js +10 -13
- package/dist/cjs/Fields/RadioGroup/RadioButton.js +9 -2
- package/dist/cjs/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
- package/dist/cjs/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/cjs/Fields/RadioGroup/RadioGroupItem.js +1 -1
- package/dist/cjs/Fields/Select/Select.tailwind.js +4 -3
- package/dist/cjs/Fields/SelectableCard/SelectableCard.d.ts +35 -0
- package/dist/cjs/Fields/SelectableCard/SelectableCard.js +105 -0
- package/dist/cjs/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
- package/dist/cjs/Fields/SelectableCard/SelectableCardContext.js +15 -0
- package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
- package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.js +55 -0
- package/dist/cjs/Fields/SelectableCard/index.d.ts +2 -0
- package/dist/cjs/Fields/SelectableCard/index.js +27 -0
- package/dist/cjs/Fields/Switch/Switch.js +1 -1
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
- package/dist/cjs/Fields/index.d.ts +1 -0
- package/dist/cjs/Fields/index.js +11 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +29 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/cjs/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/cjs/Helpers/MarkdownContent/index.js +16 -0
- package/dist/cjs/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
- package/dist/cjs/Helpers/index.d.ts +1 -0
- package/dist/cjs/Helpers/index.js +11 -0
- package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/cjs/Layout/index.d.ts +0 -1
- package/dist/cjs/Layout/index.js +0 -11
- package/dist/cjs/Navigation/Link/Link.d.ts +10 -0
- package/dist/cjs/Navigation/Link/Link.js +4 -2
- package/dist/cjs/Satellite/locale.d.ts +3 -3
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/styles/helpers/tv.d.ts +5 -1
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
- package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/esm/Actions/Button/styles.d.ts +1 -0
- package/dist/esm/Actions/Button/styles.js +14 -9
- package/dist/esm/Actions/ButtonLink/ButtonLink.d.ts +2 -0
- package/dist/esm/Actions/ButtonLink/ButtonLink.js +4 -2
- package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
- package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +13 -14
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +20 -1
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
- package/dist/{cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → esm/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +20 -14
- package/dist/{cjs/Layout → esm}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
- package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
- package/dist/{cjs/Layout → esm}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +3 -3
- package/dist/esm/Chat/ChatMessages/ChatMessages.d.ts +141 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +64 -25
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
- package/dist/esm/Chat/ChatMessages/useLastMessageHeight.d.ts +14 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +22 -15
- package/dist/{cjs/Layout → esm}/Chat/ChatPrompt/ChatPrompt.d.ts +34 -12
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +47 -19
- package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +11 -4
- package/dist/esm/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
- package/dist/esm/Chat/ChatPrompt/useFocusTyping.js +59 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
- package/dist/esm/Fields/Checkbox/Checkbox.d.ts +2 -2
- package/dist/esm/Fields/Checkbox/Checkbox.js +2 -2
- package/dist/esm/Fields/Dropzone/Dropzone.js +1 -1
- package/dist/esm/Fields/Form/stories/Complex.js +123 -50
- package/dist/esm/Fields/Input/Input.js +10 -13
- package/dist/esm/Fields/RadioGroup/RadioButton.js +10 -3
- package/dist/esm/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
- package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +1 -1
- package/dist/esm/Fields/Select/Select.tailwind.js +4 -3
- package/dist/esm/Fields/SelectableCard/SelectableCard.d.ts +35 -0
- package/dist/esm/Fields/SelectableCard/SelectableCard.js +100 -0
- package/dist/esm/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
- package/dist/esm/Fields/SelectableCard/SelectableCardContext.js +9 -0
- package/dist/esm/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
- package/dist/esm/Fields/SelectableCard/SelectableCardGroup.js +48 -0
- package/dist/esm/Fields/SelectableCard/index.d.ts +2 -0
- package/dist/esm/Fields/SelectableCard/index.js +2 -0
- package/dist/esm/Fields/Switch/Switch.js +1 -1
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
- package/dist/esm/Fields/index.d.ts +1 -0
- package/dist/esm/Fields/index.js +1 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +22 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/esm/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/esm/Helpers/MarkdownContent/index.js +1 -0
- package/dist/esm/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
- package/dist/esm/Helpers/index.d.ts +1 -0
- package/dist/esm/Helpers/index.js +2 -1
- package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/esm/Layout/index.d.ts +0 -1
- package/dist/esm/Layout/index.js +0 -1
- package/dist/esm/Navigation/Link/Link.d.ts +10 -0
- package/dist/esm/Navigation/Link/Link.js +4 -2
- package/dist/esm/Satellite/locale.d.ts +3 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/styles/helpers/tv.d.ts +5 -1
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +5 -4
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
- package/dist/cjs/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
- package/dist/esm/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
- /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/types.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/types.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/types.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/types.js +0 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
2
|
+
import type { CardProps } from "../../Layout";
|
3
|
+
import { Card } from "../../Layout";
|
4
|
+
declare type SelectableCardBaseProps = Omit<CardProps, "elevation"> & {
|
5
|
+
/**
|
6
|
+
* The color of the selected card.
|
7
|
+
*/
|
8
|
+
selectedColor?: keyof typeof SELECTED_COLOR_CLASSNAMES;
|
9
|
+
};
|
10
|
+
export declare type SelectableCardProps = SelectableCardBaseProps & {
|
11
|
+
/**
|
12
|
+
* Whether the `SelectableCard` is disabled.
|
13
|
+
*/
|
14
|
+
disabled?: boolean;
|
15
|
+
/**
|
16
|
+
* The value of the `SelectableCard`.
|
17
|
+
*/
|
18
|
+
value: string;
|
19
|
+
};
|
20
|
+
interface SelectableCardType extends ForwardRefExoticComponent<PropsWithoutRef<SelectableCardProps> & RefAttributes<HTMLElement>> {
|
21
|
+
Header: typeof Card.Header;
|
22
|
+
Title: typeof Card.Title;
|
23
|
+
}
|
24
|
+
declare const SELECTED_COLOR_CLASSNAMES: {
|
25
|
+
readonly grey: string;
|
26
|
+
readonly pink: string;
|
27
|
+
readonly accent: string;
|
28
|
+
readonly blue: string;
|
29
|
+
readonly green: string;
|
30
|
+
readonly orange: string;
|
31
|
+
readonly red: string;
|
32
|
+
readonly xenon: string;
|
33
|
+
};
|
34
|
+
export declare const SelectableCard: SelectableCardType;
|
35
|
+
export {};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
5
|
+
var _excluded = ["value", "selectedColor", "children", "id", "className"];
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
9
|
+
import cx from "clsx";
|
10
|
+
import { forwardRef } from "react";
|
11
|
+
import { Checkbox, RadioButton, useField } from "..";
|
12
|
+
import { Card } from "../../Layout";
|
13
|
+
import stl from "../../styles/helpers/satellitePrefixer";
|
14
|
+
import { useSelectableCardContext } from "./SelectableCardContext";
|
15
|
+
|
16
|
+
// We need to omit the `elevation` prop because we handle it ourselves.
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
18
|
+
var SELECTED_COLOR_CLASSNAMES = {
|
19
|
+
grey: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["border-grey-600"]))),
|
20
|
+
pink: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["border-pink-600"]))),
|
21
|
+
accent: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["border-accent-600"]))),
|
22
|
+
blue: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["border-blue-600"]))),
|
23
|
+
green: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["border-green-600"]))),
|
24
|
+
orange: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["border-orange-600"]))),
|
25
|
+
red: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["border-red-600"]))),
|
26
|
+
xenon: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["border-xenon-600"])))
|
27
|
+
};
|
28
|
+
export var SelectableCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
29
|
+
var value = _ref.value,
|
30
|
+
_ref$selectedColor = _ref.selectedColor,
|
31
|
+
selectedColor = _ref$selectedColor === void 0 ? "xenon" : _ref$selectedColor,
|
32
|
+
children = _ref.children,
|
33
|
+
id = _ref.id,
|
34
|
+
className = _ref.className,
|
35
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
36
|
+
var _useSelectableCardCon = useSelectableCardContext(),
|
37
|
+
name = _useSelectableCardCon.name,
|
38
|
+
isControlled = _useSelectableCardCon.isControlled,
|
39
|
+
setValue = _useSelectableCardCon.setValue,
|
40
|
+
onValueChange = _useSelectableCardCon.onValueChange,
|
41
|
+
type = _useSelectableCardCon.type,
|
42
|
+
valueContext = _useSelectableCardCon.value,
|
43
|
+
disabledContext = _useSelectableCardCon.disabled;
|
44
|
+
var disabled = props.disabled || disabledContext;
|
45
|
+
var selected = valueContext === null || valueContext === void 0 ? void 0 : valueContext.includes(value);
|
46
|
+
var _useField = useField(),
|
47
|
+
status = _useField.state.status;
|
48
|
+
var isInvalid = status === "invalid";
|
49
|
+
var handleCheckboxChange = function handleCheckboxChange(evt) {
|
50
|
+
var _valueContext$filter;
|
51
|
+
var newValue = selected ? (_valueContext$filter = valueContext === null || valueContext === void 0 ? void 0 : valueContext.filter(function (v) {
|
52
|
+
return v !== value;
|
53
|
+
})) !== null && _valueContext$filter !== void 0 ? _valueContext$filter : [] : [].concat(_toConsumableArray(valueContext !== null && valueContext !== void 0 ? valueContext : []), [value]);
|
54
|
+
if (!isControlled && !evt.isDefaultPrevented()) {
|
55
|
+
setValue(newValue);
|
56
|
+
}
|
57
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
|
58
|
+
};
|
59
|
+
var handleRadioButtonChange = function handleRadioButtonChange(evt) {
|
60
|
+
var newValue = [evt.target.value];
|
61
|
+
if (!isControlled && !evt.isDefaultPrevented()) {
|
62
|
+
setValue(newValue);
|
63
|
+
}
|
64
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
|
65
|
+
};
|
66
|
+
return /*#__PURE__*/_jsxs(Card, _objectSpread(_objectSpread({
|
67
|
+
ref: ref,
|
68
|
+
fullBleed: true,
|
69
|
+
className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["relative border transition-[shadow,border]"]))), !disabled && !selected && !isInvalid && stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["border-transparent"]))),
|
70
|
+
// Disabled
|
71
|
+
disabled && stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["bg-grey-100 border-grey-200 text-grey-300 shadow-none cursor-not-allowed [&>*]:text-grey-300"]))),
|
72
|
+
// Selected
|
73
|
+
selected && stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["card-z200"]))), !disabled && selected && !isInvalid && SELECTED_COLOR_CLASSNAMES[selectedColor],
|
74
|
+
// Hovered
|
75
|
+
!disabled && !selected && !isInvalid && stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["hover:border-grey-200"]))), // Focused
|
76
|
+
stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["focusable-visible-within"]))), !selected && stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["focus-within:border-grey-200"]))),
|
77
|
+
// Invalid
|
78
|
+
isInvalid && stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["border-red-700 shadow-none"]))),
|
79
|
+
// Custom
|
80
|
+
className)
|
81
|
+
}, props), {}, {
|
82
|
+
children: [type === "multiple" ? /*#__PURE__*/_jsx(Checkbox, {
|
83
|
+
id: id,
|
84
|
+
disabled: disabled,
|
85
|
+
checked: selected,
|
86
|
+
className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["absolute right-4 top-4 z-10"])))),
|
87
|
+
onChange: handleCheckboxChange,
|
88
|
+
name: name
|
89
|
+
}) : /*#__PURE__*/_jsx(RadioButton, {
|
90
|
+
id: id,
|
91
|
+
disabled: disabled,
|
92
|
+
checked: selected,
|
93
|
+
className: cx(stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["absolute right-4 top-4 z-10"])))),
|
94
|
+
onChange: handleRadioButtonChange,
|
95
|
+
value: value,
|
96
|
+
name: name
|
97
|
+
}), children]
|
98
|
+
}));
|
99
|
+
});
|
100
|
+
SelectableCard.displayName = "SelectableCard";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
2
|
+
import type { SelectionTypes } from "./SelectableCardGroup";
|
3
|
+
export interface SelectableCardContextInterface {
|
4
|
+
value?: string[];
|
5
|
+
name?: string;
|
6
|
+
type: SelectionTypes;
|
7
|
+
isControlled: boolean;
|
8
|
+
setValue: Dispatch<SetStateAction<string[]>>;
|
9
|
+
onValueChange?: (value: string[]) => void;
|
10
|
+
disabled?: boolean;
|
11
|
+
}
|
12
|
+
export declare const SelectableCardContext: import("react").Context<SelectableCardContextInterface | null>;
|
13
|
+
export declare const useSelectableCardContext: () => SelectableCardContextInterface;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { createContext, useContext } from "react";
|
2
|
+
export var SelectableCardContext = /*#__PURE__*/createContext(null);
|
3
|
+
export var useSelectableCardContext = function useSelectableCardContext() {
|
4
|
+
var context = useContext(SelectableCardContext);
|
5
|
+
if (!context) {
|
6
|
+
throw new Error("useSelectableCardContext used outside SelectableCardContext");
|
7
|
+
}
|
8
|
+
return context;
|
9
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { type FC, type PropsWithChildren } from "react";
|
2
|
+
export declare type SelectionTypes = "multiple" | "single";
|
3
|
+
export declare type SelectableCardGroupProps = {
|
4
|
+
disabled?: boolean;
|
5
|
+
name?: string;
|
6
|
+
value?: string[];
|
7
|
+
defaultValue?: string[];
|
8
|
+
type: SelectionTypes;
|
9
|
+
onValueChange?: (value: string[]) => void;
|
10
|
+
className?: string;
|
11
|
+
required?: boolean;
|
12
|
+
};
|
13
|
+
export declare const SelectableCardGroup: FC<PropsWithChildren<SelectableCardGroupProps>>;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
|
+
import { useState } from "react";
|
3
|
+
import { useField } from "..";
|
4
|
+
import { SelectableCardContext } from "./SelectableCardContext";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
export var SelectableCardGroup = function SelectableCardGroup(_ref) {
|
7
|
+
var _ref2;
|
8
|
+
var children = _ref.children,
|
9
|
+
disabled = _ref.disabled,
|
10
|
+
name = _ref.name,
|
11
|
+
controlledValue = _ref.value,
|
12
|
+
defaultValue = _ref.defaultValue,
|
13
|
+
type = _ref.type,
|
14
|
+
onValueChange = _ref.onValueChange,
|
15
|
+
className = _ref.className,
|
16
|
+
required = _ref.required;
|
17
|
+
var isControlled = controlledValue !== undefined;
|
18
|
+
var _useState = useState((_ref2 = controlledValue !== null && controlledValue !== void 0 ? controlledValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : []),
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
20
|
+
internalValue = _useState2[0],
|
21
|
+
setInternalValue = _useState2[1];
|
22
|
+
var value = isControlled ? controlledValue : internalValue;
|
23
|
+
var _useField = useField({
|
24
|
+
required: required
|
25
|
+
}),
|
26
|
+
status = _useField.state.status,
|
27
|
+
labelId = _useField.labelId,
|
28
|
+
descriptionId = _useField.descriptionId;
|
29
|
+
return /*#__PURE__*/_jsx(SelectableCardContext.Provider, {
|
30
|
+
value: {
|
31
|
+
value: value,
|
32
|
+
setValue: setInternalValue,
|
33
|
+
isControlled: isControlled,
|
34
|
+
name: name,
|
35
|
+
disabled: disabled,
|
36
|
+
onValueChange: onValueChange,
|
37
|
+
type: type
|
38
|
+
},
|
39
|
+
children: /*#__PURE__*/_jsx("div", {
|
40
|
+
role: type === "single" ? "radiogroup" : "group",
|
41
|
+
"aria-invalid": status === "invalid",
|
42
|
+
"aria-labelledby": labelId,
|
43
|
+
"aria-describedby": descriptionId,
|
44
|
+
className: className,
|
45
|
+
children: children
|
46
|
+
})
|
47
|
+
});
|
48
|
+
};
|
@@ -76,7 +76,7 @@ export var Switch = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
76
76
|
role: "switch",
|
77
77
|
ref: ref
|
78
78
|
})), /*#__PURE__*/_jsx("div", {
|
79
|
-
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["switch focusable-sibling"])))
|
79
|
+
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["switch focusable-visible-sibling"])))
|
80
80
|
})]
|
81
81
|
});
|
82
82
|
});
|
@@ -2,17 +2,25 @@
|
|
2
2
|
import type { TextAreaProps } from "../../Fields/TextArea";
|
3
3
|
export declare type TextAreaAutoSizeProps = TextAreaProps & {
|
4
4
|
/**
|
5
|
-
* The maximum number of rows the `
|
6
|
-
* If set to 0, the `
|
5
|
+
* The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
|
6
|
+
* If set to 0, the `TextAreaAutoSize` will expand indefinitely.
|
7
7
|
* @default 0
|
8
8
|
*/
|
9
9
|
maxRows?: number;
|
10
|
+
/**
|
11
|
+
* The number of rows the `TextAreaAutoSize` should start with.
|
12
|
+
*/
|
13
|
+
rows?: number;
|
10
14
|
};
|
11
15
|
export declare const TextAreaAutoSize: import("react").ForwardRefExoticComponent<TextAreaProps & {
|
12
16
|
/**
|
13
|
-
* The maximum number of rows the `
|
14
|
-
* If set to 0, the `
|
17
|
+
* The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
|
18
|
+
* If set to 0, the `TextAreaAutoSize` will expand indefinitely.
|
15
19
|
* @default 0
|
16
20
|
*/
|
17
21
|
maxRows?: number | undefined;
|
22
|
+
/**
|
23
|
+
* The number of rows the `TextAreaAutoSize` should start with.
|
24
|
+
*/
|
25
|
+
rows?: number | undefined;
|
18
26
|
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
@@ -13,6 +13,12 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
|
|
13
13
|
} | {}, {
|
14
14
|
base: string;
|
15
15
|
}, undefined, {
|
16
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
17
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
18
|
+
twMergeConfig: {
|
19
|
+
prefix: string;
|
20
|
+
};
|
21
|
+
}, {
|
16
22
|
[key: string]: {
|
17
23
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
18
24
|
base?: import("tailwind-merge").ClassNameValue;
|
@@ -22,4 +28,10 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
|
|
22
28
|
base: string;
|
23
29
|
}, import("tailwind-variants").TVReturnType<unknown, {
|
24
30
|
base: string;
|
25
|
-
}, undefined, unknown,
|
31
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
32
|
+
[key: string]: {
|
33
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
34
|
+
base?: import("tailwind-merge").ClassNameValue;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
} | {}>, unknown, unknown, undefined>>;
|
package/dist/esm/Fields/index.js
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { FC } from "react";
|
2
|
+
export interface MarkdownContentProps {
|
3
|
+
/**
|
4
|
+
* Additional classes to apply to the `MarkdownContent`.
|
5
|
+
*/
|
6
|
+
className?: string;
|
7
|
+
/**
|
8
|
+
* The content of the `MarkdownContent`.
|
9
|
+
*/
|
10
|
+
content?: string;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* The `MarkdownContent` component is used to style user generated content that comes as Markdown.
|
14
|
+
*/
|
15
|
+
export declare const MarkdownContent: FC<MarkdownContentProps>;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
+
var _templateObject;
|
3
|
+
import cx from "clsx";
|
4
|
+
import { marked } from "marked";
|
5
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
/**
|
8
|
+
* The `MarkdownContent` component is used to style user generated content that comes as Markdown.
|
9
|
+
*/
|
10
|
+
export var MarkdownContent = function MarkdownContent(_ref) {
|
11
|
+
var className = _ref.className,
|
12
|
+
content = _ref.content;
|
13
|
+
if (!content) {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
17
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["markdown-content"]))), className),
|
18
|
+
dangerouslySetInnerHTML: {
|
19
|
+
__html: marked.parse(content)
|
20
|
+
}
|
21
|
+
});
|
22
|
+
};
|
@@ -0,0 +1,138 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
|
+
import _rgba from "../../styles/rgba";
|
5
|
+
import _require2 from "../../styles/helpers/icons";
|
6
|
+
import _plugin from "tailwindcss/plugin";
|
7
|
+
// @ts-check
|
8
|
+
var plugin = _plugin;
|
9
|
+
var _require = _require2,
|
10
|
+
toBG = _require.toBG;
|
11
|
+
var rgba = _rgba;
|
12
|
+
export default plugin(function (_ref) {
|
13
|
+
var addComponents = _ref.addComponents,
|
14
|
+
theme = _ref.theme;
|
15
|
+
/** @type {any} */
|
16
|
+
var desktop = theme("stlTypography.desktop", {});
|
17
|
+
/** @type {any} */
|
18
|
+
var mobile = theme("stlTypography.mobile", {});
|
19
|
+
addComponents({
|
20
|
+
".markdown-content": {
|
21
|
+
"h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table": {
|
22
|
+
"&:not(:first-child)": {
|
23
|
+
marginTop: theme("spacing.3")
|
24
|
+
},
|
25
|
+
"&:not(:last-child)": {
|
26
|
+
marginBottom: theme("spacing.2")
|
27
|
+
}
|
28
|
+
},
|
29
|
+
h1: desktop["display-medium"],
|
30
|
+
h2: desktop["display-small"],
|
31
|
+
h3: _objectSpread(_objectSpread({}, desktop["display-body"]), {}, {
|
32
|
+
fontWeight: theme("fontWeight.semibold")
|
33
|
+
}),
|
34
|
+
"h4, h5, h6": _objectSpread(_objectSpread({}, desktop["display-body"]), {}, {
|
35
|
+
fontWeight: theme("fontWeight.medium")
|
36
|
+
}),
|
37
|
+
"p, ul, ol, blockquote, table": _objectSpread(_objectSpread({}, mobile["display-body"]), {}, {
|
38
|
+
fontSize: theme("fontSize.base")
|
39
|
+
}),
|
40
|
+
code: {
|
41
|
+
display: "inline-block",
|
42
|
+
padding: "0 ".concat(theme("spacing.1")),
|
43
|
+
backgroundColor: theme("colors.grey.100"),
|
44
|
+
color: theme("colors.grey.700"),
|
45
|
+
fontFamily: theme("fontFamily.mono"),
|
46
|
+
fontSize: theme("fontSize.base")
|
47
|
+
},
|
48
|
+
ul: {
|
49
|
+
paddingLeft: theme("spacing.5"),
|
50
|
+
listStyleType: "disc"
|
51
|
+
},
|
52
|
+
ol: {
|
53
|
+
paddingLeft: theme("spacing.5"),
|
54
|
+
listStyleType: "decimal"
|
55
|
+
},
|
56
|
+
a: {
|
57
|
+
color: theme("colors.accent.600"),
|
58
|
+
"&:hover": {
|
59
|
+
textDecoration: "underline"
|
60
|
+
},
|
61
|
+
'&[target="_blank"], &[href^="http"]': {
|
62
|
+
position: "relative",
|
63
|
+
display: "inline-flex",
|
64
|
+
alignItems: "center",
|
65
|
+
whiteSpace: "nowrap",
|
66
|
+
"&:after": {
|
67
|
+
content: "''",
|
68
|
+
background: toBG("ExternalLink", {
|
69
|
+
stroke: theme("colors.accent.600"),
|
70
|
+
viewBox: "0 0 24 24",
|
71
|
+
width: "100%",
|
72
|
+
height: "100%"
|
73
|
+
}),
|
74
|
+
backgroundRepeat: "no-repeat",
|
75
|
+
width: "1em",
|
76
|
+
height: "1em",
|
77
|
+
marginLeft: theme("spacing.1")
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
blockquote: {
|
82
|
+
paddingLeft: theme("spacing.4"),
|
83
|
+
borderLeft: "2px solid ".concat(theme("colors.grey.200")),
|
84
|
+
color: theme("colors.grey.600")
|
85
|
+
},
|
86
|
+
pre: _objectSpread(_objectSpread({}, mobile["display-code"]), {}, {
|
87
|
+
overflow: "auto",
|
88
|
+
maxWidth: "100%",
|
89
|
+
maxHeight: theme("spacing.64"),
|
90
|
+
margin: "".concat(theme("spacing.2"), " 0"),
|
91
|
+
padding: "".concat(theme("spacing.2"), " ").concat(theme("spacing.4")),
|
92
|
+
borderRadius: theme("borderRadius.DEFAULT"),
|
93
|
+
backgroundColor: theme("colors.grey.100"),
|
94
|
+
color: theme("colors.grey.700"),
|
95
|
+
code: {
|
96
|
+
display: "inline",
|
97
|
+
backgroundColor: "transparent",
|
98
|
+
color: "inherit"
|
99
|
+
}
|
100
|
+
}),
|
101
|
+
img: {
|
102
|
+
display: "block",
|
103
|
+
maxWidth: "100%",
|
104
|
+
height: "auto",
|
105
|
+
margin: "auto"
|
106
|
+
},
|
107
|
+
hr: {
|
108
|
+
borderWidth: "0 0 1px 0",
|
109
|
+
borderStyle: "solid",
|
110
|
+
borderColor: theme("colors.grey.200"),
|
111
|
+
marginTop: theme("spacing.6"),
|
112
|
+
marginBottom: theme("spacing.6")
|
113
|
+
},
|
114
|
+
"b, strong, th": {
|
115
|
+
fontWeight: "600"
|
116
|
+
},
|
117
|
+
table: {
|
118
|
+
width: "100%",
|
119
|
+
borderCollapse: "collapse",
|
120
|
+
textAlign: "left",
|
121
|
+
"th, td": {
|
122
|
+
padding: "8px 12px",
|
123
|
+
fontSize: theme("fontSize.base")
|
124
|
+
},
|
125
|
+
th: {
|
126
|
+
borderBottom: "1px solid ".concat(theme("colors.grey.200")),
|
127
|
+
fontWeight: "normal"
|
128
|
+
},
|
129
|
+
"tr:not(:last-child) td": {
|
130
|
+
borderBottom: "1px solid ".concat(theme("colors.grey.100"))
|
131
|
+
},
|
132
|
+
"tr:hover td": {
|
133
|
+
backgroundColor: rgba(theme("colors.grey.100"), 0.6)
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
});
|
138
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./MarkdownContent";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./MarkdownContent";
|
@@ -13,7 +13,7 @@ var shimmerTextPlugin = plugin(function (_ref) {
|
|
13
13
|
"animation-duration": "3s",
|
14
14
|
"animation-iteration-count": "infinite",
|
15
15
|
"animation-name": "shimmer-text",
|
16
|
-
background: "".concat(theme("colors.grey.
|
16
|
+
background: "".concat(theme("colors.grey.600"), " linear-gradient(to right, ").concat(theme("colors.grey.600"), " 0%, #ffffffbf 40%, #ffffffbf 60%, ").concat(theme("colors.grey.600"), " 100%)"),
|
17
17
|
"-webkit-background-clip": "text",
|
18
18
|
"background-clip": "text",
|
19
19
|
"background-repeat": "no-repeat",
|
@@ -5,7 +5,7 @@ var plugin = _plugin;
|
|
5
5
|
export default plugin(function (_ref) {
|
6
6
|
var addComponents = _ref.addComponents,
|
7
7
|
theme = _ref.theme;
|
8
|
-
addComponents(_defineProperty({}, ".focusable:focus,\n .focusable-within:focus-within,\n .focusable-visible:focus-visible,\n .focusable-visible-within:has(:focus-visible),\n input:focus ~ .focusable-sibling,\n .focusable-visible-group:focus-visible .focusable-visible-group-item,\n .focusable-show", {
|
8
|
+
addComponents(_defineProperty({}, ".focusable:focus,\n .focusable-within:focus-within,\n .focusable-visible:focus-visible,\n .focusable-visible-within:has(:focus-visible),\n input:focus ~ .focusable-sibling,\n input:focus-visible ~ .focusable-visible-sibling,\n .focusable-visible-group:focus-visible .focusable-visible-group-item,\n .focusable-show", {
|
9
9
|
outline: "2px solid ".concat(theme("colors.accent.600")),
|
10
10
|
outlineOffset: "1px"
|
11
11
|
}));
|
package/dist/esm/Layout/index.js
CHANGED
@@ -13,6 +13,11 @@ export declare type LinkProps = {
|
|
13
13
|
* The icon to display at the end of the link.
|
14
14
|
*/
|
15
15
|
endIcon?: IconComponentType;
|
16
|
+
/**
|
17
|
+
* To determine if the `ExternalLink` icon should be displayed.
|
18
|
+
* @default true
|
19
|
+
*/
|
20
|
+
withExternalLinkIcon?: boolean;
|
16
21
|
} & AnchorHTMLAttributes<HTMLAnchorElement>;
|
17
22
|
/**
|
18
23
|
* The `Link` component is used to display a link.
|
@@ -32,4 +37,9 @@ export declare const Link: import("react").ForwardRefExoticComponent<{
|
|
32
37
|
* The icon to display at the end of the link.
|
33
38
|
*/
|
34
39
|
endIcon?: IconComponentType | undefined;
|
40
|
+
/**
|
41
|
+
* To determine if the `ExternalLink` icon should be displayed.
|
42
|
+
* @default true
|
43
|
+
*/
|
44
|
+
withExternalLinkIcon?: boolean | undefined;
|
35
45
|
} & AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
4
|
var _templateObject, _templateObject2, _templateObject3;
|
5
|
-
var _excluded = ["className", "children", "startIcon", "endIcon", "href", "onClick"];
|
5
|
+
var _excluded = ["className", "children", "startIcon", "endIcon", "withExternalLinkIcon", "href", "onClick"];
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
import cx from "clsx";
|
@@ -21,6 +21,8 @@ export var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
21
21
|
children = _ref.children,
|
22
22
|
StartIcon = _ref.startIcon,
|
23
23
|
EndIcon = _ref.endIcon,
|
24
|
+
_ref$withExternalLink = _ref.withExternalLinkIcon,
|
25
|
+
withExternalLinkIcon = _ref$withExternalLink === void 0 ? true : _ref$withExternalLink,
|
24
26
|
href = _ref.href,
|
25
27
|
onClick = _ref.onClick,
|
26
28
|
anchorProps = _objectWithoutProperties(_ref, _excluded);
|
@@ -29,7 +31,7 @@ export var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
29
31
|
onClick: onClick
|
30
32
|
}));
|
31
33
|
var isExternalLink = linkProps.target === "_blank" && EndIcon === undefined;
|
32
|
-
if (isExternalLink) {
|
34
|
+
if (isExternalLink && withExternalLinkIcon) {
|
33
35
|
EndIcon = ExternalLinkIcon;
|
34
36
|
}
|
35
37
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread(_objectSpread({}, anchorProps), linkProps), {}, {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { IconButtonWithFeedbackLocale } from "../Actions";
|
2
|
+
import type { ChatMessageErrorLocale } from "../Chat/ChatMessageError";
|
3
|
+
import type { ChatMessageLocale } from "../Chat/ChatMessages";
|
4
|
+
import type { ChatPromptLocale } from "../Chat/ChatPrompt";
|
2
5
|
import type { AutoCompleteLocale, DateInputLocale, DatePickerLocale, DropzoneLocale, ExperimentalDateRangeInputLocale, ExperimentalFormLocale, FilePickerLocale, InputPropsLocale } from "../Fields";
|
3
6
|
import type { AnnouncementBadgeLocale, TagLocale, ToastLocale, ToastsLocale } from "../Indicators";
|
4
7
|
import type { UserAvatarLocale } from "../Indicators/Avatars";
|
5
8
|
import type { DataTableLocale, SidebarLocale } from "../Layout";
|
6
|
-
import type { ChatMessageErrorLocale } from "../Layout/Chat/ChatMessageError";
|
7
|
-
import type { ChatMessageLocale } from "../Layout/Chat/ChatMessages";
|
8
|
-
import type { ChatPromptLocale } from "../Layout/Chat/ChatPrompt";
|
9
9
|
import type { CompactPaginationLocale, DotPaginationLocale, PaginationLocale, StepperLocale } from "../Navigation";
|
10
10
|
import type { ModalLocale, PopoverLocale } from "../Overlay";
|
11
11
|
export declare type ComponentsLocales = {
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED