@stokr/components-library 4.2.4 → 4.2.5

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.
Files changed (39) hide show
  1. package/dist/components/AddressItem/AddressItem.d.ts +38 -0
  2. package/dist/components/AddressItem/AddressItem.js +51 -0
  3. package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
  4. package/dist/components/AddressItem/AddressItem.styles.js +73 -0
  5. package/dist/components/Collapsible/Collapsible.d.ts +10 -4
  6. package/dist/components/Collapsible/Collapsible.js +6 -14
  7. package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
  8. package/dist/components/Collapsible/Collapsible.styles.js +23 -9
  9. package/dist/components/Country/CountrySelect.js +9 -14
  10. package/dist/components/Country/FlagFor.d.ts +9 -0
  11. package/dist/components/Country/FlagFor.js +25 -0
  12. package/dist/components/Country/flagLoaders.d.ts +5 -0
  13. package/dist/components/Country/flagLoaders.js +270 -0
  14. package/dist/components/Country/flagStore.d.ts +6 -0
  15. package/dist/components/Country/flagStore.js +29 -0
  16. package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
  17. package/dist/components/IdentityInfo/IdentityInfo.styles.js +3 -1
  18. package/dist/components/InfoBox/InfoBox.js +44 -20
  19. package/dist/components/Input/Select.js +7 -5
  20. package/dist/components/Input/Select.styles.d.ts +19 -9
  21. package/dist/components/Input/Select.styles.js +36 -1
  22. package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
  23. package/dist/components/MaterialIcon/requiredIcons.js +2 -0
  24. package/dist/components/PanelCard/PanelCard.d.ts +51 -0
  25. package/dist/components/PanelCard/PanelCard.js +35 -0
  26. package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
  27. package/dist/components/PanelCard/PanelCard.styles.js +87 -0
  28. package/dist/components/StepSidebar/MobileStepProgress.styles.js +3 -3
  29. package/dist/components/StepSidebar/StepSidebar.d.ts +3 -1
  30. package/dist/components/StepSidebar/StepSidebar.js +2 -0
  31. package/dist/components/StepSidebar/StepSidebar.styles.js +6 -2
  32. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +27 -11
  33. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +88 -7
  34. package/dist/index.d.ts +43 -2
  35. package/dist/index.js +11 -3
  36. package/package.json +1 -1
  37. package/dist/static/images/globe.svg.js +0 -5
  38. package/dist/static/images/trash.svg +0 -17
  39. package/dist/static/images/trash.svg.js +0 -5
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  // their real types; JS exports stay `any` until converted. Export names must match
4
4
  // src/index.js (checked at build time).
5
5
  import type { ComponentType, ReactNode } from 'react'
6
+ import type { FieldVariant } from './styles/borderedField'
6
7
 
7
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
9
  type AnyComponent = any
@@ -83,6 +84,15 @@ export type { LottieAnimationProps, LottieVariant, LottieSegment } from './compo
83
84
  export { Skeleton, SkeletonLines, SkeletonStatus } from './components/Skeleton/Skeleton'
84
85
  export type { SkeletonProps, SkeletonLinesProps, SkeletonStatusProps } from './components/Skeleton/Skeleton'
85
86
  export { Collapsible } from './components/Collapsible/Collapsible'
87
+ export { PanelCard, PanelCardHeader, PanelCardSection, PanelCardFooter } from './components/PanelCard/PanelCard'
88
+ export type {
89
+ PanelCardProps,
90
+ PanelCardHeaderProps,
91
+ PanelCardSectionProps,
92
+ PanelCardFooterProps,
93
+ } from './components/PanelCard/PanelCard'
94
+ export { AddressItem } from './components/AddressItem/AddressItem'
95
+ export type { AddressItemProps } from './components/AddressItem/AddressItem'
86
96
  export { MaterialIcon, SvgIcon, ICON_SIZES } from './components/MaterialIcon/MaterialIcon'
87
97
  export type { MaterialIconProps, SvgIconProps, IconSize } from './components/MaterialIcon/MaterialIcon'
88
98
  export { registerMaterialIcons } from './components/MaterialIcon/iconConfig'
@@ -240,7 +250,10 @@ export declare const InputPassword: AnyComponent
240
250
  export declare const RangeInput: AnyComponent
241
251
  export declare const MultiSelect: AnyComponent, CheckboxWrapperDiv: AnyComponent
242
252
  export declare const CheckboxDiv: AnyComponent, OptionLabel: AnyComponent
