@activecollab/components 2.0.589 → 2.0.591
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/cjs/components/CommandPalette/CommandPalette.js +90 -62
- package/dist/cjs/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/cjs/components/CommandPalette/CommandPalette.styles.js +34 -16
- package/dist/cjs/components/CommandPalette/CommandPalette.styles.js.map +1 -1
- package/dist/cjs/components/CommandPalette/CommandPaletteCommandItem.js +1 -0
- package/dist/cjs/components/CommandPalette/CommandPaletteCommandItem.js.map +1 -1
- package/dist/cjs/components/CommandPalette/CommandPaletteHeader.js +40 -9
- package/dist/cjs/components/CommandPalette/CommandPaletteHeader.js.map +1 -1
- package/dist/cjs/components/CommandPalette/CommandPaletteItem.js +13 -4
- package/dist/cjs/components/CommandPalette/CommandPaletteItem.js.map +1 -1
- package/dist/cjs/components/CommandPalette/CommandPaletteVirtualList.js +125 -0
- package/dist/cjs/components/CommandPalette/CommandPaletteVirtualList.js.map +1 -0
- package/dist/cjs/components/CommandPalette/context/SelectedContext.js.map +1 -1
- package/dist/cjs/components/GlobalStyle.js +1 -1
- package/dist/cjs/components/GlobalStyle.js.map +1 -1
- package/dist/cjs/components/ObjectLayout/ObjectLayout.js +5 -1
- package/dist/cjs/components/ObjectLayout/ObjectLayout.js.map +1 -1
- package/dist/cjs/components/ObjectLayout/Styles.js +17 -10
- package/dist/cjs/components/ObjectLayout/Styles.js.map +1 -1
- package/dist/cjs/components/PropertyList/PropertyList.js +12 -1
- package/dist/cjs/components/PropertyList/PropertyList.js.map +1 -1
- package/dist/cjs/components/PropertyList/Styles.js +58 -51
- package/dist/cjs/components/PropertyList/Styles.js.map +1 -1
- package/dist/cjs/components/Section/Section.js +4 -1
- package/dist/cjs/components/Section/Section.js.map +1 -1
- package/dist/cjs/components/Section/Styles.js +7 -3
- package/dist/cjs/components/Section/Styles.js.map +1 -1
- package/dist/cjs/components/TicketPerforation/TicketPerforation.js +7 -5
- package/dist/cjs/components/TicketPerforation/TicketPerforation.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPalette.d.ts +13 -3
- package/dist/esm/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPalette.js +77 -53
- package/dist/esm/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPalette.styles.d.ts +9 -2
- package/dist/esm/components/CommandPalette/CommandPalette.styles.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPalette.styles.js +30 -14
- package/dist/esm/components/CommandPalette/CommandPalette.styles.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteCommandItem.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteCommandItem.js +1 -0
- package/dist/esm/components/CommandPalette/CommandPaletteCommandItem.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteHeader.d.ts +3 -1
- package/dist/esm/components/CommandPalette/CommandPaletteHeader.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteHeader.js +40 -9
- package/dist/esm/components/CommandPalette/CommandPaletteHeader.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteItem.d.ts +7 -1
- package/dist/esm/components/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteItem.js +14 -5
- package/dist/esm/components/CommandPalette/CommandPaletteItem.js.map +1 -1
- package/dist/esm/components/CommandPalette/CommandPaletteVirtualList.d.ts +21 -0
- package/dist/esm/components/CommandPalette/CommandPaletteVirtualList.d.ts.map +1 -0
- package/dist/esm/components/CommandPalette/CommandPaletteVirtualList.js +104 -0
- package/dist/esm/components/CommandPalette/CommandPaletteVirtualList.js.map +1 -0
- package/dist/esm/components/CommandPalette/context/SelectedContext.d.ts +5 -0
- package/dist/esm/components/CommandPalette/context/SelectedContext.d.ts.map +1 -1
- package/dist/esm/components/CommandPalette/context/SelectedContext.js.map +1 -1
- package/dist/esm/components/GlobalStyle.d.ts.map +1 -1
- package/dist/esm/components/GlobalStyle.js +1 -1
- package/dist/esm/components/GlobalStyle.js.map +1 -1
- package/dist/esm/components/ObjectLayout/ObjectLayout.d.ts +2 -0
- package/dist/esm/components/ObjectLayout/ObjectLayout.d.ts.map +1 -1
- package/dist/esm/components/ObjectLayout/ObjectLayout.js +5 -1
- package/dist/esm/components/ObjectLayout/ObjectLayout.js.map +1 -1
- package/dist/esm/components/ObjectLayout/Styles.d.ts +1 -0
- package/dist/esm/components/ObjectLayout/Styles.d.ts.map +1 -1
- package/dist/esm/components/ObjectLayout/Styles.js +16 -9
- package/dist/esm/components/ObjectLayout/Styles.js.map +1 -1
- package/dist/esm/components/PropertyList/PropertyList.d.ts +6 -0
- package/dist/esm/components/PropertyList/PropertyList.d.ts.map +1 -1
- package/dist/esm/components/PropertyList/PropertyList.js +12 -1
- package/dist/esm/components/PropertyList/PropertyList.js.map +1 -1
- package/dist/esm/components/PropertyList/Styles.d.ts +2 -0
- package/dist/esm/components/PropertyList/Styles.d.ts.map +1 -1
- package/dist/esm/components/PropertyList/Styles.js +58 -51
- package/dist/esm/components/PropertyList/Styles.js.map +1 -1
- package/dist/esm/components/Section/Section.d.ts +2 -0
- package/dist/esm/components/Section/Section.d.ts.map +1 -1
- package/dist/esm/components/Section/Section.js +4 -1
- package/dist/esm/components/Section/Section.js.map +1 -1
- package/dist/esm/components/Section/Styles.d.ts +3 -1
- package/dist/esm/components/Section/Styles.d.ts.map +1 -1
- package/dist/esm/components/Section/Styles.js +6 -2
- package/dist/esm/components/Section/Styles.js.map +1 -1
- package/dist/esm/components/TicketPerforation/TicketPerforation.d.ts +2 -0
- package/dist/esm/components/TicketPerforation/TicketPerforation.d.ts.map +1 -1
- package/dist/esm/components/TicketPerforation/TicketPerforation.js +7 -5
- package/dist/esm/components/TicketPerforation/TicketPerforation.js.map +1 -1
- package/dist/index.js +385 -166
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.js","names":["React","forwardRef","useId","classnames","StyledSection","StyledSectionActions","StyledSectionCounter","StyledSectionHeader","StyledSectionTitle","Card","Section","_ref","ref","title","counter","actions","_ref$card","card","_ref$radius","radius","className","children","rest","_objectWithoutPropertiesLoose","_excluded","titleId","hasCounter","undefined","createElement","_extends","id","variant","style","displayName"],"sources":["../../../../src/components/Section/Section.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n HTMLAttributes,\n ReactNode,\n forwardRef,\n useId,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledSection,\n StyledSectionActions,\n StyledSectionCounter,\n StyledSectionHeader,\n StyledSectionTitle,\n} from \"./Styles\";\nimport { Card } from \"../Card\";\n\nexport interface ISectionProps\n extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** The title of the section. Without it the section has no header. */\n title?: ReactNode;\n /** A short count beside the title, for example \"9 of 15\". */\n counter?: ReactNode;\n /** Controls at the right end of the header. */\n actions?: ReactNode;\n /** Puts the body in a raised card. */\n card?: boolean;\n /** The corner radius of the card, in pixels. A ListRow with cardEdges follows it. */\n radius?: number;\n}\n\nexport const Section = forwardRef<HTMLElement, ISectionProps>(\n (\n {\n title,\n counter,\n actions,\n card = false,\n radius = 24,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const titleId = useId();\n const hasCounter = counter !== undefined && counter !== null;\n\n return (\n <StyledSection\n {...rest}\n ref={ref}\n aria-labelledby={title ? titleId : undefined}\n className={classnames(\"c-section\", className)}\n >\n {title ? (\n <StyledSectionHeader className=\"c-section__header\">\n <StyledSectionTitle id={titleId}>{title}</StyledSectionTitle>\n {hasCounter ? (\n <StyledSectionCounter className=\"c-section__counter\">\n {counter}\n </StyledSectionCounter>\n ) : null}\n {actions ? (\n <StyledSectionActions className=\"c-section__actions\">\n {actions}\n </StyledSectionActions>\n ) : null}\n </StyledSectionHeader>\n ) : null}\n {card ? (\n <Card\n variant=\"raised\"\n radius={radius}\n className=\"c-section__body\"\n style={{ \"--c-section-radius\": `${radius}px` } as CSSProperties}\n >\n {children}\n </Card>\n ) : (\n <div className=\"c-section__body\">{children}</div>\n )}\n </StyledSection>\n );\n }\n);\n\nSection.displayName = \"Section\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAIVC,UAAU,EACVC,KAAK,QACA,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,aAAa,EACbC,oBAAoB,EACpBC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,QACb,UAAU;AACjB,SAASC,IAAI,QAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"Section.js","names":["React","forwardRef","useId","classnames","StyledSection","StyledSectionActions","StyledSectionCounter","StyledSectionHeader","StyledSectionTitle","Card","Section","_ref","ref","title","counter","actions","_ref$card","card","_ref$radius","radius","_ref$solid","solid","className","children","rest","_objectWithoutPropertiesLoose","_excluded","titleId","hasCounter","undefined","createElement","_extends","$solid","id","variant","style","displayName"],"sources":["../../../../src/components/Section/Section.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n HTMLAttributes,\n ReactNode,\n forwardRef,\n useId,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledSection,\n StyledSectionActions,\n StyledSectionCounter,\n StyledSectionHeader,\n StyledSectionTitle,\n} from \"./Styles\";\nimport { Card } from \"../Card\";\n\nexport interface ISectionProps\n extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** The title of the section. Without it the section has no header. */\n title?: ReactNode;\n /** A short count beside the title, for example \"9 of 15\". */\n counter?: ReactNode;\n /** Controls at the right end of the header. */\n actions?: ReactNode;\n /** Puts the body in a raised card. */\n card?: boolean;\n /** The corner radius of the card, in pixels. A ListRow with cardEdges follows it. */\n radius?: number;\n /** In a flat ObjectLayout the card keeps the raised color of the theme, and its rows take the soft divider. */\n solid?: boolean;\n}\n\nexport const Section = forwardRef<HTMLElement, ISectionProps>(\n (\n {\n title,\n counter,\n actions,\n card = false,\n radius = 24,\n solid = false,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const titleId = useId();\n const hasCounter = counter !== undefined && counter !== null;\n\n return (\n <StyledSection\n {...rest}\n ref={ref}\n $solid={solid}\n aria-labelledby={title ? titleId : undefined}\n className={classnames(\"c-section\", className)}\n >\n {title ? (\n <StyledSectionHeader className=\"c-section__header\">\n <StyledSectionTitle id={titleId}>{title}</StyledSectionTitle>\n {hasCounter ? (\n <StyledSectionCounter className=\"c-section__counter\">\n {counter}\n </StyledSectionCounter>\n ) : null}\n {actions ? (\n <StyledSectionActions className=\"c-section__actions\">\n {actions}\n </StyledSectionActions>\n ) : null}\n </StyledSectionHeader>\n ) : null}\n {card ? (\n <Card\n variant=\"raised\"\n radius={radius}\n className=\"c-section__body\"\n style={{ \"--c-section-radius\": `${radius}px` } as CSSProperties}\n >\n {children}\n </Card>\n ) : (\n <div className=\"c-section__body\">{children}</div>\n )}\n </StyledSection>\n );\n }\n);\n\nSection.displayName = \"Section\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAIVC,UAAU,EACVC,KAAK,QACA,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,aAAa,EACbC,oBAAoB,EACpBC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,QACb,UAAU;AACjB,SAASC,IAAI,QAAQ,SAAS;AAkB9B,OAAO,MAAMC,OAAO,gBAAGT,UAAU,CAC/B,CAAAU,IAAA,EAYEC,GAAG,KACA;EAAA,IAXDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IACPC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IAAAC,SAAA,GAAAL,IAAA,CACPM,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,KAAK,GAAAA,SAAA;IAAAE,WAAA,GAAAP,IAA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EAAKhB,MAAM;IAAK;EAAmB,GAE/DI,QACG,CAAC,gBAEPvB,KAAA,CAAA8B,aAAA;IAAKR,SAAS,EAAC;EAAiB,GAAEC,QAAc,CAErC,CAAC;AAEpB,CACF,CAAC;AAEDb,OAAO,CAAC0B,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const StyledSection: import("styled-components").StyledComponent<"section", any, {
|
|
1
|
+
export declare const StyledSection: import("styled-components").StyledComponent<"section", any, {
|
|
2
|
+
$solid: boolean;
|
|
3
|
+
}, never>;
|
|
2
4
|
export declare const StyledSectionHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
5
|
export declare const StyledSectionTitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
|
|
4
6
|
export declare const StyledSectionCounter: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Section/Styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Section/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;YAA4B,OAAO;SAkB5D,CAAC;AAEF,eAAO,MAAM,mBAAmB,oEAM/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,mEAM9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,qEAIhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAKhC,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
const SOLID_SURFACE = "var(--object-layout-card-surface, var(--surface-raised))";
|
|
2
3
|
export const StyledSection = styled.section.withConfig({
|
|
3
4
|
displayName: "Styles__StyledSection",
|
|
4
5
|
componentId: "sc-vhpgru-0"
|
|
5
|
-
})(["display:flex;flex-direction:column;gap:8px;min-width:0;"]
|
|
6
|
+
})(["display:flex;flex-direction:column;gap:8px;min-width:0;", ""], _ref => {
|
|
7
|
+
let $solid = _ref.$solid;
|
|
8
|
+
return $solid && css(["> .c-section__body{--c-section-divider:var(--object-layout-divider,var(--border-raised));background-color:", ";}> .c-section__body > *{--border-raised:var(--c-section-divider);}"], SOLID_SURFACE);
|
|
9
|
+
});
|
|
6
10
|
export const StyledSectionHeader = styled.div.withConfig({
|
|
7
11
|
displayName: "Styles__StyledSectionHeader",
|
|
8
12
|
componentId: "sc-vhpgru-1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","StyledSection","section","withConfig","displayName","componentId","StyledSectionHeader","div","StyledSectionTitle","h3","StyledSectionCounter","span","StyledSectionActions"],"sources":["../../../../src/components/Section/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nexport const StyledSection = styled.section
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","SOLID_SURFACE","StyledSection","section","withConfig","displayName","componentId","_ref","$solid","StyledSectionHeader","div","StyledSectionTitle","h3","StyledSectionCounter","span","StyledSectionActions"],"sources":["../../../../src/components/Section/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nconst SOLID_SURFACE =\n \"var(--object-layout-card-surface, var(--surface-raised))\";\n\nexport const StyledSection = styled.section<{ $solid: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n\n ${({ $solid }) =>\n $solid &&\n css`\n > .c-section__body {\n --c-section-divider: var(--object-layout-divider, var(--border-raised));\n background-color: ${SOLID_SURFACE};\n }\n\n > .c-section__body > * {\n --border-raised: var(--c-section-divider);\n }\n `}\n`;\n\nexport const StyledSectionHeader = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 24px;\n padding: 0 16px;\n`;\n\nexport const StyledSectionTitle = styled.h3`\n margin: 0;\n font-size: calc(16px * var(--text-scale, 1));\n line-height: 24px;\n font-weight: 600;\n color: var(--color-theme-800);\n`;\n\nexport const StyledSectionCounter = styled.span`\n font-size: calc(13px * var(--text-scale, 1));\n line-height: 20px;\n color: var(--color-theme-700);\n`;\n\nexport const StyledSectionActions = styled.div`\n display: flex;\n align-items: center;\n gap: 16px;\n margin-left: auto;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,MAAMC,aAAa,GACjB,0DAA0D;AAE5D,OAAO,MAAMC,aAAa,GAAGH,MAAM,CAACI,OAAO,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oEAMvCC,IAAA;EAAA,IAAGC,MAAM,GAAAD,IAAA,CAANC,MAAM;EAAA,OACTA,MAAM,IACNR,GAAG,wLAGqBC,aAAa,CAMpC;AAAA,EACJ;AAED,OAAO,MAAMQ,mBAAmB,GAAGV,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+EAM5C;AAED,OAAO,MAAMK,kBAAkB,GAAGZ,MAAM,CAACa,EAAE,CAAAR,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0HAM1C;AAED,OAAO,MAAMO,oBAAoB,GAAGd,MAAM,CAACe,IAAI,CAAAV,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iGAI9C;AAED,OAAO,MAAMS,oBAAoB,GAAGhB,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kEAK7C","ignoreList":[]}
|
|
@@ -4,6 +4,8 @@ export type { TicketPerforationLine };
|
|
|
4
4
|
export interface ITicketPerforationProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/** The color of the dashed line: "primary" on a sheet, "raised" in a raised card. */
|
|
6
6
|
line?: TicketPerforationLine;
|
|
7
|
+
/** Without notches the tear is only its dashed line. */
|
|
8
|
+
notches?: boolean;
|
|
7
9
|
}
|
|
8
10
|
/** The line where a ticket tears: a dashed line with a notch in each edge of a card with a 16px padding. */
|
|
9
11
|
export declare const TicketPerforation: React.ForwardRefExoticComponent<ITicketPerforationProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketPerforation.d.ts","sourceRoot":"","sources":["../../../../src/components/TicketPerforation/TicketPerforation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAI1D,OAAO,EAKL,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtC,qFAAqF;IACrF,IAAI,CAAC,EAAE,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"TicketPerforation.d.ts","sourceRoot":"","sources":["../../../../src/components/TicketPerforation/TicketPerforation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAI1D,OAAO,EAKL,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtC,qFAAqF;IACrF,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,4GAA4G;AAC5G,eAAO,MAAM,iBAAiB,gGAsB5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["line", "className"];
|
|
3
|
+
const _excluded = ["line", "notches", "className"];
|
|
4
4
|
import React, { forwardRef } from "react";
|
|
5
5
|
import classnames from "classnames";
|
|
6
6
|
import { StyledTicketPerforation, StyledTicketPerforationEdge, StyledTicketPerforationLine, StyledTicketPerforationNotch } from "./Styles";
|
|
@@ -8,6 +8,8 @@ import { StyledTicketPerforation, StyledTicketPerforationEdge, StyledTicketPerfo
|
|
|
8
8
|
export const TicketPerforation = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
9
9
|
let _ref$line = _ref.line,
|
|
10
10
|
line = _ref$line === void 0 ? "primary" : _ref$line,
|
|
11
|
+
_ref$notches = _ref.notches,
|
|
12
|
+
notches = _ref$notches === void 0 ? true : _ref$notches,
|
|
11
13
|
className = _ref.className,
|
|
12
14
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
15
|
return /*#__PURE__*/React.createElement(StyledTicketPerforation, _extends({
|
|
@@ -15,17 +17,17 @@ export const TicketPerforation = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
15
17
|
}, rest, {
|
|
16
18
|
ref: ref,
|
|
17
19
|
className: classnames("c-ticket-perforation", className)
|
|
18
|
-
}), /*#__PURE__*/React.createElement(StyledTicketPerforationEdge, {
|
|
20
|
+
}), notches ? /*#__PURE__*/React.createElement(StyledTicketPerforationEdge, {
|
|
19
21
|
$side: "left"
|
|
20
22
|
}, /*#__PURE__*/React.createElement(StyledTicketPerforationNotch, {
|
|
21
23
|
$side: "left"
|
|
22
|
-
})), /*#__PURE__*/React.createElement(StyledTicketPerforationLine, {
|
|
24
|
+
})) : null, /*#__PURE__*/React.createElement(StyledTicketPerforationLine, {
|
|
23
25
|
$line: line
|
|
24
|
-
}), /*#__PURE__*/React.createElement(StyledTicketPerforationEdge, {
|
|
26
|
+
}), notches ? /*#__PURE__*/React.createElement(StyledTicketPerforationEdge, {
|
|
25
27
|
$side: "right"
|
|
26
28
|
}, /*#__PURE__*/React.createElement(StyledTicketPerforationNotch, {
|
|
27
29
|
$side: "right"
|
|
28
|
-
})));
|
|
30
|
+
})) : null);
|
|
29
31
|
});
|
|
30
32
|
TicketPerforation.displayName = "TicketPerforation";
|
|
31
33
|
//# sourceMappingURL=TicketPerforation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketPerforation.js","names":["React","forwardRef","classnames","StyledTicketPerforation","StyledTicketPerforationEdge","StyledTicketPerforationLine","StyledTicketPerforationNotch","TicketPerforation","_ref","ref","_ref$line","line","className","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","$side","$line","displayName"],"sources":["../../../../src/components/TicketPerforation/TicketPerforation.tsx"],"sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledTicketPerforation,\n StyledTicketPerforationEdge,\n StyledTicketPerforationLine,\n StyledTicketPerforationNotch,\n TicketPerforationLine,\n} from \"./Styles\";\n\nexport type { TicketPerforationLine };\n\nexport interface ITicketPerforationProps\n extends HTMLAttributes<HTMLDivElement> {\n /** The color of the dashed line: \"primary\" on a sheet, \"raised\" in a raised card. */\n line?: TicketPerforationLine;\n}\n\n/** The line where a ticket tears: a dashed line with a notch in each edge of a card with a 16px padding. */\nexport const TicketPerforation = forwardRef<\n HTMLDivElement,\n ITicketPerforationProps\n>(({ line = \"primary\", className, ...rest }, ref) => (\n <StyledTicketPerforation\n aria-hidden=\"true\"\n {...rest}\n ref={ref}\n className={classnames(\"c-ticket-perforation\", className)}\n >\n <StyledTicketPerforationEdge $side=\"left\">\n
|
|
1
|
+
{"version":3,"file":"TicketPerforation.js","names":["React","forwardRef","classnames","StyledTicketPerforation","StyledTicketPerforationEdge","StyledTicketPerforationLine","StyledTicketPerforationNotch","TicketPerforation","_ref","ref","_ref$line","line","_ref$notches","notches","className","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","$side","$line","displayName"],"sources":["../../../../src/components/TicketPerforation/TicketPerforation.tsx"],"sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledTicketPerforation,\n StyledTicketPerforationEdge,\n StyledTicketPerforationLine,\n StyledTicketPerforationNotch,\n TicketPerforationLine,\n} from \"./Styles\";\n\nexport type { TicketPerforationLine };\n\nexport interface ITicketPerforationProps\n extends HTMLAttributes<HTMLDivElement> {\n /** The color of the dashed line: \"primary\" on a sheet, \"raised\" in a raised card. */\n line?: TicketPerforationLine;\n /** Without notches the tear is only its dashed line. */\n notches?: boolean;\n}\n\n/** The line where a ticket tears: a dashed line with a notch in each edge of a card with a 16px padding. */\nexport const TicketPerforation = forwardRef<\n HTMLDivElement,\n ITicketPerforationProps\n>(({ line = \"primary\", notches = true, className, ...rest }, ref) => (\n <StyledTicketPerforation\n aria-hidden=\"true\"\n {...rest}\n ref={ref}\n className={classnames(\"c-ticket-perforation\", className)}\n >\n {notches ? (\n <StyledTicketPerforationEdge $side=\"left\">\n <StyledTicketPerforationNotch $side=\"left\" />\n </StyledTicketPerforationEdge>\n ) : null}\n <StyledTicketPerforationLine $line={line} />\n {notches ? (\n <StyledTicketPerforationEdge $side=\"right\">\n <StyledTicketPerforationNotch $side=\"right\" />\n </StyledTicketPerforationEdge>\n ) : null}\n </StyledTicketPerforation>\n));\n\nTicketPerforation.displayName = \"TicketPerforation\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAoBC,UAAU,QAAQ,OAAO;AAEzD,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,uBAAuB,EACvBC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,4BAA4B,QAEvB,UAAU;AAYjB;AACA,OAAO,MAAMC,iBAAiB,gBAAGN,UAAU,CAGzC,CAAAO,IAAA,EAA2DC,GAAG;EAAA,IAAAC,SAAA,GAAAF,IAAA,CAA3DG,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,SAAS,GAAAA,SAAA;IAAAE,YAAA,GAAAJ,IAAA,CAAEK,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,IAAI,GAAAA,YAAA;IAAEE,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAKC,IAAI,GA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