@remember-web/primitive 0.2.0 → 0.2.3
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/src/Badge/style.cjs.js +1 -1
- package/dist/src/Badge/style.cjs.js.map +1 -1
- package/dist/src/Badge/style.esm.js +1 -1
- package/dist/src/Badge/style.esm.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.cjs.js +8 -1
- package/dist/src/Floating/DropdownMenu/index.cjs.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.d.ts.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.esm.js +9 -2
- package/dist/src/Floating/DropdownMenu/index.esm.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.cjs.js +8 -3
- package/dist/src/Floating/DropdownMenu/styles.cjs.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.d.ts +4 -0
- package/dist/src/Floating/DropdownMenu/styles.d.ts.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.esm.js +8 -4
- package/dist/src/Floating/DropdownMenu/styles.esm.js.map +1 -1
- package/dist/src/Floating/Popover/index.cjs.js +8 -1
- package/dist/src/Floating/Popover/index.cjs.js.map +1 -1
- package/dist/src/Floating/Popover/index.d.ts.map +1 -1
- package/dist/src/Floating/Popover/index.esm.js +9 -2
- package/dist/src/Floating/Popover/index.esm.js.map +1 -1
- package/dist/src/Floating/Popover/styles.cjs.js +7 -2
- package/dist/src/Floating/Popover/styles.cjs.js.map +1 -1
- package/dist/src/Floating/Popover/styles.d.ts +7 -3
- package/dist/src/Floating/Popover/styles.d.ts.map +1 -1
- package/dist/src/Floating/Popover/styles.esm.js +8 -4
- package/dist/src/Floating/Popover/styles.esm.js.map +1 -1
- package/dist/src/Floating/Tooltip/index.cjs.js +29 -27
- package/dist/src/Floating/Tooltip/index.cjs.js.map +1 -1
- package/dist/src/Floating/Tooltip/index.d.ts.map +1 -1
- package/dist/src/Floating/Tooltip/index.esm.js +30 -28
- package/dist/src/Floating/Tooltip/index.esm.js.map +1 -1
- package/dist/src/Floating/Tooltip/styles.cjs.js +14 -10
- package/dist/src/Floating/Tooltip/styles.cjs.js.map +1 -1
- package/dist/src/Floating/Tooltip/styles.d.ts +4 -2
- package/dist/src/Floating/Tooltip/styles.d.ts.map +1 -1
- package/dist/src/Floating/Tooltip/styles.esm.js +14 -11
- package/dist/src/Floating/Tooltip/styles.esm.js.map +1 -1
- package/dist/src/index.cjs.js +2 -0
- package/dist/src/index.cjs.js.map +1 -1
- package/dist/src/index.esm.js +2 -2
- package/package.json +2 -2
- package/src/Badge/style.tsx +1 -1
- package/src/Common/Typography/Typography.stories.tsx +1 -1
- package/src/Floating/DropdownMenu/index.tsx +7 -2
- package/src/Floating/DropdownMenu/styles.tsx +8 -1
- package/src/Floating/Popover/index.tsx +7 -3
- package/src/Floating/Popover/styles.ts +9 -2
- package/src/Floating/Tooltip/Tooltip.stories.tsx +4 -1
- package/src/Floating/Tooltip/index.tsx +39 -38
- package/src/Floating/Tooltip/styles.ts +7 -4
|
@@ -14,7 +14,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
14
14
|
/**
|
|
15
15
|
* pseudo로 사용시 data-badge-value attribue가 필요합니다.
|
|
16
16
|
*/
|
|
17
|
-
var badgeCss = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n
|
|
17
|
+
var badgeCss = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n ", "\n\n display: inline-block;\n box-sizing: border-box;\n line-height: 16px;\n min-height: 8px;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n padding: 1px 4px 0 4px;\n"])), mixin.getTypographyStyles('Subtitle2'), mixin.secondary100, mixin.contents999);
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @param pseudo - default: 'after'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.cjs.js","sources":["../../../src/Badge/style.tsx"],"sourcesContent":["import {\n contents999,\n getTypographyStyles,\n secondary100,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\n/**\n * pseudo로 사용시 data-badge-value attribue가 필요합니다.\n */\nexport const badgeCss = css`\n
|
|
1
|
+
{"version":3,"file":"style.cjs.js","sources":["../../../src/Badge/style.tsx"],"sourcesContent":["import {\n contents999,\n getTypographyStyles,\n secondary100,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\n/**\n * pseudo로 사용시 data-badge-value attribue가 필요합니다.\n */\nexport const badgeCss = css`\n ${getTypographyStyles('Subtitle2')}\n\n display: inline-block;\n box-sizing: border-box;\n line-height: 16px;\n min-height: 8px;\n background: ${secondary100};\n color: ${contents999};\n border-radius: 8px;\n padding: 1px 4px 0 4px;\n`;\n\n/**\n * @param pseudo - default: 'after'\n * @param top - default: 0\n * @param right - default: 0\n */\nexport const getBadgePseudoCss = (\n pseudo: 'after' | 'before' = 'after',\n { top = 0, right = 0 } = {}\n) => css`\n &[data-badge-value]::${pseudo} {\n ${badgeCss};\n content: attr(data-badge-value);\n position: absolute;\n top: ${top};\n right: ${right};\n transform: translate(50%, -50%);\n }\n`;\n\nexport const StyledBadge = styled.span`\n ${badgeCss};\n`;\n"],"names":["badgeCss","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","secondary100","contents999","getBadgePseudoCss","pseudo","arguments","length","undefined","_ref","_ref$top","top","_ref$right","right","_templateObject2","StyledBadge","styled","span","_templateObject3"],"mappings":";;;;;;;;;;;;;AAOA;AACA;AACA;IACaA,QAAQ,GAAGC,UAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,uCAAA,CACxBC,CAAAA,KAAAA,EAAAA,mHAAAA,EAAAA,cAAAA,EAAAA,uDAAAA,CAAAA,CAAAA,CAAAA,EAAAA,yBAAmB,CAAC,WAAW,CAAC,EAMnBC,kBAAY,EACjBC,iBAAW,EAGrB;;AAED;AACA;AACA;AACA;AACA;AACaC,IAAAA,iBAAiB,GAAG,SAApBA,iBAAiBA,GAAA;AAAA,EAAA,IAC5BC,MAA0B,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,OAAO,CAAA;AAAA,EAAA,IAAAG,IAAA,GAAAH,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GACX,EAAE;IAAAI,QAAA,GAAAD,IAAA,CAAzBE,GAAG;AAAHA,IAAAA,GAAG,GAAAD,QAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,QAAA;IAAAE,UAAA,GAAAH,IAAA,CAAEI,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,UAAA,CAAA;AAAA,EAAA,OACjBd,UAAG,CAAAgB,gBAAA,KAAAA,gBAAA,GAAAd,uCAAA,CACiBK,CAAAA,2BAAAA,EAAAA,UAAAA,EAAAA,6EAAAA,EAAAA,gBAAAA,EAAAA,gDAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAM,EACzBR,QAAQ,EAGHc,GAAG,EACDE,KAAK,CAAA,CAAA;AAAA,EAGjB;AAEYE,IAAAA,WAAW,GAAGC,uBAAM,CAACC,IAAI,CAAAC,gBAAA,KAAAA,gBAAA,GAAAlB,uCAAA,CAAA,CAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA,EAClCH,QAAQ;;;;;;"}
|
|
@@ -7,7 +7,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
7
7
|
/**
|
|
8
8
|
* pseudo로 사용시 data-badge-value attribue가 필요합니다.
|
|
9
9
|
*/
|
|
10
|
-
var badgeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
10
|
+
var badgeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n display: inline-block;\n box-sizing: border-box;\n line-height: 16px;\n min-height: 8px;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n padding: 1px 4px 0 4px;\n"])), getTypographyStyles('Subtitle2'), secondary100, contents999);
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @param pseudo - default: 'after'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.esm.js","sources":["../../../src/Badge/style.tsx"],"sourcesContent":["import {\n contents999,\n getTypographyStyles,\n secondary100,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\n/**\n * pseudo로 사용시 data-badge-value attribue가 필요합니다.\n */\nexport const badgeCss = css`\n
|
|
1
|
+
{"version":3,"file":"style.esm.js","sources":["../../../src/Badge/style.tsx"],"sourcesContent":["import {\n contents999,\n getTypographyStyles,\n secondary100,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\n/**\n * pseudo로 사용시 data-badge-value attribue가 필요합니다.\n */\nexport const badgeCss = css`\n ${getTypographyStyles('Subtitle2')}\n\n display: inline-block;\n box-sizing: border-box;\n line-height: 16px;\n min-height: 8px;\n background: ${secondary100};\n color: ${contents999};\n border-radius: 8px;\n padding: 1px 4px 0 4px;\n`;\n\n/**\n * @param pseudo - default: 'after'\n * @param top - default: 0\n * @param right - default: 0\n */\nexport const getBadgePseudoCss = (\n pseudo: 'after' | 'before' = 'after',\n { top = 0, right = 0 } = {}\n) => css`\n &[data-badge-value]::${pseudo} {\n ${badgeCss};\n content: attr(data-badge-value);\n position: absolute;\n top: ${top};\n right: ${right};\n transform: translate(50%, -50%);\n }\n`;\n\nexport const StyledBadge = styled.span`\n ${badgeCss};\n`;\n"],"names":["badgeCss","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","secondary100","contents999","getBadgePseudoCss","pseudo","arguments","length","undefined","_ref","_ref$top","top","_ref$right","right","_templateObject2","StyledBadge","styled","span","_templateObject3"],"mappings":";;;;;;AAOA;AACA;AACA;IACaA,QAAQ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AClCH,QAAQ;;;;"}
|
|
@@ -41,13 +41,20 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
41
41
|
*/
|
|
42
42
|
var DropdownMenu = Object.assign(RadixPopover__namespace.Root.bind(null), {
|
|
43
43
|
Content: function Content(_ref) {
|
|
44
|
+
var _props$style, _props$style2;
|
|
44
45
|
var _ref$isInsideCloseabl = _ref.isInsideCloseable,
|
|
45
46
|
isInsideCloseable = _ref$isInsideCloseabl === void 0 ? false : _ref$isInsideCloseabl,
|
|
46
47
|
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
47
48
|
return isInsideCloseable ? /*#__PURE__*/jsxRuntime.jsx(RadixPopover__namespace.Close, {
|
|
48
49
|
asChild: true,
|
|
50
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledDropdownMenuContentWrapper, {
|
|
51
|
+
$zIndex: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex,
|
|
52
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledDropdownMenuContent, _objectSpread({}, props))
|
|
53
|
+
})
|
|
54
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(styles.StyledDropdownMenuContentWrapper, {
|
|
55
|
+
$zIndex: (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.zIndex,
|
|
49
56
|
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledDropdownMenuContent, _objectSpread({}, props))
|
|
50
|
-
})
|
|
57
|
+
});
|
|
51
58
|
},
|
|
52
59
|
Arrow: index.Arrow,
|
|
53
60
|
Trigger: index.Trigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport {\n StyledDropdownMenuContent,\n StyledDropdownMenuItem,\n} from '@/Floating/DropdownMenu/styles';\nimport type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';\nimport Popover from '@/Floating/Popover';\n\nimport { DropdownMenuSection } from './DropdownMenuSection';\n\nexport interface DropdownContentProps extends PopoverContentProps {}\nexport interface DropdownMenuProps extends PopoverProps {}\n/**\n * Popover에 DropdownMenu Parts들을 추가한 컴포넌트\n * @see Popover\n */\nconst DropdownMenu = Object.assign(RadixPopover.Root.bind(null), {\n Content: ({ isInsideCloseable = false, ...props }: DropdownContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledDropdownMenuContent {...props} />\n </RadixPopover.Close>\n ) : (\n <StyledDropdownMenuContent {...props} />\n ),\n Arrow: Popover.Arrow,\n Trigger: Popover.Trigger,\n Portal: Popover.Portal,\n Anchor: Popover.Anchor,\n Close: Popover.Close,\n Section: DropdownMenuSection,\n Item: StyledDropdownMenuItem,\n});\n\nexport default DropdownMenu;\n"],"names":["DropdownMenu","Object","assign","RadixPopover","Root","bind","Content","_ref","_ref$isInsideCloseabl","isInsideCloseable","props","_objectWithoutProperties","_excluded","_jsx","Close","asChild","children","StyledDropdownMenuContent","_objectSpread","Arrow","Popover","Trigger","Portal","Anchor","Section","DropdownMenuSection","Item","StyledDropdownMenuItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport {\n StyledDropdownMenuContent,\n StyledDropdownMenuContentWrapper,\n StyledDropdownMenuItem,\n} from '@/Floating/DropdownMenu/styles';\nimport type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';\nimport Popover from '@/Floating/Popover';\n\nimport { DropdownMenuSection } from './DropdownMenuSection';\n\nexport interface DropdownContentProps extends PopoverContentProps {}\nexport interface DropdownMenuProps extends PopoverProps {}\n/**\n * Popover에 DropdownMenu Parts들을 추가한 컴포넌트\n * @see Popover\n */\nconst DropdownMenu = Object.assign(RadixPopover.Root.bind(null), {\n Content: ({ isInsideCloseable = false, ...props }: DropdownContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledDropdownMenuContentWrapper $zIndex={props.style?.zIndex}>\n <StyledDropdownMenuContent {...props} />\n </StyledDropdownMenuContentWrapper>\n </RadixPopover.Close>\n ) : (\n <StyledDropdownMenuContentWrapper $zIndex={props.style?.zIndex}>\n <StyledDropdownMenuContent {...props} />\n </StyledDropdownMenuContentWrapper>\n ),\n Arrow: Popover.Arrow,\n Trigger: Popover.Trigger,\n Portal: Popover.Portal,\n Anchor: Popover.Anchor,\n Close: Popover.Close,\n Section: DropdownMenuSection,\n Item: StyledDropdownMenuItem,\n});\n\nexport default DropdownMenu;\n"],"names":["DropdownMenu","Object","assign","RadixPopover","Root","bind","Content","_ref","_props$style","_props$style2","_ref$isInsideCloseabl","isInsideCloseable","props","_objectWithoutProperties","_excluded","_jsx","Close","asChild","children","StyledDropdownMenuContentWrapper","$zIndex","style","zIndex","StyledDropdownMenuContent","_objectSpread","Arrow","Popover","Trigger","Portal","Anchor","Section","DropdownMenuSection","Item","StyledDropdownMenuItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA,IAAMA,YAAY,GAAGC,MAAM,CAACC,MAAM,CAACC,uBAAY,CAACC,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC,EAAE;EAC/DC,OAAO,EAAE,SAAAA,OAAAA,CAAAC,IAAA,EAAA;IAAA,IAAAC,YAAA,EAAAC,aAAA,CAAA;AAAA,IAAA,IAAAC,qBAAA,GAAAH,IAAA,CAAGI,iBAAiB;AAAjBA,MAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;AAAKE,MAAAA,KAAK,GAAAC,yCAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AAAA,IAAA,OAC7CH,iBAAiB,gBACfI,cAAA,CAACZ,uBAAY,CAACa,KAAK,EAAA;MAACC,OAAO,EAAA,IAAA;MAAAC,QAAA,eACzBH,cAAA,CAACI,uCAAgC,EAAA;QAACC,OAAO,EAAA,CAAAZ,YAAA,GAAEI,KAAK,CAACS,KAAK,MAAA,IAAA,IAAAb,YAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,YAAA,CAAac,MAAO;QAAAJ,QAAA,eAC7DH,cAAA,CAACQ,gCAAyB,EAAAC,aAAA,CAAA,EAAA,EAAKZ,KAAK,CAAG,CAAA;OACP,CAAA;AAAC,KACjB,CAAC,gBAErBG,cAAA,CAACI,uCAAgC,EAAA;MAACC,OAAO,EAAA,CAAAX,aAAA,GAAEG,KAAK,CAACS,KAAK,MAAA,IAAA,IAAAZ,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,aAAA,CAAaa,MAAO;MAAAJ,QAAA,eAC7DH,cAAA,CAACQ,gCAAyB,EAAAC,aAAA,CAAA,EAAA,EAAKZ,KAAK,CAAG,CAAA;AAAC,KACR,CACnC,CAAA;AAAA,GAAA;EACHa,KAAK,EAAEC,KAAO,CAACD,KAAK;EACpBE,OAAO,EAAED,KAAO,CAACC,OAAO;EACxBC,MAAM,EAAEF,KAAO,CAACE,MAAM;EACtBC,MAAM,EAAEH,KAAO,CAACG,MAAM;EACtBb,KAAK,EAAEU,KAAO,CAACV,KAAK;AACpBc,EAAAA,OAAO,EAAEC,uCAAmB;AAC5BC,EAAAA,IAAI,EAAEC,6BAAAA;AACR,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AAOxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAK5E,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;CAAG;AACpE,MAAM,WAAW,iBAAkB,SAAQ,YAAY;CAAG;AAC1D;;;GAGG;AACH,QAAA,MAAM,YAAY;+CACmC,oBAAoB;;;;;;;;;;;;CAmBvE,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
4
|
-
import { StyledDropdownMenuContent, StyledDropdownMenuItem } from './styles.esm.js';
|
|
4
|
+
import { StyledDropdownMenuContentWrapper, StyledDropdownMenuContent, StyledDropdownMenuItem } from './styles.esm.js';
|
|
5
5
|
import Popover from '../Popover/index.esm.js';
|
|
6
6
|
import { DropdownMenuSection } from './DropdownMenuSection.esm.js';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -15,13 +15,20 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
15
15
|
*/
|
|
16
16
|
var DropdownMenu = Object.assign(RadixPopover.Root.bind(null), {
|
|
17
17
|
Content: function Content(_ref) {
|
|
18
|
+
var _props$style, _props$style2;
|
|
18
19
|
var _ref$isInsideCloseabl = _ref.isInsideCloseable,
|
|
19
20
|
isInsideCloseable = _ref$isInsideCloseabl === void 0 ? false : _ref$isInsideCloseabl,
|
|
20
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
22
|
return isInsideCloseable ? /*#__PURE__*/jsx(RadixPopover.Close, {
|
|
22
23
|
asChild: true,
|
|
24
|
+
children: /*#__PURE__*/jsx(StyledDropdownMenuContentWrapper, {
|
|
25
|
+
$zIndex: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex,
|
|
26
|
+
children: /*#__PURE__*/jsx(StyledDropdownMenuContent, _objectSpread({}, props))
|
|
27
|
+
})
|
|
28
|
+
}) : /*#__PURE__*/jsx(StyledDropdownMenuContentWrapper, {
|
|
29
|
+
$zIndex: (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.zIndex,
|
|
23
30
|
children: /*#__PURE__*/jsx(StyledDropdownMenuContent, _objectSpread({}, props))
|
|
24
|
-
})
|
|
31
|
+
});
|
|
25
32
|
},
|
|
26
33
|
Arrow: Popover.Arrow,
|
|
27
34
|
Trigger: Popover.Trigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport {\n StyledDropdownMenuContent,\n StyledDropdownMenuItem,\n} from '@/Floating/DropdownMenu/styles';\nimport type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';\nimport Popover from '@/Floating/Popover';\n\nimport { DropdownMenuSection } from './DropdownMenuSection';\n\nexport interface DropdownContentProps extends PopoverContentProps {}\nexport interface DropdownMenuProps extends PopoverProps {}\n/**\n * Popover에 DropdownMenu Parts들을 추가한 컴포넌트\n * @see Popover\n */\nconst DropdownMenu = Object.assign(RadixPopover.Root.bind(null), {\n Content: ({ isInsideCloseable = false, ...props }: DropdownContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledDropdownMenuContent {...props} />\n </RadixPopover.Close>\n ) : (\n <StyledDropdownMenuContent {...props} />\n ),\n Arrow: Popover.Arrow,\n Trigger: Popover.Trigger,\n Portal: Popover.Portal,\n Anchor: Popover.Anchor,\n Close: Popover.Close,\n Section: DropdownMenuSection,\n Item: StyledDropdownMenuItem,\n});\n\nexport default DropdownMenu;\n"],"names":["DropdownMenu","Object","assign","RadixPopover","Root","bind","Content","_ref","_ref$isInsideCloseabl","isInsideCloseable","props","_objectWithoutProperties","_excluded","_jsx","Close","asChild","children","StyledDropdownMenuContent","_objectSpread","Arrow","Popover","Trigger","Portal","Anchor","Section","DropdownMenuSection","Item","StyledDropdownMenuItem"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../src/Floating/DropdownMenu/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport {\n StyledDropdownMenuContent,\n StyledDropdownMenuContentWrapper,\n StyledDropdownMenuItem,\n} from '@/Floating/DropdownMenu/styles';\nimport type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';\nimport Popover from '@/Floating/Popover';\n\nimport { DropdownMenuSection } from './DropdownMenuSection';\n\nexport interface DropdownContentProps extends PopoverContentProps {}\nexport interface DropdownMenuProps extends PopoverProps {}\n/**\n * Popover에 DropdownMenu Parts들을 추가한 컴포넌트\n * @see Popover\n */\nconst DropdownMenu = Object.assign(RadixPopover.Root.bind(null), {\n Content: ({ isInsideCloseable = false, ...props }: DropdownContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledDropdownMenuContentWrapper $zIndex={props.style?.zIndex}>\n <StyledDropdownMenuContent {...props} />\n </StyledDropdownMenuContentWrapper>\n </RadixPopover.Close>\n ) : (\n <StyledDropdownMenuContentWrapper $zIndex={props.style?.zIndex}>\n <StyledDropdownMenuContent {...props} />\n </StyledDropdownMenuContentWrapper>\n ),\n Arrow: Popover.Arrow,\n Trigger: Popover.Trigger,\n Portal: Popover.Portal,\n Anchor: Popover.Anchor,\n Close: Popover.Close,\n Section: DropdownMenuSection,\n Item: StyledDropdownMenuItem,\n});\n\nexport default DropdownMenu;\n"],"names":["DropdownMenu","Object","assign","RadixPopover","Root","bind","Content","_ref","_props$style","_props$style2","_ref$isInsideCloseabl","isInsideCloseable","props","_objectWithoutProperties","_excluded","_jsx","Close","asChild","children","StyledDropdownMenuContentWrapper","$zIndex","style","zIndex","StyledDrop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ACnC,CAAA;AAAA,GAAA;EACHa,KAAK,EAAEC,OAAO,CAACD,KAAK;EACpBE,OAAO,EAAED,OAAO,CAACC,OAAO;EACxBC,MAAM,EAAEF,OAAO,CAACE,MAAM;EACtBC,MAAM,EAAEH,OAAO,CAACG,MAAM;EACtBb,KAAK,EAAEU,OAAO,CAACV,KAAK;AACpBc,EAAAA,OAAO,EAAEC,mBAAmB;AAC5BC,EAAAA,IAAI,EAAEC,sBAAAA;AACR,CAAC;;;;"}
|
|
@@ -15,7 +15,7 @@ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefault(_taggedTempla
|
|
|
15
15
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
16
16
|
|
|
17
17
|
var _excluded = ["active", "disabled"];
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
19
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
21
|
var dropdownMenuItemCSS = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ", ";\n color: ", ";\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n"])), mixin.getTypographyStyles('Body1'), mixin.contents000);
|
|
@@ -39,13 +39,18 @@ var StyledDropdownMenuItem = styled__default.default.div.attrs(function (_ref2)
|
|
|
39
39
|
$disabled: disabled
|
|
40
40
|
}, props);
|
|
41
41
|
})(getDropdownMenuItemCss);
|
|
42
|
-
var
|
|
43
|
-
var
|
|
42
|
+
var StyledDropdownMenuContentWrapper = styled__default.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default.default(["\n [data-radix-popper-content-wrapper]{\n ", "\n }\n"])), function (_ref3) {
|
|
43
|
+
var $zIndex = _ref3.$zIndex;
|
|
44
|
+
return $zIndex && styled.css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default.default([" z-index: ", " !important; "])), $zIndex);
|
|
45
|
+
});
|
|
46
|
+
var StyledDropdownMenuSection = styled__default.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral__default.default([""])));
|
|
47
|
+
var StyledDropdownMenuContent = styled__default.default(styles.StyledPopoverContent)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default.default(["\n ", " {\n border-bottom: 1px solid ", ";\n }\n ", ":last-child {\n border-bottom: none;\n }\n"])), StyledDropdownMenuSection, mixin.divider, StyledDropdownMenuSection);
|
|
44
48
|
StyledDropdownMenuItem.defaultProps = {};
|
|
45
49
|
|
|
46
50
|
exports.DropdownMenuItemDisabledCSS = DropdownMenuItemDisabledCSS;
|
|
47
51
|
exports.DropdownMenuItemHoverCSS = DropdownMenuItemHoverCSS;
|
|
48
52
|
exports.StyledDropdownMenuContent = StyledDropdownMenuContent;
|
|
53
|
+
exports.StyledDropdownMenuContentWrapper = StyledDropdownMenuContentWrapper;
|
|
49
54
|
exports.StyledDropdownMenuItem = StyledDropdownMenuItem;
|
|
50
55
|
exports.StyledDropdownMenuSection = StyledDropdownMenuSection;
|
|
51
56
|
exports.StyledDropdownMenuSectionTitle = StyledDropdownMenuSectionTitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.cjs.js","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"sourcesContent":["import {\n bg200,\n contents000,\n contents200,\n divider,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nimport { StyledPopoverContent } from '../Popover/styles';\n\nexport const dropdownMenuItemCSS = css`\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ${getTypographyStyles('Body1')};\n color: ${contents000};\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n`;\n\nexport const DropdownMenuItemHoverCSS = css`\n &:hover,\n &:focus-visible {\n background-color: ${bg200};\n }\n`;\n\nexport const DropdownMenuItemDisabledCSS = css`\n pointer-events: none;\n`;\n\nexport const StyledDropdownMenuSectionTitle = styled.span`\n ${dropdownMenuItemCSS};\n ${getTypographyStyles('Body2_M')};\n color: ${contents200};\n`;\n\nexport type DropdownMenuItemProps =\n ConvertTransientProps<StyledDropdownMenuItemProps>;\n\nexport type StyledDropdownMenuItemProps = {\n $active?: boolean;\n $disabled?: boolean;\n};\n\nexport const getDropdownMenuItemCss = ({\n $active,\n $disabled,\n}: StyledDropdownMenuItemProps) =>\n css(() => [\n dropdownMenuItemCSS,\n !$active && DropdownMenuItemHoverCSS,\n $disabled && DropdownMenuItemDisabledCSS,\n css`\n font-weight: ${$active ? 600 : 400};\n\n &:focus-visible {\n outline: none;\n }\n `,\n ]);\n\nexport const StyledDropdownMenuItem = styled.div.attrs<DropdownMenuItemProps>(\n ({ active, disabled, ...props }) => ({\n tabIndex: active ? -1 : undefined,\n $active: active,\n $disabled: disabled,\n ...props,\n })\n)<StyledDropdownMenuItemProps>(getDropdownMenuItemCss);\n\nexport const StyledDropdownMenuSection = styled.div``;\n\nexport const StyledDropdownMenuContent = styled(StyledPopoverContent)`\n ${StyledDropdownMenuSection} {\n border-bottom: 1px solid ${divider};\n }\n ${StyledDropdownMenuSection}:last-child {\n border-bottom: none;\n }\n`;\nStyledDropdownMenuItem.defaultProps = {};\n"],"names":["dropdownMenuItemCSS","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","contents000","DropdownMenuItemHoverCSS","_templateObject2","bg200","DropdownMenuItemDisabledCSS","_templateObject3","StyledDropdownMenuSectionTitle","styled","span","_templateObject4","contents200","getDropdownMenuItemCss","_ref","$active","$disabled","_templateObject5","StyledDropdownMenuItem","div","attrs","_ref2","active","disabled","props","_objectWithoutProperties","_excluded","_objectSpread","tabIndex","undefined","
|
|
1
|
+
{"version":3,"file":"styles.cjs.js","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"sourcesContent":["import {\n bg200,\n contents000,\n contents200,\n divider,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport styled, { css, CSSProperties } from 'styled-components';\n\nimport { StyledPopoverContent } from '../Popover/styles';\n\nexport const dropdownMenuItemCSS = css`\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ${getTypographyStyles('Body1')};\n color: ${contents000};\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n`;\n\nexport const DropdownMenuItemHoverCSS = css`\n &:hover,\n &:focus-visible {\n background-color: ${bg200};\n }\n`;\n\nexport const DropdownMenuItemDisabledCSS = css`\n pointer-events: none;\n`;\n\nexport const StyledDropdownMenuSectionTitle = styled.span`\n ${dropdownMenuItemCSS};\n ${getTypographyStyles('Body2_M')};\n color: ${contents200};\n`;\n\nexport type DropdownMenuItemProps =\n ConvertTransientProps<StyledDropdownMenuItemProps>;\n\nexport type StyledDropdownMenuItemProps = {\n $active?: boolean;\n $disabled?: boolean;\n};\n\nexport const getDropdownMenuItemCss = ({\n $active,\n $disabled,\n}: StyledDropdownMenuItemProps) =>\n css(() => [\n dropdownMenuItemCSS,\n !$active && DropdownMenuItemHoverCSS,\n $disabled && DropdownMenuItemDisabledCSS,\n css`\n font-weight: ${$active ? 600 : 400};\n\n &:focus-visible {\n outline: none;\n }\n `,\n ]);\n\nexport const StyledDropdownMenuItem = styled.div.attrs<DropdownMenuItemProps>(\n ({ active, disabled, ...props }) => ({\n tabIndex: active ? -1 : undefined,\n $active: active,\n $disabled: disabled,\n ...props,\n })\n)<StyledDropdownMenuItemProps>(getDropdownMenuItemCss);\n\n\nexport const StyledDropdownMenuContentWrapper = styled.div<{$zIndex?: CSSProperties['zIndex']}>`\n [data-radix-popper-content-wrapper]{\n ${({$zIndex}) => $zIndex && css` z-index: ${$zIndex} !important; `}\n }\n`\n\nexport const StyledDropdownMenuSection = styled.div``;\n\nexport const StyledDropdownMenuContent = styled(StyledPopoverContent)`\n ${StyledDropdownMenuSection} {\n border-bottom: 1px solid ${divider};\n }\n ${StyledDropdownMenuSection}:last-child {\n border-bottom: none;\n }\n`;\nStyledDropdownMenuItem.defaultProps = {};\n"],"names":["dropdownMenuItemCSS","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","contents000","DropdownMenuItemHoverCSS","_templateObject2","bg200","DropdownMenuItemDisabledCSS","_templateObject3","StyledDropdownMenuSectionTitle","styled","span","_templateObject4","contents200","getDropdownMenuItemCss","_ref","$active","$disabled","_templateObject5","StyledDropdownMenuItem","div","attrs","_ref2","active","disabled","props","_objectWithoutProperties","_excluded","_objectSpread","tabIndex","undefined","StyledDropdownMenuContentWrapper","_templateObject6","_ref3","$zIndex","_templateObject7","StyledDropdownMenuSection","_templateObject8","StyledDropdownMenuContent","StyledPopoverContent","_templateObject9","divider","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;IAYaA,mBAAmB,GAAGC,UAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,uCAAA,gMAKlCC,yBAAmB,CAAC,OAAO,CAAC,EACrBC,iBAAW,EAIrB;AAEYC,IAAAA,wBAAwB,GAAGL,UAAG,CAAAM,gBAAA,KAAAA,gBAAA,GAAAJ,uCAAA,CAGnBK,CAAAA,2DAAAA,EAAAA,UAAAA,CAAAA,CAAAA,CAAAA,EAAAA,WAAK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AM;AACfN,IAAAA,SAAS,EAAEO,QAAAA;AAAQ,GAAA,EAChBC,KAAK,CAAA,CAAA;AAAA,CAEZ,CAAC,CAA8BX,sBAAsB,EAAC;AAGzCiB,IAAAA,gCAAgC,GAAGrB,uBAAM,CAACU,GAAG,CAAAY,gBAAA,KAAAA,gBAAA,GAAA/B,uCAAA,CAAA,CAAA,gDAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAEpD,UAAAgC,KAAA,EAAA;AAAA,EAAA,IAAEC,OAAO,GAAAD,KAAA,CAAPC,OAAO,CAAA;EAAA,OAAMA,OAAO,IAAInC,UAAG,CAAAoC,gBAAA,KAAAA,gBAAA,GAAAlC,uCAAA,CAAaiC,CAAAA,YAAAA,EAAAA,eAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAO,CAAe,CAAA;AAAA,CAErE,EAAA;AAEYE,IAAAA,yBAAyB,GAAG1B,uBAAM,CAACU,GAAG,CAAAiB,gBAAA,KAAAA,gBAAA,GAAApC,uCAAA,CAAE,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA;IAExCqC,yBAAyB,GAAG5B,uBAAM,CAAC6B,2BAAoB,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAAvC,uCAAA,CACjEmC,CAAAA,MAAAA,EAAAA,mCAAAA,EAAAA,YAAAA,EAAAA,gDAAAA,CAAAA,CAAAA,CAAAA,EAAAA,yBAAyB,EACEK,aAAO,EAElCL,yBAAyB,EAG5B;AACDjB,sBAAsB,CAACuB,YAAY,GAAG,EAAE;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ConvertTransientProps } from '@remember-web/shared';
|
|
3
|
+
import { CSSProperties } from 'styled-components';
|
|
3
4
|
export declare const dropdownMenuItemCSS: import("styled-components").RuleSet<object>;
|
|
4
5
|
export declare const DropdownMenuItemHoverCSS: import("styled-components").RuleSet<object>;
|
|
5
6
|
export declare const DropdownMenuItemDisabledCSS: import("styled-components").RuleSet<object>;
|
|
@@ -13,6 +14,9 @@ export declare const getDropdownMenuItemCss: ({ $active, $disabled, }: StyledDro
|
|
|
13
14
|
export declare const StyledDropdownMenuItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
15
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
16
|
}>, ConvertTransientProps<StyledDropdownMenuItemProps>>, StyledDropdownMenuItemProps>>;
|
|
17
|
+
export declare const StyledDropdownMenuContentWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
18
|
+
$zIndex?: CSSProperties['zIndex'];
|
|
19
|
+
}>>;
|
|
16
20
|
export declare const StyledDropdownMenuSection: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
17
21
|
export declare const StyledDropdownMenuContent: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<import("@radix-ui/react-popover").PopoverContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
22
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAe,EAAO,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI/D,eAAO,MAAM,mBAAmB,6CAU/B,CAAC;AAEF,eAAO,MAAM,wBAAwB,6CAKpC,CAAC;AAEF,eAAO,MAAM,2BAA2B,6CAEvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,kNAI1C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC/B,qBAAqB,CAAC,2BAA2B,CAAC,CAAC;AAErD,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,4BAGhC,2BAA2B,gDAY1B,CAAC;AAEL,eAAO,MAAM,sBAAsB;;sFAOmB,CAAC;AAGvD,eAAO,MAAM,gCAAgC;cAAyB,aAAa,CAAC,QAAQ,CAAC;GAI5F,CAAA;AAED,eAAO,MAAM,yBAAyB,gNAAe,CAAC;AAEtD,eAAO,MAAM,yBAAyB;;;;kQAOrC,CAAC"}
|
|
@@ -6,7 +6,7 @@ import styled, { css } from 'styled-components';
|
|
|
6
6
|
import { StyledPopoverContent } from '../Popover/styles.esm.js';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["active", "disabled"];
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
var dropdownMenuItemCSS = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ", ";\n color: ", ";\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n"])), getTypographyStyles('Body1'), contents000);
|
|
@@ -30,9 +30,13 @@ var StyledDropdownMenuItem = styled.div.attrs(function (_ref2) {
|
|
|
30
30
|
$disabled: disabled
|
|
31
31
|
}, props);
|
|
32
32
|
})(getDropdownMenuItemCss);
|
|
33
|
-
var
|
|
34
|
-
var
|
|
33
|
+
var StyledDropdownMenuContentWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n [data-radix-popper-content-wrapper]{\n ", "\n }\n"])), function (_ref3) {
|
|
34
|
+
var $zIndex = _ref3.$zIndex;
|
|
35
|
+
return $zIndex && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([" z-index: ", " !important; "])), $zIndex);
|
|
36
|
+
});
|
|
37
|
+
var StyledDropdownMenuSection = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""])));
|
|
38
|
+
var StyledDropdownMenuContent = styled(StyledPopoverContent)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", " {\n border-bottom: 1px solid ", ";\n }\n ", ":last-child {\n border-bottom: none;\n }\n"])), StyledDropdownMenuSection, divider, StyledDropdownMenuSection);
|
|
35
39
|
StyledDropdownMenuItem.defaultProps = {};
|
|
36
40
|
|
|
37
|
-
export { DropdownMenuItemDisabledCSS, DropdownMenuItemHoverCSS, StyledDropdownMenuContent, StyledDropdownMenuItem, StyledDropdownMenuSection, StyledDropdownMenuSectionTitle, dropdownMenuItemCSS, getDropdownMenuItemCss };
|
|
41
|
+
export { DropdownMenuItemDisabledCSS, DropdownMenuItemHoverCSS, StyledDropdownMenuContent, StyledDropdownMenuContentWrapper, StyledDropdownMenuItem, StyledDropdownMenuSection, StyledDropdownMenuSectionTitle, dropdownMenuItemCSS, getDropdownMenuItemCss };
|
|
38
42
|
//# sourceMappingURL=styles.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.esm.js","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"sourcesContent":["import {\n bg200,\n contents000,\n contents200,\n divider,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nimport { StyledPopoverContent } from '../Popover/styles';\n\nexport const dropdownMenuItemCSS = css`\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ${getTypographyStyles('Body1')};\n color: ${contents000};\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n`;\n\nexport const DropdownMenuItemHoverCSS = css`\n &:hover,\n &:focus-visible {\n background-color: ${bg200};\n }\n`;\n\nexport const DropdownMenuItemDisabledCSS = css`\n pointer-events: none;\n`;\n\nexport const StyledDropdownMenuSectionTitle = styled.span`\n ${dropdownMenuItemCSS};\n ${getTypographyStyles('Body2_M')};\n color: ${contents200};\n`;\n\nexport type DropdownMenuItemProps =\n ConvertTransientProps<StyledDropdownMenuItemProps>;\n\nexport type StyledDropdownMenuItemProps = {\n $active?: boolean;\n $disabled?: boolean;\n};\n\nexport const getDropdownMenuItemCss = ({\n $active,\n $disabled,\n}: StyledDropdownMenuItemProps) =>\n css(() => [\n dropdownMenuItemCSS,\n !$active && DropdownMenuItemHoverCSS,\n $disabled && DropdownMenuItemDisabledCSS,\n css`\n font-weight: ${$active ? 600 : 400};\n\n &:focus-visible {\n outline: none;\n }\n `,\n ]);\n\nexport const StyledDropdownMenuItem = styled.div.attrs<DropdownMenuItemProps>(\n ({ active, disabled, ...props }) => ({\n tabIndex: active ? -1 : undefined,\n $active: active,\n $disabled: disabled,\n ...props,\n })\n)<StyledDropdownMenuItemProps>(getDropdownMenuItemCss);\n\nexport const StyledDropdownMenuSection = styled.div``;\n\nexport const StyledDropdownMenuContent = styled(StyledPopoverContent)`\n ${StyledDropdownMenuSection} {\n border-bottom: 1px solid ${divider};\n }\n ${StyledDropdownMenuSection}:last-child {\n border-bottom: none;\n }\n`;\nStyledDropdownMenuItem.defaultProps = {};\n"],"names":["dropdownMenuItemCSS","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","contents000","DropdownMenuItemHoverCSS","_templateObject2","bg200","DropdownMenuItemDisabledCSS","_templateObject3","StyledDropdownMenuSectionTitle","styled","span","_templateObject4","contents200","getDropdownMenuItemCss","_ref","$active","$disabled","_templateObject5","StyledDropdownMenuItem","div","attrs","_ref2","active","disabled","props","_objectWithoutProperties","_excluded","_objectSpread","tabIndex","undefined","
|
|
1
|
+
{"version":3,"file":"styles.esm.js","sources":["../../../../src/Floating/DropdownMenu/styles.tsx"],"sourcesContent":["import {\n bg200,\n contents000,\n contents200,\n divider,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport styled, { css, CSSProperties } from 'styled-components';\n\nimport { StyledPopoverContent } from '../Popover/styles';\n\nexport const dropdownMenuItemCSS = css`\n display: flex;\n align-items: center;\n padding: 8px 12px;\n\n ${getTypographyStyles('Body1')};\n color: ${contents000};\n transition: background-color 0.07s;\n border-radius: unset;\n text-decoration: none;\n`;\n\nexport const DropdownMenuItemHoverCSS = css`\n &:hover,\n &:focus-visible {\n background-color: ${bg200};\n }\n`;\n\nexport const DropdownMenuItemDisabledCSS = css`\n pointer-events: none;\n`;\n\nexport const StyledDropdownMenuSectionTitle = styled.span`\n ${dropdownMenuItemCSS};\n ${getTypographyStyles('Body2_M')};\n color: ${contents200};\n`;\n\nexport type DropdownMenuItemProps =\n ConvertTransientProps<StyledDropdownMenuItemProps>;\n\nexport type StyledDropdownMenuItemProps = {\n $active?: boolean;\n $disabled?: boolean;\n};\n\nexport const getDropdownMenuItemCss = ({\n $active,\n $disabled,\n}: StyledDropdownMenuItemProps) =>\n css(() => [\n dropdownMenuItemCSS,\n !$active && DropdownMenuItemHoverCSS,\n $disabled && DropdownMenuItemDisabledCSS,\n css`\n font-weight: ${$active ? 600 : 400};\n\n &:focus-visible {\n outline: none;\n }\n `,\n ]);\n\nexport const StyledDropdownMenuItem = styled.div.attrs<DropdownMenuItemProps>(\n ({ active, disabled, ...props }) => ({\n tabIndex: active ? -1 : undefined,\n $active: active,\n $disabled: disabled,\n ...props,\n })\n)<StyledDropdownMenuItemProps>(getDropdownMenuItemCss);\n\n\nexport const StyledDropdownMenuContentWrapper = styled.div<{$zIndex?: CSSProperties['zIndex']}>`\n [data-radix-popper-content-wrapper]{\n ${({$zIndex}) => $zIndex && css` z-index: ${$zIndex} !important; `}\n }\n`\n\nexport const StyledDropdownMenuSection = styled.div``;\n\nexport const StyledDropdownMenuContent = styled(StyledPopoverContent)`\n ${StyledDropdownMenuSection} {\n border-bottom: 1px solid ${divider};\n }\n ${StyledDropdownMenuSection}:last-child {\n border-bottom: none;\n }\n`;\nStyledDropdownMenuItem.defaultProps = {};\n"],"names":["dropdownMenuItemCSS","css","_templateObject","_taggedTemplateLiteral","getTypographyStyles","contents000","DropdownMenuItemHoverCSS","_templateObject2","bg200","DropdownMenuItemDisabledCSS","_templateObject3","StyledDropdownMenuSectionTitle","styled","span","_templateObject4","contents200","getDropdownMenuItemCss","_ref","$active","$disabled","_templateObject5","StyledDropdownMenuItem","div","attrs","_ref2","active","disabled","props","_objectWithoutProperties","_excluded","_objectSpread","tabIndex","undefined","StyledDropdownMenuContentWrapper","_templateObject6","_ref3","$zIndex","_templateObject7","StyledDropdownMenuSection","_templateObject8","StyledDropdownMenuContent","StyledPopoverContent","_templateObject9","divider","defaultProps"],"mappings":";;;;;;;;;;;IAYaA,mBAAmB,GAAGC,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,gMAKlCC,mBAAmB,CAAC,OAAO,CAAC,EACrBC,WAAW,EAIrB;AAEYC,IAAAA,wBAAwB,GAAGL,GAAG,CAAAM,gBAAA,KAAAA,gBAAA,GAAAJ,sBAAA,CAGnBK,CAAAA,2DAAAA,EAAAA,UAAAA,CAAAA,CAAAA,CAAAA,EAAAA,KAAK,EAE5B;AAEM,IAAMC,2BAA2B,GAAGR,GAAG,CAAAS,gBAAA,KAAAA,gBAAA,GAAAP,sBAAA,CAE7C,CAAA,6BAAA,CAAA,CAAA,CAAA,EAAA;AAEM,IAAMQ,8BAA8B,GAAGC,MAAM,CAACC,IAAI,CAAAC,gBAAA,KAAAA,gBAAA,GAAAX,sBAAA,CAAA,CAAA,MAAA,EAAA,OAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA,CAAA,EACrDH,mBAAmB,EACnBI,mBAAmB,CAAC,SAAS,CAAC,EACvBW,WAAW,EACrB;IAUYC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACjCC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,SAAS,GAAAF,IAAA,CAATE,SAAS,CAAA;AAAA,EAAA,OAETlB,GAAG,CAAC,YAAA;IAAA,OAAM,CACRD,mBAAmB,EACnB,CAACkB,OAAO,IAAIZ,wBAAwB,EACpCa,SAAS,IAAIV,2BAA2B,EACxCR,GAAG,CAAAmB,gBAAA,KAAAA,gBAAA,GAAAjB,sBAAA,CACce,CAAAA,uBAAAA,EAAAA,qEAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAO,GAAG,GAAG,GAAG,GAAG,CAMrC,CAAA,CAAA;GAAC,CAAA,CAAA;AAAA,E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AAAA,EAAAA,yBAAyB,EACEK,OAAO,EAElCL,yBAAyB,EAG5B;AACDjB,sBAAsB,CAACuB,YAAY,GAAG,EAAE;;;;"}
|
|
@@ -52,13 +52,20 @@ var Popover = Object.assign(RadixPopover__namespace.Root.bind(null), {
|
|
|
52
52
|
Close: Close,
|
|
53
53
|
Arrow: RadixPopover__namespace.Arrow,
|
|
54
54
|
Content: function Content(_ref) {
|
|
55
|
+
var _props$style, _props$style2;
|
|
55
56
|
var _ref$isInsideCloseabl = _ref.isInsideCloseable,
|
|
56
57
|
isInsideCloseable = _ref$isInsideCloseabl === void 0 ? false : _ref$isInsideCloseabl,
|
|
57
58
|
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
58
59
|
return isInsideCloseable ? /*#__PURE__*/jsxRuntime.jsx(RadixPopover__namespace.Close, {
|
|
59
60
|
asChild: true,
|
|
61
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledPopoverContentWrapper, {
|
|
62
|
+
$zIndex: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex,
|
|
63
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledPopoverContent, _objectSpread({}, props))
|
|
64
|
+
})
|
|
65
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(styles.StyledPopoverContentWrapper, {
|
|
66
|
+
$zIndex: (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.zIndex,
|
|
60
67
|
children: /*#__PURE__*/jsxRuntime.jsx(styles.StyledPopoverContent, _objectSpread({}, props))
|
|
61
|
-
})
|
|
68
|
+
});
|
|
62
69
|
}
|
|
63
70
|
});
|
|
64
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Floating/Popover/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport { StyledPopoverContent } from '@/Floating/Popover/styles';\n\nconst { Trigger, Anchor, Close, PopoverPortal } = RadixPopover;\n\nexport type PopoverProps = RadixPopover.PopoverProps;\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n isInsideCloseable?: boolean;\n};\n\n/**\n * @see https://www.radix-ui.com/docs/primitives/components/popover\n */\n\nconst Popover = Object.assign(RadixPopover.Root.bind(null), {\n Trigger(props: RadixPopover.PopoverTriggerProps) {\n return <Trigger asChild {...props} />;\n },\n Anchor,\n Portal: PopoverPortal,\n Close,\n Arrow: RadixPopover.Arrow,\n Content: ({ isInsideCloseable = false, ...props }: PopoverContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledPopoverContent {...props} />\n </RadixPopover.Close>\n ) : (\n <StyledPopoverContent {...props} />\n ),\n});\n\nexport default Popover;\n"],"names":["Trigger","RadixPopover","Anchor","Close","PopoverPortal","Popover","Object","assign","Root","bind","props","_jsx","_Trigger","_objectSpread","asChild","Portal","Arrow","Content","_ref","_ref$isInsideCloseabl","isInsideCloseable","_objectWithoutProperties","_excluded","children","StyledPopoverContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAQA,QAAO,GAAmCC,uBAAY,CAAtDD,OAAO;EAAEE,MAAM,GAA2BD,uBAAY,CAA7CC,MAAM;EAAEC,KAAK,GAAoBF,uBAAY,CAArCE,KAAK;EAAEC,aAAa,GAAKH,uBAAY,CAA9BG,aAAa,CAAA;AAO7C;AACA;AACA;;AAEA,IAAMC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACN,uBAAY,CAACO,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC,EAAE;EAC1DT,OAAO,EAAA,SAAAA,OAACU,CAAAA,KAAuC,EAAE;AAC/C,IAAA,oBAAOC,cAAA,CAACC,QAAO,EAAAC,aAAA,CAAA;MAACC,OAAO,EAAA,IAAA;KAAKJ,EAAAA,KAAK,CAAG,CAAC,CAAA;GACtC;AACDR,EAAAA,MAAM,EAANA,MAAM;AACNa,EAAAA,MAAM,EAAEX,aAAa;AACrBD,EAAAA,KAAK,EAALA,KAAK;EACLa,KAAK,EAAEf,uBAAY,CAACe,KAAK;EACzBC,OAAO,EAAE,SAAAA,OAAAA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAAC,qBAAA,
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Floating/Popover/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport { StyledPopoverContent, StyledPopoverContentWrapper } from '@/Floating/Popover/styles';\n\nconst { Trigger, Anchor, Close, PopoverPortal } = RadixPopover;\n\nexport type PopoverProps = RadixPopover.PopoverProps;\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n isInsideCloseable?: boolean;\n};\n\n/**\n * @see https://www.radix-ui.com/docs/primitives/components/popover\n */\n\nconst Popover = Object.assign(RadixPopover.Root.bind(null), {\n Trigger(props: RadixPopover.PopoverTriggerProps) {\n return <Trigger asChild {...props} />;\n },\n Anchor,\n Portal: PopoverPortal,\n Close,\n Arrow: RadixPopover.Arrow,\n Content: ({ isInsideCloseable = false, ...props }: PopoverContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledPopoverContentWrapper $zIndex={props.style?.zIndex}>\n <StyledPopoverContent {...props} />\n </StyledPopoverContentWrapper>\n </RadixPopover.Close>\n ) : (\n <StyledPopoverContentWrapper $zIndex={props.style?.zIndex}>\n <StyledPopoverContent {...props} />\n </StyledPopoverContentWrapper>\n ),\n});\n\nexport default Popover;\n"],"names":["Trigger","RadixPopover","Anchor","Close","PopoverPortal","Popover","Object","assign","Root","bind","props","_jsx","_Trigger","_objectSpread","asChild","Portal","Arrow","Content","_ref","_props$style","_props$style2","_ref$isInsideCloseabl","isInsideCloseable","_objectWithoutProperties","_excluded","children","StyledPopoverContentWrapper","$zIndex","style","zIndex","StyledPopoverContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAQA,QAAO,GAAmCC,uBAAY,CAAtDD,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AAA,EAAA,EAAKH,KAAK,CAAG,CAAA;OACP,CAAA;AAAC,KACZ,CAAC,gBAErBC,cAAA,CAACe,kCAA2B,EAAA;MAACC,OAAO,EAAA,CAAAP,aAAA,GAAEV,KAAK,CAACkB,KAAK,MAAA,IAAA,IAAAR,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,aAAA,CAAaS,MAAO;MAAAJ,QAAA,eACxDd,cAAA,CAACmB,2BAAoB,EAAAjB,aAAA,CAAA,EAAA,EAAKH,KAAK,CAAG,CAAA;AAAC,KACR,CAC9B,CAAA;AAAA,GAAA;AACL,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Floating/Popover/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AAMxD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;AACrD,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,mBAAmB,GAAG;IACnE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AAEH,QAAA,MAAM,OAAO;mBACI,aAAa,mBAAmB;;;;;+CAOI,mBAAmB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Floating/Popover/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AAMxD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;AACrD,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,mBAAmB,GAAG;IACnE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AAEH,QAAA,MAAM,OAAO;mBACI,aAAa,mBAAmB;;;;;+CAOI,mBAAmB;CAYtE,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
4
|
-
import { StyledPopoverContent } from './styles.esm.js';
|
|
4
|
+
import { StyledPopoverContentWrapper, StyledPopoverContent } from './styles.esm.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["isInsideCloseable"];
|
|
@@ -26,13 +26,20 @@ var Popover = Object.assign(RadixPopover.Root.bind(null), {
|
|
|
26
26
|
Close: Close,
|
|
27
27
|
Arrow: RadixPopover.Arrow,
|
|
28
28
|
Content: function Content(_ref) {
|
|
29
|
+
var _props$style, _props$style2;
|
|
29
30
|
var _ref$isInsideCloseabl = _ref.isInsideCloseable,
|
|
30
31
|
isInsideCloseable = _ref$isInsideCloseabl === void 0 ? false : _ref$isInsideCloseabl,
|
|
31
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
return isInsideCloseable ? /*#__PURE__*/jsx(RadixPopover.Close, {
|
|
33
34
|
asChild: true,
|
|
35
|
+
children: /*#__PURE__*/jsx(StyledPopoverContentWrapper, {
|
|
36
|
+
$zIndex: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex,
|
|
37
|
+
children: /*#__PURE__*/jsx(StyledPopoverContent, _objectSpread({}, props))
|
|
38
|
+
})
|
|
39
|
+
}) : /*#__PURE__*/jsx(StyledPopoverContentWrapper, {
|
|
40
|
+
$zIndex: (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.zIndex,
|
|
34
41
|
children: /*#__PURE__*/jsx(StyledPopoverContent, _objectSpread({}, props))
|
|
35
|
-
})
|
|
42
|
+
});
|
|
36
43
|
}
|
|
37
44
|
});
|
|
38
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../../src/Floating/Popover/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport { StyledPopoverContent } from '@/Floating/Popover/styles';\n\nconst { Trigger, Anchor, Close, PopoverPortal } = RadixPopover;\n\nexport type PopoverProps = RadixPopover.PopoverProps;\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n isInsideCloseable?: boolean;\n};\n\n/**\n * @see https://www.radix-ui.com/docs/primitives/components/popover\n */\n\nconst Popover = Object.assign(RadixPopover.Root.bind(null), {\n Trigger(props: RadixPopover.PopoverTriggerProps) {\n return <Trigger asChild {...props} />;\n },\n Anchor,\n Portal: PopoverPortal,\n Close,\n Arrow: RadixPopover.Arrow,\n Content: ({ isInsideCloseable = false, ...props }: PopoverContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledPopoverContent {...props} />\n </RadixPopover.Close>\n ) : (\n <StyledPopoverContent {...props} />\n ),\n});\n\nexport default Popover;\n"],"names":["Trigger","RadixPopover","Anchor","Close","PopoverPortal","Popover","Object","assign","Root","bind","props","_jsx","_Trigger","_objectSpread","asChild","Portal","Arrow","Content","_ref","_ref$isInsideCloseabl","isInsideCloseable","_objectWithoutProperties","_excluded","children","StyledPopoverContent"],"mappings":";;;;;;;;;AAIA,IAAQA,QAAO,GAAmCC,YAAY,CAAtDD,OAAO;EAAEE,MAAM,GAA2BD,YAAY,CAA7CC,MAAM;EAAEC,KAAK,GAAoBF,YAAY,CAArCE,KAAK;EAAEC,aAAa,GAAKH,YAAY,CAA9BG,aAAa,CAAA;AAO7C;AACA;AACA;;AAEA,IAAMC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACN,YAAY,CAACO,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC,EAAE;EAC1DT,OAAO,EAAA,SAAAA,OAACU,CAAAA,KAAuC,EAAE;AAC/C,IAAA,oBAAOC,GAAA,CAACC,QAAO,EAAAC,aAAA,CAAA;MAACC,OAAO,EAAA,IAAA;KAAKJ,EAAAA,KAAK,CAAG,CAAC,CAAA;GACtC;AACDR,EAAAA,MAAM,EAANA,MAAM;AACNa,EAAAA,MAAM,EAAEX,aAAa;AACrBD,EAAAA,KAAK,EAALA,KAAK;EACLa,KAAK,EAAEf,YAAY,CAACe,KAAK;EACzBC,OAAO,EAAE,SAAAA,OAAAA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAAC,qBAAA,
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../src/Floating/Popover/index.tsx"],"sourcesContent":["import * as RadixPopover from '@radix-ui/react-popover';\n\nimport { StyledPopoverContent, StyledPopoverContentWrapper } from '@/Floating/Popover/styles';\n\nconst { Trigger, Anchor, Close, PopoverPortal } = RadixPopover;\n\nexport type PopoverProps = RadixPopover.PopoverProps;\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n isInsideCloseable?: boolean;\n};\n\n/**\n * @see https://www.radix-ui.com/docs/primitives/components/popover\n */\n\nconst Popover = Object.assign(RadixPopover.Root.bind(null), {\n Trigger(props: RadixPopover.PopoverTriggerProps) {\n return <Trigger asChild {...props} />;\n },\n Anchor,\n Portal: PopoverPortal,\n Close,\n Arrow: RadixPopover.Arrow,\n Content: ({ isInsideCloseable = false, ...props }: PopoverContentProps) =>\n isInsideCloseable ? (\n <RadixPopover.Close asChild>\n <StyledPopoverContentWrapper $zIndex={props.style?.zIndex}>\n <StyledPopoverContent {...props} />\n </StyledPopoverContentWrapper>\n </RadixPopover.Close>\n ) : (\n <StyledPopoverContentWrapper $zIndex={props.style?.zIndex}>\n <StyledPopoverContent {...props} />\n </StyledPopoverContentWrapper>\n ),\n});\n\nexport default Popover;\n"],"names":["Trigger","RadixPopover","Anchor","Close","PopoverPortal","Popover","Object","assign","Root","bind","props","_jsx","_Trigger","_objectSpread","asChild","Portal","Arrow","Content","_ref","_props$style","_props$style2","_ref$isInsideCloseabl","isInsideCloseable","_objectWithoutProperties","_excluded","children","StyledPopoverContentWrapper","$zIndex","style","zIndex","StyledPopover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AAJ,QAAA,eACxDd,GAAA,CAACmB,oBAAoB,EAAAjB,aAAA,CAAA,EAAA,EAAKH,KAAK,CAAG,CAAA;OACP,CAAA;AAAC,KACZ,CAAC,gBAErBC,GAAA,CAACe,2BAA2B,EAAA;MAACC,OAAO,EAAA,CAAAP,aAAA,GAAEV,KAAK,CAACkB,KAAK,MAAA,IAAA,IAAAR,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,aAAA,CAAaS,MAAO;MAAAJ,QAAA,eACxDd,GAAA,CAACmB,oBAAoB,EAAAjB,aAAA,CAAA,EAAA,EAAKH,KAAK,CAAG,CAAA;AAAC,KACR,CAC9B,CAAA;AAAA,GAAA;AACL,CAAC;;;;"}
|
|
@@ -10,10 +10,14 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
10
10
|
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefault(_taggedTemplateLiteral);
|
|
11
11
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
12
12
|
|
|
13
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
13
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
14
14
|
var showFadeIn = styled.keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
15
15
|
var showFadeOut = styled.keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n"])));
|
|
16
|
-
var
|
|
16
|
+
var StyledPopoverContentWrapper = styled__default.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default.default(["\n [data-radix-popper-content-wrapper]{\n ", "\n }\n"])), function (_ref) {
|
|
17
|
+
var $zIndex = _ref.$zIndex;
|
|
18
|
+
return $zIndex && styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default.default([" z-index: ", " !important; "])), $zIndex);
|
|
19
|
+
});
|
|
20
|
+
var StyledPopoverContent = styled__default.default(RadixPopover.PopoverContent)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default.default(["\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ", ";\n background-color: ", ";\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ", " 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ", " 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n"])), mixin.contents000, mixin.bg100, showFadeIn, showFadeOut);
|
|
17
21
|
StyledPopoverContent.defaultProps = {
|
|
18
22
|
avoidCollisions: true,
|
|
19
23
|
align: 'start',
|
|
@@ -22,6 +26,7 @@ StyledPopoverContent.defaultProps = {
|
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
exports.StyledPopoverContent = StyledPopoverContent;
|
|
29
|
+
exports.StyledPopoverContentWrapper = StyledPopoverContentWrapper;
|
|
25
30
|
exports.showFadeIn = showFadeIn;
|
|
26
31
|
exports.showFadeOut = showFadeOut;
|
|
27
32
|
//# sourceMappingURL=styles.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.cjs.js","sources":["../../../../src/Floating/Popover/styles.ts"],"sourcesContent":["import { PopoverContent } from '@radix-ui/react-popover';\nimport { bg100, contents000 } from '@remember-web/mixin';\nimport styled, { keyframes } from 'styled-components';\n\nexport const showFadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\nexport const showFadeOut = keyframes`\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n`;\n\nexport const StyledPopoverContent = styled(PopoverContent)`\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ${contents000};\n background-color: ${bg100};\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ${showFadeIn} 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ${showFadeOut} 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n`;\n\nStyledPopoverContent.defaultProps = {\n avoidCollisions: true,\n align: 'start',\n side: 'bottom',\n sideOffset: 4,\n};\n"],"names":["showFadeIn","keyframes","_templateObject","_taggedTemplateLiteral","showFadeOut","_templateObject2","
|
|
1
|
+
{"version":3,"file":"styles.cjs.js","sources":["../../../../src/Floating/Popover/styles.ts"],"sourcesContent":["import { PopoverContent, PopoverContentProps } from '@radix-ui/react-popover';\nimport { bg100, contents000 } from '@remember-web/mixin';\nimport { CSSProperties } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\n\nexport const showFadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\nexport const showFadeOut = keyframes`\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<{$zIndex?: CSSProperties['zIndex']}>`\n [data-radix-popper-content-wrapper]{\n ${({$zIndex}) => $zIndex && css` z-index: ${$zIndex} !important; `}\n }\n`\n\nexport const StyledPopoverContent = styled(PopoverContent)`\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ${contents000};\n background-color: ${bg100};\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ${showFadeIn} 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ${showFadeOut} 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n`;\n\nStyledPopoverContent.defaultProps = {\n avoidCollisions: true,\n align: 'start',\n side: 'bottom',\n sideOffset: 4,\n};\n"],"names":["showFadeIn","keyframes","_templateObject","_taggedTemplateLiteral","showFadeOut","_templateObject2","StyledPopoverContentWrapper","styled","div","_templateObject3","_ref","$zIndex","css","_templateObject4","StyledPopoverContent","PopoverContent","_templateObject5","contents000","bg100","defaultProps","avoidCollisions","align","side","sideOffset"],"mappings":";;;;;;;;;;;;;AAKO,IAAMA,UAAU,GAAGC,gBAAS,CAAAC,eAAA,KAAAA,eAAA,GAAAC,uCAAA,CAOlC,CAAA,kFAAA,CAAA,CAAA,CAAA,EAAA;AACM,IAAMC,WAAW,GAAGH,gBAAS,CAAAI,gBAAA,KAAAA,gBAAA,GAAAF,uCAAA,CAOnC,CAAA,kFAAA,CAAA,CAAA,CAAA,EAAA;AAEYG,IAAAA,2BAA2B,GAAGC,uBAAM,CAACC,GAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAN,uCAAA,CAAA,CAAA,gDAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAE/C,UAAAO,IAAA,EAAA;AAAA,EAAA,IAAEC,OAAO,GAAAD,IAAA,CAAPC,OAAO,CAAA;EAAA,OAAMA,OAAO,IAAIC,UAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAV,uCAAA,CAAaQ,CAAAA,YAAAA,EAAAA,eAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAO,CAAe,CAAA;AAAA,CAErE,EAAA;AAEM,IAAMG,oBAAoB,GAAGP,uBAAM,CAACQ,2BAAc,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAAb,uCAAA,2fAQ/Cc,iBAAW,EACAC,WAAK,EAUVlB,UAAU,EAGVI,WAAW,EAE3B;AAEDU,oBAAoB,CAACK,YAAY,GAAG;AAClCC,EAAAA,eAAe,EAAE,IAAI;AACrBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,UAAU,EAAE,CAAA;AACd,CAAC;;;;;;;"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
2
3
|
export declare const showFadeIn: import("styled-components/dist/models/Keyframes").default;
|
|
3
4
|
export declare const showFadeOut: import("styled-components/dist/models/Keyframes").default;
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const StyledPopoverContentWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
|
+
$zIndex?: CSSProperties['zIndex'];
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const StyledPopoverContent: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
-
}, never>> & Omit<import("react").ForwardRefExoticComponent<
|
|
10
|
+
}, never>> & Omit<import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
7
11
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Floating/Popover/styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Floating/Popover/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,UAAU,2DAOtB,CAAC;AACF,eAAO,MAAM,WAAW,2DAOvB,CAAC;AAEF,eAAO,MAAM,2BAA2B;cAAyB,aAAa,CAAC,QAAQ,CAAC;GAIvF,CAAA;AAED,eAAO,MAAM,oBAAoB;;gLAwBhC,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
2
2
|
import { PopoverContent } from '@radix-ui/react-popover';
|
|
3
3
|
import { contents000, bg100 } from '@remember-web/mixin';
|
|
4
|
-
import styled, { keyframes } from 'styled-components';
|
|
4
|
+
import styled, { keyframes, css } from 'styled-components';
|
|
5
5
|
|
|
6
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
7
7
|
var showFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
8
8
|
var showFadeOut = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n"])));
|
|
9
|
-
var
|
|
9
|
+
var StyledPopoverContentWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n [data-radix-popper-content-wrapper]{\n ", "\n }\n"])), function (_ref) {
|
|
10
|
+
var $zIndex = _ref.$zIndex;
|
|
11
|
+
return $zIndex && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([" z-index: ", " !important; "])), $zIndex);
|
|
12
|
+
});
|
|
13
|
+
var StyledPopoverContent = styled(PopoverContent)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ", ";\n background-color: ", ";\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ", " 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ", " 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n"])), contents000, bg100, showFadeIn, showFadeOut);
|
|
10
14
|
StyledPopoverContent.defaultProps = {
|
|
11
15
|
avoidCollisions: true,
|
|
12
16
|
align: 'start',
|
|
@@ -14,5 +18,5 @@ StyledPopoverContent.defaultProps = {
|
|
|
14
18
|
sideOffset: 4
|
|
15
19
|
};
|
|
16
20
|
|
|
17
|
-
export { StyledPopoverContent, showFadeIn, showFadeOut };
|
|
21
|
+
export { StyledPopoverContent, StyledPopoverContentWrapper, showFadeIn, showFadeOut };
|
|
18
22
|
//# sourceMappingURL=styles.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.esm.js","sources":["../../../../src/Floating/Popover/styles.ts"],"sourcesContent":["import { PopoverContent } from '@radix-ui/react-popover';\nimport { bg100, contents000 } from '@remember-web/mixin';\nimport styled, { keyframes } from 'styled-components';\n\nexport const showFadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\nexport const showFadeOut = keyframes`\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n`;\n\nexport const StyledPopoverContent = styled(PopoverContent)`\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ${contents000};\n background-color: ${bg100};\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ${showFadeIn} 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ${showFadeOut} 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n`;\n\nStyledPopoverContent.defaultProps = {\n avoidCollisions: true,\n align: 'start',\n side: 'bottom',\n sideOffset: 4,\n};\n"],"names":["showFadeIn","keyframes","_templateObject","_taggedTemplateLiteral","showFadeOut","_templateObject2","
|
|
1
|
+
{"version":3,"file":"styles.esm.js","sources":["../../../../src/Floating/Popover/styles.ts"],"sourcesContent":["import { PopoverContent, PopoverContentProps } from '@radix-ui/react-popover';\nimport { bg100, contents000 } from '@remember-web/mixin';\nimport { CSSProperties } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\n\nexport const showFadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\nexport const showFadeOut = keyframes`\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<{$zIndex?: CSSProperties['zIndex']}>`\n [data-radix-popper-content-wrapper]{\n ${({$zIndex}) => $zIndex && css` z-index: ${$zIndex} !important; `}\n }\n`\n\nexport const StyledPopoverContent = styled(PopoverContent)`\n contain: paint;\n width: fit-content;\n margin: 0;\n padding: 0;\n border-radius: 4px;\n\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n color: ${contents000};\n background-color: ${bg100};\n white-space: pre-line;\n\n height: 100%;\n will-change: box-shadow;\n\n &:focus {\n outline: none;\n }\n &[data-state='open'] {\n animation: ${showFadeIn} 0.12s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n &:not([data-state='open']) {\n animation: ${showFadeOut} 0.16s cubic-bezier(0.35, 0, 0.25, 1) both;\n }\n`;\n\nStyledPopoverContent.defaultProps = {\n avoidCollisions: true,\n align: 'start',\n side: 'bottom',\n sideOffset: 4,\n};\n"],"names":["showFadeIn","keyframes","_templateObject","_taggedTemplateLiteral","showFadeOut","_templateObject2","StyledPopoverContentWrapper","styled","div","_templateObject3","_ref","$zIndex","css","_templateObject4","StyledPopoverContent","PopoverContent","_templateObject5","contents000","bg100","defaultProps","avoidCollisions","align","side","sideOffset"],"mappings":";;;;;;AAKO,IAAMA,UAAU,GAAGC,SAAS,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,CAOlC,CAAA,kFAAA,CAAA,CAAA,CAAA,EAAA;AACM,IAAMC,WAAW,GAAGH,SAAS,CAAAI,gBAAA,KAAAA,gBAAA,GAAAF,sBAAA,CAOnC,CAAA,kFAAA,CAAA,CAAA,CAAA,EAAA;AAEYG,IAAAA,2BAA2B,GAAGC,MAAM,CAACC,GAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAN,sBAAA,CAAA,CAAA,gDAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAE/C,UAAAO,IAAA,EAAA;AAAA,EAAA,IAAEC,OAAO,GAAAD,IAAA,CAAPC,OAAO,CAAA;EAAA,OAAMA,OAAO,IAAIC,GAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAV,sBAAA,CAAaQ,CAAAA,YAAAA,EAAAA,eAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAO,CAAe,CAAA;AAAA,CAErE,EAAA;AAEM,IAAMG,oBAAoB,GAAGP,MAAM,CAACQ,cAAc,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAAb,sBAAA,2fAQ/Cc,WAAW,EACAC,KAAK,EAUVlB,UAAU,EAGVI,WAAW,EAE3B;AAEDU,oBAAoB,CAACK,YAAY,GAAG;AAClCC,EAAAA,eAAe,EAAE,IAAI;AACrBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,UAAU,EAAE,CAAA;AACd,CAAC;;;;"}
|
|
@@ -97,35 +97,37 @@ function Tooltip(_ref) {
|
|
|
97
97
|
children: children
|
|
98
98
|
})
|
|
99
99
|
}), /*#__PURE__*/jsxRuntime.jsx(RadixTooltip__namespace.Portal, {
|
|
100
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
101
|
-
$size: size,
|
|
102
|
-
$maxWidth: maxWidth,
|
|
103
|
-
$backgroundColor: backgroundColor,
|
|
104
|
-
$contentColor: contentColor,
|
|
105
|
-
$textAlign: textAlign,
|
|
100
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.TooltipContentWrapper, {
|
|
106
101
|
$zIndex: zIndex,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
onClick: function onClick() {
|
|
121
|
-
return _setOpen(false);
|
|
102
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(styles.TooltipContent, {
|
|
103
|
+
$size: size,
|
|
104
|
+
$maxWidth: maxWidth,
|
|
105
|
+
$backgroundColor: backgroundColor,
|
|
106
|
+
$contentColor: contentColor,
|
|
107
|
+
$textAlign: textAlign,
|
|
108
|
+
sideOffset: gap,
|
|
109
|
+
side: side,
|
|
110
|
+
onPointerDownOutside: function onPointerDownOutside(e) {
|
|
111
|
+
if (isClickType) {
|
|
112
|
+
_setOpen(false);
|
|
113
|
+
}
|
|
114
|
+
onClickOutside === null || onClickOutside === void 0 || onClickOutside(e);
|
|
122
115
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
collisionPadding: 20,
|
|
117
|
+
onClick: function onClick(e) {
|
|
118
|
+
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
119
|
+
},
|
|
120
|
+
children: [content, type === 'closeButton' && /*#__PURE__*/jsxRuntime.jsx(styles.CloseButton, {
|
|
121
|
+
onClick: function onClick() {
|
|
122
|
+
return _setOpen(false);
|
|
123
|
+
},
|
|
124
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icon.IconCloseS, {})
|
|
125
|
+
}), types.isLargeSizeProps(props) && props.hasArrow && /*#__PURE__*/jsxRuntime.jsx(RadixTooltip__namespace.Arrow, {
|
|
126
|
+
width: 14,
|
|
127
|
+
height: 8,
|
|
128
|
+
color: backgroundColor
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
129
131
|
})
|
|
130
132
|
})]
|
|
131
133
|
})
|