243
- export declare const CountrySelect: AnyComponent, FlagFor: AnyComponent, Flags: AnyValue
253
+ export declare const CountrySelect: AnyComponent
254
+ export { FlagFor } from './components/Country/FlagFor'
255
+ export { preloadFlags } from './components/Country/flagStore'
256
+ export type { FlagForProps } from './components/Country/FlagFor'
244
257
  export declare const OtpInput: AnyComponent
245
258
  export declare const InputWithButton: AnyComponent
246
259
  export declare const Textarea: AnyComponent
@@ -258,7 +271,35 @@ export declare const ProfileBadge: AnyComponent
258
271
  export declare const ProfileBox: AnyComponent
259
272
  export declare const Radio: AnyComponent
260
273
  export declare const RefreshButton: AnyComponent
261
- export declare const TaxResidenceCard: AnyComponent
274
+ export interface TaxResidenceCardValue {
275
+ country?: string
276
+ tin?: string
277
+ noTinIssued?: boolean
278
+ }
279
+ export interface TaxResidenceCardProps {
280
+ id: string
281
+ name?: string
282
+ countries: { key?: string; value: string | number; label: string }[]
283
+ value?: TaxResidenceCardValue
284
+ onChange?: (next: Required<TaxResidenceCardValue>) => void
285
+ onDelete?: () => void
286
+ open?: boolean
287
+ defaultOpen?: boolean
288
+ onToggle?: (next: boolean) => void
289
+ emptyTitle?: string
290
+ countryLabel?: string
291
+ tinLabel?: string
292
+ noTinLabel?: ReactNode
293
+ countryPlaceholder?: string
294
+ disabled?: boolean
295
+ hideNoTin?: boolean
296
+ /** `bordered`: white card with boxed fields (sign-up redesign). Default keeps the list look. */
297
+ variant?: FieldVariant
298
+ error?: { country?: boolean; tin?: boolean }
299
+ touched?: { country?: boolean; tin?: boolean }
300
+ dataCy?: string
301
+ }
302
+ export declare const TaxResidenceCard: ComponentType<TaxResidenceCardProps>
262
303
  export declare const RequestDataBox: AnyComponent
263
304
  export declare const SectionTitle: AnyComponent
264
305
  export declare const StepController: AnyComponent
package/dist/index.js CHANGED
@@ -33,7 +33,9 @@ import { InputPassword } from "./components/Input/InputPassword.js";
33
33
  import { RangeInput } from "./components/Input/RangeInput.js";
34
34
  import { Select } from "./components/Input/Select.js";
35
35
  import { CheckboxDiv, CheckboxWrapperDiv, MultiSelect, OptionLabel } from "./components/Input/MultiSelect.js";
36
- import { CountrySelect, FlagFor } from "./components/Country/CountrySelect.js";
36
+ import { CountrySelect } from "./components/Country/CountrySelect.js";
37
+ import { FlagFor } from "./components/Country/FlagFor.js";
38
+ import { preloadFlags } from "./components/Country/flagStore.js";
37
39
  import { OtpInput } from "./components/Input/OtpInput.js";
38
40
  import { InputWithButton } from "./components/Input/InputWithButton.js";
39
41
  import { Textarea } from "./components/Input/Textarea.js";
@@ -47,6 +49,8 @@ import { SIDE_MODAL_BACKDROP, SideModal } from "./components/Modal/SideModal.js"
47
49
  import { SideModalBody, SideModalFooter, SideModalHeader } from "./components/Modal/SideModalParts.js";
48
50
  import { Skeleton, SkeletonLines, SkeletonStatus } from "./components/Skeleton/Skeleton.js";
49
51
  import { Collapsible } from "./components/Collapsible/Collapsible.js";
52
+ import { PanelCard, PanelCardFooter, PanelCardHeader, PanelCardSection } from "./components/PanelCard/PanelCard.js";
53
+ import { AddressItem } from "./components/AddressItem/AddressItem.js";
50
54
  import { ICON_SIZES, MaterialIcon, SvgIcon } from "./components/MaterialIcon/MaterialIcon.js";
51
55
  import { registerMaterialIcons } from "./components/MaterialIcon/iconConfig.js";
52
56
  import { requiredMaterialIcons } from "./components/MaterialIcon/requiredIcons.js";
