@preply/ds-web-lib 3.5.1 → 3.6.0

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 (135) hide show
  1. package/dist/BubbleCounter.module-QMwXWFIS.js +16 -0
  2. package/dist/ChipsPrimitive-DN5NA2yH.js +1242 -0
  3. package/dist/assets/Accordion.css +2 -2
  4. package/dist/assets/AlertDialog.css +2 -2
  5. package/dist/assets/Avatar.css +3 -3
  6. package/dist/assets/AvatarWithStatus.css +2 -2
  7. package/dist/assets/Badge.css +3 -3
  8. package/dist/assets/Box.css +3 -3
  9. package/dist/assets/BubbleCounter.css +69 -0
  10. package/dist/assets/Button.css +4 -4
  11. package/dist/assets/ButtonBase.css +4 -4
  12. package/dist/assets/Checkbox.css +2 -2
  13. package/dist/assets/Chips.css +16 -16
  14. package/dist/assets/ChipsPrimitive.css +118 -0
  15. package/dist/assets/CountryFlag.css +1 -1
  16. package/dist/assets/Dialog.css +3 -3
  17. package/dist/assets/Divider.css +14 -0
  18. package/dist/assets/FieldButton.css +3 -3
  19. package/dist/assets/FormControl.css +2 -2
  20. package/dist/assets/Heading.css +3 -3
  21. package/dist/assets/Icon.css +3 -3
  22. package/dist/assets/InputContainer.css +2 -2
  23. package/dist/assets/LayoutFlex.css +1 -1
  24. package/dist/assets/LayoutFlexItem.css +1 -1
  25. package/dist/assets/Link.css +3 -3
  26. package/dist/assets/Loader.css +1 -1
  27. package/dist/assets/OnboardingTooltip.css +1 -1
  28. package/dist/assets/OnboardingTour.css +1 -1
  29. package/dist/assets/PreplyLogo.css +1 -1
  30. package/dist/assets/ProgressBar.css +1 -1
  31. package/dist/assets/ProgressSteps.css +1 -1
  32. package/dist/assets/Slider.css +1 -1
  33. package/dist/assets/Spinner.css +3 -3
  34. package/dist/assets/Steps.css +1 -1
  35. package/dist/assets/Switch.css +57 -0
  36. package/dist/assets/Text.css +3 -3
  37. package/dist/assets/TextHighlighted.css +3 -3
  38. package/dist/assets/TextInline.css +3 -3
  39. package/dist/assets/Toast.css +2 -2
  40. package/dist/assets/Tooltip.css +1 -1
  41. package/dist/assets/VisuallyHidden.css +9 -0
  42. package/dist/assets/align-self.css +1 -1
  43. package/dist/assets/color.css +2 -2
  44. package/dist/assets/exp-color.css +2 -2
  45. package/dist/assets/layout-gap.css +21 -3
  46. package/dist/assets/layout-grid.css +3 -3
  47. package/dist/assets/layout-hide.css +1 -1
  48. package/dist/assets/layout-padding.css +75 -3
  49. package/dist/assets/layout-relative.css +1 -1
  50. package/dist/assets/text-accent.css +2 -2
  51. package/dist/assets/text-centered.css +1 -1
  52. package/dist/assets/text-weight.css +2 -2
  53. package/dist/components/BubbleCounter/BubbleCounter.d.ts +41 -0
  54. package/dist/components/BubbleCounter/BubbleCounter.d.ts.map +1 -0
  55. package/dist/components/BubbleCounter/BubbleCounter.js +31 -0
  56. package/dist/components/Chips/Chips.types.d.ts +38 -0
  57. package/dist/components/Chips/Chips.types.d.ts.map +1 -0
  58. package/dist/components/Chips/DismissibleChips.d.ts +48 -0
  59. package/dist/components/Chips/DismissibleChips.d.ts.map +1 -0
  60. package/dist/components/Chips/DismissibleChips.js +92 -0
  61. package/dist/components/Chips/MultiSelectChips.d.ts +45 -0
  62. package/dist/components/Chips/MultiSelectChips.d.ts.map +1 -0
  63. package/dist/components/Chips/MultiSelectChips.js +70 -0
  64. package/dist/components/Chips/SingleSelectChips.d.ts +45 -0
  65. package/dist/components/Chips/SingleSelectChips.d.ts.map +1 -0
  66. package/dist/components/Chips/SingleSelectChips.js +63 -0
  67. package/dist/components/Chips/private/ChipsPrimitive.d.ts +58 -0
  68. package/dist/components/Chips/private/ChipsPrimitive.d.ts.map +1 -0
  69. package/dist/components/Chips/private/ChipsPrimitive.js +17 -0
  70. package/dist/components/CountryFlag/CountryFlag.d.ts +3 -4
  71. package/dist/components/CountryFlag/CountryFlag.d.ts.map +1 -1
  72. package/dist/components/CountryFlag/CountryFlag.js +6 -6
  73. package/dist/components/Divider/Divider.d.ts +9 -0
  74. package/dist/components/Divider/Divider.d.ts.map +1 -0
  75. package/dist/components/Divider/Divider.js +14 -0
  76. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  77. package/dist/components/IconButton/IconButton.js +2 -1
  78. package/dist/components/LayoutFlex/LayoutFlex.js +1 -1
  79. package/dist/components/LayoutFlex/tests/Gap.d.ts +1 -0
  80. package/dist/components/LayoutFlex/tests/Gap.d.ts.map +1 -1
  81. package/dist/components/LayoutFlex/tests/Gap.js +12 -0
  82. package/dist/components/LayoutFlex/tests/Padding.d.ts +1 -0
  83. package/dist/components/LayoutFlex/tests/Padding.d.ts.map +1 -1
  84. package/dist/components/LayoutFlex/tests/Padding.js +12 -0
  85. package/dist/components/Switch/Switch.d.ts +62 -0
  86. package/dist/components/Switch/Switch.d.ts.map +1 -0
  87. package/dist/components/Switch/Switch.js +51 -0
  88. package/dist/components/{Chips → deprecated/Chips}/Chips.d.ts +9 -1
  89. package/dist/components/deprecated/Chips/Chips.d.ts.map +1 -0
  90. package/dist/components/{Chips → deprecated/Chips}/Chips.js +7 -7
  91. package/dist/components/deprecated/index.d.ts +2 -0
  92. package/dist/components/deprecated/index.d.ts.map +1 -0
  93. package/dist/components/deprecated/index.js +4 -0
  94. package/dist/components/index.d.ts +6 -2
  95. package/dist/components/index.d.ts.map +1 -1
  96. package/dist/components/index.js +15 -2
  97. package/dist/components/private/VisuallyHidden/VisuallyHidden.d.ts +23 -0
  98. package/dist/components/private/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
  99. package/dist/components/private/VisuallyHidden/VisuallyHidden.js +15 -0
  100. package/dist/index.js +15 -2
  101. package/dist/{layout-gap.module-B_tyw31T.js → layout-gap.module-RzGBJL6B.js} +6 -0
  102. package/dist/shared-styles/layout-gap/layout-gap.js +1 -1
  103. package/dist/shared-styles/layout-padding/layout-padding.js +24 -0
  104. package/dist/utils/Orientation/OrientationProvider.d.ts +45 -0
  105. package/dist/utils/Orientation/OrientationProvider.d.ts.map +1 -0
  106. package/dist/utils/Orientation/OrientationProvider.js +27 -0
  107. package/dist/utils/Orientation/index.d.ts +2 -0
  108. package/dist/utils/Orientation/index.d.ts.map +1 -0
  109. package/dist/utils/Orientation/index.js +5 -0
  110. package/dist/utils/RovingTabIndex/RovingTabIndexProvider.d.ts +45 -0
  111. package/dist/utils/RovingTabIndex/RovingTabIndexProvider.d.ts.map +1 -0
  112. package/dist/utils/RovingTabIndex/RovingTabIndexProvider.js +48 -0
  113. package/dist/utils/RovingTabIndex/index.d.ts +2 -0
  114. package/dist/utils/RovingTabIndex/index.d.ts.map +1 -0
  115. package/dist/utils/RovingTabIndex/index.js +5 -0
  116. package/dist/utils/createRequiredContext.d.ts +15 -0
  117. package/dist/utils/createRequiredContext.d.ts.map +1 -0
  118. package/dist/utils/createRequiredContext.js +16 -0
  119. package/dist/utils/useControllableState/useControllableState.d.ts +19 -0
  120. package/dist/utils/useControllableState/useControllableState.d.ts.map +1 -0
  121. package/dist/utils/useControllableState/useControllableState.js +27 -0
  122. package/dist/utils/useStableCallback/useStableCallback.d.ts +18 -0
  123. package/dist/utils/useStableCallback/useStableCallback.d.ts.map +1 -0
  124. package/dist/utils/useStableCallback/useStableCallback.js +15 -0
  125. package/package.json +14 -13
  126. package/dist/components/Chips/Chips.d.ts.map +0 -1
  127. package/dist/components/CountryFlag/types.d.ts +0 -3
  128. package/dist/components/CountryFlag/types.d.ts.map +0 -1
  129. package/dist/components/CountryFlag/utils/countries.d.ts +0 -276
  130. package/dist/components/CountryFlag/utils/countries.d.ts.map +0 -1
  131. package/dist/components/CountryFlag/utils/countries.js +0 -275
  132. package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts +0 -7
  133. package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts.map +0 -1
  134. package/dist/components/CountryFlag/utils/getCountryFlagUrl.js +0 -14
  135. /package/dist/components/{CountryFlag/types.js → Chips/Chips.types.js} +0 -0
