@radix-ui/react-direction 1.1.5 → 1.2.0-rc.1791406924474
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ declare const Direction: {
|
|
|
6
6
|
};
|
|
7
7
|
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
8
8
|
interface DirectionProviderProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
10
10
|
dir: Direction;
|
|
11
11
|
}
|
|
12
12
|
declare const DirectionProvider: React.FC<DirectionProviderProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const Direction: {
|
|
|
6
6
|
};
|
|
7
7
|
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
8
8
|
interface DirectionProviderProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
10
10
|
dir: Direction;
|
|
11
11
|
}
|
|
12
12
|
declare const DirectionProvider: React.FC<DirectionProviderProps>;
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/direction.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n} from './direction';\n", "import * as React from 'react';\n\nconst Direction = {\n LTR: 'ltr',\n RTL: 'rtl',\n} as const;\n\ntype Direction = (typeof Direction)[keyof typeof Direction];\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || Direction.LTR;\n}\n\nexport {\n useDirection,\n //\n DirectionProvider as Provider,\n //\n DirectionProvider,\n};\n"],
|
|
4
|
+
"sourcesContent": ["'use client';\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n} from './direction';\n", "import * as React from 'react';\n\nconst Direction = {\n LTR: 'ltr',\n RTL: 'rtl',\n} as const;\n\ntype Direction = (typeof Direction)[keyof typeof Direction];\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode | undefined;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || Direction.LTR;\n}\n\nexport {\n useDirection,\n //\n DirectionProvider as Provider,\n //\n DirectionProvider,\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAqBd;AAnBT,IAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,KAAK;AACP;AAIA,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,wBAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,4CAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D,GAH4D;AAO5D,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa,UAAU;AAC5C;AAHS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/direction.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\n\nconst Direction = {\n LTR: 'ltr',\n RTL: 'rtl',\n} as const;\n\ntype Direction = (typeof Direction)[keyof typeof Direction];\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || Direction.LTR;\n}\n\nexport {\n useDirection,\n //\n DirectionProvider as Provider,\n //\n DirectionProvider,\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\nconst Direction = {\n LTR: 'ltr',\n RTL: 'rtl',\n} as const;\n\ntype Direction = (typeof Direction)[keyof typeof Direction];\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode | undefined;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || Direction.LTR;\n}\n\nexport {\n useDirection,\n //\n DirectionProvider as Provider,\n //\n DirectionProvider,\n};\n"],
|
|
5
5
|
"mappings": ";;;;;AAAA,YAAY,WAAW;AAqBd;AAnBT,IAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,KAAK;AACP;AAIA,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,wBAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D,GAH4D;AAO5D,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa,UAAU;AAC5C;AAHS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|