@xyo-network/react-property 2.64.0-rc.2 → 2.64.0-rc.4
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/browser/components/Action.d.mts.map +1 -0
- package/dist/browser/components/Action.d.ts.map +1 -0
- package/dist/browser/components/Action.js +1 -0
- package/dist/browser/components/Action.js.map +1 -0
- package/dist/browser/components/Actions.d.mts.map +1 -0
- package/dist/browser/components/Actions.d.ts.map +1 -0
- package/dist/browser/components/Actions.js +16 -0
- package/dist/browser/components/Actions.js.map +1 -0
- package/dist/browser/components/ActionsMenu.d.mts.map +1 -0
- package/dist/browser/components/ActionsMenu.d.ts.map +1 -0
- package/dist/browser/components/ActionsMenu.js +35 -0
- package/dist/browser/components/ActionsMenu.js.map +1 -0
- package/dist/browser/components/ActionsProps.d.mts.map +1 -0
- package/dist/browser/components/ActionsProps.d.ts.map +1 -0
- package/dist/browser/components/ActionsProps.js +1 -0
- package/dist/browser/components/ActionsProps.js.map +1 -0
- package/dist/browser/components/Group.d.mts.map +1 -0
- package/dist/browser/components/Group.d.ts.map +1 -0
- package/dist/browser/components/Group.js +25 -0
- package/dist/browser/components/Group.js.map +1 -0
- package/dist/browser/components/IdenticonCorner.d.mts.map +1 -0
- package/dist/browser/components/IdenticonCorner.d.ts.map +1 -0
- package/dist/browser/components/IdenticonCorner.js +19 -0
- package/dist/browser/components/IdenticonCorner.js.map +1 -0
- package/dist/browser/components/Property.d.mts.map +1 -0
- package/dist/browser/components/Property.d.ts.map +1 -0
- package/dist/browser/components/Property.js +61 -0
- package/dist/browser/components/Property.js.map +1 -0
- package/dist/browser/components/PropertyBox.stories.js +160 -0
- package/dist/browser/components/PropertyBox.stories.js.map +1 -0
- package/dist/browser/components/PropertyPaper.stories.js +178 -0
- package/dist/browser/components/PropertyPaper.stories.js.map +1 -0
- package/dist/browser/components/Props.d.mts.map +1 -0
- package/dist/browser/components/Props.d.ts.map +1 -0
- package/dist/browser/components/Props.js +1 -0
- package/dist/browser/components/Props.js.map +1 -0
- package/dist/browser/components/Title.d.mts.map +1 -0
- package/dist/browser/components/Title.d.ts.map +1 -0
- package/dist/browser/components/Title.js +47 -0
- package/dist/browser/components/Title.js.map +1 -0
- package/dist/browser/components/Title.stories.js +27 -0
- package/dist/browser/components/Title.stories.js.map +1 -0
- package/dist/browser/components/Value.d.mts.map +1 -0
- package/dist/browser/components/Value.d.ts.map +1 -0
- package/dist/browser/components/Value.js +11 -0
- package/dist/browser/components/Value.js.map +1 -0
- package/dist/browser/components/Value.stories.js +26 -0
- package/dist/browser/components/Value.stories.js.map +1 -0
- package/dist/browser/components/index.d.mts.map +1 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/components/index.js +7 -0
- package/dist/browser/components/index.js.map +1 -0
- package/dist/{index.d.mts.map → browser/index.d.mts.map} +1 -1
- package/dist/{index.d.ts.map → browser/index.d.ts.map} +1 -1
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/node/components/Action.d.mts +8 -0
- package/dist/node/components/Action.d.mts.map +1 -0
- package/dist/node/components/Action.d.ts +8 -0
- package/dist/node/components/Action.d.ts.map +1 -0
- package/dist/node/components/Action.js +17 -0
- package/dist/node/components/Action.js.map +1 -0
- package/dist/node/components/Action.mjs +1 -0
- package/dist/node/components/Action.mjs.map +1 -0
- package/dist/node/components/Actions.d.mts +4 -0
- package/dist/node/components/Actions.d.mts.map +1 -0
- package/dist/node/components/Actions.d.ts +4 -0
- package/dist/node/components/Actions.d.ts.map +1 -0
- package/dist/node/components/Actions.js +40 -0
- package/dist/node/components/Actions.js.map +1 -0
- package/dist/node/components/Actions.mjs +16 -0
- package/dist/node/components/Actions.mjs.map +1 -0
- package/dist/node/components/ActionsMenu.d.mts +4 -0
- package/dist/node/components/ActionsMenu.d.mts.map +1 -0
- package/dist/node/components/ActionsMenu.d.ts +4 -0
- package/dist/node/components/ActionsMenu.d.ts.map +1 -0
- package/dist/node/components/ActionsMenu.js +59 -0
- package/dist/node/components/ActionsMenu.js.map +1 -0
- package/dist/node/components/ActionsMenu.mjs +35 -0
- package/dist/node/components/ActionsMenu.mjs.map +1 -0
- package/dist/node/components/ActionsProps.d.mts +7 -0
- package/dist/node/components/ActionsProps.d.mts.map +1 -0
- package/dist/node/components/ActionsProps.d.ts +7 -0
- package/dist/node/components/ActionsProps.d.ts.map +1 -0
- package/dist/node/components/ActionsProps.js +17 -0
- package/dist/node/components/ActionsProps.js.map +1 -0
- package/dist/node/components/ActionsProps.mjs +1 -0
- package/dist/node/components/ActionsProps.mjs.map +1 -0
- package/dist/node/components/Group.d.mts +4 -0
- package/dist/node/components/Group.d.mts.map +1 -0
- package/dist/node/components/Group.d.ts +4 -0
- package/dist/node/components/Group.d.ts.map +1 -0
- package/dist/node/components/Group.js +49 -0
- package/dist/node/components/Group.js.map +1 -0
- package/dist/node/components/Group.mjs +25 -0
- package/dist/node/components/Group.mjs.map +1 -0
- package/dist/node/components/IdenticonCorner.d.mts +7 -0
- package/dist/node/components/IdenticonCorner.d.mts.map +1 -0
- package/dist/node/components/IdenticonCorner.d.ts +7 -0
- package/dist/node/components/IdenticonCorner.d.ts.map +1 -0
- package/dist/node/components/IdenticonCorner.js +43 -0
- package/dist/node/components/IdenticonCorner.js.map +1 -0
- package/dist/node/components/IdenticonCorner.mjs +19 -0
- package/dist/node/components/IdenticonCorner.mjs.map +1 -0
- package/dist/node/components/Property.d.mts +4 -0
- package/dist/node/components/Property.d.mts.map +1 -0
- package/dist/node/components/Property.d.ts +4 -0
- package/dist/node/components/Property.d.ts.map +1 -0
- package/dist/node/components/Property.js +85 -0
- package/dist/node/components/Property.js.map +1 -0
- package/dist/node/components/Property.mjs +61 -0
- package/dist/node/components/Property.mjs.map +1 -0
- package/dist/node/components/PropertyBox.stories.js +197 -0
- package/dist/node/components/PropertyBox.stories.js.map +1 -0
- package/dist/node/components/PropertyBox.stories.mjs +160 -0
- package/dist/node/components/PropertyBox.stories.mjs.map +1 -0
- package/dist/node/components/PropertyPaper.stories.js +217 -0
- package/dist/node/components/PropertyPaper.stories.js.map +1 -0
- package/dist/node/components/PropertyPaper.stories.mjs +178 -0
- package/dist/node/components/PropertyPaper.stories.mjs.map +1 -0
- package/dist/node/components/Props.d.mts +35 -0
- package/dist/node/components/Props.d.mts.map +1 -0
- package/dist/node/components/Props.d.ts +35 -0
- package/dist/node/components/Props.d.ts.map +1 -0
- package/dist/node/components/Props.js +17 -0
- package/dist/node/components/Props.js.map +1 -0
- package/dist/node/components/Props.mjs +1 -0
- package/dist/node/components/Props.mjs.map +1 -0
- package/dist/node/components/Title.d.mts +13 -0
- package/dist/node/components/Title.d.mts.map +1 -0
- package/dist/node/components/Title.d.ts +13 -0
- package/dist/node/components/Title.d.ts.map +1 -0
- package/dist/node/components/Title.js +71 -0
- package/dist/node/components/Title.js.map +1 -0
- package/dist/node/components/Title.mjs +47 -0
- package/dist/node/components/Title.mjs.map +1 -0
- package/dist/node/components/Title.stories.js +53 -0
- package/dist/node/components/Title.stories.js.map +1 -0
- package/dist/node/components/Title.stories.mjs +27 -0
- package/dist/node/components/Title.stories.mjs.map +1 -0
- package/dist/node/components/Value.d.mts +9 -0
- package/dist/node/components/Value.d.mts.map +1 -0
- package/dist/node/components/Value.d.ts +9 -0
- package/dist/node/components/Value.d.ts.map +1 -0
- package/dist/node/components/Value.js +35 -0
- package/dist/node/components/Value.js.map +1 -0
- package/dist/node/components/Value.mjs +11 -0
- package/dist/node/components/Value.mjs.map +1 -0
- package/dist/node/components/Value.stories.js +51 -0
- package/dist/node/components/Value.stories.js.map +1 -0
- package/dist/node/components/Value.stories.mjs +26 -0
- package/dist/node/components/Value.stories.mjs.map +1 -0
- package/dist/node/components/index.d.mts +7 -0
- package/dist/node/components/index.d.mts.map +1 -0
- package/dist/node/components/index.d.ts +7 -0
- package/dist/node/components/index.d.ts.map +1 -0
- package/dist/node/components/index.js +33 -0
- package/dist/node/components/index.js.map +1 -0
- package/dist/node/components/index.mjs +7 -0
- package/dist/node/components/index.mjs.map +1 -0
- package/dist/node/index.d.mts +2 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +23 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/index.mjs +2 -0
- package/dist/node/index.mjs.map +1 -0
- package/package.json +23 -23
- package/dist/components/Action.d.mts.map +0 -1
- package/dist/components/Action.d.ts.map +0 -1
- package/dist/components/Actions.d.mts.map +0 -1
- package/dist/components/Actions.d.ts.map +0 -1
- package/dist/components/ActionsMenu.d.mts.map +0 -1
- package/dist/components/ActionsMenu.d.ts.map +0 -1
- package/dist/components/ActionsProps.d.mts.map +0 -1
- package/dist/components/ActionsProps.d.ts.map +0 -1
- package/dist/components/Group.d.mts.map +0 -1
- package/dist/components/Group.d.ts.map +0 -1
- package/dist/components/IdenticonCorner.d.mts.map +0 -1
- package/dist/components/IdenticonCorner.d.ts.map +0 -1
- package/dist/components/Property.d.mts.map +0 -1
- package/dist/components/Property.d.ts.map +0 -1
- package/dist/components/PropertyBox.stories.d.mts +0 -19
- package/dist/components/PropertyBox.stories.d.mts.map +0 -1
- package/dist/components/PropertyBox.stories.d.ts +0 -19
- package/dist/components/PropertyBox.stories.d.ts.map +0 -1
- package/dist/components/PropertyPaper.stories.d.mts +0 -22
- package/dist/components/PropertyPaper.stories.d.mts.map +0 -1
- package/dist/components/PropertyPaper.stories.d.ts +0 -22
- package/dist/components/PropertyPaper.stories.d.ts.map +0 -1
- package/dist/components/Props.d.mts.map +0 -1
- package/dist/components/Props.d.ts.map +0 -1
- package/dist/components/Title.d.mts.map +0 -1
- package/dist/components/Title.d.ts.map +0 -1
- package/dist/components/Title.stories.d.mts +0 -7
- package/dist/components/Title.stories.d.mts.map +0 -1
- package/dist/components/Title.stories.d.ts +0 -7
- package/dist/components/Title.stories.d.ts.map +0 -1
- package/dist/components/Value.d.mts.map +0 -1
- package/dist/components/Value.d.ts.map +0 -1
- package/dist/components/Value.stories.d.mts +0 -7
- package/dist/components/Value.stories.d.mts.map +0 -1
- package/dist/components/Value.stories.d.ts +0 -7
- package/dist/components/Value.stories.d.ts.map +0 -1
- package/dist/components/index.d.mts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/index.js +0 -225
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -195
- package/dist/index.mjs.map +0 -1
- /package/dist/{components → browser/components}/Action.d.mts +0 -0
- /package/dist/{components → browser/components}/Action.d.ts +0 -0
- /package/dist/{components → browser/components}/Actions.d.mts +0 -0
- /package/dist/{components → browser/components}/Actions.d.ts +0 -0
- /package/dist/{components → browser/components}/ActionsMenu.d.mts +0 -0
- /package/dist/{components → browser/components}/ActionsMenu.d.ts +0 -0
- /package/dist/{components → browser/components}/ActionsProps.d.mts +0 -0
- /package/dist/{components → browser/components}/ActionsProps.d.ts +0 -0
- /package/dist/{components → browser/components}/Group.d.mts +0 -0
- /package/dist/{components → browser/components}/Group.d.ts +0 -0
- /package/dist/{components → browser/components}/IdenticonCorner.d.mts +0 -0
- /package/dist/{components → browser/components}/IdenticonCorner.d.ts +0 -0
- /package/dist/{components → browser/components}/Property.d.mts +0 -0
- /package/dist/{components → browser/components}/Property.d.ts +0 -0
- /package/dist/{components → browser/components}/Props.d.mts +0 -0
- /package/dist/{components → browser/components}/Props.d.ts +0 -0
- /package/dist/{components → browser/components}/Title.d.mts +0 -0
- /package/dist/{components → browser/components}/Title.d.ts +0 -0
- /package/dist/{components → browser/components}/Value.d.mts +0 -0
- /package/dist/{components → browser/components}/Value.d.ts +0 -0
- /package/dist/{components → browser/components}/index.d.mts +0 -0
- /package/dist/{components → browser/components}/index.d.ts +0 -0
- /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
- /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PropertyPaper.stories.tsx"],"sourcesContent":["import { Replay as ReplayIcon } from '@mui/icons-material'\nimport { TextField } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { PayloadWrapper } from '@xyo-network/payload-wrapper'\nimport { sampleBlockWithPayloads, useAppThemeDecorator } from '@xyo-network/react-storybook'\n\nimport { Property } from './Property'\nimport { PropertyPaperProps, PropertyProps } from './Props'\n\nconst StorybookEntry = {\n argTypes: {},\n component: Property,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/PropertyPaper',\n} as Meta<typeof Property>\n\nconst Template: StoryFn<typeof Property> = (args: PropertyProps) => <Property {...(args as PropertyPaperProps)} paper={true}></Property>\n\nconst TemplateWithCompare: StoryFn<typeof Property> = (args: PropertyProps) => (\n <FlexCol gap={1} alignItems=\"stretch\">\n <FlexRow gap={1}>\n <TextField size=\"small\" value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField size=\"medium\" value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n </FlexRow>\n </FlexCol>\n)\n\nconst Default = Template.bind({})\nDefault.args = {}\nDefault.decorators = [useAppThemeDecorator]\n\nconst WithTitle = Template.bind({})\nWithTitle.args = { title: 'No Data' }\nWithTitle.decorators = [useAppThemeDecorator]\n\nconst WithUndefinedData = Template.bind({})\nWithUndefinedData.args = { title: 'Block Hash' }\nWithUndefinedData.decorators = [useAppThemeDecorator]\n\nconst WithData = Template.bind({})\nWithData.args = { title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithData.decorators = [useAppThemeDecorator]\n\nconst WithDataSmall = Template.bind({})\nWithDataSmall.args = { size: 'small', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataCompare = TemplateWithCompare.bind({})\nWithDataCompare.args = { tip: 'This is the block hash', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataCompare.decorators = [useAppThemeDecorator]\n\nconst WithDataCompareOutlined = TemplateWithCompare.bind({})\nWithDataCompareOutlined.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n variant: 'outlined',\n}\nWithDataCompareOutlined.decorators = [useAppThemeDecorator]\n\nconst WithDataCompareElevation = TemplateWithCompare.bind({})\nWithDataCompareElevation.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n variant: 'elevation',\n}\nWithDataCompareElevation.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeSmall = Template.bind({})\nWithDataAndBadgeSmall.args = {\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeMedium = Template.bind({})\nWithDataAndBadgeMedium.args = {\n badge: true,\n size: 'medium',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeMedium.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeLarge = Template.bind({})\nWithDataAndBadgeLarge.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeLarge.decorators = [useAppThemeDecorator]\n\nconst WithTip = Template.bind({})\nWithTip.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTip.decorators = [useAppThemeDecorator]\n\nconst WithTipAndBadge = Template.bind({})\nWithTipAndBadge.args = {\n badge: true,\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTipAndBadge.decorators = [useAppThemeDecorator]\n\nconst WithActions = Template.bind({})\nWithActions.args = {\n actions: [{ name: 'ActionOne' }, { name: 'ActionTwo' }],\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithActions.decorators = [useAppThemeDecorator]\n\nconst LargeWithValue = Template.bind({})\nLargeWithValue.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValue.decorators = [useAppThemeDecorator]\n\nconst LargeWithValueAndActions = Template.bind({})\nLargeWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValueAndActions.decorators = [useAppThemeDecorator]\n\nconst SmallWithValueAndActions = Template.bind({})\nSmallWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nSmallWithValueAndActions.decorators = [useAppThemeDecorator]\n\nexport {\n Default,\n LargeWithValue,\n LargeWithValueAndActions,\n SmallWithValueAndActions,\n WithActions,\n WithData,\n WithDataAndBadgeLarge,\n WithDataAndBadgeMedium,\n WithDataAndBadgeSmall,\n WithDataCompare,\n WithDataCompareElevation,\n WithDataCompareOutlined,\n WithDataSmall,\n WithTip,\n WithTipAndBadge,\n WithUndefinedData,\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAqBoE,cAIhE,YAJgE;AArBpE,SAAS,UAAU,kBAAkB;AACrC,SAAS,iBAAiB;AAE1B,SAAS,SAAS,eAAe;AACjC,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB,4BAA4B;AAE9D,SAAS,gBAAgB;AAGzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,CAAC,SAAwB,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM;AAE7H,MAAM,sBAAgD,CAAC,SACrD,qBAAC,WAAQ,KAAK,GAAG,YAAW,WAC1B;AAAA,uBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,aAAU,MAAK,SAAQ,OAAM,qBAAoB;AAAA,IAClD,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,KACxE;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,IACtE,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,KACxE;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,aAAU,MAAK,U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AAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,YAAY,GAAG;IACb,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAEH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GACrD,UAAU,GAAG;IACX,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,kBAAkB,CAAA;AAEjE,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAA;AAEtD,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GACxD,YAAY,GAAG;IACb,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAEH,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,GAC1D,UAAU,GAAG;IACX,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAEH,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,uBAAuB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqDtD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqDtD,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { darken, lighten, Typography, useTheme } from "@mui/material";
|
|
3
|
+
import { FlexRow } from "@xylabs/react-flexbox";
|
|
4
|
+
import { QuickTipButton } from "@xylabs/react-quick-tip-button";
|
|
5
|
+
const PropertyTitle = ({ elevation = 1, size = "medium", tip, more, title, ...props }) => {
|
|
6
|
+
const sizeVariants = {
|
|
7
|
+
full: "caption",
|
|
8
|
+
large: "caption",
|
|
9
|
+
medium: "caption",
|
|
10
|
+
small: "caption"
|
|
11
|
+
};
|
|
12
|
+
const sizeTitleHeight = {
|
|
13
|
+
full: void 0,
|
|
14
|
+
large: 32,
|
|
15
|
+
medium: 20,
|
|
16
|
+
small: 16
|
|
17
|
+
};
|
|
18
|
+
const sizeFontSize = {
|
|
19
|
+
full: 16,
|
|
20
|
+
large: 16,
|
|
21
|
+
medium: 14,
|
|
22
|
+
small: 10
|
|
23
|
+
};
|
|
24
|
+
const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16;
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
FlexRow,
|
|
28
|
+
{
|
|
29
|
+
bgcolor: theme.palette.mode === "dark" ? lighten(theme.palette.background.paper, 0.05 * elevation) : darken(theme.palette.background.paper, 0.025 * elevation),
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
height: sizeTitleHeight[size],
|
|
32
|
+
justifyContent: "space-between",
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxs(FlexRow, { paddingX: 1, paddingY: 0.5, children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Typography, { fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size], children: /* @__PURE__ */ jsx("small", { children: /* @__PURE__ */ jsx("strong", { children: title }) }) }),
|
|
37
|
+
tip ? /* @__PURE__ */ jsx(QuickTipButton, { style: { fontSize: quickTipSize }, color: "inherit", title: title ?? "", children: tip }) : null
|
|
38
|
+
] }),
|
|
39
|
+
more
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
PropertyTitle
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Title.tsx"],"sourcesContent":["import { darken, lighten, Typography, TypographyVariant, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { QuickTipButton } from '@xylabs/react-quick-tip-button'\nimport { SizeProp } from '@xyo-network/react-shared'\nimport { ReactNode } from 'react'\n\nexport type TitleSizeProp = SizeProp | 'full'\n\nexport interface PropertyTitleProps extends FlexBoxProps {\n elevation?: number\n more?: ReactNode\n size?: TitleSizeProp\n tip?: ReactNode\n title?: string\n}\n\nexport const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, size = 'medium', tip, more, title, ...props }) => {\n const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {\n full: 'caption',\n large: 'caption',\n medium: 'caption',\n small: 'caption',\n }\n\n const sizeTitleHeight: Record<TitleSizeProp, number | undefined> = {\n full: undefined,\n large: 32,\n medium: 20,\n small: 16,\n }\n\n const sizeFontSize: Record<TitleSizeProp, number> = {\n full: 16,\n large: 16,\n medium: 14,\n small: 10,\n }\n\n const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16\n\n const theme = useTheme()\n\n return (\n <FlexRow\n bgcolor={\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.background.paper, 0.05 * elevation)\n : darken(theme.palette.background.paper, 0.025 * elevation)\n }\n alignItems=\"center\"\n height={sizeTitleHeight[size]}\n justifyContent=\"space-between\"\n {...props}\n >\n <FlexRow paddingX={1} paddingY={0.5}>\n <Typography fontWeight={500} noWrap variant={sizeVariants[size]} fontSize={sizeFontSize[size]}>\n <small>\n <strong>{title}</strong>\n </small>\n </Typography>\n {tip ? (\n <QuickTipButton style={{ fontSize: quickTipSize }} color=\"inherit\" title={title ?? ''}>\n {tip}\n </QuickTipButton>\n ) : null}\n </FlexRow>\n {more}\n </FlexRow>\n )\n}\n"],"mappings":"AAsDM,SAGM,KAHN;AAtDN,SAAS,QAAQ,SAAS,YAA+B,gBAAgB;AACzE,SAAuB,eAAe;AACtC,SAAS,sBAAsB;AAcxB,MAAM,gBAA8C,CAAC,EAAE,YAAY,GAAG,OAAO,UAAU,KAAK,MAAM,OAAO,GAAG,MAAM,MAAM;AAC7H,QAAM,eAAyD;AAAA,IAC7D,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,kBAA6D;AAAA,IACjE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAA8C;AAAA,IAClD,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAAe,aAAa,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI;AAEpE,QAAM,QAAQ,SAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SACE,MAAM,QAAQ,SAAS,SACnB,QAAQ,MAAM,QAAQ,WAAW,OAAO,OAAO,SAAS,IACxD,OAAO,MAAM,QAAQ,WAAW,OAAO,QAAQ,SAAS;AAAA,MAE9D,YAAW;AAAA,MACX,QAAQ,gBAAgB,IAAI;AAAA,MAC5B,gBAAe;AAAA,MACd,GAAG;AAAA,MAEJ;AAAA,6BAAC,WAAQ,UAAU,GAAG,UAAU,KAC9B;AAAA,8BAAC,cAAW,YAAY,KAAK,QAAM,MAAC,SAAS,aAAa,IAAI,GAAG,UAAU,aAAa,IAAI,GAC1F,8BAAC,WACC,8BAAC,YAAQ,iBAAM,GACjB,GACF;AAAA,UACC,MACC,oBAAC,kBAAe,OAAO,EAAE,UAAU,aAAa,GAAG,OAAM,WAAU,OAAO,SAAS,IAChF,eACH,IACE;AAAA,WACN;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PropertyTitle } from "./Title";
|
|
3
|
+
const StorybookEntry = {
|
|
4
|
+
argTypes: {},
|
|
5
|
+
component: PropertyTitle,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
page: null
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
title: "property/Title"
|
|
12
|
+
};
|
|
13
|
+
const Template = (args) => /* @__PURE__ */ jsx(PropertyTitle, { ...args });
|
|
14
|
+
const Default = Template.bind({});
|
|
15
|
+
Default.args = {};
|
|
16
|
+
const WithData = Template.bind({});
|
|
17
|
+
WithData.args = { title: "Sample Title" };
|
|
18
|
+
const WithDataAndActions = Template.bind({});
|
|
19
|
+
WithDataAndActions.args = { title: "Sample Title" };
|
|
20
|
+
var Title_stories_default = StorybookEntry;
|
|
21
|
+
export {
|
|
22
|
+
Default,
|
|
23
|
+
WithData,
|
|
24
|
+
WithDataAndActions,
|
|
25
|
+
Title_stories_default as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Title.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Title.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\n\nimport { PropertyTitle } from './Title'\n\nconst StorybookEntry = {\n argTypes: {},\n component: PropertyTitle,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/Title',\n} as Meta<typeof PropertyTitle>\n\nconst Template: StoryFn<typeof PropertyTitle> = (args) => <PropertyTitle {...args}></PropertyTitle>\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithData = Template.bind({})\n\nWithData.args = { title: 'Sample Title' }\n\nconst WithDataAndActions = Template.bind({})\n\nWithDataAndActions.args = { title: 'Sample Title' }\n\nexport { Default, WithData, WithDataAndActions }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAe0D;AAb1D,SAAS,qBAAqB;AAE9B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAA0C,CAAC,SAAS,oBAAC,iBAAe,GAAG,MAAM;AAEnF,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,WAAW,SAAS,KAAK,CAAC,CAAC;AAEjC,SAAS,OAAO,EAAE,OAAO,eAAe;AAExC,MAAM,qBAAqB,SAAS,KAAK,CAAC,CAAC;AAE3C,mBAAmB,OAAO,EAAE,OAAO,eAAe;AAKlD,IAAO,wBAAQ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../src/components/Value.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AACpE,OAAO,EAAgB,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,aAAa,+GAMxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../src/components/Value.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AACpE,OAAO,EAAgB,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,aAAa,+GAMxB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EllipsizeBox } from "@xyo-network/react-shared";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const PropertyValue = forwardRef(({ typographyVariant = "body1", value, ...props }, ref) => {
|
|
5
|
+
return value !== void 0 ? /* @__PURE__ */ jsx(EllipsizeBox, { typographyProps: { component: void 0, title: value?.toString(), variant: typographyVariant }, width: "100%", ref, ...props, children: value }) : null;
|
|
6
|
+
});
|
|
7
|
+
PropertyValue.displayName = "PropertyValue";
|
|
8
|
+
export {
|
|
9
|
+
PropertyValue
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Value.tsx"],"sourcesContent":["import type { Variant } from '@mui/material/styles/createTypography'\nimport { EllipsizeBox, EllipsizeBoxProps } from '@xyo-network/react-shared'\nimport { forwardRef } from 'react'\n\nexport interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {\n typographyVariant?: Variant\n value?: string | number | boolean | null\n}\n\nexport const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({ typographyVariant = 'body1', value, ...props }, ref) => {\n return value !== undefined ? (\n <EllipsizeBox typographyProps={{ component: undefined, title: value?.toString(), variant: typographyVariant }} width=\"100%\" ref={ref} {...props}>\n {value}\n </EllipsizeBox>\n ) : null\n})\n\nPropertyValue.displayName = 'PropertyValue'\n"],"mappings":"AAWI;AAVJ,SAAS,oBAAuC;AAChD,SAAS,kBAAkB;AAOpB,MAAM,gBAAgB,WAA+C,CAAC,EAAE,oBAAoB,SAAS,OAAO,GAAG,MAAM,GAAG,QAAQ;AACrI,SAAO,UAAU,SACf,oBAAC,gBAAa,iBAAiB,EAAE,WAAW,QAAW,OAAO,OAAO,SAAS,GAAG,SAAS,kBAAkB,GAAG,OAAM,QAAO,KAAW,GAAG,OACvI,iBACH,IACE;AACN,CAAC;AAED,cAAc,cAAc;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PayloadWrapper } from "@xyo-network/payload-wrapper";
|
|
3
|
+
import { sampleBlockWithPayloads } from "@xyo-network/react-storybook";
|
|
4
|
+
import { PropertyValue } from "./Value";
|
|
5
|
+
const StorybookEntry = {
|
|
6
|
+
argTypes: {},
|
|
7
|
+
component: PropertyValue,
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
page: null
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
title: "property/Value"
|
|
14
|
+
};
|
|
15
|
+
const Template = (args) => /* @__PURE__ */ jsx(PropertyValue, { ...args });
|
|
16
|
+
const Default = Template.bind({});
|
|
17
|
+
Default.args = {};
|
|
18
|
+
const WithData = Template.bind({});
|
|
19
|
+
WithData.args = { value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
20
|
+
var Value_stories_default = StorybookEntry;
|
|
21
|
+
export {
|
|
22
|
+
Default,
|
|
23
|
+
WithData,
|
|
24
|
+
Value_stories_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Value.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Value.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { PayloadWrapper } from '@xyo-network/payload-wrapper'\nimport { sampleBlockWithPayloads } from '@xyo-network/react-storybook'\n\nimport { PropertyValue } from './Value'\n\nconst StorybookEntry = {\n argTypes: {},\n component: PropertyValue,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/Value',\n} as Meta<typeof PropertyValue>\n\nconst Template: StoryFn<typeof PropertyValue> = (args) => <PropertyValue {...args}></PropertyValue>\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithData = Template.bind({})\n\nWithData.args = { value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\n\nexport { Default, WithData }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAiB0D;AAhB1D,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AAExC,SAAS,qBAAqB;AAE9B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAA0C,CAAC,SAAS,oBAAC,iBAAe,GAAG,MAAM;AAEnF,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,WAAW,SAAS,KAAK,CAAC,CAAC;AAEjC,SAAS,OAAO,EAAE,OAAO,eAAe,SAAS,uBAAuB,EAAE;AAK1E,IAAO,wBAAQ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './Action'\nexport * from './Group'\nexport * from './Property'\nexport * from './Props'\nexport * from './Title'\nexport * from './Value'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var Action_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(Action_exports);
|
|
17
|
+
//# sourceMappingURL=Action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Action.ts"],"sourcesContent":["import { ReactNode } from 'react'\n\nexport interface PropertyAction {\n disabled?: boolean\n icon?: ReactNode\n name: string\n onClick?: () => void\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmB1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmB1D,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Actions_exports = {};
|
|
20
|
+
__export(Actions_exports, {
|
|
21
|
+
PropertyActions: () => PropertyActions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Actions_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_material = require("@mui/material");
|
|
26
|
+
var import_react_button = require("@xylabs/react-button");
|
|
27
|
+
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
28
|
+
const PropertyActions = ({ buttons = false, actions, ...props }) => {
|
|
29
|
+
if (actions) {
|
|
30
|
+
return (actions?.length ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
|
|
31
|
+
return action.icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: action.onClick, children: action.icon }, index) : buttons ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_button.ButtonEx, { paddingY: 0, color: "primary", size: "small", disabled: action.disabled, onClick: action.onClick, variant: "contained", children: action.name }, index) : null;
|
|
32
|
+
}) }) : null;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
PropertyActions
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=Actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Actions.tsx"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActions: React.FC<PropertyActionsProps> = ({ buttons = false, actions, ...props }) => {\n if (actions) {\n return (actions?.length ?? 0) > 0 ? (\n <FlexRow gap={1} {...props}>\n {actions.map((action, index) => {\n return action.icon ? (\n <IconButton size=\"small\" key={index} color=\"inherit\" onClick={action.onClick}>\n {action.icon}\n </IconButton>\n ) : buttons ? (\n <ButtonEx paddingY={0} color=\"primary\" key={index} size=\"small\" disabled={action.disabled} onClick={action.onClick} variant=\"contained\">\n {action.name}\n </ButtonEx>\n ) : null\n })}\n </FlexRow>\n ) : null\n }\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYY;AAZZ,sBAA2B;AAC3B,0BAAyB;AACzB,2BAAwB;AAIjB,MAAM,kBAAkD,CAAC,EAAE,UAAU,OAAO,SAAS,GAAG,MAAM,MAAM;AACzG,MAAI,SAAS;AACX,YAAQ,SAAS,UAAU,KAAK,IAC9B,4CAAC,gCAAQ,KAAK,GAAI,GAAG,OAClB,kBAAQ,IAAI,CAAC,QAAQ,UAAU;AAC9B,aAAO,OAAO,OACZ,4CAAC,8BAAW,MAAK,SAAoB,OAAM,WAAU,SAAS,OAAO,SAClE,iBAAO,QADoB,KAE9B,IACE,UACF,4CAAC,gCAAS,UAAU,GAAG,OAAM,WAAsB,MAAK,SAAQ,UAAU,OAAO,UAAU,SAAS,OAAO,SAAS,SAAQ,aACzH,iBAAO,QADkC,KAE5C,IACE;AAAA,IACN,CAAC,GACH,IACE;AAAA,EACN;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton } from "@mui/material";
|
|
3
|
+
import { ButtonEx } from "@xylabs/react-button";
|
|
4
|
+
import { FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
+
const PropertyActions = ({ buttons = false, actions, ...props }) => {
|
|
6
|
+
if (actions) {
|
|
7
|
+
return (actions?.length ?? 0) > 0 ? /* @__PURE__ */ jsx(FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
|
|
8
|
+
return action.icon ? /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: action.onClick, children: action.icon }, index) : buttons ? /* @__PURE__ */ jsx(ButtonEx, { paddingY: 0, color: "primary", size: "small", disabled: action.disabled, onClick: action.onClick, variant: "contained", children: action.name }, index) : null;
|
|
9
|
+
}) }) : null;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
PropertyActions
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Actions.tsx"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActions: React.FC<PropertyActionsProps> = ({ buttons = false, actions, ...props }) => {\n if (actions) {\n return (actions?.length ?? 0) > 0 ? (\n <FlexRow gap={1} {...props}>\n {actions.map((action, index) => {\n return action.icon ? (\n <IconButton size=\"small\" key={index} color=\"inherit\" onClick={action.onClick}>\n {action.icon}\n </IconButton>\n ) : buttons ? (\n <ButtonEx paddingY={0} color=\"primary\" key={index} size=\"small\" disabled={action.disabled} onClick={action.onClick} variant=\"contained\">\n {action.name}\n </ButtonEx>\n ) : null\n })}\n </FlexRow>\n ) : null\n }\n return null\n}\n"],"mappings":"AAYY;AAZZ,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAIjB,MAAM,kBAAkD,CAAC,EAAE,UAAU,OAAO,SAAS,GAAG,MAAM,MAAM;AACzG,MAAI,SAAS;AACX,YAAQ,SAAS,UAAU,KAAK,IAC9B,oBAAC,WAAQ,KAAK,GAAI,GAAG,OAClB,kBAAQ,IAAI,CAAC,QAAQ,UAAU;AAC9B,aAAO,OAAO,OACZ,oBAAC,cAAW,MAAK,SAAoB,OAAM,WAAU,SAAS,OAAO,SAClE,iBAAO,QADoB,KAE9B,IACE,UACF,oBAAC,YAAS,UAAU,GAAG,OAAM,WAAsB,MAAK,SAAQ,UAAU,OAAO,UAAU,SAAS,OAAO,SAAS,SAAQ,aACzH,iBAAO,QADkC,KAE5C,IACE;AAAA,IACN,CAAC,GACH,IACE;AAAA,EACN;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ActionsMenu_exports = {};
|
|
20
|
+
__export(ActionsMenu_exports, {
|
|
21
|
+
PropertyActionsMenu: () => PropertyActionsMenu
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ActionsMenu_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_icons_material = require("@mui/icons-material");
|
|
26
|
+
var import_material = require("@mui/material");
|
|
27
|
+
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
const PropertyActionsMenu = ({ actions, ...props }) => {
|
|
30
|
+
const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
|
|
31
|
+
const open = !!anchorEl;
|
|
32
|
+
const handleClick = (event) => {
|
|
33
|
+
setAnchorEl(event.currentTarget);
|
|
34
|
+
};
|
|
35
|
+
const handleClose = () => {
|
|
36
|
+
setAnchorEl(null);
|
|
37
|
+
};
|
|
38
|
+
return actions && actions?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexRow, { ...props, children: [
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.MoreHoriz, { fontSize: "inherit" }) }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Menu, { anchorEl, open, onClose: handleClose, children: actions?.map((action) => {
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
import_material.MenuItem,
|
|
43
|
+
{
|
|
44
|
+
onClick: () => {
|
|
45
|
+
action?.onClick?.();
|
|
46
|
+
handleClose();
|
|
47
|
+
},
|
|
48
|
+
children: action.name
|
|
49
|
+
},
|
|
50
|
+
action.name
|
|
51
|
+
);
|
|
52
|
+
}) })
|
|
53
|
+
] }) : null;
|
|
54
|
+
};
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
PropertyActionsMenu
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=ActionsMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ActionsMenu.tsx"],"sourcesContent":["import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport { IconButton, Menu, MenuItem } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0 ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n ) : null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBI;AAnBJ,4BAA2C;AAC3C,sBAA2C;AAC3C,2BAAwB;AACxB,mBAAyB;AAIlB,MAAM,sBAAsD,CAAC,EAAE,SAAS,GAAG,MAAM,MAAM;AAC5F,QAAM,CAAC,UAAU,WAAW,QAAI,uBAA6B,IAAI;AACjE,QAAM,OAAO,CAAC,CAAC;AAEf,QAAM,cAAc,CAAC,UAAyC;AAC5D,gBAAY,MAAM,aAAa;AAAA,EACjC;AACA,QAAM,cAAc,MAAM;AACxB,gBAAY,IAAI;AAAA,EAClB;AAEA,SAAO,WAAW,SAAS,SAAS,IAClC,6CAAC,gCAAS,GAAG,OACX;AAAA,gDAAC,8BAAW,MAAK,SAAQ,OAAM,WAAU,SAAS,aAChD,sDAAC,sBAAAA,WAAA,EAAc,UAAS,WAAU,GACpC;AAAA,IACA,4CAAC,wBAAK,UAAoB,MAAY,SAAS,aAC5C,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,MAAM;AACb,oBAAQ,UAAU;AAClB,wBAAY;AAAA,UACd;AAAA,UAEC,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF,IACE;AACN;","names":["MoreHorizIcon"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHoriz as MoreHorizIcon } from "@mui/icons-material";
|
|
3
|
+
import { IconButton, Menu, MenuItem } from "@mui/material";
|
|
4
|
+
import { FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
const PropertyActionsMenu = ({ actions, ...props }) => {
|
|
7
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
8
|
+
const open = !!anchorEl;
|
|
9
|
+
const handleClick = (event) => {
|
|
10
|
+
setAnchorEl(event.currentTarget);
|
|
11
|
+
};
|
|
12
|
+
const handleClose = () => {
|
|
13
|
+
setAnchorEl(null);
|
|
14
|
+
};
|
|
15
|
+
return actions && actions?.length > 0 ? /* @__PURE__ */ jsxs(FlexRow, { ...props, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ jsx(MoreHorizIcon, { fontSize: "inherit" }) }),
|
|
17
|
+
/* @__PURE__ */ jsx(Menu, { anchorEl, open, onClose: handleClose, children: actions?.map((action) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
MenuItem,
|
|
20
|
+
{
|
|
21
|
+
onClick: () => {
|
|
22
|
+
action?.onClick?.();
|
|
23
|
+
handleClose();
|
|
24
|
+
},
|
|
25
|
+
children: action.name
|
|
26
|
+
},
|
|
27
|
+
action.name
|
|
28
|
+
);
|
|
29
|
+
}) })
|
|
30
|
+
] }) : null;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
PropertyActionsMenu
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ActionsMenu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ActionsMenu.tsx"],"sourcesContent":["import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport { IconButton, Menu, MenuItem } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0 ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n ) : null\n}\n"],"mappings":"AAmBI,SAEI,KAFJ;AAnBJ,SAAS,aAAa,qBAAqB;AAC3C,SAAS,YAAY,MAAM,gBAAgB;AAC3C,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAIlB,MAAM,sBAAsD,CAAC,EAAE,SAAS,GAAG,MAAM,MAAM;AAC5F,QAAM,CAAC,UAAU,WAAW,IAAI,SAA6B,IAAI;AACjE,QAAM,OAAO,CAAC,CAAC;AAEf,QAAM,cAAc,CAAC,UAAyC;AAC5D,gBAAY,MAAM,aAAa;AAAA,EACjC;AACA,QAAM,cAAc,MAAM;AACxB,gBAAY,IAAI;AAAA,EAClB;AAEA,SAAO,WAAW,SAAS,SAAS,IAClC,qBAAC,WAAS,GAAG,OACX;AAAA,wBAAC,cAAW,MAAK,SAAQ,OAAM,WAAU,SAAS,aAChD,8BAAC,iBAAc,UAAS,WAAU,GACpC;AAAA,IACA,oBAAC,QAAK,UAAoB,MAAY,SAAS,aAC5C,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,MAAM;AACb,oBAAQ,UAAU;AAClB,wBAAY;AAAA,UACd;AAAA,UAEC,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF,IACE;AACN;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var ActionsProps_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(ActionsProps_exports);
|
|
17
|
+
//# sourceMappingURL=ActionsProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ActionsProps.ts"],"sourcesContent":["import { FlexBoxProps } from '@xylabs/react-flexbox'\n\nimport { PropertyAction } from './Action'\n\nexport interface PropertyActionsProps extends FlexBoxProps {\n actions?: PropertyAction[]\n buttons?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ActionsProps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAoC5F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAoC5F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|