@@ -128,7 +132,6 @@ import { BackButtonIcon, StyledBackButton, StyledBackButtonExternal, StyledWindo
128
132
  import { Breakdown } from "./components/breakdown/Breakdown.js";
129
133
  import { default as default8 } from "./components/SvgIcons/CapsLockSvg.js";
130
134
  import { FaqContent, FaqDropdownIcon, FaqItem, FaqItems, FaqText, FaqTitle } from "./components/FAQ/FAQ.styles.js";
131
- import * as Flags from "country-flag-icons/react/3x2";
132
135
  import { FormContainer, FormError, FormField, FormInfo } from "./components/Form/Form.styles.js";
133
136
  import { FieldLabel, FieldValue } from "./components/IdentityInfo/IdentityInfo.styles.js";
134
137
  import { Container, Icon } from "./components/InfoIcon/InfoIcon.styles.js";
@@ -153,6 +156,7 @@ import { default as default16 } from "./components/SvgIcons/VerifiedBadge.js";
153
156
  import { copyTextToClipboard } from "./utils/copy-text-to-clipboard.js";
154
157
  import { useSnackbar } from "./components/Snackbar/useSnackbar.js";
155
158
  export {
159
+ AddressItem,
156
160
  default7 as AdminBadgeSvg,
157
161
  AgreementItem,
158
162
  AnimatedSpan,
@@ -212,7 +216,6 @@ export {
212
216
  FaqText,
213
217
  FaqTitle,
214
218
  FlagFor,
215
- Flags,
216
219
  FlexContainer,
217
220
  FlexGrid,
218
221
  Form,
@@ -274,6 +277,10 @@ export {
274
277
  PageWrapper,
275
278
  Pagination,
276
279
  PaginationControls,
280
+ PanelCard,
281
+ PanelCardFooter,
282
+ PanelCardHeader,
283
+ PanelCardSection,
277
284
  PaymentDetailsCard,
278
285
  PaymentDisplay,
279
286
  PaymentModal,
@@ -418,6 +425,7 @@ export {
418
425
  openFile,
419
426
  parseAmount,
420
427
  paymentUnit,
428
+ preloadFlags,
421
429
  projectTokenUnit,
422
430
  projectUnit,
423
431
  radius,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
4
4
  "description": "STOKR - Components Library",
5
5
  "author": "Bilal Hodzic <bilal@stokr.io>",
6
6
  "license": "MIT",
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- const SvgGlobe = (props) => /* @__PURE__ */ React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", ...props }, /* @__PURE__ */ React.createElement("circle", { cx: 12, cy: 12, r: 9 }), /* @__PURE__ */ React.createElement("line", { x1: 3, y1: 12, x2: 21, y2: 12 }), /* @__PURE__ */ React.createElement("path", { d: "M12 3 C 7.5 7, 7.5 17, 12 21" }), /* @__PURE__ */ React.createElement("path", { d: "M12 3 C 16.5 7, 16.5 17, 12 21" }));
3
- export {
4
- SvgGlobe as default
5
- };
@@ -1,17 +0,0 @@
1
- <svg
2
- width="18"
3
- height="18"
4
- viewBox="0 0 24 24"
5
- fill="none"
6
- stroke="currentColor"
7
- strokeWidth="1.5"
8
- strokeLinecap="round"
9
- strokeLinejoin="round"
10
- aria-hidden="true"
11
- focusable="false">
12
- <path d="M3 6h18" />
13
- <path d="M8 6V4.5a1.5 1.5 0 0 1 1.5-1.5h5A1.5 1.5 0 0 1 16 4.5V6" />
14
- <path d="M5.5 6l1 13a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2l1-13" />
15
- <line x1="10" y1="11" x2="10" y2="17" />
16
- <line x1="14" y1="11" x2="14" y2="17" />
17
- </svg>
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- const SvgTrash = (props) => /* @__PURE__ */ React.createElement("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M3 6h18" }), /* @__PURE__ */ React.createElement("path", { d: "M8 6V4.5a1.5 1.5 0 0 1 1.5-1.5h5A1.5 1.5 0 0 1 16 4.5V6" }), /* @__PURE__ */ React.createElement("path", { d: "M5.5 6l1 13a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2l1-13" }), /* @__PURE__ */ React.createElement("line", { x1: 10, y1: 11, x2: 10, y2: 17 }), /* @__PURE__ */ React.createElement("line", { x1: 14, y1: 11, x2: 14, y2: 17 }));
3
- export {
4
- SvgTrash as default
5
- };