@@ -0,0 +1,45 @@
1
+ import { default as React, FocusEventHandler, ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode | ReactNode[];
4
+ };
5
+ /**
6
+ * Provider that manages tabIndex values for the roving tab index pattern.
7
+ * Only one element in the group has tabIndex={0}, others have tabIndex={-1}.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * function Toolbar() {
12
+ * return (
13
+ * <RovingTabIndexProvider>
14
+ * <ToolbarButton>Cut</ToolbarButton>
15
+ * <ToolbarButton>Copy</ToolbarButton>
16
+ * </RovingTabIndexProvider>
17
+ * );
18
+ * }
19
+ * ```
20
+ */
21
+ export declare function RovingTabIndexProvider({ children }: Props): React.JSX.Element;
22
+ /**
23
+ * Hook that provides tabIndex management for individual elements in a roving tab index group.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * function ToolbarButton({ children, onFocus }) {
28
+ * const { ref, onFocus, tabIndex } = useRovingTabIndex({ onFocus });
29
+ * return (
30
+ * <button ref={ref} onFocus={onFocus} tabIndex={tabIndex}>
31
+ * {children}
32
+ * </button>
33
+ * );
34
+ * }
35
+ * ```
36
+ */
37
+ export declare function useRovingTabIndex<E extends HTMLElement = HTMLElement>({ onFocus, }?: {
38
+ onFocus?: FocusEventHandler<E>;
39
+ }): {
40
+ ref: React.RefObject<E>;
41
+ onFocus: React.FocusEventHandler<E>;
42
+ tabIndex: number;
43
+ };
44
+ export {};
45
+ //# sourceMappingURL=RovingTabIndexProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RovingTabIndexProvider.d.ts","sourceRoot":"","sources":["../../../src/utils/RovingTabIndex/RovingTabIndexProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAGV,iBAAiB,EACjB,SAAS,EAMZ,MAAM,OAAO,CAAC;AAYf,KAAK,KAAK,GAAG;IACT,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACrC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,qBAIzD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,EACnE,OAAO,GACV,GAAE;IAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAO;;;;EAwBzC"}
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useRef, useEffect, useState } from "react";
4
+ const ctx = createContext({
5
+ lastFocused: null,
6
+ setLastFocused: () => {
7
+ }
8
+ });
9
+ function RovingTabIndexProvider({
10
+ children
11
+ }) {
12
+ const [lastFocused, setLastFocused] = useState(null);
13
+ return /* @__PURE__ */ jsx(ctx.Provider, { value: {
14
+ lastFocused,
15
+ setLastFocused
16
+ }, children });
17
+ }
18
+ function useRovingTabIndex({
19
+ onFocus
20
+ } = {}) {
21
+ const {
22
+ lastFocused,
23
+ setLastFocused
24
+ } = useContext(ctx);
25
+ const ref = useRef(null);
26
+ useEffect(() => {
27
+ const self = ref.current;
28
+ return () => {
29
+ setLastFocused((element) => {
30
+ if (element === self) return null;
31
+ return element;
32
+ });
33
+ };
34
+ }, [setLastFocused]);
35
+ const handleFocus = (e) => {
36
+ setLastFocused(e.target);
37
+ onFocus == null ? void 0 : onFocus(e);
38
+ };
39
+ return {
40
+ ref,
41
+ onFocus: handleFocus,
42
+ tabIndex: lastFocused && lastFocused !== ref.current ? -1 : 0
43
+ };
44
+ }
45
+ export {
46
+ RovingTabIndexProvider,
47
+ useRovingTabIndex
48
+ };
@@ -0,0 +1,2 @@
1
+ export * from './RovingTabIndexProvider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/RovingTabIndex/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { RovingTabIndexProvider, useRovingTabIndex } from "./RovingTabIndexProvider.js";
2
+ export {
3
+ RovingTabIndexProvider,
4
+ useRovingTabIndex
5
+ };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Creates a required context and a hook to access it.
4
+ *
5
+ * @example
6
+ * const [Provider, useRequiredContext] = createRequiredContext<Ctx>('MyContext');
7
+ *
8
+ * <Provider value={value}>
9
+ * <Component />
10
+ * </Provider>
11
+ *
12
+ * const value = useRequiredContext();
13
+ */
14
+ export declare function createRequiredContext<T>(name: string): readonly [import('react').Provider<T | null>, () => NonNullable<T>];
15
+ //# sourceMappingURL=createRequiredContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRequiredContext.d.ts","sourceRoot":"","sources":["../../src/utils/createRequiredContext.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,uEAapD"}
@@ -0,0 +1,16 @@
1
+ import { createContext, useContext } from "react";
2
+ function createRequiredContext(name) {
3
+ const context = createContext(null);
4
+ context.displayName = `${name}.Provider`;
5
+ const useRequiredContext = () => {
6
+ const value = useContext(context);
7
+ if (!value) {
8
+ throw new Error(`${name} context must be used within its Provider`);
9
+ }
10
+ return value;
11
+ };
12
+ return [context.Provider, useRequiredContext];
13
+ }
14
+ export {
15
+ createRequiredContext
16
+ };
@@ -0,0 +1,19 @@
1
+ type Props<T> = {
2
+ value?: T;
3
+ defaultValue?: T;
4
+ onValueChange?: (value: T) => void;
5
+ };
6
+ /**
7
+ * A hook that manages state that can be either controlled or uncontrolled.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * function MyInput(props) {
12
+ * const [value, setValue] = useControllableState(props);
13
+ * return <input value={value} onChange={(e) => setValue(e.target.value)} />;
14
+ * }
15
+ * ```
16
+ */
17
+ export declare function useControllableState<T>({ value, defaultValue, onValueChange }: Props<T>): readonly [T, (value: T) => void];
18
+ export {};
19
+ //# sourceMappingURL=useControllableState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../../src/utils/useControllableState/useControllableState.ts"],"names":[],"mappings":"AAGA,KAAK,KAAK,CAAC,CAAC,IAAI;IACZ,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,wBAYxE,CAAC,WAYhB"}
@@ -0,0 +1,27 @@
1
+ import { useState, useEffect, useCallback } from "react";
2
+ import { useStableCallback } from "../useStableCallback/useStableCallback.js";
3
+ function useControllableState({
4
+ value,
5
+ defaultValue,
6
+ onValueChange
7
+ }) {
8
+ const isControlled = value !== void 0;
9
+ const [internalValue, setInternalValue] = useState(isControlled ? value : defaultValue);
10
+ useEffect(() => {
11
+ if (isControlled && value !== internalValue) {
12
+ setInternalValue(value);
13
+ }
14
+ }, [isControlled, value, internalValue]);
15
+ const onValueChangeStable = useStableCallback(onValueChange);
16
+ const handleValueChange = useCallback((value2) => {
17
+ if (!isControlled) {
18
+ setInternalValue(value2);
19
+ }
20
+ onValueChangeStable(value2);
21
+ }, [isControlled, onValueChangeStable]);
22
+ const currentValue = isControlled ? value : internalValue;
23
+ return [currentValue, handleValueChange];
24
+ }
25
+ export {
26
+ useControllableState
27
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A custom React hook that provides a stable reference to a callback function.
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * function ParentComponent() {
7
+ * const [count, setCount] = useState(0);
8
+ *
9
+ * const handleClick = useStableCallback(() => {
10
+ * console.log('Current count:', count);
11
+ * });
12
+ *
13
+ * return <ChildComponent onClick={handleClick} />;
14
+ * }
15
+ * ```
16
+ */
17
+ export declare function useStableCallback<T extends (...args: any[]) => any>(callback?: T): T;
18
+ //# sourceMappingURL=useStableCallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStableCallback.d.ts","sourceRoot":"","sources":["../../../src/utils/useStableCallback/useStableCallback.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,KAShF"}
@@ -0,0 +1,15 @@
1
+ import { useRef, useEffect, useCallback } from "react";
2
+ function useStableCallback(callback) {
3
+ const ref = useRef(callback);
4
+ useEffect(() => {
5
+ ref.current = callback;
6
+ }, [callback]);
7
+ const stableCallback = useCallback((...args) => {
8
+ var _a;
9
+ return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
10
+ }, []);
11
+ return stableCallback;
12
+ }
13
+ export {
14
+ useStableCallback
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preply/ds-web-lib",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,26 +32,27 @@
32
32
  "@radix-ui/react-slider": "^1.1.2",
33
33
  "@radix-ui/react-slot": "^1.1.2",
34
34
  "@radix-ui/react-tooltip": "^1.1.8",
35
+ "@react-aria/focus": "^3.21.0",
35
36
  "react-is": "^18.2.0",
36
37
  "sonner": "^1.7.4"
37
38
  },
38
39
  "peerDependencies": {
39
- "@preply/ds-core": "3.5.1",
40
- "@preply/ds-media-icons": "3.5.1",
41
- "@preply/ds-visual-coverage-preply-component-names": "3.5.1",
42
- "@preply/ds-web-core": "3.5.1",
43
- "@preply/ds-web-root": "3.5.1",
40
+ "@preply/ds-core": "3.6.0",
41
+ "@preply/ds-media-icons": "3.6.0",
42
+ "@preply/ds-visual-coverage-preply-component-names": "3.6.0",
43
+ "@preply/ds-web-core": "3.6.0",
44
+ "@preply/ds-web-root": "3.6.0",
44
45
  "react": "^16 || ^18",
45
46
  "react-dom": "^16 || ^18",
46
47
  "react-intl": "^6.5.5"
47
48
  },
48
49
  "devDependencies": {
49
- "@preply/ds-core": "3.5.1",
50
- "@preply/ds-docs-toolkit": "3.5.1",
51
- "@preply/ds-media-icons": "3.5.1",
52
- "@preply/ds-visual-coverage-preply-component-names": "3.5.1",
53
- "@preply/ds-web-core": "3.5.1",
54
- "@preply/ds-web-root": "3.5.1",
50
+ "@preply/ds-core": "3.6.0",
51
+ "@preply/ds-docs-toolkit": "3.6.0",
52
+ "@preply/ds-media-icons": "3.6.0",
53
+ "@preply/ds-visual-coverage-preply-component-names": "3.6.0",
54
+ "@preply/ds-web-core": "3.6.0",
55
+ "@preply/ds-web-root": "3.6.0",
55
56
  "@storybook/react": "8.5.8",
56
57
  "@testing-library/react": "16.2.0",
57
58
  "@types/react-is": "^18.2.0",
@@ -67,5 +68,5 @@
67
68
  "vite-plugin-svgr": "4.3.0",
68
69
  "vitest-browser-react": "^0.1.1"
69
70
  },
70
- "gitHead": "73217c651b724a6d54ef81bfe4f6470a7371e25f"
71
+ "gitHead": "69141be9a43742a53b52afe14de1620b3a6b43e0"
71
72
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chips.d.ts","sourceRoot":"","sources":["../../../src/components/Chips/Chips.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAmB,MAAM,qBAAqB,CAAC;AAC7E,OAAc,EAAE,EAAE,EAAc,yBAAyB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAUnG,MAAM,MAAM,UAAU,GAAG;IACrB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,yBAAyB,CAAC,cAAc,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;CAClF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,kBAgBpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { countryNames } from './utils/countries';
2
- export type CountryCode = keyof typeof countryNames;
3
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CountryFlag/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -1,276 +0,0 @@
1
- /**
2
- * The following country list come from {@link https://github.com/lipis/flag-icons/blob/main/country.json.|the flag-icons library}.
3
- */
4
- export declare const countryNames: {
5
- af: string;
6
- ax: string;
7
- al: string;
8
- dz: string;
9
- as: string;
10
- ad: string;
11
- ao: string;
12
- ai: string;
13
- aq: string;
14
- ag: string;
15
- ar: string;
16
- am: string;
17
- aw: string;
18
- 'sh-ac': string;
19
- asean: string;
20
- au: string;
21
- at: string;
22
- az: string;
23
- bs: string;
24
- bh: string;
25
- bd: string;
26
- bb: string;
27
- 'es-pv': string;
28
- by: string;
29
- be: string;
30
- bz: string;
31
- bj: string;
32
- bm: string;
33
- bt: string;
34
- bo: string;
35
- bq: string;
36
- ba: string;
37
- bw: string;
38
- bv: string;
39
- br: string;
40
- io: string;
41
- bn: string;
42
- bg: string;
43
- bf: string;
44
- bi: string;
45
- cv: string;
46
- kh: string;
47
- cm: string;
48
- ca: string;
49
- ic: string;
50
- 'es-ct': string;
51
- ky: string;
52
- cf: string;
53
- cefta: string;
54
- td: string;
55
- cl: string;
56
- cn: string;
57
- cx: string;
58
- cp: string;
59
- cc: string;
60
- co: string;
61
- km: string;
62
- ck: string;
63
- cr: string;
64
- hr: string;
65
- cu: string;
66
- cw: string;
67
- cy: string;
68
- cz: string;
69
- ci: string;
70
- cd: string;
71
- dk: string;
72
- dg: string;
73
- dj: string;
74
- dm: string;
75
- do: string;
76
- eac: string;
77
- ec: string;
78
- eg: string;
79
- sv: string;
80
- 'gb-eng': string;
81
- gq: string;
82
- er: string;
83
- ee: string;
84
- sz: string;
85
- et: string;
86
- eu: string;
87
- fk: string;
88
- fo: string;
89
- fm: string;
90
- fj: string;
91
- fi: string;
92
- fr: string;
93
- gf: string;
94
- pf: string;
95
- tf: string;
96
- ga: string;
97
- 'es-ga': string;
98
- gm: string;
99
- ge: string;
100
- de: string;
101
- gh: string;
102
- gi: string;
103
- gr: string;
104
- gl: string;
105
- gd: string;
106
- gp: string;
107
- gu: string;
108
- gt: string;
109
- gg: string;
110
- gn: string;
111
- gw: string;
112
- gy: string;
113
- ht: string;
114
- hm: string;
115
- va: string;
116
- hn: string;
117
- hk: string;
118
- hu: string;
119
- is: string;
120
- in: string;
121
- id: string;
122
- ir: string;
123
- iq: string;
124
- ie: string;
125
- im: string;
126
- il: string;
127
- it: string;
128
- jm: string;
129
- jp: string;
130
- je: string;
131
- jo: string;
132
- kz: string;
133
- ke: string;
134
- ki: string;
135
- xk: string;
136
- kw: string;
137
- kg: string;
138
- la: string;
139
- lv: string;
140
- arab: string;
141
- lb: string;
142
- ls: string;
143
- lr: string;
144
- ly: string;
145
- li: string;
146
- lt: string;
147
- lu: string;
148
- mo: string;
149
- mg: string;
150
- mw: string;
151
- my: string;
152
- mv: string;
153
- ml: string;
154
- mt: string;
155
- mh: string;
156
- mq: string;
157
- mr: string;
158
- mu: string;
159
- yt: string;
160
- mx: string;
161
- md: string;
162
- mc: string;
163
- mn: string;
164
- me: string;
165
- ms: string;
166
- ma: string;
167
- mz: string;
168
- mm: string;
169
- na: string;
170
- nr: string;
171
- np: string;
172
- nl: string;
173
- nc: string;
174
- nz: string;
175
- ni: string;
176
- ne: string;
177
- ng: string;
178
- nu: string;
179
- nf: string;
180
- kp: string;
181
- mk: string;
182
- 'gb-nir': string;
183
- mp: string;
184
- no: string;
185
- om: string;
186
- pc: string;
187
- pk: string;
188
- pw: string;
189
- pa: string;
190
- pg: string;
191
- py: string;
192
- pe: string;
193
- ph: string;
194
- pn: string;
195
- pl: string;
196
- pt: string;
197
- pr: string;
198
- qa: string;
199
- cg: string;
200
- ro: string;
201
- ru: string;
202
- rw: string;
203
- re: string;
204
- bl: string;
205
- 'sh-hl': string;
206
- sh: string;
207
- kn: string;
208
- lc: string;
209
- mf: string;
210
- pm: string;
211
- vc: string;
212
- ws: string;
213
- sm: string;
214
- st: string;
215
- sa: string;
216
- 'gb-sct': string;
217
- sn: string;
218
- rs: string;
219
- sc: string;
220
- sl: string;
221
- sg: string;
222
- sx: string;
223
- sk: string;
224
- si: string;
225
- sb: string;
226
- so: string;
227
- za: string;
228
- gs: string;
229
- kr: string;
230
- ss: string;
231
- es: string;
232
- lk: string;
233
- ps: string;
234
- sd: string;
235
- sr: string;
236
- sj: string;
237
- se: string;
238
- ch: string;
239
- sy: string;
240
- tw: string;
241
- tj: string;
242
- tz: string;
243
- th: string;
244
- tl: string;
245
- tg: string;
246
- tk: string;
247
- to: string;
248
- tt: string;
249
- 'sh-ta': string;
250
- tn: string;
251
- tm: string;
252
- tc: string;
253
- tv: string;
254
- tr: string;
255
- ug: string;
256
- ua: string;
257
- ae: string;
258
- gb: string;
259
- un: string;
260
- um: string;
261
- us: string;
262
- uy: string;
263
- uz: string;
264
- vu: string;
265
- ve: string;
266
- vn: string;
267
- vg: string;
268
- vi: string;
269
- 'gb-wls': string;
270
- wf: string;
271
- eh: string;
272
- ye: string;
273
- zm: string;
274
- zw: string;
275
- };
276
- //# sourceMappingURL=countries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryFlag/utils/countries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+QxB,CAAC"}