@entur/chip 0.9.0 → 0.9.1-beta.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.
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils = require("@entur/utils");
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const React = require("react");
6
+ const cx = require("classnames");
7
+ const loader = require("@entur/loader");
8
+ const icons = require("@entur/icons");
9
+ const form = require("@entur/form");
10
+ const ChoiceChipGroupContext = React.createContext(null);
11
+ const ChoiceChipGroupContextProvider = ChoiceChipGroupContext.Provider;
12
+ const useChoiceChipGroupContext = () => {
13
+ const context = React.useContext(ChoiceChipGroupContext);
14
+ if (!context) {
15
+ throw new Error(
16
+ "You need to wrap your ChoiceChips in a ChoiceChipGroup-component"
17
+ );
18
+ }
19
+ return context;
20
+ };
21
+ const ChoiceChip = React.forwardRef(
22
+ ({
23
+ className,
24
+ children,
25
+ value,
26
+ disabled = false,
27
+ style,
28
+ size = "medium",
29
+ ...rest
30
+ }, ref) => {
31
+ const childrenArray = React.Children.toArray(children);
32
+ const hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== "string";
33
+ const hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== "string";
34
+ const classList = cx(className, "eds-chip", `eds-chip--size-${size}`, {
35
+ "eds-chip--disabled": disabled,
36
+ "eds-chip--leading-icon": hasLeadingIcon,
37
+ "eds-chip--trailing-icon": hasTrailingIcon
38
+ });
39
+ const {
40
+ name,
41
+ value: selectedValue,
42
+ onChange
43
+ } = useChoiceChipGroupContext();
44
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "eds-choice-chip", style, children: [
45
+ /* @__PURE__ */ jsxRuntime.jsx(
46
+ "input",
47
+ {
48
+ className: "eds-choice-chip__input",
49
+ type: "radio",
50
+ name,
51
+ ref,
52
+ value,
53
+ disabled,
54
+ checked: selectedValue === value,
55
+ onChange,
56
+ "aria-disabled": disabled,
57
+ ...rest
58
+ }
59
+ ),
60
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: classList, children })
61
+ ] });
62
+ }
63
+ );
64
+ const ActionChip = React.forwardRef(
65
+ ({ children, className, loading = false, size = "medium", ...rest }, ref) => {
66
+ const childrenArray = React.Children.toArray(children);
67
+ const hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== "string";
68
+ const hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== "string";
69
+ const ariaLabelValue = () => {
70
+ if (rest["aria-label"]) return rest["aria-label"];
71
+ if (loading) return ariaLabelWhenLoading;
72
+ return void 0;
73
+ };
74
+ const ariaLabelWhenLoading = childrenArray.filter((child) => typeof child === "string").join(" ");
75
+ const classList = cx(
76
+ className,
77
+ "eds-chip",
78
+ "eds-action-chip",
79
+ `eds-chip--size-${size}`,
80
+ {
81
+ "eds-chip--leading-icon": hasLeadingIcon,
82
+ "eds-chip--trailing-icon": hasTrailingIcon,
83
+ "eds-action-chip--disabled": rest.disabled
84
+ }
85
+ );
86
+ const actionChip = /* @__PURE__ */ jsxRuntime.jsx(
87
+ "button",
88
+ {
89
+ className: classList,
90
+ ref,
91
+ "aria-busy": loading,
92
+ "aria-label": ariaLabelValue(),
93
+ type: "button",
94
+ ...rest,
95
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(loader.LoadingDots, { className: "eds-action-chip__loading-dots" }) : children
96
+ }
97
+ );
98
+ if (rest.disabled) {
99
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "eds-action-chip--disabled__wrapper", children: actionChip });
100
+ }
101
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: actionChip });
102
+ }
103
+ );
104
+ const TagChip = React.forwardRef(
105
+ ({
106
+ children,
107
+ className,
108
+ onClose,
109
+ closeButtonAriaLabel,
110
+ size = "medium",
111
+ ...rest
112
+ }, ref) => {
113
+ const childrenArray = React.Children.toArray(children);
114
+ const hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== "string";
115
+ const hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== "string";
116
+ const selectedCloseLabel = closeButtonAriaLabel ?? "Fjern " + children?.toString();
117
+ return /* @__PURE__ */ jsxRuntime.jsxs(
118
+ "div",
119
+ {
120
+ className: cx(
121
+ "eds-chip",
122
+ "eds-tag-chip",
123
+ `eds-chip--size-${size}`,
124
+ className,
125
+ {
126
+ "eds-chip--leading-icon": hasLeadingIcon,
127
+ "eds-chip--trailing-icon": hasTrailingIcon
128
+ }
129
+ ),
130
+ ...rest,
131
+ children: [
132
+ children,
133
+ /* @__PURE__ */ jsxRuntime.jsx(
134
+ "button",
135
+ {
136
+ className: "eds-tag-chip__close-button",
137
+ type: "button",
138
+ onClick: onClose,
139
+ "aria-label": selectedCloseLabel,
140
+ ref,
141
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseSmallIcon, { "aria-hidden": true })
142
+ }
143
+ )
144
+ ]
145
+ }
146
+ );
147
+ }
148
+ );
149
+ const FilterChip = React.forwardRef(
150
+ ({
151
+ className,
152
+ children,
153
+ value,
154
+ disabled = false,
155
+ name,
156
+ style,
157
+ size = "medium",
158
+ ...rest
159
+ }, ref) => {
160
+ const childrenArray = React.Children.toArray(children);
161
+ const hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== "string";
162
+ const hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== "string";
163
+ const classList = cx(className, "eds-filter-chip");
164
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: classList, style, children: [
165
+ /* @__PURE__ */ jsxRuntime.jsx(
166
+ "input",
167
+ {
168
+ className: "eds-filter-chip__input",
169
+ type: "checkbox",
170
+ name,
171
+ ref,
172
+ value,
173
+ disabled,
174
+ ...rest
175
+ }
176
+ ),
177
+ /* @__PURE__ */ jsxRuntime.jsxs(
178
+ "div",
179
+ {
180
+ className: cx("eds-chip", `eds-chip--size-${size}`, {
181
+ "eds-chip--leading-icon": hasLeadingIcon,
182
+ "eds-chip--trailing-icon": hasTrailingIcon
183
+ }),
184
+ children: [
185
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "eds-filter-chip__icon", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxIcon, {}) }),
186
+ children
187
+ ]
188
+ }
189
+ )
190
+ ] });
191
+ }
192
+ );
193
+ const CheckboxIcon = () => {
194
+ return /* @__PURE__ */ jsxRuntime.jsx(
195
+ "svg",
196
+ {
197
+ className: "eds-filter-chip-icon",
198
+ width: "16",
199
+ height: "16",
200
+ viewBox: "0 0 16 16",
201
+ fill: "none",
202
+ xmlns: "http://www.w3.org/2000/svg",
203
+ children: /* @__PURE__ */ jsxRuntime.jsx(
204
+ "path",
205
+ {
206
+ className: "eds-filter-chip-icon__path",
207
+ d: "M1.71283 7.10801L5.6464 11.1377C5.84098 11.3371 6.16095 11.339 6.35786 11.1419L14.2916 3.20325",
208
+ stroke: "#181C56",
209
+ strokeWidth: "2"
210
+ }
211
+ )
212
+ }
213
+ );
214
+ };
215
+ const ChoiceChipGroup = ({
216
+ name,
217
+ value,
218
+ children,
219
+ onChange,
220
+ label,
221
+ ...rest
222
+ }) => {
223
+ const contextValue = React.useMemo(
224
+ () => ({ name, value, onChange }),
225
+ [name, value, onChange]
226
+ );
227
+ return /* @__PURE__ */ jsxRuntime.jsx(ChoiceChipGroupContextProvider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(form.Fieldset, { className: "eds-choice-chips-group", label, ...rest, children }) });
228
+ };
229
+ utils.warnAboutMissingStyles("chip", "form");
230
+ exports.ActionChip = ActionChip;
231
+ exports.ChoiceChip = ChoiceChip;
232
+ exports.ChoiceChipGroup = ChoiceChipGroup;
233
+ exports.FilterChip = FilterChip;
234
+ exports.TagChip = TagChip;
235
+ //# sourceMappingURL=chip.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chip.cjs.js","sources":["../src/ChoiceChipGroupContext.tsx","../src/ChoiceChip.tsx","../src/ActionChip.tsx","../src/TagChip.tsx","../src/FilterChip.tsx","../src/ChoiceChipGroup.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\n\ntype ChoiceChipGroupContextProps = {\n name: string;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n value: string | null;\n};\n\nconst ChoiceChipGroupContext =\n React.createContext<ChoiceChipGroupContextProps | null>(null);\n\nexport const ChoiceChipGroupContextProvider = ChoiceChipGroupContext.Provider;\n\nexport const useChoiceChipGroupContext: () => ChoiceChipGroupContextProps =\n () => {\n const context = React.useContext(ChoiceChipGroupContext);\n if (!context) {\n throw new Error(\n 'You need to wrap your ChoiceChips in a ChoiceChipGroup-component',\n );\n }\n return context;\n };\n","import React from 'react';\nimport cx from 'classnames';\nimport { useChoiceChipGroupContext } from './ChoiceChipGroupContext';\nimport './BaseChip.scss';\nimport './ChoiceChip.scss';\n\nexport type ChoiceChipProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Om Choicechip er deaktivert eller ikke\n * @default false\n */\n disabled?: boolean;\n /** Label til ChoiceChip */\n children?: React.ReactNode;\n /** Verdien til ChoiceChip */\n value: string;\n /** Størrelsen på chip\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n} & Omit<\n React.DetailedHTMLProps<\n React.InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n >,\n 'value' | 'size'\n>;\n\nexport const ChoiceChip = React.forwardRef<HTMLInputElement, ChoiceChipProps>(\n (\n {\n className,\n children,\n value,\n disabled = false,\n style,\n size = 'medium',\n ...rest\n },\n ref: React.Ref<HTMLInputElement>,\n ) => {\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n const classList = cx(className, 'eds-chip', `eds-chip--size-${size}`, {\n 'eds-chip--disabled': disabled,\n 'eds-chip--leading-icon': hasLeadingIcon,\n 'eds-chip--trailing-icon': hasTrailingIcon,\n });\n const {\n name,\n value: selectedValue,\n onChange,\n } = useChoiceChipGroupContext();\n return (\n <label className=\"eds-choice-chip\" style={style}>\n <input\n className=\"eds-choice-chip__input\"\n type=\"radio\"\n name={name}\n ref={ref}\n value={value}\n disabled={disabled}\n checked={selectedValue === value}\n onChange={onChange}\n aria-disabled={disabled}\n {...rest}\n />\n <div className={classList}>{children}</div>\n </label>\n );\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { LoadingDots } from '@entur/loader';\nimport './BaseChip.scss';\nimport './ActionChip.scss';\n\nexport type ActionChipProps = {\n /** Teksten som vises i ActionChip */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Om chip-en er opptatt, f.eks med å oppdatere informasjon\n * @default false\n */\n loading?: boolean;\n /** Størrelsen på chip\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n} & React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>;\n\nexport const ActionChip = React.forwardRef<HTMLButtonElement, ActionChipProps>(\n (\n { children, className, loading = false, size = 'medium', ...rest },\n ref: React.Ref<HTMLButtonElement>,\n ) => {\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n const ariaLabelValue = () => {\n if (rest['aria-label']) return rest['aria-label'];\n if (loading) return ariaLabelWhenLoading;\n return undefined;\n };\n\n const ariaLabelWhenLoading = childrenArray\n .filter(child => typeof child === 'string')\n .join(' ');\n\n const classList = classNames(\n className,\n 'eds-chip',\n 'eds-action-chip',\n `eds-chip--size-${size}`,\n {\n 'eds-chip--leading-icon': hasLeadingIcon,\n 'eds-chip--trailing-icon': hasTrailingIcon,\n 'eds-action-chip--disabled': rest.disabled,\n },\n );\n\n const actionChip = (\n <button\n className={classList}\n ref={ref}\n aria-busy={loading}\n aria-label={ariaLabelValue()}\n type=\"button\"\n {...rest}\n >\n {loading ? (\n <LoadingDots className=\"eds-action-chip__loading-dots\" />\n ) : (\n children\n )}\n </button>\n );\n\n if (rest.disabled) {\n return (\n <div className=\"eds-action-chip--disabled__wrapper\">{actionChip}</div>\n );\n }\n return <>{actionChip}</>;\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { CloseSmallIcon } from '@entur/icons';\nimport './BaseChip.scss';\nimport './TagChip.scss';\n\nexport type TagChipProps = {\n /** Teksten som vises i TagChip */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Callback for når man klikker på krysset */\n onClose: () => void;\n /** Skjermlesertekst for X-knappen */\n closeButtonAriaLabel?: string;\n /** Størrelsen på chip\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n};\n\nexport const TagChip = React.forwardRef<HTMLButtonElement, TagChipProps>(\n (\n {\n children,\n className,\n onClose,\n closeButtonAriaLabel,\n size = 'medium',\n ...rest\n },\n ref: React.Ref<HTMLButtonElement>,\n ) => {\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n const selectedCloseLabel =\n closeButtonAriaLabel ?? 'Fjern ' + children?.toString();\n\n return (\n <div\n className={classNames(\n 'eds-chip',\n 'eds-tag-chip',\n `eds-chip--size-${size}`,\n className,\n {\n 'eds-chip--leading-icon': hasLeadingIcon,\n 'eds-chip--trailing-icon': hasTrailingIcon,\n },\n )}\n {...rest}\n >\n {children}\n <button\n className=\"eds-tag-chip__close-button\"\n type=\"button\"\n onClick={onClose}\n aria-label={selectedCloseLabel}\n ref={ref}\n >\n <CloseSmallIcon aria-hidden />\n </button>\n </div>\n );\n },\n);\n","import React from 'react';\nimport cx from 'classnames';\nimport './BaseChip.scss';\nimport './FilterChip.scss';\n\nexport type FilterChipProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Label til FilterChip */\n children?: React.ReactNode;\n /** Verdien til FilterChip */\n value: string;\n /** Størrelsen på chip\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'size'>;\n\nexport const FilterChip = React.forwardRef<HTMLInputElement, FilterChipProps>(\n (\n {\n className,\n children,\n value,\n disabled = false,\n name,\n style,\n size = 'medium',\n ...rest\n },\n ref: React.Ref<HTMLInputElement>,\n ) => {\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n const classList = cx(className, 'eds-filter-chip');\n\n return (\n <label className={classList} style={style}>\n <input\n className=\"eds-filter-chip__input\"\n type=\"checkbox\"\n name={name}\n ref={ref}\n value={value}\n disabled={disabled}\n {...rest}\n />\n <div\n className={cx('eds-chip', `eds-chip--size-${size}`, {\n 'eds-chip--leading-icon': hasLeadingIcon,\n 'eds-chip--trailing-icon': hasTrailingIcon,\n })}\n >\n <span className=\"eds-filter-chip__icon\">\n <CheckboxIcon />\n </span>\n {children}\n </div>\n </label>\n );\n },\n);\n\nconst CheckboxIcon: React.FC = () => {\n return (\n <svg\n className=\"eds-filter-chip-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"eds-filter-chip-icon__path\"\n d=\"M1.71283 7.10801L5.6464 11.1377C5.84098 11.3371 6.16095 11.339 6.35786 11.1419L14.2916 3.20325\"\n stroke=\"#181C56\"\n strokeWidth=\"2\"\n />\n </svg>\n );\n};\n","import React from 'react';\nimport { ChoiceChipGroupContextProvider } from './ChoiceChipGroupContext';\nimport { Fieldset } from '@entur/form';\n\nimport './ChoiceChipGroup.scss';\n\nexport type ChoiceChipGroupProps = {\n /** Navnet til ChoiceChipsGroup */\n name: string;\n /** Verdien til den valgte ChoiceChipen */\n value: string | null;\n /** ChoiceChip-komponentene sendes inn som children */\n children: React.ReactNode;\n /** En callback som blir kalles hver gang en ChoiceChip klikkes på */\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n /** Labelen til ChoiceChip-gruppen. */\n label?: React.ReactNode;\n [key: string]: any;\n};\n\nexport const ChoiceChipGroup: React.FC<ChoiceChipGroupProps> = ({\n name,\n value,\n children,\n onChange,\n label,\n ...rest\n}) => {\n const contextValue = React.useMemo(\n () => ({ name, value, onChange }),\n [name, value, onChange],\n );\n return (\n <ChoiceChipGroupContextProvider value={contextValue}>\n <Fieldset className=\"eds-choice-chips-group\" label={label} {...rest}>\n {children}\n </Fieldset>\n </ChoiceChipGroupContextProvider>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('chip', 'form');\n\nexport * from './ChoiceChip';\nexport * from './ActionChip';\nexport * from './TagChip';\nexport * from './FilterChip';\nexport * from './ChoiceChipGroup';\n"],"names":["jsxs","jsx","classNames","LoadingDots","CloseSmallIcon","Fieldset","warnAboutMissingStyles"],"mappings":";;;;;;;;;AAQA,MAAM,yBACJ,MAAM,cAAkD,IAAI;AAEvD,MAAM,iCAAiC,uBAAuB;AAE9D,MAAM,4BACX,MAAM;AACJ,QAAM,UAAU,MAAM,WAAW,sBAAsB;AACvD,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;ACOK,MAAM,aAAa,MAAM;AAAA,EAC9B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,OAAO;AAAA,IACP,GAAG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