@drivy/cobalt 1.3.3 → 1.4.1
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/cjs/tokens/icons.js +2 -0
- package/cjs/tokens/icons.js.map +1 -1
- package/components/Alerter/index.js +0 -1
- package/components/Alerter/index.js.map +1 -1
- package/components/Form/Stepper.js +10 -2
- package/components/Form/Stepper.js.map +1 -1
- package/components/Form/TagsInput.js +32 -0
- package/components/Form/TagsInput.js.map +1 -0
- package/components/Form/TextArea.js +41 -35
- package/components/Form/TextArea.js.map +1 -1
- package/components/Icon/__generated__/MoonIcon.js +21 -0
- package/components/Icon/__generated__/MoonIcon.js.map +1 -0
- package/components/Icon/__generated__/RoadsideAssistanceIcon.js +21 -0
- package/components/Icon/__generated__/RoadsideAssistanceIcon.js.map +1 -0
- package/icons/index.js +2 -0
- package/icons/index.js.map +1 -1
- package/icons/moon.js +4 -0
- package/icons/moon.js.map +1 -0
- package/icons/moon.svg +1 -0
- package/icons/roadside-assistance.js +4 -0
- package/icons/roadside-assistance.js.map +1 -0
- package/icons/roadside-assistance.svg +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/package.json +7 -8
- package/styles/components/Form/Autocomplete/index.scss +5 -1
- package/styles/components/Form/TagsInput.scss +90 -0
- package/styles/components/Form/TextArea.scss +0 -3
- package/styles/components/Form/form.scss +7 -2
- package/styles/components/Form/index.scss +1 -0
- package/tokens/icons.js +2 -0
- package/tokens/icons.js.map +1 -1
- package/types/src/components/Alerter/index.d.ts +1 -1
- package/types/src/components/Form/Autocomplete/index.d.ts +1 -1
- package/types/src/components/Form/TagsInput.d.ts +39 -0
- package/types/src/components/Form/TextArea.d.ts +8 -9
- package/types/src/components/Form/TextInput.d.ts +1 -1
- package/types/src/components/Icon/__generated__/MoonIcon.d.ts +10 -0
- package/types/src/components/Icon/__generated__/RoadsideAssistanceIcon.d.ts +10 -0
- package/types/src/components/Icon/__generated__/index.d.ts +2 -0
- package/types/src/components/Icon/index.d.ts +1 -1
- package/types/src/icons/index.d.ts +2 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/tokens/index.d.ts +2 -0
- package/utils/getCobaltTailwindcssConfig.js.map +1 -1
- package/types/src/hooks/useElementHeight.d.ts +0 -13
package/cjs/tokens/icons.js
CHANGED
|
@@ -171,6 +171,7 @@ const icons = {
|
|
|
171
171
|
minusCircleFilled: "minus-circle-filled.svg",
|
|
172
172
|
minus: "minus.svg",
|
|
173
173
|
miscGift: "misc-gift.svg",
|
|
174
|
+
moon: "moon.svg",
|
|
174
175
|
nearbyDevice: "nearby-device.svg",
|
|
175
176
|
notification: "notification.svg",
|
|
176
177
|
number1Circle: "number-1-circle.svg",
|
|
@@ -229,6 +230,7 @@ const icons = {
|
|
|
229
230
|
reply: "reply.svg",
|
|
230
231
|
reset: "reset.svg",
|
|
231
232
|
ride: "ride.svg",
|
|
233
|
+
roadsideAssistance: "roadside-assistance.svg",
|
|
232
234
|
roofBox: "roof-box.svg",
|
|
233
235
|
rotate: "rotate.svg",
|
|
234
236
|
sealCheck: "seal-check.svg",
|
package/cjs/tokens/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -24,7 +24,6 @@ const useAlerts = () => {
|
|
|
24
24
|
sendAlert: ({ message, status, duration, }) => toaster.create({
|
|
25
25
|
description: message,
|
|
26
26
|
type: status,
|
|
27
|
-
placement: "bottom",
|
|
28
27
|
duration: duration !== null && duration !== void 0 ? duration : computeTimeDurationFromText(message),
|
|
29
28
|
}),
|
|
30
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Alerter/index.tsx"],"sourcesContent":["import React, { type PropsWithChildren } from \"react\"\nimport { Toast, Toaster, createToaster, Portal } from \"@ark-ui/react\"\nimport {\n InfoFilledIcon,\n CheckCircleIcon,\n ContextualWarningCircleFilledIcon,\n IconColorsType,\n} from \"../Icon\"\nimport cx from \"classnames\"\n\nconst DEFAULT_TIMEOUT = 3000\nconst MAX_TEXT_TIMEOUT = 9000\n\nexport type AlertStatus = \"info\" | \"success\" | \"error\"\n\nconst computeTimeDurationFromText = (\n content: string | React.ReactNode\n): number => {\n if (typeof content !== \"string\") return DEFAULT_TIMEOUT\n return Math.min(\n Math.max(DEFAULT_TIMEOUT, content.length * 90),\n MAX_TEXT_TIMEOUT\n )\n}\n\nconst toaster = createToaster({\n overlap: true,\n gap: 12,\n placement: \"bottom\",\n max: 12,\n})\n\nexport const useAlerts = () => {\n return {\n sendAlert: ({\n message,\n status,\n duration,\n }: {\n message: React.ReactNode\n status: AlertStatus\n duration?: number\n }) =>\n toaster.create({\n description: message,\n type: status,\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Alerter/index.tsx"],"sourcesContent":["import React, { type PropsWithChildren } from \"react\"\nimport { Toast, Toaster, createToaster, Portal } from \"@ark-ui/react\"\nimport {\n InfoFilledIcon,\n CheckCircleIcon,\n ContextualWarningCircleFilledIcon,\n IconColorsType,\n} from \"../Icon\"\nimport cx from \"classnames\"\n\nconst DEFAULT_TIMEOUT = 3000\nconst MAX_TEXT_TIMEOUT = 9000\n\nexport type AlertStatus = \"info\" | \"success\" | \"error\"\n\nconst computeTimeDurationFromText = (\n content: string | React.ReactNode\n): number => {\n if (typeof content !== \"string\") return DEFAULT_TIMEOUT\n return Math.min(\n Math.max(DEFAULT_TIMEOUT, content.length * 90),\n MAX_TEXT_TIMEOUT\n )\n}\n\nconst toaster = createToaster({\n overlap: true,\n gap: 12,\n placement: \"bottom\",\n max: 12,\n})\n\nexport const useAlerts = () => {\n return {\n sendAlert: ({\n message,\n status,\n duration,\n }: {\n message: React.ReactNode\n status: AlertStatus\n duration?: number\n }) =>\n toaster.create({\n description: message,\n type: status,\n duration: duration ?? computeTimeDurationFromText(message),\n }),\n }\n}\n\nconst STATUS_ICONS_MAP: { [k in AlertStatus]: typeof InfoFilledIcon } = {\n info: InfoFilledIcon,\n success: CheckCircleIcon,\n error: ContextualWarningCircleFilledIcon,\n}\n\nconst STATUS_ICON_COLOR_MAP: { [k in AlertStatus]: IconColorsType } = {\n info: \"infoAlt\",\n success: \"success\",\n error: \"error\",\n}\n\nconst Alerter = ({ children }: PropsWithChildren) => {\n return (\n <>\n {children}\n <Portal>\n <Toaster toaster={toaster} className=\"cobalt-alerter\">\n {(toast) => {\n const status = toast.type as AlertStatus\n const IconComp = STATUS_ICONS_MAP[status]\n return (\n <Toast.Root className={cx(\"cobalt-alert\")} key={toast.id}>\n <div className=\"cobalt-alert__wrapper\">\n <IconComp size={20} color={STATUS_ICON_COLOR_MAP[status]} />\n <Toast.Description>{toast.description}</Toast.Description>\n </div>\n </Toast.Root>\n )\n }}\n </Toaster>\n </Portal>\n </>\n )\n}\n\nexport default Alerter\n"],"names":[],"mappings":";;;;;;;;AAUA,MAAM,eAAe,GAAG,IAAI,CAAA;AAC5B,MAAM,gBAAgB,GAAG,IAAI,CAAA;AAI7B,MAAM,2BAA2B,GAAG,CAClC,OAAiC,KACvB;IACV,IAAI,OAAO,OAAO,KAAK,QAAQ;AAAE,QAAA,OAAO,eAAe,CAAA;AACvD,IAAA,OAAO,IAAI,C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AAI;AACT,gBAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAmB,CAAA;AACxC,gBAAA,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AACzC,gBAAA,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,EAAA;oBACtD,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA;AACpC,wBAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAI,CAAA;wBAC5D,KAAC,CAAA,aAAA,CAAA,KAAK,CAAC,WAAW,EAAE,IAAA,EAAA,KAAK,CAAC,WAAW,CAAqB,CACtD,CACK,EACd;AACH,aAAC,CACO,CACH,CACR,EACJ;AACH;;;;"}
|
|
@@ -80,12 +80,20 @@ class Stepper extends PureComponent {
|
|
|
80
80
|
"cobalt-Stepper--error": status === "error",
|
|
81
81
|
}) },
|
|
82
82
|
React.createElement("div", { className: "cobalt-Stepper__Wrapper" },
|
|
83
|
-
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === min,
|
|
83
|
+
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === min, ...(!disabled && {
|
|
84
|
+
onPointerDown: () => this.onPointerDown(this.onDecrement),
|
|
85
|
+
onPointerUp: this.onPointerUp,
|
|
86
|
+
onPointerLeave: this.onPointerUp,
|
|
87
|
+
}), type: "button", "data-label": "stepper-minus" },
|
|
84
88
|
React.createElement(MinusIcon, null)),
|
|
85
89
|
React.createElement("div", { className: "cobalt-Stepper__ContentWrapper" },
|
|
86
90
|
children ? children(this.state.value) : this.state.value,
|
|
87
91
|
React.createElement("input", { type: "hidden", name: name, value: this.state.value })),
|
|
88
|
-
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === max,
|
|
92
|
+
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === max, ...(!disabled && {
|
|
93
|
+
onPointerDown: () => this.onPointerDown(this.onIncrement),
|
|
94
|
+
onPointerUp: this.onPointerUp,
|
|
95
|
+
onPointerLeave: this.onPointerUp,
|
|
96
|
+
}), type: "button", "data-label": "stepper-plus" },
|
|
89
97
|
React.createElement(PlusIcon, null)))));
|
|
90
98
|
}
|
|
91
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport { MinusIcon, PlusIcon } from \"../Icon\"\n\nconst AUTO_CHANGE_TIMEOUT_IN_MS = 750\nconst AUTO_CHANGE_INTERVAL_IN_MS = 150\n\nconst enforceInRange = (\n value: number,\n min: number | undefined,\n max: number | undefined\n) => {\n let enforcedValue = value\n if (typeof max !== \"undefined\") {\n enforcedValue = Math.min(enforcedValue, max)\n }\n if (typeof min !== \"undefined\") {\n enforcedValue = Math.max(enforcedValue, min)\n }\n return enforcedValue\n}\n\ntype Props = {\n value: number\n name?: string\n disabled?: boolean\n min?: number\n max?: number\n step: number\n onChange?: (value: number) => void\n children?: (value: number) => React.ReactNode\n} & FormElement\n\ntype State = {\n value: number\n}\n\nclass Stepper extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props)\n\n if (props.step < 0)\n throw new Error(\"Incorrect step value. Can't be below zero\")\n\n this.onDecrement = this.onDecrement.bind(this)\n this.onIncrement = this.onIncrement.bind(this)\n this.changeValue = this.changeValue.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n\n this.state = {\n value: enforceInRange(props.value, props.min, props.max),\n }\n }\n\n timeout: ReturnType<typeof setTimeout> | null = null\n interval: ReturnType<typeof setInterval> | null = null\n\n componentDidUpdate(_prevProps: Props, prevState: State) {\n if (prevState.value !== this.state.value) {\n this.changeValue(this.state.value)\n } else if (this.props.value !== this.state.value) {\n this.changeValue(this.props.value)\n }\n }\n\n onDecrement = () => {\n ;(this.props.min !== null || this.state.value > this.props.min) &&\n this.changeValue(\n parseFloat((this.state.value - this.props.step).toFixed(10))\n )\n }\n\n onIncrement = () => {\n ;(this.props.max !== null || this.state.value < this.props.max) &&\n this.changeValue(\n parseFloat((this.state.value + this.props.step).toFixed(10))\n )\n }\n\n onPointerDown = (callback: () => void) => {\n callback()\n this.timeout && clearTimeout(this.timeout)\n this.timeout = setTimeout(() => {\n this.interval && clearInterval(this.interval)\n this.interval = setInterval(callback, AUTO_CHANGE_INTERVAL_IN_MS)\n }, AUTO_CHANGE_TIMEOUT_IN_MS)\n }\n\n onPointerUp = () => {\n if (this.interval) {\n clearInterval(this.interval)\n this.interval = null\n }\n this.timeout && clearTimeout(this.timeout)\n }\n\n changeValue = (value: number) => {\n this.setState(\n {\n value: enforceInRange(value, this.props.min, this.props.max),\n },\n () => {\n this.props.onChange && this.props.onChange(this.state.value)\n }\n )\n }\n\n render() {\n const { name, status, disabled, min, max, children } = this.props\n\n return (\n <div\n className={classNames(\"cobalt-Stepper\", {\n \"cobalt-Stepper--disabled\": disabled,\n \"cobalt-Stepper--success\": status === \"success\",\n \"cobalt-Stepper--error\": status === \"error\",\n })}\n >\n <div className=\"cobalt-Stepper__Wrapper\">\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === min}\n
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport { MinusIcon, PlusIcon } from \"../Icon\"\n\nconst AUTO_CHANGE_TIMEOUT_IN_MS = 750\nconst AUTO_CHANGE_INTERVAL_IN_MS = 150\n\nconst enforceInRange = (\n value: number,\n min: number | undefined,\n max: number | undefined\n) => {\n let enforcedValue = value\n if (typeof max !== \"undefined\") {\n enforcedValue = Math.min(enforcedValue, max)\n }\n if (typeof min !== \"undefined\") {\n enforcedValue = Math.max(enforcedValue, min)\n }\n return enforcedValue\n}\n\ntype Props = {\n value: number\n name?: string\n disabled?: boolean\n min?: number\n max?: number\n step: number\n onChange?: (value: number) => void\n children?: (value: number) => React.ReactNode\n} & FormElement\n\ntype State = {\n value: number\n}\n\nclass Stepper extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props)\n\n if (props.step < 0)\n throw new Error(\"Incorrect step value. Can't be below zero\")\n\n this.onDecrement = this.onDecrement.bind(this)\n this.onIncrement = this.onIncrement.bind(this)\n this.changeValue = this.changeValue.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n\n this.state = {\n value: enforceInRange(props.value, props.min, props.max),\n }\n }\n\n timeout: ReturnType<typeof setTimeout> | null = null\n interval: ReturnType<typeof setInterval> | null = null\n\n componentDidUpdate(_prevProps: Props, prevState: State) {\n if (prevState.value !== this.state.value) {\n this.changeValue(this.state.value)\n } else if (this.props.value !== this.state.value) {\n this.changeValue(this.props.value)\n }\n }\n\n onDecrement = () => {\n ;(this.props.min !== null || this.state.value > this.props.min) &&\n this.changeValue(\n parseFloat((this.state.value - this.props.step).toFixed(10))\n )\n }\n\n onIncrement = () => {\n ;(this.props.max !== null || this.state.value < this.props.max) &&\n this.changeValue(\n parseFloat((this.state.value + this.props.step).toFixed(10))\n )\n }\n\n onPointerDown = (callback: () => void) => {\n callback()\n this.timeout && clearTimeout(this.timeout)\n this.timeout = setTimeout(() => {\n this.interval && clearInterval(this.interval)\n this.interval = setInterval(callback, AUTO_CHANGE_INTERVAL_IN_MS)\n }, AUTO_CHANGE_TIMEOUT_IN_MS)\n }\n\n onPointerUp = () => {\n if (this.interval) {\n clearInterval(this.interval)\n this.interval = null\n }\n this.timeout && clearTimeout(this.timeout)\n }\n\n changeValue = (value: number) => {\n this.setState(\n {\n value: enforceInRange(value, this.props.min, this.props.max),\n },\n () => {\n this.props.onChange && this.props.onChange(this.state.value)\n }\n )\n }\n\n render() {\n const { name, status, disabled, min, max, children } = this.props\n\n return (\n <div\n className={classNames(\"cobalt-Stepper\", {\n \"cobalt-Stepper--disabled\": disabled,\n \"cobalt-Stepper--success\": status === \"success\",\n \"cobalt-Stepper--error\": status === \"error\",\n })}\n >\n <div className=\"cobalt-Stepper__Wrapper\">\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === min}\n {...(!disabled && {\n onPointerDown: () => this.onPointerDown(this.onDecrement),\n onPointerUp: this.onPointerUp,\n onPointerLeave: this.onPointerUp,\n })}\n type=\"button\"\n data-label=\"stepper-minus\"\n >\n <MinusIcon />\n </DefaultButton>\n <div className=\"cobalt-Stepper__ContentWrapper\">\n {children ? children(this.state.value) : this.state.value}\n <input type=\"hidden\" name={name} value={this.state.value} />\n </div>\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === max}\n {...(!disabled && {\n onPointerDown: () => this.onPointerDown(this.onIncrement),\n onPointerUp: this.onPointerUp,\n onPointerLeave: this.onPointerUp,\n })}\n type=\"button\"\n data-label=\"stepper-plus\"\n >\n <PlusIcon />\n </DefaultButton>\n </div>\n </div>\n )\n }\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Stepper)\nwrappedComponent.displayName = \"Stepper\"\n\nexport { wrappedComponent as Stepper }\n\ntype StepperMetaProps = {\n children: React.ReactNode\n}\nconst StepperMeta = ({ children }: StepperMetaProps) => {\n return <div className=\"cobalt-Stepper__Meta\">{children}</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,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,EAC1C,IAAC,CAAC,QAAQ,IAAI;wBAChB,aAAa,EAAE,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;wBACzD,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,cAAc,EAAE,IAAI,CAAC,WAAW;AACjC,qBAAA,CAAC,EACF,IAAI,EAAC,QAAQ,gBACF,cAAc,EAAA;AAEzB,oBAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAG,IAAA,CAAA,CACE,CACZ,CACF,EACP;KACF;AACF,CAAA;AAED,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,OAAO,EAAC;AACvD,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAA;AAOxC,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;AACrD,IAAA,OAAO,6BAAK,SAAS,EAAC,sBAAsB,EAAE,EAAA,QAAQ,CAAO,CAAA;AAC/D;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagsInput as TagsInput$1 } from '@ark-ui/react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import '../Icon/index.js';
|
|
5
|
+
import { withFieldLabelAndHint } from './field.js';
|
|
6
|
+
import CloseIcon from '../Icon/__generated__/CloseIcon.js';
|
|
7
|
+
|
|
8
|
+
const TagsInput = ({ status, forwardedRef, value, onValueChange, tags, onTagsChange, defaultTags, defaultValue, placeholder, id, disabled, readOnly, ...restProps }) => {
|
|
9
|
+
const hasDeleteTrigger = !disabled && !readOnly;
|
|
10
|
+
return (React.createElement("div", { className: "cobalt-TagsField" },
|
|
11
|
+
React.createElement(TagsInput$1.Root, { ids: { input: id }, onInputValueChange: (details) => onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(details.inputValue), onValueChange: (details) => onTagsChange === null || onTagsChange === void 0 ? void 0 : onTagsChange(details.value), defaultValue: defaultTags, defaultInputValue: defaultValue, className: cx("cobalt-TagsField__InputContainer", {
|
|
12
|
+
"cobalt-TagsField__InputContainer--success": status === "success",
|
|
13
|
+
"cobalt-TagsField__InputContainer--error": status === "error",
|
|
14
|
+
}), value: tags, inputValue: value, disabled: disabled, readOnly: readOnly, addOnPaste: true, ...restProps },
|
|
15
|
+
React.createElement(TagsInput$1.Context, null, (tagsInput) => (React.createElement(React.Fragment, null,
|
|
16
|
+
React.createElement(TagsInput$1.Control, { className: "cobalt-TagsField__Tags" }, tagsInput.value.map((tagValue, index) => (React.createElement(TagsInput$1.Item, { key: tagValue, index: index, value: tagValue },
|
|
17
|
+
React.createElement(TagsInput$1.ItemPreview, { className: cx("cobalt-Tag cobalt-TagsField__Tag", {
|
|
18
|
+
"c-pr-none": hasDeleteTrigger,
|
|
19
|
+
}) },
|
|
20
|
+
React.createElement(TagsInput$1.ItemText, null, tagValue),
|
|
21
|
+
hasDeleteTrigger && (React.createElement(TagsInput$1.ItemDeleteTrigger, { className: "cobalt-TagsField__TagDeleteTrigger" },
|
|
22
|
+
React.createElement(CloseIcon, { size: 16 })))),
|
|
23
|
+
React.createElement(TagsInput$1.ItemInput, null))))),
|
|
24
|
+
React.createElement(TagsInput$1.Input, { className: "cobalt-TagsField__Input", placeholder: placeholder })))),
|
|
25
|
+
React.createElement(TagsInput$1.HiddenInput, { ref: forwardedRef }))));
|
|
26
|
+
};
|
|
27
|
+
TagsInput.displayName = "TagsInputRaw";
|
|
28
|
+
const wrappedComponent = withFieldLabelAndHint(TagsInput);
|
|
29
|
+
wrappedComponent.displayName = "TagsInput";
|
|
30
|
+
|
|
31
|
+
export { wrappedComponent as TagsInput };
|
|
32
|
+
//# sourceMappingURL=TagsInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsInput.js","sources":["../../../src/components/Form/TagsInput.tsx"],"sourcesContent":["import React from \"react\"\nimport {\n TagsInput as TagsInputComponent,\n TagsInputRootProps,\n} from \"@ark-ui/react\"\nimport cx from \"classnames\"\nimport { CloseIcon, IconSources } from \"../Icon\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\n\ntype Props = {\n icon?: IconSources\n forwardedRef?: React.Ref<HTMLInputElement>\n value?: string\n onValueChange?: (value: string) => void\n tags?: string[]\n onTagsChange?: (tags: string[]) => void\n defaultTags?: string[]\n defaultValue?: string\n max?: number\n} & Omit<\n FormElement,\n \"value\" | \"defaultValue\" | \"max\" | \"onChange\" | \"onInputChange\"\n> &\n React.InputHTMLAttributes<HTMLInputElement> &\n Omit<TagsInputRootProps, \"value\" | \"inputValue\" | \"onValueChange\">\n\nexport const TagsInputWrapper = ({\n status,\n render,\n}: {\n status?: FormElement[\"status\"]\n render: (className: string) => React.ReactNode\n}) => {\n return (\n <div\n className={cx(\"cobalt-TagsField\", {\n \"cobalt-TagsField--success\": status === \"success\",\n \"cobalt-TagsField--error\": status === \"error\",\n })}\n >\n {render(\"cobalt-TagsField__InputContainer\")}\n </div>\n )\n}\n\nconst TagsInput = ({\n status,\n forwardedRef,\n value,\n onValueChange,\n tags,\n onTagsChange,\n defaultTags,\n defaultValue,\n placeholder,\n id,\n disabled,\n readOnly,\n ...restProps\n}: Props) => {\n const hasDeleteTrigger = !disabled && !readOnly\n return (\n <div className=\"cobalt-TagsField\">\n <TagsInputComponent.Root\n ids={{ input: id }}\n onInputValueChange={(details) => onValueChange?.(details.inputValue)}\n onValueChange={(details) => onTagsChange?.(details.value)}\n defaultValue={defaultTags}\n defaultInputValue={defaultValue}\n className={cx(\"cobalt-TagsField__InputContainer\", {\n \"cobalt-TagsField__InputContainer--success\": status === \"success\",\n \"cobalt-TagsField__InputContainer--error\": status === \"error\",\n })}\n value={tags}\n inputValue={value}\n disabled={disabled}\n readOnly={readOnly}\n addOnPaste\n {...restProps}\n >\n <TagsInputComponent.Context>\n {(tagsInput) => (\n <>\n <TagsInputComponent.Control className=\"cobalt-TagsField__Tags\">\n {tagsInput.value.map((tagValue, index) => (\n <TagsInputComponent.Item\n key={tagValue}\n index={index}\n value={tagValue}\n >\n <TagsInputComponent.ItemPreview\n className={cx(\"cobalt-Tag cobalt-TagsField__Tag\", {\n \"c-pr-none\": hasDeleteTrigger,\n })}\n >\n <TagsInputComponent.ItemText>\n {tagValue}\n </TagsInputComponent.ItemText>\n {hasDeleteTrigger && (\n <TagsInputComponent.ItemDeleteTrigger className=\"cobalt-TagsField__TagDeleteTrigger\">\n <CloseIcon size={16} />\n </TagsInputComponent.ItemDeleteTrigger>\n )}\n </TagsInputComponent.ItemPreview>\n <TagsInputComponent.ItemInput />\n </TagsInputComponent.Item>\n ))}\n </TagsInputComponent.Control>\n <TagsInputComponent.Input\n className=\"cobalt-TagsField__Input\"\n placeholder={placeholder}\n />\n </>\n )}\n </TagsInputComponent.Context>\n <TagsInputComponent.HiddenInput ref={forwardedRef} />\n </TagsInputComponent.Root>\n </div>\n )\n}\n\nTagsInput.displayName = \"TagsInputRaw\"\n\nconst wrappedComponent = withFieldLabelAndHint(TagsInput)\nwrappedComponent.displayName = \"TagsInput\"\n\nexport { wrappedComponent as TagsInput }\n"],"names":["TagsInputComponent"],"mappings":";;;;;;;AA8CA,MAAM,SAAS,GAAG,CAAC,EACjB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,GAAG,SAAS,EACN,KAAI;AACV,IAAA,MAAM,gBAAgB,GAAG,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAA;AAC/C,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,kBAAkB,EAAA;AAC/B,QAAA,KAAA,CAAA,aAAA,CAACA,WAAkB,CAAC,IAAI,EAAA,EACtB,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAClB,kBAAkB,EAAE,CAAC,OAAO,KA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,EAAA,IAAA,EACzB,QAAQ,CACmB;wBAC7B,gBAAgB,KACf,KAAC,CAAA,aAAA,CAAAA,WAAkB,CAAC,iBAAiB,EAAA,EAAC,SAAS,EAAC,oCAAoC,EAAA;4BAClF,KAAC,CAAA,aAAA,CAAA,SAAS,IAAC,IAAI,EAAE,EAAE,EAAI,CAAA,CACc,CACxC,CAC8B;AACjC,oBAAA,KAAA,CAAA,aAAA,CAACA,WAAkB,CAAC,SAAS,OAAG,CACR,CAC3B,CAAC,CACyB;AAC7B,gBAAA,KAAA,CAAA,aAAA,CAACA,WAAkB,CAAC,KAAK,EAAA,EACvB,SAAS,EAAC,yBAAyB,EACnC,WAAW,EAAE,WAAW,EACxB,CAAA,CACD,CACJ,CAC0B;YAC7B,KAAC,CAAA,aAAA,CAAAA,WAAkB,CAAC,WAAW,EAAC,EAAA,GAAG,EAAE,YAAY,EAAI,CAAA,CAC7B,CACtB,EACP;AACH,CAAC,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,cAAc,CAAA;AAEtC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,SAAS,EAAC;AACzD,gBAAgB,CAAC,WAAW,GAAG,WAAW;;;;"}
|
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { forwardRef, useRef, useState, useEffect } from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { withFieldLabelAndHint } from './field.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
handleChange(event) {
|
|
15
|
-
if (this.props.autosize || this.props.maxLength) {
|
|
16
|
-
this.setState({
|
|
17
|
-
length: event.target.value.length,
|
|
18
|
-
height: event.target.scrollHeight + 2,
|
|
19
|
-
});
|
|
5
|
+
const TextArea = forwardRef((props, ref) => {
|
|
6
|
+
const { autosize, className, inputClassName, status, maxLength, onChange, ...nativeProps } = props;
|
|
7
|
+
const internalRef = useRef(null);
|
|
8
|
+
const [length, setLength] = useState(0);
|
|
9
|
+
const [height, setHeight] = useState(0);
|
|
10
|
+
const hasAutosize = autosize || (maxLength && maxLength > 0);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (ref && "current" in ref) {
|
|
13
|
+
ref.current = internalRef.current;
|
|
20
14
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
}, [ref]);
|
|
16
|
+
const handleAutosize = (el) => {
|
|
17
|
+
if (!el)
|
|
18
|
+
return;
|
|
19
|
+
if (hasAutosize) {
|
|
20
|
+
setLength(el.value.length);
|
|
21
|
+
setHeight(el.scrollHeight + 2);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
handleAutosize(internalRef.current);
|
|
26
|
+
}, [autosize, maxLength]);
|
|
27
|
+
const handleChange = (event) => {
|
|
28
|
+
handleAutosize(event.target);
|
|
29
|
+
onChange && onChange(event);
|
|
30
|
+
};
|
|
31
|
+
return (React.createElement("div", { className: cx("cobalt-TextAreaField", className, {
|
|
32
|
+
"cobalt-TextAreaField--withLimit": maxLength && maxLength > 0,
|
|
33
|
+
"cobalt-TextAreaField--success": status === "success",
|
|
34
|
+
"cobalt-TextAreaField--error": status === "error",
|
|
35
|
+
}) },
|
|
36
|
+
React.createElement("textarea", { ...nativeProps, maxLength: maxLength, style: hasAutosize
|
|
37
|
+
? {
|
|
38
|
+
height: height + "px",
|
|
39
|
+
}
|
|
40
|
+
: {}, onChange: handleChange, className: cx("cobalt-TextAreaField__Input", inputClassName), ref: internalRef }),
|
|
41
|
+
length > 0 && maxLength && maxLength > 0 && (React.createElement("div", { className: "cobalt-TextAreaField__RemainingChars" },
|
|
42
|
+
maxLength - length,
|
|
43
|
+
" remaining characters"))));
|
|
44
|
+
});
|
|
45
|
+
TextArea.displayName = "TextArea";
|
|
40
46
|
const wrappedComponent = withFieldLabelAndHint(TextArea);
|
|
41
47
|
wrappedComponent.displayName = "TextArea";
|
|
42
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../../../src/components/Form/TextArea.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../src/components/Form/TextArea.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect, forwardRef } from \"react\"\nimport cx from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\n\ntype Props = {\n maxLength?: number\n className?: string\n inputClassName?: string\n autosize?: boolean\n onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void\n} & FormElement &\n React.TextareaHTMLAttributes<HTMLTextAreaElement>\n\nconst TextArea = forwardRef<HTMLTextAreaElement, Props>((props, ref) => {\n const {\n autosize,\n className,\n inputClassName,\n status,\n maxLength,\n onChange,\n ...nativeProps\n } = props\n\n const internalRef = useRef<HTMLTextAreaElement>(null)\n const [length, setLength] = useState(0)\n const [height, setHeight] = useState(0)\n\n const hasAutosize = autosize || (maxLength && maxLength > 0)\n\n useEffect(() => {\n if (ref && \"current\" in ref) {\n ref.current = internalRef.current\n }\n }, [ref])\n\n const handleAutosize = (el?: HTMLTextAreaElement | null) => {\n if (!el) return\n if (hasAutosize) {\n setLength(el.value.length)\n setHeight(el.scrollHeight + 2)\n }\n }\n\n useEffect(() => {\n handleAutosize(internalRef.current)\n }, [autosize, maxLength])\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n handleAutosize(event.target)\n onChange && onChange(event)\n }\n\n return (\n <div\n className={cx(\"cobalt-TextAreaField\", className, {\n \"cobalt-TextAreaField--withLimit\": maxLength && maxLength > 0,\n \"cobalt-TextAreaField--success\": status === \"success\",\n \"cobalt-TextAreaField--error\": status === \"error\",\n })}\n >\n <textarea\n {...nativeProps}\n maxLength={maxLength}\n style={\n hasAutosize\n ? {\n height: height + \"px\",\n }\n : {}\n }\n onChange={handleChange}\n className={cx(\"cobalt-TextAreaField__Input\", inputClassName)}\n ref={internalRef}\n />\n {length > 0 && maxLength && maxLength > 0 && (\n <div className=\"cobalt-TextAreaField__RemainingChars\">\n {maxLength - length} remaining characters\n </div>\n )}\n </div>\n )\n})\n\nTextArea.displayName = \"TextArea\"\n\nconst wrappedComponent = withFieldLabelAndHint(TextArea)\nwrappedComponent.displayName = \"TextArea\"\n\nexport { wrappedComponent as TextArea }\n"],"names":[],"mappings":";;;;AAcA,MAAM,QAAQ,GAAG,UAAU,CAA6B,CAAC,KAAK,EAAE,GAAG,KAAI;AACrE,IAAA,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,cAAc,EACd,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,WAAW,EACf,GAAG,KAAK,CAAA;AAET,IAAA,MAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAA;IACrD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACvC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAEvC,MAAM,WAAW,GAAG,QAAQ,KAAK,SAAS,IAAI,SAAS,GAAG,CAAC,CAAC,CAAA;IAE5D,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,EAAE;AAC3B,YAAA,GAAG,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAA;SAClC;AACH,KAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;AAET,IAAA,MAAM,cAAc,GAAG,CAAC,EAA+B,KAAI;AAC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ACf,CACP,CACG,EACP;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,QAAQ,EAAC;AACxD,gBAAgB,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import capitalize from '../../utils/capitalize.js';
|
|
3
|
+
import 'lodash.throttle';
|
|
4
|
+
import cx from 'classnames';
|
|
5
|
+
|
|
6
|
+
const iconSource = "moon";
|
|
7
|
+
const MoonIcon = ({ color, size = 24, contained = false, className, }) => {
|
|
8
|
+
const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
|
|
9
|
+
[`cobalt-Icon--color${capitalize(color)}`]: color,
|
|
10
|
+
"cobalt-Icon--size16": size === 16,
|
|
11
|
+
"cobalt-Icon--size20": size === 20,
|
|
12
|
+
"cobalt-Icon--size32": size === 32,
|
|
13
|
+
"cobalt-Icon--contained": contained,
|
|
14
|
+
});
|
|
15
|
+
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
|
|
16
|
+
return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
17
|
+
React.createElement("path", { d: "M12.25 21a8.9 8.9 0 0 1-3.606-.734 9.4 9.4 0 0 1-2.93-1.983 9.4 9.4 0 0 1-1.981-2.935A9 9 0 0 1 3 11.736q0-2.935 1.649-5.32t4.419-3.348a.96.96 0 0 1 .939.126q.435.31.412.837a9.2 9.2 0 0 0 .618 3.715 9.05 9.05 0 0 0 2.06 3.142 9 9 0 0 0 3.138 2.063 9.2 9.2 0 0 0 3.709.62q.595-.023.882.4.286.425.102.952-1.007 2.752-3.377 4.414Q15.181 21 12.251 21" })));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { MoonIcon as default };
|
|
21
|
+
//# sourceMappingURL=MoonIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoonIcon.js","sources":["../../../../src/components/Icon/__generated__/MoonIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"moon\"\nconst MoonIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12.25 21a8.9 8.9 0 0 1-3.606-.734 9.4 9.4 0 0 1-2.93-1.983 9.4 9.4 0 0 1-1.981-2.935A9 9 0 0 1 3 11.736q0-2.935 1.649-5.32t4.419-3.348a.96.96 0 0 1 .939.126q.435.31.412.837a9.2 9.2 0 0 0 .618 3.715 9.05 9.05 0 0 0 2.06 3.142 9 9 0 0 0 3.138 2.063 9.2 9.2 0 0 0 3.709.62q.595-.023.882.4.286.425.102.952-1.007 2.752-3.377 4.414Q15.181 21 12.251 21\" />\n </svg>\n )\n}\nexport default MoonIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,MAAM,CAAA;AACzB,MAAM,QAAQ,GAAG,CAAC,EAChB,KAAK,EACL,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,KAAK,EACjB,SAAS,GACC,KAAI;IACd,MAAM,iBAAiB,GAAG,EAAE,CAC1B,SAAS,EACT,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,EACxC;QACE,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAC,KAAK,CAAC,CAAE,CAAA,GAAG,KAAK;QACjD,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;AAClC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CACF,CAAA;AACD,IAAA,MAAM,IAAI,GAAG,CAAC,OAAwB,MACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAAA,EAAG,OAAO,CAAQ,CACrD,CAAA;IACD,OAAO,IAAI,CACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAA;AACzD,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,4VAA4V,EAAG,CAAA,CACnW,CACP,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import capitalize from '../../utils/capitalize.js';
|
|
3
|
+
import 'lodash.throttle';
|
|
4
|
+
import cx from 'classnames';
|
|
5
|
+
|
|
6
|
+
const iconSource = "roadsideAssistance";
|
|
7
|
+
const RoadsideAssistanceIcon = ({ color, size = 24, contained = false, className, }) => {
|
|
8
|
+
const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
|
|
9
|
+
[`cobalt-Icon--color${capitalize(color)}`]: color,
|
|
10
|
+
"cobalt-Icon--size16": size === 16,
|
|
11
|
+
"cobalt-Icon--size20": size === 20,
|
|
12
|
+
"cobalt-Icon--size32": size === 32,
|
|
13
|
+
"cobalt-Icon--contained": contained,
|
|
14
|
+
});
|
|
15
|
+
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
|
|
16
|
+
return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
17
|
+
React.createElement("path", { d: "M1.5 15.618V13.68q0-.411.278-.69a.94.94 0 0 1 .69-.278h6.97L3.437 7.97v1.84a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278.94.94 0 0 1-.69-.278.94.94 0 0 1-.278-.69V6.08q0-.555.472-.835a.91.91 0 0 1 .956-.012l10.19 5.591V4.968q0-.411.278-.69a.94.94 0 0 1 .69-.278h2.977q.435 0 .823.182.387.18.653.52l3.8 4.574q.217.267.339.581.12.315.12.654v5.107a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278h-1.452a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.057-.847 2.8 2.8 0 0 1-.847-2.057H9.245a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.058-.847 2.8 2.8 0 0 1-.847-2.057h-.968a.94.94 0 0 1-.69-.279.94.94 0 0 1-.278-.69m4.84 2.42q.63 0 1.041-.412.412-.41.412-1.04t-.412-1.041q-.41-.411-1.04-.412-.63 0-1.041.412-.412.411-.412 1.04 0 .63.412 1.041.411.412 1.04.412m11.134 0q.63 0 1.04-.412.412-.41.412-1.04t-.411-1.041q-.411-.411-1.04-.412-.63 0-1.042.412-.411.411-.411 1.04 0 .63.411 1.041.412.412 1.041.412m-2.42-8.23h5.228l-3.244-3.872h-1.984z" })));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { RoadsideAssistanceIcon as default };
|
|
21
|
+
//# sourceMappingURL=RoadsideAssistanceIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoadsideAssistanceIcon.js","sources":["../../../../src/components/Icon/__generated__/RoadsideAssistanceIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"roadsideAssistance\"\nconst RoadsideAssistanceIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M1.5 15.618V13.68q0-.411.278-.69a.94.94 0 0 1 .69-.278h6.97L3.437 7.97v1.84a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278.94.94 0 0 1-.69-.278.94.94 0 0 1-.278-.69V6.08q0-.555.472-.835a.91.91 0 0 1 .956-.012l10.19 5.591V4.968q0-.411.278-.69a.94.94 0 0 1 .69-.278h2.977q.435 0 .823.182.387.18.653.52l3.8 4.574q.217.267.339.581.12.315.12.654v5.107a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278h-1.452a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.057-.847 2.8 2.8 0 0 1-.847-2.057H9.245a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.058-.847 2.8 2.8 0 0 1-.847-2.057h-.968a.94.94 0 0 1-.69-.279.94.94 0 0 1-.278-.69m4.84 2.42q.63 0 1.041-.412.412-.41.412-1.04t-.412-1.041q-.41-.411-1.04-.412-.63 0-1.041.412-.412.411-.412 1.04 0 .63.412 1.041.411.412 1.04.412m11.134 0q.63 0 1.04-.412.412-.41.412-1.04t-.411-1.041q-.411-.411-1.04-.412-.63 0-1.042.412-.411.411-.411 1.04 0 .63.411 1.041.412.412 1.041.412m-2.42-8.23h5.228l-3.244-3.872h-1.984z\" />\n </svg>\n )\n}\nexport default RoadsideAssistanceIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,oBAAoB,CAAA;AACvC,MAAM,sBAAsB,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,KAAK,EACjB,SAAS,GACC,KAAI;IACd,MAAM,iBAAiB,GAAG,EAAE,CAC1B,SAAS,EACT,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,EACxC;QACE,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAC,KAAK,CAAC,CAAE,CAAA,GAAG,KAAK;QACjD,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;AAClC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CACF,CAAA;AACD,IAAA,MAAM,IAAI,GAAG,CAAC,OAAwB,MACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAAA,EAAG,OAAO,CAAQ,CACrD,CAAA;IACD,OAAO,IAAI,CACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAA;AACzD,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,y8BAAy8B,EAAG,CAAA,CACh9B,CACP,CAAA;AACH;;;;"}
|
package/icons/index.js
CHANGED
|
@@ -166,6 +166,7 @@ export { default as minibus } from './minibus.js';
|
|
|
166
166
|
export { default as minusCircleFilled } from './minus-circle-filled.js';
|
|
167
167
|
export { default as minus } from './minus.js';
|
|
168
168
|
export { default as miscGift } from './misc-gift.js';
|
|
169
|
+
export { default as moon } from './moon.js';
|
|
169
170
|
export { default as nearbyDevice } from './nearby-device.js';
|
|
170
171
|
export { default as notification } from './notification.js';
|
|
171
172
|
export { default as number1Circle } from './number-1-circle.js';
|
|
@@ -224,6 +225,7 @@ export { default as replacementCar } from './replacement-car.js';
|
|
|
224
225
|
export { default as reply } from './reply.js';
|
|
225
226
|
export { default as reset } from './reset.js';
|
|
226
227
|
export { default as ride } from './ride.js';
|
|
228
|
+
export { default as roadsideAssistance } from './roadside-assistance.js';
|
|
227
229
|
export { default as roofBox } from './roof-box.js';
|
|
228
230
|
export { default as rotate } from './rotate.js';
|
|
229
231
|
export { default as sealCheck } from './seal-check.js';
|
package/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/icons/moon.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var moon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12.25 21a8.9 8.9 0 0 1-3.606-.734 9.4 9.4 0 0 1-2.93-1.983 9.4 9.4 0 0 1-1.981-2.935A9 9 0 0 1 3 11.736q0-2.935 1.649-5.32t4.419-3.348a.96.96 0 0 1 .939.126q.435.31.412.837a9.2 9.2 0 0 0 .618 3.715 9.05 9.05 0 0 0 2.06 3.142 9 9 0 0 0 3.138 2.063 9.2 9.2 0 0 0 3.709.62q.595-.023.882.4.286.425.102.952-1.007 2.752-3.377 4.414Q15.181 21 12.251 21\"/></svg>";
|
|
2
|
+
|
|
3
|
+
export { moon as default };
|
|
4
|
+
//# sourceMappingURL=moon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/icons/moon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.25 21a8.9 8.9 0 0 1-3.606-.734 9.4 9.4 0 0 1-2.93-1.983 9.4 9.4 0 0 1-1.981-2.935A9 9 0 0 1 3 11.736q0-2.935 1.649-5.32t4.419-3.348a.96.96 0 0 1 .939.126q.435.31.412.837a9.2 9.2 0 0 0 .618 3.715 9.05 9.05 0 0 0 2.06 3.142 9 9 0 0 0 3.138 2.063 9.2 9.2 0 0 0 3.709.62q.595-.023.882.4.286.425.102.952-1.007 2.752-3.377 4.414Q15.181 21 12.251 21"/></svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var roadsideAssistance = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M1.5 15.618V13.68q0-.411.278-.69a.94.94 0 0 1 .69-.278h6.97L3.437 7.97v1.84a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278.94.94 0 0 1-.69-.278.94.94 0 0 1-.278-.69V6.08q0-.555.472-.835a.91.91 0 0 1 .956-.012l10.19 5.591V4.968q0-.411.278-.69a.94.94 0 0 1 .69-.278h2.977q.435 0 .823.182.387.18.653.52l3.8 4.574q.217.267.339.581.12.315.12.654v5.107a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278h-1.452a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.057-.847 2.8 2.8 0 0 1-.847-2.057H9.245a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.058-.847 2.8 2.8 0 0 1-.847-2.057h-.968a.94.94 0 0 1-.69-.279.94.94 0 0 1-.278-.69m4.84 2.42q.63 0 1.041-.412.412-.41.412-1.04t-.412-1.041q-.41-.411-1.04-.412-.63 0-1.041.412-.412.411-.412 1.04 0 .63.412 1.041.411.412 1.04.412m11.134 0q.63 0 1.04-.412.412-.41.412-1.04t-.411-1.041q-.411-.411-1.04-.412-.63 0-1.042.412-.411.411-.411 1.04 0 .63.411 1.041.412.412 1.041.412m-2.42-8.23h5.228l-3.244-3.872h-1.984z\"/></svg>";
|
|
2
|
+
|
|
3
|
+
export { roadsideAssistance as default };
|
|
4
|
+
//# sourceMappingURL=roadside-assistance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roadside-assistance.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1.5 15.618V13.68q0-.411.278-.69a.94.94 0 0 1 .69-.278h6.97L3.437 7.97v1.84a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278.94.94 0 0 1-.69-.278.94.94 0 0 1-.278-.69V6.08q0-.555.472-.835a.91.91 0 0 1 .956-.012l10.19 5.591V4.968q0-.411.278-.69a.94.94 0 0 1 .69-.278h2.977q.435 0 .823.182.387.18.653.52l3.8 4.574q.217.267.339.581.12.315.12.654v5.107a.94.94 0 0 1-.278.69.94.94 0 0 1-.69.278h-1.452a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.057-.847 2.8 2.8 0 0 1-.847-2.057H9.245a2.8 2.8 0 0 1-.847 2.057 2.8 2.8 0 0 1-2.057.847 2.8 2.8 0 0 1-2.058-.847 2.8 2.8 0 0 1-.847-2.057h-.968a.94.94 0 0 1-.69-.279.94.94 0 0 1-.278-.69m4.84 2.42q.63 0 1.041-.412.412-.41.412-1.04t-.412-1.041q-.41-.411-1.04-.412-.63 0-1.041.412-.412.411-.412 1.04 0 .63.412 1.041.411.412 1.04.412m11.134 0q.63 0 1.04-.412.412-.41.412-1.04t-.411-1.041q-.411-.411-1.04-.412-.63 0-1.042.412-.411.411-.411 1.04 0 .63.411 1.041.412.412 1.041.412m-2.42-8.23h5.228l-3.244-3.872h-1.984z"/></svg>
|
package/index.js
CHANGED
|
@@ -43,6 +43,7 @@ export { Select } from './components/Form/Select.js';
|
|
|
43
43
|
export { default as Slider, SliderValueMeta } from './components/Form/Slider.js';
|
|
44
44
|
export { Stepper, StepperMeta } from './components/Form/Stepper.js';
|
|
45
45
|
export { TextArea } from './components/Form/TextArea.js';
|
|
46
|
+
export { TagsInput } from './components/Form/TagsInput.js';
|
|
46
47
|
export { TextInput } from './components/Form/TextInput.js';
|
|
47
48
|
export { ToggleSwitch } from './components/Form/ToggleSwitch.js';
|
|
48
49
|
export { CalendarView } from './components/Calendar/CalendarView/index.js';
|
|
@@ -222,6 +223,7 @@ export { default as MinibusIcon } from './components/Icon/__generated__/MinibusI
|
|
|
222
223
|
export { default as MinusCircleFilledIcon } from './components/Icon/__generated__/MinusCircleFilledIcon.js';
|
|
223
224
|
export { default as MinusIcon } from './components/Icon/__generated__/MinusIcon.js';
|
|
224
225
|
export { default as MiscGiftIcon } from './components/Icon/__generated__/MiscGiftIcon.js';
|
|
226
|
+
export { default as MoonIcon } from './components/Icon/__generated__/MoonIcon.js';
|
|
225
227
|
export { default as NearbyDeviceIcon } from './components/Icon/__generated__/NearbyDeviceIcon.js';
|
|
226
228
|
export { default as NotificationIcon } from './components/Icon/__generated__/NotificationIcon.js';
|
|
227
229
|
export { default as Number1CircleIcon } from './components/Icon/__generated__/Number1CircleIcon.js';
|
|
@@ -280,6 +282,7 @@ export { default as ReplacementCarIcon } from './components/Icon/__generated__/R
|
|
|
280
282
|
export { default as ReplyIcon } from './components/Icon/__generated__/ReplyIcon.js';
|
|
281
283
|
export { default as ResetIcon } from './components/Icon/__generated__/ResetIcon.js';
|
|
282
284
|
export { default as RideIcon } from './components/Icon/__generated__/RideIcon.js';
|
|
285
|
+
export { default as RoadsideAssistanceIcon } from './components/Icon/__generated__/RoadsideAssistanceIcon.js';
|
|
283
286
|
export { default as RoofBoxIcon } from './components/Icon/__generated__/RoofBoxIcon.js';
|
|
284
287
|
export { default as RotateIcon } from './components/Icon/__generated__/RotateIcon.js';
|
|
285
288
|
export { default as SealCheckIcon } from './components/Icon/__generated__/SealCheckIcon.js';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/src/index.d.ts",
|
|
@@ -19,10 +19,9 @@
|
|
|
19
19
|
"url": "https://github.com/TimPetricola"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ark-ui/react": "
|
|
22
|
+
"@ark-ui/react": "5.9.1",
|
|
23
23
|
"@juggle/resize-observer": "3.4.0",
|
|
24
24
|
"@lottiefiles/react-lottie-player": "3.5.4",
|
|
25
|
-
"@react-spring/web": "9.7.5",
|
|
26
25
|
"@tippyjs/react": "4.2.6",
|
|
27
26
|
"classnames": "2.5.1",
|
|
28
27
|
"date-fns": "2.30.0",
|
|
@@ -60,10 +59,10 @@
|
|
|
60
59
|
"@types/lodash.throttle": "4.1.9",
|
|
61
60
|
"@types/media-typer": "1.1.3",
|
|
62
61
|
"@types/node": "22.14.1",
|
|
63
|
-
"@types/react": "18.3.
|
|
64
|
-
"@types/react-dom": "18.3.
|
|
62
|
+
"@types/react": "18.3.22",
|
|
63
|
+
"@types/react-dom": "18.3.7",
|
|
65
64
|
"autoprefixer": "10.4.21",
|
|
66
|
-
"core-js": "3.
|
|
65
|
+
"core-js": "3.42.0",
|
|
67
66
|
"css-loader": "7.1.2",
|
|
68
67
|
"eslint": "8.57.1",
|
|
69
68
|
"eslint-plugin-storybook": "^0.12.0",
|
|
@@ -97,8 +96,8 @@
|
|
|
97
96
|
"stylelint": "15.11.0",
|
|
98
97
|
"svg2vectordrawable": "2.9.1",
|
|
99
98
|
"svgo": "3.3.2",
|
|
100
|
-
"ts-jest": "29.3.
|
|
101
|
-
"tsx": "4.19.
|
|
99
|
+
"ts-jest": "29.3.4",
|
|
100
|
+
"tsx": "4.19.4",
|
|
102
101
|
"typescript": "5.4.5"
|
|
103
102
|
},
|
|
104
103
|
"keywords": [
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
position: relative;
|
|
5
5
|
|
|
6
|
+
[data-state="open"] {
|
|
7
|
+
border-radius: 8px 8px 0 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
&__clear-button:not([hidden]) {
|
|
7
11
|
position: absolute;
|
|
8
12
|
right: 6px;
|
|
@@ -34,7 +38,7 @@
|
|
|
34
38
|
|
|
35
39
|
overflow: hidden;
|
|
36
40
|
|
|
37
|
-
border-radius: 0 0
|
|
41
|
+
border-radius: 0 0 8px 8px;
|
|
38
42
|
box-shadow:
|
|
39
43
|
0 2px 2px 0 rgba(0, 0, 0, 0.06),
|
|
40
44
|
0 6px 6px 0 rgba(0, 0, 0, 0.04),
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@import "./form";
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable max-nesting-depth */
|
|
4
|
+
.cobalt- {
|
|
5
|
+
&TagsField {
|
|
6
|
+
$self: &;
|
|
7
|
+
|
|
8
|
+
@include form-field-container;
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&__InputContainer {
|
|
13
|
+
@apply c-text-base c-border c-border-strong c-bg-secondary c-rounded-lg;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: 10px 12px;
|
|
18
|
+
|
|
19
|
+
&:not([data-disabled]):not([data-readonly]) {
|
|
20
|
+
@apply c-state-interactive c-transition-colors;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--success {
|
|
24
|
+
@apply c-border-success;
|
|
25
|
+
|
|
26
|
+
&:not([data-disabled]):hover,
|
|
27
|
+
&:not([data-disabled]):focus {
|
|
28
|
+
@apply c-border-success;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--error {
|
|
33
|
+
@apply c-border-error;
|
|
34
|
+
|
|
35
|
+
&:not([data-disabled]):hover,
|
|
36
|
+
&:not([data-disabled]):focus {
|
|
37
|
+
@apply c-border-error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:not([data-disabled]):focus-within {
|
|
42
|
+
@apply c-border-accent;
|
|
43
|
+
|
|
44
|
+
outline: none;
|
|
45
|
+
box-shadow: inset 0 0 0 1px theme("semanticBorderColor.accent");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[data-disabled] {
|
|
49
|
+
@apply c-border-base c-text-subdued c-bg-neutral c-cursor-not-allowed;
|
|
50
|
+
|
|
51
|
+
* {
|
|
52
|
+
@apply c-pointer-events-none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&[data-readonly] {
|
|
57
|
+
@apply c-border-base c-text-subdued c-bg-neutral c-cursor-text;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__Tags {
|
|
62
|
+
@apply c-flex c-flex-wrap c-gap-[4px] c-mb-2xs;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__Tag {
|
|
66
|
+
@apply c-border-none c-cursor-pointer c-state-interactive c-transition-colors c-gap-[2px];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__TagDeleteTrigger {
|
|
70
|
+
@apply c-flex c-border-none c-cursor-pointer c-p-[2px] c-state-interactive c-transition-colors c-rounded-br c-rounded-tr;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__Input {
|
|
74
|
+
@apply c-bg-transparent c-border-none c-font-base c-text-base;
|
|
75
|
+
width: 100%;
|
|
76
|
+
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
line-height: 24px;
|
|
80
|
+
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&__Input::placeholder {
|
|
85
|
+
@apply c-text-subdued;
|
|
86
|
+
opacity: 0.7;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/* stylelint-enable max-nesting-depth */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@mixin form-input-base($container) {
|
|
2
|
-
@apply c-text-base c-border c-border-strong c-bg-secondary c-
|
|
2
|
+
@apply c-text-base c-border c-border-strong c-bg-secondary c-transition-colors;
|
|
3
|
+
|
|
3
4
|
@include withContext(#{$container}--success) {
|
|
4
5
|
@apply c-border-success;
|
|
5
6
|
|
|
@@ -29,7 +30,11 @@
|
|
|
29
30
|
font-weight: 400;
|
|
30
31
|
line-height: 24px;
|
|
31
32
|
|
|
32
|
-
border-radius:
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
|
|
35
|
+
&:not([readonly]):not([disabled]) {
|
|
36
|
+
@apply c-state-interactive;
|
|
37
|
+
}
|
|
33
38
|
|
|
34
39
|
&:not(:disabled):not(:read-only):hover {
|
|
35
40
|
@apply c-text-base;
|
package/tokens/icons.js
CHANGED
|
@@ -167,6 +167,7 @@ const icons = {
|
|
|
167
167
|
minusCircleFilled: "minus-circle-filled.svg",
|
|
168
168
|
minus: "minus.svg",
|
|
169
169
|
miscGift: "misc-gift.svg",
|
|
170
|
+
moon: "moon.svg",
|
|
170
171
|
nearbyDevice: "nearby-device.svg",
|
|
171
172
|
notification: "notification.svg",
|
|
172
173
|
number1Circle: "number-1-circle.svg",
|
|
@@ -225,6 +226,7 @@ const icons = {
|
|
|
225
226
|
reply: "reply.svg",
|
|
226
227
|
reset: "reset.svg",
|
|
227
228
|
ride: "ride.svg",
|
|
229
|
+
roadsideAssistance: "roadside-assistance.svg",
|
|
228
230
|
roofBox: "roof-box.svg",
|
|
229
231
|
rotate: "rotate.svg",
|
|
230
232
|
sealCheck: "seal-check.svg",
|
package/tokens/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ export declare const useAlerts: () => {
|
|
|
5
5
|
message: React.ReactNode;
|
|
6
6
|
status: AlertStatus;
|
|
7
7
|
duration?: number;
|
|
8
|
-
}) => string
|
|
8
|
+
}) => string;
|
|
9
9
|
};
|
|
10
10
|
declare const Alerter: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
11
11
|
export default Alerter;
|
|
@@ -34,7 +34,7 @@ declare const Autocomplete: React.ForwardRefExoticComponent<{
|
|
|
34
34
|
label?: string | undefined;
|
|
35
35
|
hint?: string | undefined;
|
|
36
36
|
fullWidth?: boolean | undefined;
|
|
37
|
-
icon?: "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "search" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "warning" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
|
|
37
|
+
icon?: "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "moon" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roadsideAssistance" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "search" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "warning" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
|
|
38
38
|
items: AutocompleteItemInput[];
|
|
39
39
|
popoverClassName?: string | undefined;
|
|
40
40
|
minQueryLength?: number | undefined;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TagsInput as TagsInputComponent, TagsInputRootProps } from "@ark-ui/react";
|
|
3
|
+
import { IconSources } from "../Icon";
|
|
4
|
+
import { FormElement } from "./form";
|
|
5
|
+
type Props = {
|
|
6
|
+
icon?: IconSources;
|
|
7
|
+
forwardedRef?: React.Ref<HTMLInputElement>;
|
|
8
|
+
value?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
tags?: string[];
|
|
11
|
+
onTagsChange?: (tags: string[]) => void;
|
|
12
|
+
defaultTags?: string[];
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
max?: number;
|
|
15
|
+
} & Omit<FormElement, "value" | "defaultValue" | "max" | "onChange" | "onInputChange"> & React.InputHTMLAttributes<HTMLInputElement> & Omit<TagsInputRootProps, "value" | "inputValue" | "onValueChange">;
|
|
16
|
+
export declare const TagsInputWrapper: ({ status, render, }: {
|
|
17
|
+
status?: FormElement["status"];
|
|
18
|
+
render: (className: string) => React.ReactNode;
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
declare const wrappedComponent: React.ComponentClass<{
|
|
21
|
+
icon?: "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "moon" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roadsideAssistance" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "search" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "warning" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
|
|
22
|
+
forwardedRef?: React.Ref<HTMLInputElement> | undefined;
|
|
23
|
+
value?: string | undefined;
|
|
24
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
25
|
+
tags?: string[] | undefined;
|
|
26
|
+
onTagsChange?: ((tags: string[]) => void) | undefined;
|
|
27
|
+
defaultTags?: string[] | undefined;
|
|
28
|
+
defaultValue?: string | undefined;
|
|
29
|
+
max?: number | undefined;
|
|
30
|
+
} & Omit<FormElement, "value" | "defaultValue" | "max" | "onChange" | "onInputChange"> & React.InputHTMLAttributes<HTMLInputElement> & Omit<TagsInputComponent.RootProps, "value" | "inputValue" | "onValueChange"> & {
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
label?: string | undefined;
|
|
33
|
+
hint?: string | undefined;
|
|
34
|
+
fieldClassName?: string | undefined;
|
|
35
|
+
fullWidth?: boolean | undefined;
|
|
36
|
+
} & FormElement, any> & {
|
|
37
|
+
Raw: React.ComponentType<Props>;
|
|
38
|
+
};
|
|
39
|
+
export { wrappedComponent as TagsInput };
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FormElement } from "./form";
|
|
3
|
-
type Props = {
|
|
4
|
-
maxLength?: number;
|
|
5
|
-
className?: string;
|
|
6
|
-
inputClassName?: string;
|
|
7
|
-
autosize?: boolean;
|
|
8
|
-
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
|
-
} & FormElement & React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
10
3
|
declare const wrappedComponent: React.ComponentClass<{
|
|
11
4
|
maxLength?: number | undefined;
|
|
12
5
|
className?: string | undefined;
|
|
13
6
|
inputClassName?: string | undefined;
|
|
14
7
|
autosize?: boolean | undefined;
|
|
15
8
|
onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
16
|
-
} & FormElement & React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
9
|
+
} & FormElement & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement> & {
|
|
17
10
|
id?: string | undefined;
|
|
18
11
|
label?: string | undefined;
|
|
19
12
|
hint?: string | undefined;
|
|
20
13
|
fieldClassName?: string | undefined;
|
|
21
14
|
fullWidth?: boolean | undefined;
|
|
22
15
|
}, any> & {
|
|
23
|
-
Raw: React.ComponentType<
|
|
16
|
+
Raw: React.ComponentType<{
|
|
17
|
+
maxLength?: number | undefined;
|
|
18
|
+
className?: string | undefined;
|
|
19
|
+
inputClassName?: string | undefined;
|
|
20
|
+
autosize?: boolean | undefined;
|
|
21
|
+
onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
22
|
+
} & FormElement & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
24
23
|
};
|
|
25
24
|
export { wrappedComponent as TextArea };
|
|
@@ -14,7 +14,7 @@ export declare const TextInputWrapper: ({ icon, status, render, }: {
|
|
|
14
14
|
}) => React.JSX.Element;
|
|
15
15
|
declare const wrappedComponent: React.ComponentClass<{
|
|
16
16
|
type?: TextInputType | undefined;
|
|
17
|
-
icon?: "search" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "warning" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
|
|
17
|
+
icon?: "search" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "moon" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roadsideAssistance" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "warning" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
|
|
18
18
|
forwardedRef?: React.Ref<HTMLInputElement> | undefined;
|
|
19
19
|
} & FormElement & React.InputHTMLAttributes<HTMLInputElement> & {
|
|
20
20
|
id?: string | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconColorsType } from "../";
|
|
3
|
+
export type IconProps = {
|
|
4
|
+
color?: IconColorsType;
|
|
5
|
+
size?: 16 | 20 | 24 | 32;
|
|
6
|
+
contained?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const MoonIcon: ({ color, size, contained, className, }: IconProps) => React.JSX.Element;
|
|
10
|
+
export default MoonIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconColorsType } from "../";
|
|
3
|
+
export type IconProps = {
|
|
4
|
+
color?: IconColorsType;
|
|
5
|
+
size?: 16 | 20 | 24 | 32;
|
|
6
|
+
contained?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const RoadsideAssistanceIcon: ({ color, size, contained, className, }: IconProps) => React.JSX.Element;
|
|
10
|
+
export default RoadsideAssistanceIcon;
|
|
@@ -166,6 +166,7 @@ export { default as MinibusIcon } from "./MinibusIcon";
|
|
|
166
166
|
export { default as MinusCircleFilledIcon } from "./MinusCircleFilledIcon";
|
|
167
167
|
export { default as MinusIcon } from "./MinusIcon";
|
|
168
168
|
export { default as MiscGiftIcon } from "./MiscGiftIcon";
|
|
169
|
+
export { default as MoonIcon } from "./MoonIcon";
|
|
169
170
|
export { default as NearbyDeviceIcon } from "./NearbyDeviceIcon";
|
|
170
171
|
export { default as NotificationIcon } from "./NotificationIcon";
|
|
171
172
|
export { default as Number1CircleIcon } from "./Number1CircleIcon";
|
|
@@ -224,6 +225,7 @@ export { default as ReplacementCarIcon } from "./ReplacementCarIcon";
|
|
|
224
225
|
export { default as ReplyIcon } from "./ReplyIcon";
|
|
225
226
|
export { default as ResetIcon } from "./ResetIcon";
|
|
226
227
|
export { default as RideIcon } from "./RideIcon";
|
|
228
|
+
export { default as RoadsideAssistanceIcon } from "./RoadsideAssistanceIcon";
|
|
227
229
|
export { default as RoofBoxIcon } from "./RoofBoxIcon";
|
|
228
230
|
export { default as RotateIcon } from "./RotateIcon";
|
|
229
231
|
export { default as SealCheckIcon } from "./SealCheckIcon";
|
|
@@ -22,7 +22,7 @@ export interface IconProps {
|
|
|
22
22
|
contained?: boolean;
|
|
23
23
|
className?: string;
|
|
24
24
|
}
|
|
25
|
-
export declare const isIconSource: (source: string) => source is "info" | "warning" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "search" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang";
|
|
25
|
+
export declare const isIconSource: (source: string) => source is "info" | "warning" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "bank" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowLeft" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "collapse" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "contract" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "expand" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filepdf" | "filexls" | "filter" | "filters" | "flag" | "fourByFour" | "fourWheelDrive" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "moon" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "percentage" | "performance" | "phoneLink" | "phone" | "photos" | "pickupTruck" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "recenter" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roadsideAssistance" | "roofBox" | "rotate" | "sealCheck" | "searchCar" | "searchPeople" | "search" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "smilingFace" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "uber" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "video" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang";
|
|
26
26
|
export declare const Icon: ({ source, color, size, contained, className, }: IconProps) => React.JSX.Element;
|
|
27
27
|
export * from "./__generated__/index";
|
|
28
28
|
export default Icon;
|
|
@@ -166,6 +166,7 @@ export { default as minibus } from "./minibus.svg";
|
|
|
166
166
|
export { default as minusCircleFilled } from "./minus-circle-filled.svg";
|
|
167
167
|
export { default as minus } from "./minus.svg";
|
|
168
168
|
export { default as miscGift } from "./misc-gift.svg";
|
|
169
|
+
export { default as moon } from "./moon.svg";
|
|
169
170
|
export { default as nearbyDevice } from "./nearby-device.svg";
|
|
170
171
|
export { default as notification } from "./notification.svg";
|
|
171
172
|
export { default as number1Circle } from "./number-1-circle.svg";
|
|
@@ -224,6 +225,7 @@ export { default as replacementCar } from "./replacement-car.svg";
|
|
|
224
225
|
export { default as reply } from "./reply.svg";
|
|
225
226
|
export { default as reset } from "./reset.svg";
|
|
226
227
|
export { default as ride } from "./ride.svg";
|
|
228
|
+
export { default as roadsideAssistance } from "./roadside-assistance.svg";
|
|
227
229
|
export { default as roofBox } from "./roof-box.svg";
|
|
228
230
|
export { default as rotate } from "./rotate.svg";
|
|
229
231
|
export { default as sealCheck } from "./seal-check.svg";
|
package/types/src/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export { Select } from "./components/Form/Select";
|
|
|
44
44
|
export { default as Slider, SliderValueMeta } from "./components/Form/Slider";
|
|
45
45
|
export { Stepper, StepperMeta } from "./components/Form/Stepper";
|
|
46
46
|
export { TextArea } from "./components/Form/TextArea";
|
|
47
|
+
export { TagsInput } from "./components/Form/TagsInput";
|
|
47
48
|
export { TextInput } from "./components/Form/TextInput";
|
|
48
49
|
export { ToggleSwitch } from "./components/Form/ToggleSwitch";
|
|
49
50
|
export { CalendarView, MonthType, StatusByDateType, } from "./components/Calendar";
|
|
@@ -225,6 +225,7 @@ export declare const icons: {
|
|
|
225
225
|
minusCircleFilled: string;
|
|
226
226
|
minus: string;
|
|
227
227
|
miscGift: string;
|
|
228
|
+
moon: string;
|
|
228
229
|
nearbyDevice: string;
|
|
229
230
|
notification: string;
|
|
230
231
|
number1Circle: string;
|
|
@@ -283,6 +284,7 @@ export declare const icons: {
|
|
|
283
284
|
reply: string;
|
|
284
285
|
reset: string;
|
|
285
286
|
ride: string;
|
|
287
|
+
roadsideAssistance: string;
|
|
286
288
|
roofBox: string;
|
|
287
289
|
rotate: string;
|
|
288
290
|
sealCheck: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/
|
|
1
|
+
{"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/cedric/Dev/drivy/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* Hook to listen the giving element resize events (using ResizeObserver)
|
|
4
|
-
* and returning the updated height of that element according to those events
|
|
5
|
-
*
|
|
6
|
-
* Useful to animated using react-spring an element that we can't know the
|
|
7
|
-
* actual size since it's computed from the child elements
|
|
8
|
-
*/
|
|
9
|
-
declare const useElementHeight: <ElementType extends HTMLElement>() => {
|
|
10
|
-
ref: import("react").RefObject<ElementType>;
|
|
11
|
-
height: number;
|
|
12
|
-
};
|
|
13
|
-
export default useElementHeight;
|