@apipass/design-system 4.3.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/lib/embedded-styles.d.ts +4 -0
  2. package/dist/lib/embedded-styles.js +3 -1
  3. package/dist/lib/style.css +1 -1
  4. package/dist/lib/ui/components/Breadcrumb/Breadcrumb.cjs +1 -1
  5. package/dist/lib/ui/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
  6. package/dist/lib/ui/components/Breadcrumb/Breadcrumb.js +1 -1
  7. package/dist/lib/ui/components/Breadcrumb/Breadcrumb.js.map +1 -1
  8. package/dist/lib/ui/primitives/Accordion/Accordion.cjs +1 -1
  9. package/dist/lib/ui/primitives/Accordion/Accordion.cjs.map +1 -1
  10. package/dist/lib/ui/primitives/Accordion/Accordion.js +5 -5
  11. package/dist/lib/ui/primitives/Accordion/Accordion.js.map +1 -1
  12. package/dist/lib/ui/primitives/Alert/Alert.cjs +1 -1
  13. package/dist/lib/ui/primitives/Alert/Alert.cjs.map +1 -1
  14. package/dist/lib/ui/primitives/Alert/Alert.js +1 -1
  15. package/dist/lib/ui/primitives/Alert/Alert.js.map +1 -1
  16. package/dist/lib/ui/primitives/Checkbox/Checkbox.cjs +1 -1
  17. package/dist/lib/ui/primitives/Checkbox/Checkbox.cjs.map +1 -1
  18. package/dist/lib/ui/primitives/Checkbox/Checkbox.js +9 -9
  19. package/dist/lib/ui/primitives/Checkbox/Checkbox.js.map +1 -1
  20. package/dist/lib/ui/primitives/Fieldset/Fieldset.cjs +1 -1
  21. package/dist/lib/ui/primitives/Fieldset/Fieldset.cjs.map +1 -1
  22. package/dist/lib/ui/primitives/Fieldset/Fieldset.js +1 -1
  23. package/dist/lib/ui/primitives/Fieldset/Fieldset.js.map +1 -1
  24. package/dist/lib/ui/primitives/Pagination/Pagination.cjs +1 -1
  25. package/dist/lib/ui/primitives/Pagination/Pagination.cjs.map +1 -1
  26. package/dist/lib/ui/primitives/Pagination/Pagination.js +6 -6
  27. package/dist/lib/ui/primitives/Pagination/Pagination.js.map +1 -1
  28. package/dist/lib/ui/primitives/Radio/Radio.cjs +1 -1
  29. package/dist/lib/ui/primitives/Radio/Radio.cjs.map +1 -1
  30. package/dist/lib/ui/primitives/Radio/Radio.js +8 -8
  31. package/dist/lib/ui/primitives/Radio/Radio.js.map +1 -1
  32. package/dist/lib/ui/primitives/Switch/Switch.cjs +1 -1
  33. package/dist/lib/ui/primitives/Switch/Switch.cjs.map +1 -1
  34. package/dist/lib/ui/primitives/Switch/Switch.js +1 -1
  35. package/dist/lib/ui/primitives/Switch/Switch.js.map +1 -1
  36. package/dist/lib/ui/primitives/Table/Table.cjs +1 -1
  37. package/dist/lib/ui/primitives/Table/Table.cjs.map +1 -1
  38. package/dist/lib/ui/primitives/Table/Table.js +2 -2
  39. package/dist/lib/ui/primitives/Table/Table.js.map +1 -1
  40. package/dist/lib/ui/primitives/Text/Text.cjs +1 -1
  41. package/dist/lib/ui/primitives/Text/Text.cjs.map +1 -1
  42. package/dist/lib/ui/primitives/Text/Text.js +16 -16
  43. package/dist/lib/ui/primitives/Text/Text.js.map +1 -1
  44. package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs +1 -1
  45. package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs.map +1 -1
  46. package/dist/lib/ui/primitives/Tooltip/Tooltip.js +9 -9
  47. package/dist/lib/ui/primitives/Tooltip/Tooltip.js.map +1 -1
  48. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.cjs","sources":["../../../../../src/ui/primitives/Radio/Radio.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport {\n Radio as RACRadio,\n RadioGroup as RACRadioGroup,\n type RadioGroupProps as RACRadioGroupProps,\n type RadioProps as RACRadioProps,\n} from \"react-aria-components\";\nimport \"./radio.css\";\n\nexport interface RadioGroupProps\n extends Omit<RACRadioGroupProps, \"children\">,\n SharedFieldProps {\n children?: React.ReactNode;\n}\n\nexport function RadioGroup({\n className,\n label,\n description,\n errorMessage,\n children,\n ...props\n}: RadioGroupProps) {\n const classNames = clsx(className, \"radio-group\");\n return (\n <RACRadioGroup {...props} className={classNames}>\n {label && <Label>{label}</Label>}\n {description && <Description>{description}</Description>}\n {errorMessage && <FieldError>{errorMessage}</FieldError>}\n {children}\n </RACRadioGroup>\n );\n}\n\nexport type RadioFieldProps = RACRadioProps &\n SharedFieldProps & { inline?: boolean };\nexport function RadioField({\n children,\n className,\n label,\n description,\n errorMessage,\n inline,\n ...props\n}: RadioFieldProps) {\n const classNames = clsx(\n className,\n \"radio-field\",\n inline && \"radio-field--inline\",\n );\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACRadio className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Radio />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && (\n <span className=\"label\">{children as React.ReactNode}</span>\n )}\n </>\n </RACRadio>\n );\n}\n\nexport type RadioProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Radio({ className, ...props }: RadioProps) {\n const classNames = clsx(className, \"radio\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"radio-check\" />\n </div>\n );\n}\n"],"names":["RadioGroup","className","label","description","errorMessage","children","props","classNames","clsx","jsxs","RACRadioGroup","jsx","Label","Description","FieldError","RadioField","inline","labelText","RACRadio","Fragment","Radio"],"mappings":"+QAgBO,SAASA,EAAW,CACzB,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAoB,CAClB,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,aAAa,EAChD,OACEQ,EAAAA,KAACC,EAAAA,WAAA,CAAe,GAAGJ,EAAO,UAAWC,EAClC,SAAA,CAAAL,GAASS,EAAAA,IAACC,EAAAA,OAAO,SAAAV,CAAA,CAAM,EACvBC,GAAeQ,EAAAA,IAACE,EAAAA,YAAA,CAAa,SAAAV,CAAA,CAAY,EACzCC,GAAgBO,EAAAA,IAACG,EAAAA,WAAA,CAAY,SAAAV,CAAA,CAAa,EAC1CC,CAAA,EACH,CAEJ,CAIO,SAASU,EAAW,CACzB,SAAAV,EACA,UAAAJ,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,OAAAY,EACA,GAAGV,CACL,EAAoB,CAClB,MAAMC,EAAaC,EAAAA,KACjBP,EACA,cACAe,GAAU,qBAAA,EAENC,EACJf,IAAU,OAAOG,GAAa,SAAWA,EAAW,QACtD,aACGa,EAAAA,MAAA,CAAS,UAAWX,EAAa,GAAGD,EACnC,SAAAG,EAAAA,KAAAU,EAAAA,SAAA,CACE,SAAA,CAAAR,EAAAA,IAACC,EAAAA,OAAO,SAAAK,CAAA,CAAU,QACjBG,EAAA,EAAM,EACNjB,GAAeQ,EAAAA,IAACE,EAAAA,YAAA,CAAa,SAAAV,CAAA,CAAY,EAC1CQ,EAAAA,IAACG,EAAAA,YAAY,SAAAV,CAAA,CAAa,EACzBa,IAAcZ,GACbM,MAAC,OAAA,CAAK,UAAU,QAAS,SAAAN,CAAA,CAA4B,CAAA,CAAA,CAEzD,CAAA,CACF,CAEJ,CAGO,SAASe,EAAM,CAAE,UAAAnB,EAAW,GAAGK,GAAqB,CACzD,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,OAAO,EAC1C,OACEU,EAAAA,IAAC,MAAA,CAAI,UAAWJ,EAAa,GAAGD,EAC9B,SAAAK,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,UAAU,aAAA,CAAc,EACnD,CAEJ"}
1
+ {"version":3,"file":"Radio.cjs","sources":["../../../../../src/ui/primitives/Radio/Radio.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport {\n Radio as RACRadio,\n RadioGroup as RACRadioGroup,\n type RadioGroupProps as RACRadioGroupProps,\n type RadioProps as RACRadioProps,\n} from \"react-aria-components\";\nimport \"./radio.css\";\n\nexport interface RadioGroupProps\n extends Omit<RACRadioGroupProps, \"children\">,\n SharedFieldProps {\n children?: React.ReactNode;\n}\n\nexport function RadioGroup({\n className,\n label,\n description,\n errorMessage,\n children,\n ...props\n}: RadioGroupProps) {\n const classNames = clsx(className, \"radio-group\");\n return (\n <RACRadioGroup {...props} className={classNames}>\n {label && <Label>{label}</Label>}\n {description && <Description>{description}</Description>}\n {errorMessage && <FieldError>{errorMessage}</FieldError>}\n {children}\n </RACRadioGroup>\n );\n}\n\nexport type RadioFieldProps = RACRadioProps &\n SharedFieldProps & { inline?: boolean };\nexport function RadioField({\n children,\n className,\n label,\n description,\n errorMessage,\n inline,\n ...props\n}: RadioFieldProps) {\n const classNames = clsx(\n className,\n \"radio-field\",\n inline && \"radio-field--inline\",\n );\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACRadio className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Radio />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && (\n <span className=\"sds-label\">{children as React.ReactNode}</span>\n )}\n </>\n </RACRadio>\n );\n}\n\nexport type RadioProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Radio({ className, ...props }: RadioProps) {\n const classNames = clsx(className, \"radio\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"radio-check\" />\n </div>\n );\n}\n"],"names":["RadioGroup","className","label","description","errorMessage","children","props","classNames","clsx","jsxs","RACRadioGroup","jsx","Label","Description","FieldError","RadioField","inline","labelText","RACRadio","Fragment","Radio"],"mappings":"+QAgBO,SAASA,EAAW,CACzB,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAoB,CAClB,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,aAAa,EAChD,OAC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- ...n
12
+ ...d
13
13
  }) {
14
- const d = c(i, "radio-group");
15
- return /* @__PURE__ */ t(N, { ...n, className: d, children: [
14
+ const n = c(i, "radio-group");
15
+ return /* @__PURE__ */ t(N, { ...d, className: n, children: [
16
16
  r && /* @__PURE__ */ a(m, { children: r }),
17
17
  o && /* @__PURE__ */ a(p, { children: o }),
18
18
  s && /* @__PURE__ */ a(u, { children: s }),
@@ -25,20 +25,20 @@ function $({
25
25
  label: o,
26
26
  description: s,
27
27
  errorMessage: e,
28
- inline: n,
29
- ...d
28
+ inline: d,
29
+ ...n
30
30
  }) {
31
31
  const f = c(
32
32
  r,
33
33
  "radio-field",
34
- n && "radio-field--inline"
34
+ d && "radio-field--inline"
35
35
  ), l = o || (typeof i == "string" ? i : void 0);
36
- return /* @__PURE__ */ a(R, { className: f, ...d, children: /* @__PURE__ */ t(h, { children: [
36
+ return /* @__PURE__ */ a(R, { className: f, ...n, children: /* @__PURE__ */ t(h, { children: [
37
37
  /* @__PURE__ */ a(m, { children: l }),
38
38
  /* @__PURE__ */ a(x, {}),
39
39
  s && /* @__PURE__ */ a(p, { children: s }),
40
40
  /* @__PURE__ */ a(u, { children: e }),
41
- l !== i && /* @__PURE__ */ a("span", { className: "label", children: i })
41
+ l !== i && /* @__PURE__ */ a("span", { className: "sds-label", children: i })
42
42
  ] }) });
43
43
  }
44
44
  function x({ className: i, ...r }) {
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sources":["../../../../../src/ui/primitives/Radio/Radio.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport {\n Radio as RACRadio,\n RadioGroup as RACRadioGroup,\n type RadioGroupProps as RACRadioGroupProps,\n type RadioProps as RACRadioProps,\n} from \"react-aria-components\";\nimport \"./radio.css\";\n\nexport interface RadioGroupProps\n extends Omit<RACRadioGroupProps, \"children\">,\n SharedFieldProps {\n children?: React.ReactNode;\n}\n\nexport function RadioGroup({\n className,\n label,\n description,\n errorMessage,\n children,\n ...props\n}: RadioGroupProps) {\n const classNames = clsx(className, \"radio-group\");\n return (\n <RACRadioGroup {...props} className={classNames}>\n {label && <Label>{label}</Label>}\n {description && <Description>{description}</Description>}\n {errorMessage && <FieldError>{errorMessage}</FieldError>}\n {children}\n </RACRadioGroup>\n );\n}\n\nexport type RadioFieldProps = RACRadioProps &\n SharedFieldProps & { inline?: boolean };\nexport function RadioField({\n children,\n className,\n label,\n description,\n errorMessage,\n inline,\n ...props\n}: RadioFieldProps) {\n const classNames = clsx(\n className,\n \"radio-field\",\n inline && \"radio-field--inline\",\n );\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACRadio className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Radio />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && (\n <span className=\"label\">{children as React.ReactNode}</span>\n )}\n </>\n </RACRadio>\n );\n}\n\nexport type RadioProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Radio({ className, ...props }: RadioProps) {\n const classNames = clsx(className, \"radio\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"radio-check\" />\n </div>\n );\n}\n"],"names":["RadioGroup","className","label","description","errorMessage","children","props","classNames","clsx","jsxs","RACRadioGroup","jsx","Label","Description","FieldError","RadioField","inline","labelText","RACRadio","Fragment","Radio"],"mappings":";;;;;AAgBO,SAASA,EAAW;AAAA,EACzB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAoB;AAClB,QAAMC,IAAaC,EAAKP,GAAW,aAAa;AAChD,SACE,gBAAAQ,EAACC,GAAA,EAAe,GAAGJ,GAAO,WAAWC,GAClC,UAAA;AAAA,IAAAL,KAAS,gBAAAS,EAACC,KAAO,UAAAV,EAAA,CAAM;AAAA,IACvBC,KAAe,gBAAAQ,EAACE,GAAA,EAAa,UAAAV,EAAA,CAAY;AAAA,IACzCC,KAAgB,gBAAAO,EAACG,GAAA,EAAY,UAAAV,EAAA,CAAa;AAAA,IAC1CC;AAAA,EAAA,GACH;AAEJ;AAIO,SAASU,EAAW;AAAA,EACzB,UAAAV;AAAA,EACA,WAAAJ;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAY;AAAA,EACA,GAAGV;AACL,GAAoB;AAClB,QAAMC,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACAe,KAAU;AAAA,EAAA,GAENC,IACJf,MAAU,OAAOG,KAAa,WAAWA,IAAW;AACtD,2BACGa,GAAA,EAAS,WAAWX,GAAa,GAAGD,GACnC,UAAA,gBAAAG,EAAAU,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAR,EAACC,KAAO,UAAAK,EAAA,CAAU;AAAA,sBACjBG,GAAA,EAAM;AAAA,IACNjB,KAAe,gBAAAQ,EAACE,GAAA,EAAa,UAAAV,EAAA,CAAY;AAAA,IAC1C,gBAAAQ,EAACG,KAAY,UAAAV,EAAA,CAAa;AAAA,IACzBa,MAAcZ,KACb,gBAAAM,EAAC,QAAA,EAAK,WAAU,SAAS,UAAAN,EAAA,CAA4B;AAAA,EAAA,EAAA,CAEzD,EAAA,CACF;AAEJ;AAGO,SAASe,EAAM,EAAE,WAAAnB,GAAW,GAAGK,KAAqB;AACzD,QAAMC,IAAaC,EAAKP,GAAW,OAAO;AAC1C,SACE,gBAAAU,EAAC,OAAA,EAAI,WAAWJ,GAAa,GAAGD,GAC9B,UAAA,gBAAAK,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,cAAA,CAAc,GACnD;AAEJ;"}
1
+ {"version":3,"file":"Radio.js","sources":["../../../../../src/ui/primitives/Radio/Radio.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport {\n Radio as RACRadio,\n RadioGroup as RACRadioGroup,\n type RadioGroupProps as RACRadioGroupProps,\n type RadioProps as RACRadioProps,\n} from \"react-aria-components\";\nimport \"./radio.css\";\n\nexport interface RadioGroupProps\n extends Omit<RACRadioGroupProps, \"children\">,\n SharedFieldProps {\n children?: React.ReactNode;\n}\n\nexport function RadioGroup({\n className,\n label,\n description,\n errorMessage,\n children,\n ...props\n}: RadioGroupProps) {\n const classNames = clsx(className, \"radio-group\");\n return (\n <RACRadioGroup {...props} className={classNames}>\n {label && <Label>{label}</Label>}\n {description && <Description>{description}</Description>}\n {errorMessage && <FieldError>{errorMessage}</FieldError>}\n {children}\n </RACRadioGroup>\n );\n}\n\nexport type RadioFieldProps = RACRadioProps &\n SharedFieldProps & { inline?: boolean };\nexport function RadioField({\n children,\n className,\n label,\n description,\n errorMessage,\n inline,\n ...props\n}: RadioFieldProps) {\n const classNames = clsx(\n className,\n \"radio-field\",\n inline && \"radio-field--inline\",\n );\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACRadio className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Radio />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && (\n <span className=\"sds-label\">{children as React.ReactNode}</span>\n )}\n </>\n </RACRadio>\n );\n}\n\nexport type RadioProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Radio({ className, ...props }: RadioProps) {\n const classNames = clsx(className, \"radio\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"radio-check\" />\n </div>\n );\n}\n"],"names":["RadioGroup","className","label","description","errorMessage","children","props","classNames","clsx","jsxs","RACRadioGroup","jsx","Label","Description","FieldError","RadioField","inline","labelText","RACRadio","Fragment","Radio"],"mappings":";;;;;AAgBO,SAASA,EAAW;AAAA,EACzB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAoB;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AY,QAAO,WAAU,cAAA,CAAc,GACnD;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),x=require("react-aria-components");;/* empty css */const i=require("../Fieldset/Fieldset.cjs");function d({className:e,...c}){const t=r.clsx(e,"switch-group");return s.jsx("div",{...c,className:t})}function j({children:e,className:c,label:t,description:n,errorMessage:o,...u}){const h=r.clsx(c,"switch-field"),l=t||(typeof e=="string"?e:void 0);return s.jsx(x.Switch,{className:h,...u,children:s.jsxs(s.Fragment,{children:[s.jsx(i.Label,{children:l}),s.jsx(a,{}),n&&s.jsx(i.Description,{children:n}),s.jsx(i.FieldError,{children:o}),l!==e&&e]})})}function a({className:e,...c}){const t=r.clsx(e,"switch");return s.jsx("div",{className:t,...c,children:s.jsx("span",{"aria-hidden":"true",className:"switch-icon"})})}exports.Switch=a;exports.SwitchField=j;exports.SwitchGroup=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),h=require("react-aria-components");;/* empty css */const i=require("../Fieldset/Fieldset.cjs");function x({className:e,...c}){const t=r.clsx(e,"switch-group");return s.jsx("div",{...c,className:t})}function j({children:e,className:c,label:t,description:n,errorMessage:o,...u}){const d=r.clsx(c,"switch-field"),l=t||(typeof e=="string"?e:void 0);return s.jsx(h.Switch,{className:d,...u,children:s.jsxs(s.Fragment,{children:[s.jsx(i.Label,{children:l}),s.jsx(a,{}),n&&s.jsx(i.Description,{children:n}),s.jsx(i.FieldError,{children:o}),l!==e&&e]})})}function a({className:e,...c}){const t=r.clsx(e,"sds-switch");return s.jsx("div",{className:t,...c,children:s.jsx("span",{"aria-hidden":"true",className:"switch-icon"})})}exports.Switch=a;exports.SwitchField=j;exports.SwitchGroup=x;
2
2
  //# sourceMappingURL=Switch.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.cjs","sources":["../../../../../src/ui/primitives/Switch/Switch.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport type React from \"react\";\nimport {\n Switch as RACSwitch,\n type SwitchProps as RACSwitchProps,\n} from \"react-aria-components\";\nimport \"./switch.css\";\n\nexport type SwitchGroupProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function SwitchGroup({ className, ...props }: SwitchGroupProps) {\n const classNames = clsx(className, \"switch-group\");\n return <div {...props} className={classNames} />;\n}\n\nexport type SwitchFieldProps = RACSwitchProps & SharedFieldProps;\nexport function SwitchField({\n children,\n className,\n label,\n description,\n errorMessage,\n ...props\n}: SwitchFieldProps) {\n const classNames = clsx(className, \"switch-field\");\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACSwitch className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Switch />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && children}\n </>\n </RACSwitch>\n );\n}\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Switch({ className, ...props }: SwitchProps) {\n const classNames = clsx(className, \"switch\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"switch-icon\" />\n </div>\n );\n}\n"],"names":["SwitchGroup","className","props","classNames","clsx","jsx","SwitchField","children","label","description","errorMessage","labelText","RACSwitch","jsxs","Fragment","Label","Switch","Description","FieldError"],"mappings":"gRAUO,SAASA,EAAY,CAAE,UAAAC,EAAW,GAAGC,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,cAAc,EACjD,OAAOI,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASG,EAAY,CAC1B,SAAAC,EACA,UAAAN,EACA,MAAAO,EACA,YAAAC,EACA,aAAAC,EACA,GAAGR,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,cAAc,EAC3CU,EACJH,IAAU,OAAOD,GAAa,SAAWA,EAAW,QACtD,aACGK,EAAAA,OAAA,CAAU,UAAWT,EAAa,GAAGD,EACpC,SAAAW,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAT,EAAAA,IAACU,EAAAA,OAAO,SAAAJ,CAAA,CAAU,QACjBK,EAAA,EAAO,EACPP,GAAeJ,EAAAA,IAACY,EAAAA,YAAA,CAAa,SAAAR,CAAA,CAAY,EAC1CJ,EAAAA,IAACa,EAAAA,YAAY,SAAAR,CAAA,CAAa,EACzBC,IAAcJ,GAAYA,CAAA,CAAA,CAC7B,CAAA,CACF,CAEJ,CAGO,SAASS,EAAO,CAAE,UAAAf,EAAW,GAAGC,GAAsB,CAC3D,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,QAAQ,EAC3C,OACEI,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAa,GAAGD,EAC9B,SAAAG,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,UAAU,aAAA,CAAc,EACnD,CAEJ"}
1
+ {"version":3,"file":"Switch.cjs","sources":["../../../../../src/ui/primitives/Switch/Switch.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport type React from \"react\";\nimport {\n Switch as RACSwitch,\n type SwitchProps as RACSwitchProps,\n} from \"react-aria-components\";\nimport \"./switch.css\";\n\nexport type SwitchGroupProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function SwitchGroup({ className, ...props }: SwitchGroupProps) {\n const classNames = clsx(className, \"switch-group\");\n return <div {...props} className={classNames} />;\n}\n\nexport type SwitchFieldProps = RACSwitchProps & SharedFieldProps;\nexport function SwitchField({\n children,\n className,\n label,\n description,\n errorMessage,\n ...props\n}: SwitchFieldProps) {\n const classNames = clsx(className, \"switch-field\");\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACSwitch className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Switch />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && children}\n </>\n </RACSwitch>\n );\n}\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Switch({ className, ...props }: SwitchProps) {\n const classNames = clsx(className, \"sds-switch\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"switch-icon\" />\n </div>\n );\n}\n"],"names":["SwitchGroup","className","props","classNames","clsx","jsx","SwitchField","children","label","description","errorMessage","labelText","RACSwitch","jsxs","Fragment","Label","Switch","Description","FieldError"],"mappings":"gRAUO,SAASA,EAAY,CAAE,UAAAC,EAAW,GAAGC,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,cAAc,EACjD,OAAOI,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASG,EAAY,CAC1B,SAAAC,EACA,UAAAN,EACA,MAAAO,EACA,YAAAC,EACA,aAAAC,EACA,GAAGR,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,cAAc,EAC3CU,EACJH,IAAU,OAAOD,GAAa,SAAWA,EAAW,QACtD,aACGK,EAAAA,OAAA,CAAU,UAAWT,EAAa,GAAGD,EACpC,SAAAW,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAT,EAAAA,IAACU,EAAAA,OAAO,SAAAJ,CAAA,CAAU,QACjBK,EAAA,EAAO,EACPP,GAAeJ,EAAAA,IAACY,EAAAA,YAAA,CAAa,SAAAR,CAAA,CAAY,EAC1CJ,EAAAA,IAACa,EAAAA,YAAY,SAAAR,CAAA,CAAa,EACzBC,IAAcJ,GAAYA,CAAA,CAAA,CAC7B,CAAA,CACF,CAEJ,CAGO,SAASS,EAAO,CAAE,UAAAf,EAAW,GAAGC,GAAsB,CAC3D,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,YAAY,EAC/C,OACEI,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAa,GAAGD,EAC9B,SAAAG,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,UAAU,aAAA,CAAc,EACnD,CAEJ"}
@@ -25,7 +25,7 @@ function b({
25
25
  ] }) });
26
26
  }
27
27
  function w({ className: s, ...t }) {
28
- const c = r(s, "switch");
28
+ const c = r(s, "sds-switch");
29
29
  return /* @__PURE__ */ i("div", { className: c, ...t, children: /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "switch-icon" }) });
30
30
  }
31
31
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sources":["../../../../../src/ui/primitives/Switch/Switch.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport type React from \"react\";\nimport {\n Switch as RACSwitch,\n type SwitchProps as RACSwitchProps,\n} from \"react-aria-components\";\nimport \"./switch.css\";\n\nexport type SwitchGroupProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function SwitchGroup({ className, ...props }: SwitchGroupProps) {\n const classNames = clsx(className, \"switch-group\");\n return <div {...props} className={classNames} />;\n}\n\nexport type SwitchFieldProps = RACSwitchProps & SharedFieldProps;\nexport function SwitchField({\n children,\n className,\n label,\n description,\n errorMessage,\n ...props\n}: SwitchFieldProps) {\n const classNames = clsx(className, \"switch-field\");\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACSwitch className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Switch />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && children}\n </>\n </RACSwitch>\n );\n}\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Switch({ className, ...props }: SwitchProps) {\n const classNames = clsx(className, \"switch\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"switch-icon\" />\n </div>\n );\n}\n"],"names":["SwitchGroup","className","props","classNames","clsx","jsx","SwitchField","children","label","description","errorMessage","labelText","RACSwitch","jsxs","Fragment","Label","Switch","Description","FieldError"],"mappings":";;;;;AAUO,SAASA,EAAY,EAAE,WAAAC,GAAW,GAAGC,KAA2B;AACrE,QAAMC,IAAaC,EAAKH,GAAW,cAAc;AACjD,SAAO,gBAAAI,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASG,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,WAAAN;AAAA,EACA,OAAAO;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGR;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKH,GAAW,cAAc,GAC3CU,IACJH,MAAU,OAAOD,KAAa,WAAWA,IAAW;AACtD,2BACGK,GAAA,EAAU,WAAWT,GAAa,GAAGD,GACpC,UAAA,gBAAAW,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAT,EAACU,KAAO,UAAAJ,EAAA,CAAU;AAAA,sBACjBK,GAAA,EAAO;AAAA,IACPP,KAAe,gBAAAJ,EAACY,GAAA,EAAa,UAAAR,EAAA,CAAY;AAAA,IAC1C,gBAAAJ,EAACa,KAAY,UAAAR,EAAA,CAAa;AAAA,IACzBC,MAAcJ,KAAYA;AAAA,EAAA,EAAA,CAC7B,EAAA,CACF;AAEJ;AAGO,SAASS,EAAO,EAAE,WAAAf,GAAW,GAAGC,KAAsB;AAC3D,QAAMC,IAAaC,EAAKH,GAAW,QAAQ;AAC3C,SACE,gBAAAI,EAAC,OAAA,EAAI,WAAWF,GAAa,GAAGD,GAC9B,UAAA,gBAAAG,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,cAAA,CAAc,GACnD;AAEJ;"}
1
+ {"version":3,"file":"Switch.js","sources":["../../../../../src/ui/primitives/Switch/Switch.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { Description, FieldError, Label, SharedFieldProps } from \"primitives\";\nimport type React from \"react\";\nimport {\n Switch as RACSwitch,\n type SwitchProps as RACSwitchProps,\n} from \"react-aria-components\";\nimport \"./switch.css\";\n\nexport type SwitchGroupProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function SwitchGroup({ className, ...props }: SwitchGroupProps) {\n const classNames = clsx(className, \"switch-group\");\n return <div {...props} className={classNames} />;\n}\n\nexport type SwitchFieldProps = RACSwitchProps & SharedFieldProps;\nexport function SwitchField({\n children,\n className,\n label,\n description,\n errorMessage,\n ...props\n}: SwitchFieldProps) {\n const classNames = clsx(className, \"switch-field\");\n const labelText: string | undefined =\n label || (typeof children === \"string\" ? children : undefined);\n return (\n <RACSwitch className={classNames} {...props}>\n <>\n <Label>{labelText}</Label>\n <Switch />\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {labelText !== children && children}\n </>\n </RACSwitch>\n );\n}\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<\"div\">;\nexport function Switch({ className, ...props }: SwitchProps) {\n const classNames = clsx(className, \"sds-switch\");\n return (\n <div className={classNames} {...props}>\n <span aria-hidden=\"true\" className=\"switch-icon\" />\n </div>\n );\n}\n"],"names":["SwitchGroup","className","props","classNames","clsx","jsx","SwitchField","children","label","description","errorMessage","labelText","RACSwitch","jsxs","Fragment","Label","Switch","Description","FieldError"],"mappings":";;;;;AAUO,SAASA,EAAY,EAAE,WAAAC,GAAW,GAAGC,KAA2B;AACrE,QAAMC,IAAaC,EAAKH,GAAW,cAAc;AACjD,SAAO,gBAAAI,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASG,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,WAAAN;AAAA,EACA,OAAAO;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGR;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKH,GAAW,cAAc,GAC3CU,IACJH,MAAU,OAAOD,KAAa,WAAWA,IAAW;AACtD,2BACGK,GAAA,EAAU,WAAWT,GAAa,GAAGD,GACpC,UAAA,gBAAAW,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAT,EAACU,KAAO,UAAAJ,EAAA,CAAU;AAAA,sBACjBK,GAAA,EAAO;AAAA,IACPP,KAAe,gBAAAJ,EAACY,GAAA,EAAa,UAAAR,EAAA,CAAY;AAAA,IAC1C,gBAAAJ,EAACa,KAAY,UAAAR,EAAA,CAAa;AAAA,IACzBC,MAAcJ,KAAYA;AAAA,EAAA,EAAA,CAC7B,EAAA,CACF;AAEJ;AAGO,SAASS,EAAO,EAAE,WAAAf,GAAW,GAAGC,KAAsB;AAC3D,QAAMC,IAAaC,EAAKH,GAAW,YAAY;AAC/C,SACE,gBAAAI,EAAC,OAAA,EAAI,WAAWF,GAAa,GAAGD,GAC9B,UAAA,gBAAAG,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,cAAA,CAAc,GACnD;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),l=require("react-aria-components");;/* empty css */const m=require("../../icons/IconChevronUp.cjs"),h=require("../../icons/IconChevronDown.cjs"),u=require("../Checkbox/Checkbox.cjs");function j({bleed:s=!1,dense:a=!1,grid:n=!1,striped:c=!1,className:t,...o}){const i=r.clsx(t,"table-container",s&&"table-container-bleed"),b=r.clsx("table",s&&"table-bleed",a&&"table-dense",n&&"table-grid",c&&"table-striped");return e.jsx("div",{className:i,children:e.jsx(l.Table,{className:b,...o})})}function x({align:s="start",className:a,...n}){const c=r.clsx(a,"table-column",`table-align-${s}`);return e.jsx(l.Column,{className:c,...n,children:({allowsSorting:t,sortDirection:o})=>e.jsx("div",{className:r.clsx("table-column-inner"),children:e.jsxs(e.Fragment,{children:[n.children,t&&e.jsx("span",{"aria-hidden":"true",className:"sort-indicator",children:o==="ascending"?e.jsx(m.IconChevronUp,{}):e.jsx(h.IconChevronDown,{})})]})})})}function C({className:s,...a}){return e.jsx(l.TableBody,{...a})}function N({className:s,columns:a,children:n,...c}){const{selectionBehavior:t,selectionMode:o,allowsDragging:i}=l.useTableOptions(),b=r.clsx(s,"table-head");return e.jsxs(l.TableHeader,{className:b,...c,children:[i&&e.jsx(x,{}),t==="toggle"&&e.jsx(x,{className:"table-selection-col",children:o==="multiple"&&e.jsx(l.Checkbox,{slot:"selection",className:"table-selection-checkbox",children:e.jsx(u.Checkbox,{})})}),e.jsx(l.Collection,{items:a,children:n})]})}function g({id:s,columns:a,children:n,className:c,...t}){const{selectionBehavior:o,allowsDragging:i}=l.useTableOptions(),b=r.clsx(c,"table-row");return e.jsxs(l.Row,{id:s,...t,className:b,children:[i&&e.jsx(d,{children:e.jsx(l.Button,{slot:"drag",children:"≡"})}),o==="toggle"&&e.jsx(d,{className:"table-selection-cell",children:e.jsx(l.Checkbox,{slot:"selection",className:"table-selection-checkbox",children:e.jsx(u.Checkbox,{})})}),e.jsx(l.Collection,{items:a,children:n})]})}function d({align:s="start",className:a,...n}){const c=r.clsx(a,"table-cell",`table-align-${s}`);return e.jsx(l.Cell,{className:c,...n})}exports.Table=j;exports.TableBody=C;exports.TableCell=d;exports.TableColumn=x;exports.TableHead=N;exports.TableRow=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),s=require("react-aria-components");;/* empty css */const m=require("../../icons/IconChevronUp.cjs"),h=require("../../icons/IconChevronDown.cjs"),u=require("../Checkbox/Checkbox.cjs");function j({bleed:l=!1,dense:a=!1,grid:n=!1,striped:c=!1,className:t,...o}){const i=r.clsx(t,"table-container",l&&"table-container-bleed"),b=r.clsx("sds-table",l&&"table-bleed",a&&"table-dense",n&&"table-grid",c&&"sds-table-striped");return e.jsx("div",{className:i,children:e.jsx(s.Table,{className:b,...o})})}function x({align:l="start",className:a,...n}){const c=r.clsx(a,"table-column",`table-align-${l}`);return e.jsx(s.Column,{className:c,...n,children:({allowsSorting:t,sortDirection:o})=>e.jsx("div",{className:r.clsx("table-column-inner"),children:e.jsxs(e.Fragment,{children:[n.children,t&&e.jsx("span",{"aria-hidden":"true",className:"sort-indicator",children:o==="ascending"?e.jsx(m.IconChevronUp,{}):e.jsx(h.IconChevronDown,{})})]})})})}function C({className:l,...a}){return e.jsx(s.TableBody,{...a})}function N({className:l,columns:a,children:n,...c}){const{selectionBehavior:t,selectionMode:o,allowsDragging:i}=s.useTableOptions(),b=r.clsx(l,"table-head");return e.jsxs(s.TableHeader,{className:b,...c,children:[i&&e.jsx(x,{}),t==="toggle"&&e.jsx(x,{className:"table-selection-col",children:o==="multiple"&&e.jsx(s.Checkbox,{slot:"selection",className:"table-selection-checkbox",children:e.jsx(u.Checkbox,{})})}),e.jsx(s.Collection,{items:a,children:n})]})}function g({id:l,columns:a,children:n,className:c,...t}){const{selectionBehavior:o,allowsDragging:i}=s.useTableOptions(),b=r.clsx(c,"table-row");return e.jsxs(s.Row,{id:l,...t,className:b,children:[i&&e.jsx(d,{children:e.jsx(s.Button,{slot:"drag",children:"≡"})}),o==="toggle"&&e.jsx(d,{className:"table-selection-cell",children:e.jsx(s.Checkbox,{slot:"selection",className:"table-selection-checkbox",children:e.jsx(u.Checkbox,{})})}),e.jsx(s.Collection,{items:a,children:n})]})}function d({align:l="start",className:a,...n}){const c=r.clsx(a,"table-cell",`table-align-${l}`);return e.jsx(s.Cell,{className:c,...n})}exports.Table=j;exports.TableBody=C;exports.TableCell=d;exports.TableColumn=x;exports.TableHead=N;exports.TableRow=g;
2
2
  //# sourceMappingURL=Table.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.cjs","sources":["../../../../../src/ui/primitives/Table/Table.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { IconChevronDown, IconChevronUp } from \"icons\";\nimport { Checkbox } from \"primitives\";\nimport {\n Button as RACButton,\n Cell as RACCell,\n Checkbox as RACSelectionCheckbox,\n Collection as RACCollection,\n Column as RACColumn,\n Row as RACRow,\n Table as RACTable,\n TableBody as RACTableBody,\n TableHeader as RACTableHeader,\n useTableOptions,\n type CellProps as RACCellProps,\n type ColumnProps as RACColumnProps,\n type RowProps as RACRowProps,\n type TableBodyProps as RACTableBodyProps,\n type TableHeaderProps as RACTableHeaderProps,\n type TableProps as RACTableProps,\n} from \"react-aria-components\";\nimport \"./table.css\";\n\ntype TableAlign = \"start\" | \"center\" | \"right\";\n\nexport type TableProps = RACTableProps & {\n bleed?: boolean;\n dense?: boolean;\n grid?: boolean;\n striped?: boolean;\n};\nexport function Table({\n bleed = false,\n dense = false,\n grid = false,\n striped = false,\n className,\n ...props\n}: TableProps) {\n const containerClassNames = clsx(\n className,\n \"table-container\",\n bleed && \"table-container-bleed\",\n );\n const tableClassNames = clsx(\n \"table\",\n bleed && \"table-bleed\",\n dense && \"table-dense\",\n grid && \"table-grid\",\n striped && \"table-striped\",\n );\n return (\n <div className={containerClassNames}>\n <RACTable className={tableClassNames} {...props} />\n </div>\n );\n}\n\nexport type TableColumnProps = RACColumnProps & {\n align?: TableAlign;\n};\nexport function TableColumn({\n align = \"start\",\n className,\n ...props\n}: TableColumnProps) {\n const classNames = clsx(className, \"table-column\", `table-align-${align}`);\n return (\n <RACColumn className={classNames} {...props}>\n {({ allowsSorting, sortDirection }) => (\n <div className={clsx(\"table-column-inner\")}>\n <>\n {props.children}\n {allowsSorting && (\n <span aria-hidden=\"true\" className=\"sort-indicator\">\n {sortDirection === \"ascending\" ? (\n <IconChevronUp />\n ) : (\n <IconChevronDown />\n )}\n </span>\n )}\n </>\n </div>\n )}\n </RACColumn>\n );\n}\n\nexport type TableBodyProps<T> = RACTableBodyProps<T>;\nexport function TableBody<T extends object>({\n className,\n ...props\n}: TableBodyProps<T>) {\n return <RACTableBody {...props} />;\n}\n\nexport type TableHeadProps<T> = RACTableHeaderProps<T>;\nexport function TableHead<T extends object>({\n className,\n columns,\n children,\n ...props\n}: TableHeadProps<T>) {\n const { selectionBehavior, selectionMode, allowsDragging } =\n useTableOptions();\n const classNames = clsx(className, \"table-head\");\n return (\n <RACTableHeader className={classNames} {...props}>\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <TableColumn />}\n {selectionBehavior === \"toggle\" && (\n <TableColumn className=\"table-selection-col\">\n {selectionMode === \"multiple\" && (\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n )}\n </TableColumn>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACTableHeader>\n );\n}\n\nexport type TableRowProps<T> = RACRowProps<T>;\nexport function TableRow<T extends object>({\n id,\n columns,\n children,\n className,\n ...otherProps\n}: TableRowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions();\n const classNames = clsx(className, \"table-row\");\n return (\n <RACRow id={id} {...otherProps} className={classNames}>\n {allowsDragging && (\n <TableCell>\n <RACButton slot=\"drag\">≡</RACButton>\n </TableCell>\n )}\n {selectionBehavior === \"toggle\" && (\n <TableCell className=\"table-selection-cell\">\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n </TableCell>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACRow>\n );\n}\n\nexport type TableCellProps = RACCellProps & { align?: TableAlign };\nexport function TableCell({\n align = \"start\",\n className,\n ...props\n}: TableCellProps) {\n const classNames = clsx(className, \"table-cell\", `table-align-${align}`);\n return <RACCell className={classNames} {...props} />;\n}\n"],"names":["Table","bleed","dense","grid","striped","className","props","containerClassNames","clsx","tableClassNames","jsx","RACTable","TableColumn","align","classNames","RACColumn","allowsSorting","sortDirection","jsxs","Fragment","IconChevronUp","IconChevronDown","TableBody","RACTableBody","TableHead","columns","children","selectionBehavior","selectionMode","allowsDragging","useTableOptions","RACTableHeader","RACSelectionCheckbox","Checkbox","RACCollection","TableRow","id","otherProps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AAMQ,EAAaN,EAAAA,KAAKH,EAAW,aAAc,eAAeQ,CAAK,EAAE,EACvE,OAAOH,EAAAA,IAAC+B,EAAAA,KAAA,CAAQ,UAAW3B,EAAa,GAAGR,EAAO,CACpD"}
1
+ {"version":3,"file":"Table.cjs","sources":["../../../../../src/ui/primitives/Table/Table.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { IconChevronDown, IconChevronUp } from \"icons\";\nimport { Checkbox } from \"primitives\";\nimport {\n Button as RACButton,\n Cell as RACCell,\n Checkbox as RACSelectionCheckbox,\n Collection as RACCollection,\n Column as RACColumn,\n Row as RACRow,\n Table as RACTable,\n TableBody as RACTableBody,\n TableHeader as RACTableHeader,\n useTableOptions,\n type CellProps as RACCellProps,\n type ColumnProps as RACColumnProps,\n type RowProps as RACRowProps,\n type TableBodyProps as RACTableBodyProps,\n type TableHeaderProps as RACTableHeaderProps,\n type TableProps as RACTableProps,\n} from \"react-aria-components\";\nimport \"./table.css\";\n\ntype TableAlign = \"start\" | \"center\" | \"right\";\n\nexport type TableProps = RACTableProps & {\n bleed?: boolean;\n dense?: boolean;\n grid?: boolean;\n striped?: boolean;\n};\nexport function Table({\n bleed = false,\n dense = false,\n grid = false,\n striped = false,\n className,\n ...props\n}: TableProps) {\n const containerClassNames = clsx(\n className,\n \"table-container\",\n bleed && \"table-container-bleed\",\n );\n const tableClassNames = clsx(\n \"sds-table\",\n bleed && \"table-bleed\",\n dense && \"table-dense\",\n grid && \"table-grid\",\n striped && \"sds-table-striped\",\n );\n return (\n <div className={containerClassNames}>\n <RACTable className={tableClassNames} {...props} />\n </div>\n );\n}\n\nexport type TableColumnProps = RACColumnProps & {\n align?: TableAlign;\n};\nexport function TableColumn({\n align = \"start\",\n className,\n ...props\n}: TableColumnProps) {\n const classNames = clsx(className, \"table-column\", `table-align-${align}`);\n return (\n <RACColumn className={classNames} {...props}>\n {({ allowsSorting, sortDirection }) => (\n <div className={clsx(\"table-column-inner\")}>\n <>\n {props.children}\n {allowsSorting && (\n <span aria-hidden=\"true\" className=\"sort-indicator\">\n {sortDirection === \"ascending\" ? (\n <IconChevronUp />\n ) : (\n <IconChevronDown />\n )}\n </span>\n )}\n </>\n </div>\n )}\n </RACColumn>\n );\n}\n\nexport type TableBodyProps<T> = RACTableBodyProps<T>;\nexport function TableBody<T extends object>({\n className,\n ...props\n}: TableBodyProps<T>) {\n return <RACTableBody {...props} />;\n}\n\nexport type TableHeadProps<T> = RACTableHeaderProps<T>;\nexport function TableHead<T extends object>({\n className,\n columns,\n children,\n ...props\n}: TableHeadProps<T>) {\n const { selectionBehavior, selectionMode, allowsDragging } =\n useTableOptions();\n const classNames = clsx(className, \"table-head\");\n return (\n <RACTableHeader className={classNames} {...props}>\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <TableColumn />}\n {selectionBehavior === \"toggle\" && (\n <TableColumn className=\"table-selection-col\">\n {selectionMode === \"multiple\" && (\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n )}\n </TableColumn>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACTableHeader>\n );\n}\n\nexport type TableRowProps<T> = RACRowProps<T>;\nexport function TableRow<T extends object>({\n id,\n columns,\n children,\n className,\n ...otherProps\n}: TableRowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions();\n const classNames = clsx(className, \"table-row\");\n return (\n <RACRow id={id} {...otherProps} className={classNames}>\n {allowsDragging && (\n <TableCell>\n <RACButton slot=\"drag\">≡</RACButton>\n </TableCell>\n )}\n {selectionBehavior === \"toggle\" && (\n <TableCell className=\"table-selection-cell\">\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n </TableCell>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACRow>\n );\n}\n\nexport type TableCellProps = RACCellProps & { align?: TableAlign };\nexport function TableCell({\n align = \"start\",\n className,\n ...props\n}: TableCellProps) {\n const classNames = clsx(className, \"table-cell\", `table-align-${align}`);\n return <RACCell className={classNames} {...props} />;\n}\n"],"names":["Table","bleed","dense","grid","striped","className","props","containerClassNames","clsx","tableClassNames","jsx","RACTable","TableColumn","align","classNames","RACColumn","allowsSorting","sortDirection","jsxs","Fragment","IconChevronUp","IconChevronDown","TableBody","RACTableBody","TableHead","columns","children","selectionBehavior","selectionMode","allowsDragging","useTableOptions","RACTableHeader","RACSelectionCheckbox","Checkbox","RACCollection","TableRow","id","otherProps","RACRow","TableCell","RACButton","RACCell"],"mappings":"uWA+BO,SAASA,EAAM,CACpB,MAAAC,EAAQ,GACR,MAAAC,EAAQ,GACR,KAAAC,EAAO,GACP,QAAAC,EAAU,GACV,UAAAC,EACA,GAAGC,CACL,EAAe,CACb,MAAMC,EAAsBC,EAAAA,KAC1BH,EACA,kBACAJ,GAAS,uBAAA,EAELQ,EAAkBD,EAAAA,KACtB,YACAP,GAAS,cACTC,GAAS,cACTC,GAAQ,aACRC,GAAW,mBAAA,EAEb,OACEM,EAAAA,IAAC,MAAA,CAAI,UAAWH,EACd,SAAAG,EAAAA,IAACC,EAAAA,OAAS,UAAWF,EAAkB,GAAGH,CAAA,CAAO,CAAA,CACnD,CAEJ,CAKO,SAASM,EAAY,CAC1B,MAAAC,EAAQ,QACR,UAAAR,EACA,GAAGC,CACL,EAAqB,CACnB,MAAMQ,EAAaN,EAAAA,KAAKH,EAAW,eAAgB,eAAeQ,CAAK,EAAE,EACzE,aACGE,SAAA,CAAU,UAAWD,EAAa,GAAGR,EACnC,SAAA,CAAC,CAAE,cAAAU,EAAe,cAAAC,CAAA,IACjBP,EAAAA,IAAC,MAAA,CAAI,UAAWF,OAAK,oBAAoB,EACvC,SAAAU,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAb,EAAM,SACNU,GACCN,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,UAAU,iBAChC,SAAAO,IAAkB,YACjBP,EAAAA,IAACU,gBAAA,CAAA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AA,CAAU,UAAU,uBACnB,SAAA7B,EAAAA,IAACsB,EAAAA,SAAA,CAAqB,KAAK,YAAY,UAAU,2BAC/C,SAAAtB,EAAAA,IAACuB,WAAA,CAAA,CAAS,EACZ,EACF,EAEFvB,EAAAA,IAACwB,EAAAA,WAAA,CAAc,MAAOT,EAAU,SAAAC,CAAA,CAAS,CAAA,EAC3C,CAEJ,CAGO,SAASa,EAAU,CACxB,MAAA1B,EAAQ,QACR,UAAAR,EACA,GAAGC,CACL,EAAmB,CACjB,MAAMQ,EAAaN,EAAAA,KAAKH,EAAW,aAAc,eAAeQ,CAAK,EAAE,EACvE,OAAOH,EAAAA,IAAC+B,EAAAA,KAAA,CAAQ,UAAW3B,EAAa,GAAGR,EAAO,CACpD"}
@@ -18,11 +18,11 @@ function M({
18
18
  "table-container",
19
19
  l && "table-container-bleed"
20
20
  ), i = c(
21
- "table",
21
+ "sds-table",
22
22
  l && "table-bleed",
23
23
  a && "table-dense",
24
24
  s && "table-grid",
25
- n && "table-striped"
25
+ n && "sds-table-striped"
26
26
  );
27
27
  return /* @__PURE__ */ e("div", { className: r, children: /* @__PURE__ */ e(C, { className: i, ...o }) });
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../../../../src/ui/primitives/Table/Table.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { IconChevronDown, IconChevronUp } from \"icons\";\nimport { Checkbox } from \"primitives\";\nimport {\n Button as RACButton,\n Cell as RACCell,\n Checkbox as RACSelectionCheckbox,\n Collection as RACCollection,\n Column as RACColumn,\n Row as RACRow,\n Table as RACTable,\n TableBody as RACTableBody,\n TableHeader as RACTableHeader,\n useTableOptions,\n type CellProps as RACCellProps,\n type ColumnProps as RACColumnProps,\n type RowProps as RACRowProps,\n type TableBodyProps as RACTableBodyProps,\n type TableHeaderProps as RACTableHeaderProps,\n type TableProps as RACTableProps,\n} from \"react-aria-components\";\nimport \"./table.css\";\n\ntype TableAlign = \"start\" | \"center\" | \"right\";\n\nexport type TableProps = RACTableProps & {\n bleed?: boolean;\n dense?: boolean;\n grid?: boolean;\n striped?: boolean;\n};\nexport function Table({\n bleed = false,\n dense = false,\n grid = false,\n striped = false,\n className,\n ...props\n}: TableProps) {\n const containerClassNames = clsx(\n className,\n \"table-container\",\n bleed && \"table-container-bleed\",\n );\n const tableClassNames = clsx(\n \"table\",\n bleed && \"table-bleed\",\n dense && \"table-dense\",\n grid && \"table-grid\",\n striped && \"table-striped\",\n );\n return (\n <div className={containerClassNames}>\n <RACTable className={tableClassNames} {...props} />\n </div>\n );\n}\n\nexport type TableColumnProps = RACColumnProps & {\n align?: TableAlign;\n};\nexport function TableColumn({\n align = \"start\",\n className,\n ...props\n}: TableColumnProps) {\n const classNames = clsx(className, \"table-column\", `table-align-${align}`);\n return (\n <RACColumn className={classNames} {...props}>\n {({ allowsSorting, sortDirection }) => (\n <div className={clsx(\"table-column-inner\")}>\n <>\n {props.children}\n {allowsSorting && (\n <span aria-hidden=\"true\" className=\"sort-indicator\">\n {sortDirection === \"ascending\" ? (\n <IconChevronUp />\n ) : (\n <IconChevronDown />\n )}\n </span>\n )}\n </>\n </div>\n )}\n </RACColumn>\n );\n}\n\nexport type TableBodyProps<T> = RACTableBodyProps<T>;\nexport function TableBody<T extends object>({\n className,\n ...props\n}: TableBodyProps<T>) {\n return <RACTableBody {...props} />;\n}\n\nexport type TableHeadProps<T> = RACTableHeaderProps<T>;\nexport function TableHead<T extends object>({\n className,\n columns,\n children,\n ...props\n}: TableHeadProps<T>) {\n const { selectionBehavior, selectionMode, allowsDragging } =\n useTableOptions();\n const classNames = clsx(className, \"table-head\");\n return (\n <RACTableHeader className={classNames} {...props}>\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <TableColumn />}\n {selectionBehavior === \"toggle\" && (\n <TableColumn className=\"table-selection-col\">\n {selectionMode === \"multiple\" && (\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n )}\n </TableColumn>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACTableHeader>\n );\n}\n\nexport type TableRowProps<T> = RACRowProps<T>;\nexport function TableRow<T extends object>({\n id,\n columns,\n children,\n className,\n ...otherProps\n}: TableRowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions();\n const classNames = clsx(className, \"table-row\");\n return (\n <RACRow id={id} {...otherProps} className={classNames}>\n {allowsDragging && (\n <TableCell>\n <RACButton slot=\"drag\">≡</RACButton>\n </TableCell>\n )}\n {selectionBehavior === \"toggle\" && (\n <TableCell className=\"table-selection-cell\">\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n </TableCell>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACRow>\n );\n}\n\nexport type TableCellProps = RACCellProps & { align?: TableAlign };\nexport function TableCell({\n align = \"start\",\n className,\n ...props\n}: TableCellProps) {\n const classNames = clsx(className, \"table-cell\", `table-align-${align}`);\n return <RACCell className={classNames} {...props} />;\n}\n"],"names":["Table","bleed","dense","grid","striped","className","props","containerClassNames","clsx","tableClassNames","jsx","RACTable","TableColumn","align","classNames","RACColumn","allowsSorting","sortDirection","jsxs","Fragment","IconChevronUp","IconChevronDown","TableBody","RACTableBody","TableHead","columns","children","selectionBehavior","selectionMode","allowsDragging","useTableOptions","RACTableHeader","RACSelectionCheckbox","Checkbox","RACCollection","TableRow","id","otherProps","RACRow","TableCell","RACButton","RACCell"],"mappings":";;;;;;;AA+BO,SAASA,EAAM;AAAA,EACpB,OAAAC,IAAQ;AAAA,EACR,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,GAAGC;AACL,GAAe;AACb,QAAMC,IAAsBC;AAAA,IAC1BH;AAAA,IACA;AAAA,IACAJ,KAAS;AAAA,EAAA,GAELQ,IAAkBD;AAAA,IACtB;AAAA,IACAP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,"file":"Table.js","sources":["../../../../../src/ui/primitives/Table/Table.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { IconChevronDown, IconChevronUp } from \"icons\";\nimport { Checkbox } from \"primitives\";\nimport {\n Button as RACButton,\n Cell as RACCell,\n Checkbox as RACSelectionCheckbox,\n Collection as RACCollection,\n Column as RACColumn,\n Row as RACRow,\n Table as RACTable,\n TableBody as RACTableBody,\n TableHeader as RACTableHeader,\n useTableOptions,\n type CellProps as RACCellProps,\n type ColumnProps as RACColumnProps,\n type RowProps as RACRowProps,\n type TableBodyProps as RACTableBodyProps,\n type TableHeaderProps as RACTableHeaderProps,\n type TableProps as RACTableProps,\n} from \"react-aria-components\";\nimport \"./table.css\";\n\ntype TableAlign = \"start\" | \"center\" | \"right\";\n\nexport type TableProps = RACTableProps & {\n bleed?: boolean;\n dense?: boolean;\n grid?: boolean;\n striped?: boolean;\n};\nexport function Table({\n bleed = false,\n dense = false,\n grid = false,\n striped = false,\n className,\n ...props\n}: TableProps) {\n const containerClassNames = clsx(\n className,\n \"table-container\",\n bleed && \"table-container-bleed\",\n );\n const tableClassNames = clsx(\n \"sds-table\",\n bleed && \"table-bleed\",\n dense && \"table-dense\",\n grid && \"table-grid\",\n striped && \"sds-table-striped\",\n );\n return (\n <div className={containerClassNames}>\n <RACTable className={tableClassNames} {...props} />\n </div>\n );\n}\n\nexport type TableColumnProps = RACColumnProps & {\n align?: TableAlign;\n};\nexport function TableColumn({\n align = \"start\",\n className,\n ...props\n}: TableColumnProps) {\n const classNames = clsx(className, \"table-column\", `table-align-${align}`);\n return (\n <RACColumn className={classNames} {...props}>\n {({ allowsSorting, sortDirection }) => (\n <div className={clsx(\"table-column-inner\")}>\n <>\n {props.children}\n {allowsSorting && (\n <span aria-hidden=\"true\" className=\"sort-indicator\">\n {sortDirection === \"ascending\" ? (\n <IconChevronUp />\n ) : (\n <IconChevronDown />\n )}\n </span>\n )}\n </>\n </div>\n )}\n </RACColumn>\n );\n}\n\nexport type TableBodyProps<T> = RACTableBodyProps<T>;\nexport function TableBody<T extends object>({\n className,\n ...props\n}: TableBodyProps<T>) {\n return <RACTableBody {...props} />;\n}\n\nexport type TableHeadProps<T> = RACTableHeaderProps<T>;\nexport function TableHead<T extends object>({\n className,\n columns,\n children,\n ...props\n}: TableHeadProps<T>) {\n const { selectionBehavior, selectionMode, allowsDragging } =\n useTableOptions();\n const classNames = clsx(className, \"table-head\");\n return (\n <RACTableHeader className={classNames} {...props}>\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <TableColumn />}\n {selectionBehavior === \"toggle\" && (\n <TableColumn className=\"table-selection-col\">\n {selectionMode === \"multiple\" && (\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n )}\n </TableColumn>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACTableHeader>\n );\n}\n\nexport type TableRowProps<T> = RACRowProps<T>;\nexport function TableRow<T extends object>({\n id,\n columns,\n children,\n className,\n ...otherProps\n}: TableRowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions();\n const classNames = clsx(className, \"table-row\");\n return (\n <RACRow id={id} {...otherProps} className={classNames}>\n {allowsDragging && (\n <TableCell>\n <RACButton slot=\"drag\">≡</RACButton>\n </TableCell>\n )}\n {selectionBehavior === \"toggle\" && (\n <TableCell className=\"table-selection-cell\">\n <RACSelectionCheckbox slot=\"selection\" className=\"table-selection-checkbox\">\n <Checkbox />\n </RACSelectionCheckbox>\n </TableCell>\n )}\n <RACCollection items={columns}>{children}</RACCollection>\n </RACRow>\n );\n}\n\nexport type TableCellProps = RACCellProps & { align?: TableAlign };\nexport function TableCell({\n align = \"start\",\n className,\n ...props\n}: TableCellProps) {\n const classNames = clsx(className, \"table-cell\", `table-align-${align}`);\n return <RACCell className={classNames} {...props} />;\n}\n"],"names":["Table","bleed","dense","grid","striped","className","props","containerClassNames","clsx","tableClassNames","jsx","RACTable","TableColumn","align","classNames","RACColumn","allowsSorting","sortDirection","jsxs","Fragment","IconChevronUp","IconChevronDown","TableBody","RACTableBody","TableHead","columns","children","selectionBehavior","selectionMode","allowsDragging","useTableOptions","RACTableHeader","RACSelectionCheckbox","Checkbox","RACCollection","TableRow","id","otherProps","RACRow","TableCell","RACButton","RACCell"],"mappings":";;;;;;;AA+BO,SAASA,EAAM;AAAA,EACpB,OAAAC,IAAQ;AAAA,EACR,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,GAAGC;AACL,GAAe;AACb,QAAMC,IAAsBC;AAAA,IAC1BH;AAAA,IACA;AAAA,IACAJ,KAAS;AAAA,EAAA,GAELQ,IAAkBD;AAAA,IACtB;AAAA,IACAP,KAAS;AAAA,IACTC,KAAS;AAAA,IACTC,KAAQ;AAAA,IACRC,KAAW;AAAA,EAAA;AAEb,SACE,gBAAAM,EAAC,OAAA,EAAI,WAAWH,GACd,UAAA,gBAAAG,EAACC,KAAS,WAAWF,GAAkB,GAAGH,EAAA,CAAO,EAAA,CACnD;AAEJ;AAKO,SAASM,EAAY;AAAA,EAC1B,OAAAC,IAAQ;AAAA,EACR,WAAAR;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAMQ,IAAaN,EAAKH,GAAW,gBAAgB,eAAeQ,CAAK,EAAE;AACzE,2BACGE,GAAA,EAAU,WAAWD,GAAa,GAAGR,GACnC,UAAA,CAAC,EAAE,eAAAU,GAAe,eAAAC,EAAA,MACjB,gBAAAP,EAAC,OAAA,EAAI,WAAWF,EAAK,oBAAoB,GACvC,UAAA,gBAAAU,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAb,EAAM;AAAA,IACNU,KACC,gBAAAN,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,kBAChC,UAAAO,MAAkB,cACjB,gBAAAP,EAACU,GAAA,CAAA,CAAc,IAEf,gBAAAV,EAACW,KAAgB,EAAA,CAErB;AAAA,EAAA,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AAA,EAAU,WAAU,wBACnB,UAAA,gBAAA7B,EAACsB,GAAA,EAAqB,MAAK,aAAY,WAAU,4BAC/C,UAAA,gBAAAtB,EAACuB,GAAA,CAAA,CAAS,GACZ,GACF;AAAA,IAEF,gBAAAvB,EAACwB,GAAA,EAAc,OAAOT,GAAU,UAAAC,EAAA,CAAS;AAAA,EAAA,GAC3C;AAEJ;AAGO,SAASa,EAAU;AAAA,EACxB,OAAA1B,IAAQ;AAAA,EACR,WAAAR;AAAA,EACA,GAAGC;AACL,GAAmB;AACjB,QAAMQ,IAAaN,EAAKH,GAAW,cAAc,eAAeQ,CAAK,EAAE;AACvE,SAAO,gBAAAH,EAAC+B,GAAA,EAAQ,WAAW3B,GAAa,GAAGR,GAAO;AACpD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),i=require("react-aria-components");;/* empty css */const y=require("../Link/Link.cjs"),m=require("../../layout/Flex/Flex.cjs"),f=require("../../hooks/useMediaQuery.cjs");function b({className:s,elementType:n="p",lineHeight:t="body",lineClamp:e,style:x,...a}){const l=r.clsx(s,!!e&&"text-truncate","text-body-base",`text-line-height-${t}`),o=e?{"--text-truncate-line-clamp":e,...x}:x;return c.jsx(i.Text,{style:o,elementType:n,className:l,...a})}function d({className:s,elementType:n="small",lineHeight:t="body",lineClamp:e,style:x,...a}){const l=r.clsx(s,!!e&&"text-truncate","text-body-small",`text-line-height-${t}`),o=e?{"--text-truncate-line-clamp":e,...x}:x;return c.jsx(i.Text,{style:o,className:l,elementType:n,...a})}function p({className:s,elementType:n="small",lineClamp:t,lineHeight:e="body",style:x,...a}){const l=r.clsx(s,!!t&&"text-truncate","text-body-small-strong",`text-line-height-${e}`),o=t?{"--text-truncate-line-clamp":t,...x}:x;return c.jsx(i.Text,{style:o,className:l,elementType:n,...a})}function L({className:s,elementType:n="strong",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-body-strong"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function $({className:s,elementType:n,...t}){const e=r.clsx(s,"text-body-emphasis");return c.jsx(i.Text,{className:e,elementType:n,...t})}function k({className:s,...n}){const t=r.clsx(s,"text-body-link");return c.jsx(y.Link,{className:t,...n})}function q({className:s,...n}){const t=r.clsx(s,"text-body-code");return c.jsx(i.Text,{className:t,...n})}function H({className:s,...n}){const t=r.clsx(s,"text-input");return c.jsx(i.Text,{className:t,...n})}function N({className:s,elementType:n="h1",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-title-hero"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function u({className:s,elementType:n="h2",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-title-page"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function h({className:s,elementType:n="p",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-subtitle"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function T({className:s,elementType:n="h3",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-heading"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function j({className:s,elementType:n="p",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"text-truncate","text-subheading"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function P({className:s,currency:n,size:t="large",price:e,label:x,...a}){const l=r.clsx(s,"text-price",`text-price-size-${t}`),o=c.jsxs(c.Fragment,{children:[c.jsx("sup",{className:"text-price-currency",children:n}),e]});return c.jsxs(i.Text,{elementType:"p",className:l,...a,children:[t==="small"?c.jsx(T,{elementType:"span",children:o}):c.jsx(u,{elementType:"span",children:o}),x&&c.jsx(d,{children:x})]})}function S({className:s,...n}){const t=r.clsx(s,"text-list-item");return c.jsx("li",{className:t,...n})}function g({children:s,className:n,density:t="default",title:e,...x}){const a=r.clsx(n,"text-list",`text-list-density-${t}`);return c.jsxs("ul",{className:a,...x,children:[e&&c.jsx("li",{className:"text-list-title",children:e}),s]})}function F({className:s,...n}){const t=r.clsx(s,"text-link-list");return c.jsx(g,{className:t,...n})}function I({align:s="start",className:n,heading:t,subheading:e,...x}){const a=r.clsx(n,"text-content-heading",`text-align-${s}`);return c.jsxs(m.Flex,{direction:"column",gap:"200",className:a,...x,children:[c.jsx(T,{children:t}),e&&c.jsx(j,{children:e})]})}function M({align:s="start",className:n,title:t,subtitle:e,...x}){const a=r.clsx(n,"text-content-title"),{isMobile:l}=f.useMediaQuery();return c.jsxs(m.Flex,{direction:"column",gap:"200",className:a,...x,children:[l?c.jsx(u,{className:`text-align-${s}`,children:t}):c.jsx(N,{className:`text-align-${s}`,children:t}),e&&c.jsx(h,{className:`text-align-${s}`,children:e})]})}exports.Text=b;exports.TextCode=q;exports.TextContentHeading=I;exports.TextContentTitle=M;exports.TextEmphasis=$;exports.TextHeading=T;exports.TextInput=H;exports.TextLink=k;exports.TextLinkList=F;exports.TextList=g;exports.TextListItem=S;exports.TextPrice=P;exports.TextSmall=d;exports.TextSmallStrong=p;exports.TextStrong=L;exports.TextSubheading=j;exports.TextSubtitle=h;exports.TextTitleHero=N;exports.TextTitlePage=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),r=require("../../../vendor/clsx/dist/clsx.cjs"),i=require("react-aria-components");;/* empty css */const y=require("../Link/Link.cjs"),d=require("../../layout/Flex/Flex.cjs"),f=require("../../hooks/useMediaQuery.cjs");function b({className:s,elementType:n="p",lineHeight:t="body",lineClamp:e,style:x,...a}){const l=r.clsx(s,!!e&&"sds-text-truncate","text-body-base",`text-line-height-${t}`),o=e?{"--text-truncate-line-clamp":e,...x}:x;return c.jsx(i.Text,{style:o,elementType:n,className:l,...a})}function m({className:s,elementType:n="small",lineHeight:t="body",lineClamp:e,style:x,...a}){const l=r.clsx(s,!!e&&"sds-text-truncate","text-body-small",`text-line-height-${t}`),o=e?{"--text-truncate-line-clamp":e,...x}:x;return c.jsx(i.Text,{style:o,className:l,elementType:n,...a})}function p({className:s,elementType:n="small",lineClamp:t,lineHeight:e="body",style:x,...a}){const l=r.clsx(s,!!t&&"sds-text-truncate","text-body-small-strong",`text-line-height-${e}`),o=t?{"--text-truncate-line-clamp":t,...x}:x;return c.jsx(i.Text,{style:o,className:l,elementType:n,...a})}function L({className:s,elementType:n="strong",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-body-strong"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function $({className:s,elementType:n,...t}){const e=r.clsx(s,"text-body-emphasis");return c.jsx(i.Text,{className:e,elementType:n,...t})}function k({className:s,...n}){const t=r.clsx(s,"text-body-link");return c.jsx(y.Link,{className:t,...n})}function q({className:s,...n}){const t=r.clsx(s,"text-body-code");return c.jsx(i.Text,{className:t,...n})}function H({className:s,...n}){const t=r.clsx(s,"text-input");return c.jsx(i.Text,{className:t,...n})}function N({className:s,elementType:n="h1",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-title-hero"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function u({className:s,elementType:n="h2",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-title-page"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function h({className:s,elementType:n="p",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-subtitle"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function T({className:s,elementType:n="h3",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-heading"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function j({className:s,elementType:n="p",lineClamp:t,style:e,...x}){const a=r.clsx(s,!!t&&"sds-text-truncate","text-subheading"),l=t?{"--text-truncate-line-clamp":t,...e}:e;return c.jsx(i.Text,{style:l,className:a,elementType:n,...x})}function P({className:s,currency:n,size:t="large",price:e,label:x,...a}){const l=r.clsx(s,"text-price",`text-price-size-${t}`),o=c.jsxs(c.Fragment,{children:[c.jsx("sup",{className:"text-price-currency",children:n}),e]});return c.jsxs(i.Text,{elementType:"p",className:l,...a,children:[t==="small"?c.jsx(T,{elementType:"span",children:o}):c.jsx(u,{elementType:"span",children:o}),x&&c.jsx(m,{children:x})]})}function S({className:s,...n}){const t=r.clsx(s,"text-list-item");return c.jsx("li",{className:t,...n})}function g({children:s,className:n,density:t="default",title:e,...x}){const a=r.clsx(n,"text-list",`text-list-density-${t}`);return c.jsxs("ul",{className:a,...x,children:[e&&c.jsx("li",{className:"text-list-title",children:e}),s]})}function F({className:s,...n}){const t=r.clsx(s,"text-link-list");return c.jsx(g,{className:t,...n})}function I({align:s="start",className:n,heading:t,subheading:e,...x}){const a=r.clsx(n,"text-content-heading",`text-align-${s}`);return c.jsxs(d.Flex,{direction:"column",gap:"200",className:a,...x,children:[c.jsx(T,{children:t}),e&&c.jsx(j,{children:e})]})}function M({align:s="start",className:n,title:t,subtitle:e,...x}){const a=r.clsx(n,"text-content-title"),{isMobile:l}=f.useMediaQuery();return c.jsxs(d.Flex,{direction:"column",gap:"200",className:a,...x,children:[l?c.jsx(u,{className:`text-align-${s}`,children:t}):c.jsx(N,{className:`text-align-${s}`,children:t}),e&&c.jsx(h,{className:`text-align-${s}`,children:e})]})}exports.Text=b;exports.TextCode=q;exports.TextContentHeading=I;exports.TextContentTitle=M;exports.TextEmphasis=$;exports.TextHeading=T;exports.TextInput=H;exports.TextLink=k;exports.TextLinkList=F;exports.TextList=g;exports.TextListItem=S;exports.TextPrice=P;exports.TextSmall=m;exports.TextSmallStrong=p;exports.TextStrong=L;exports.TextSubheading=j;exports.TextSubtitle=h;exports.TextTitleHero=N;exports.TextTitlePage=u;
2
2
  //# sourceMappingURL=Text.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","sources":["../../../../../src/ui/primitives/Text/Text.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useMediaQuery } from \"hooks\";\nimport { Flex } from \"layout\";\nimport { Link } from \"primitives\";\nimport { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport {\n Text as RACText,\n type TextProps as RACTextProps,\n} from \"react-aria-components\";\nimport \"./text.css\";\n\ntype TextLineHeightProps = { lineHeight?: \"body\" | \"single\" };\n\ntype TextTruncateProps = { lineClamp?: number };\n\nexport type TextProps = TextTruncateProps & RACTextProps & TextLineHeightProps;\nexport function Text({\n className,\n elementType = \"p\",\n lineHeight = \"body\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-body-base\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n elementType={elementType}\n className={classNames}\n {...props}\n />\n );\n}\nexport type TextSmallProps = TextTruncateProps &\n RACTextProps &\n TextLineHeightProps;\nexport function TextSmall({\n className,\n elementType = \"small\",\n lineHeight = \"body\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSmallProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-body-small\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSmallStrongProps = TextTruncateProps &\n RACTextProps &\n TextLineHeightProps;\nexport function TextSmallStrong({\n className,\n elementType = \"small\",\n lineClamp,\n lineHeight = \"body\",\n style: consumerStyle,\n ...props\n}: TextSmallProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-body-small-strong\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextStrongProps = TextTruncateProps & RACTextProps;\nexport function TextStrong({\n className,\n elementType = \"strong\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextStrongProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-body-strong\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextEmphasisProps = RACTextProps;\nexport function TextEmphasis({\n className,\n elementType,\n ...props\n}: TextEmphasisProps) {\n const classNames = clsx(className, \"text-body-emphasis\");\n return (\n <RACText className={classNames} elementType={elementType} {...props} />\n );\n}\nexport type TextLinkProps = ComponentPropsWithoutRef<typeof Link>;\nexport function TextLink({ className, ...props }: TextLinkProps) {\n const classNames = clsx(className, \"text-body-link\");\n return <Link className={classNames} {...props} />;\n}\nexport type TextCodeProps = RACTextProps;\nexport function TextCode({ className, ...props }: TextCodeProps) {\n const classNames = clsx(className, \"text-body-code\");\n return <RACText className={classNames} {...props} />;\n}\n\nexport type TextInputProps = RACTextProps;\nexport function TextInput({ className, ...props }: TextInputProps) {\n const classNames = clsx(className, \"text-input\");\n return <RACText className={classNames} {...props} />;\n}\n\nexport type TextTitleHeroProps = TextTruncateProps & RACTextProps;\nexport function TextTitleHero({\n className,\n elementType = \"h1\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextTitleHeroProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-title-hero\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextTitlePageProps = TextTruncateProps & RACTextProps;\nexport function TextTitlePage({\n className,\n elementType = \"h2\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextTitlePageProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-title-page\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSubtitleProps = TextTruncateProps & RACTextProps;\nexport function TextSubtitle({\n className,\n elementType = \"p\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSubtitleProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-subtitle\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextHeadingProps = TextTruncateProps & RACTextProps;\nexport function TextHeading({\n className,\n elementType = \"h3\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextHeadingProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-heading\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSubheadingProps = TextTruncateProps & RACTextProps;\nexport function TextSubheading({\n className,\n elementType = \"p\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSubheadingProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"text-truncate\",\n \"text-subheading\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\n\nexport type TextPriceProps = RACTextProps & {\n currency: string;\n price: string;\n label?: string;\n size?: \"small\" | \"large\";\n};\nexport function TextPrice({\n className,\n currency,\n size = \"large\",\n price,\n label,\n ...props\n}: TextPriceProps) {\n const classNames = clsx(className, \"text-price\", `text-price-size-${size}`);\n const content = (\n <>\n <sup className=\"text-price-currency\">{currency}</sup>\n {price}\n </>\n );\n return (\n <RACText elementType=\"p\" className={classNames} {...props}>\n {size === \"small\" ? (\n <TextHeading elementType=\"span\">{content}</TextHeading>\n ) : (\n <TextTitlePage elementType=\"span\">{content}</TextTitlePage>\n )}\n\n {label && <TextSmall>{label}</TextSmall>}\n </RACText>\n );\n}\n\nexport type TextListItemProps = ComponentPropsWithoutRef<\"li\">;\nexport function TextListItem({ className, ...props }: TextListItemProps) {\n const classNames = clsx(className, \"text-list-item\");\n return <li className={classNames} {...props} />;\n}\n\nexport type TextListProps = Omit<ComponentPropsWithoutRef<\"ul\">, \"title\"> & {\n title?: ReactNode;\n density?: \"default\" | \"tight\";\n};\nexport function TextList({\n children,\n className,\n density = \"default\",\n title,\n ...props\n}: TextListProps) {\n const classNames = clsx(\n className,\n \"text-list\",\n `text-list-density-${density}`,\n );\n return (\n <ul className={classNames} {...props}>\n {title && <li className=\"text-list-title\">{title}</li>}\n {children}\n </ul>\n );\n}\n\nexport type TextLinkListProps = TextListProps;\nexport function TextLinkList({ className, ...props }: TextLinkListProps) {\n const classNames = clsx(className, \"text-link-list\");\n return <TextList className={classNames} {...props} />;\n}\n\nexport type TextContentHeadingProps = ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"center\";\n heading: string;\n subheading?: string;\n};\nexport function TextContentHeading({\n align = \"start\",\n className,\n heading,\n subheading,\n ...props\n}: TextContentHeadingProps) {\n const classNames = clsx(\n className,\n \"text-content-heading\",\n `text-align-${align}`,\n );\n return (\n <Flex direction=\"column\" gap=\"200\" className={classNames} {...props}>\n <TextHeading>{heading}</TextHeading>\n {subheading && <TextSubheading>{subheading}</TextSubheading>}\n </Flex>\n );\n}\n\nexport type TextContentTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"center\";\n title: ReactNode;\n subtitle?: ReactNode;\n};\nexport function TextContentTitle({\n align = \"start\",\n className,\n title,\n subtitle,\n ...props\n}: TextContentTitleProps) {\n const classNames = clsx(className, \"text-content-title\");\n const { isMobile } = useMediaQuery();\n return (\n <Flex direction=\"column\" gap=\"200\" className={classNames} {...props}>\n {isMobile ? (\n <TextTitlePage className={`text-align-${align}`}>{title}</TextTitlePage>\n ) : (\n <TextTitleHero className={`text-align-${align}`}>{title}</TextTitleHero>\n )}\n\n {subtitle && (\n <TextSubtitle className={`text-align-${align}`}>\n {subtitle}\n </TextSubtitle>\n )}\n </Flex>\n );\n}\n"],"names":["Text","className","elementType","lineHeight","lineClamp","consumerStyle","props","classNames","clsx","style","jsx","RACText","TextSmall","TextSmallStrong","TextStrong","TextEmphasis","TextLink","Link","TextCode","TextInput","TextTitleHero","TextTitlePage","TextSubtitle","TextHeading","TextSubheading","TextPrice","currency","size","price","label","content","jsxs","Fragment","TextListItem","TextList","children","density","title","TextLinkList","TextContentHeading","align","heading","subheading","Flex","TextContentTitle","subtitle","isMobile","useMediaQuery"],"mappings":"yVAgBO,SAASA,EAAK,CACnB,UAAAC,EACA,YAAAC,EAA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SAASG,EAAa,CAAE,UAAArC,EAAW,GAAGK,GAA4B,CACvE,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,gBAAgB,EACnD,OAAOS,EAAAA,IAACwB,EAAA,CAAS,UAAW3B,EAAa,GAAGD,EAAO,CACrD,CAOO,SAASiC,EAAmB,CACjC,MAAAC,EAAQ,QACR,UAAAvC,EACA,QAAAwC,EACA,WAAAC,EACA,GAAGpC,CACL,EAA4B,CAC1B,MAAMC,EAAaC,EAAAA,KACjBP,EACA,uBACA,cAAcuC,CAAK,EAAA,EAErB,OACET,OAACY,EAAAA,MAAK,UAAU,SAAS,IAAI,MAAM,UAAWpC,EAAa,GAAGD,EAC5D,SAAA,CAAAI,EAAAA,IAACa,GAAa,SAAAkB,CAAA,CAAQ,EACrBC,GAAchC,EAAAA,IAACc,EAAA,CAAgB,SAAAkB,CAAA,CAAW,CAAA,EAC7C,CAEJ,CAOO,SAASE,EAAiB,CAC/B,MAAAJ,EAAQ,QACR,UAAAvC,EACA,MAAAoC,EACA,SAAAQ,EACA,GAAGvC,CACL,EAA0B,CACxB,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,oBAAoB,EACjD,CAAE,SAAA6C,CAAA,EAAaC,gBAAA,EACrB,OACEhB,OAACY,EAAAA,MAAK,UAAU,SAAS,IAAI,MAAM,UAAWpC,EAAa,GAAGD,EAC3D,SAAA,CAAAwC,EACCpC,EAAAA,IAACW,EAAA,CAAc,UAAW,cAAcmB,CAAK,GAAK,SAAAH,CAAA,CAAM,EAExD3B,MAACU,EAAA,CAAc,UAAW,cAAcoB,CAAK,GAAK,SAAAH,EAAM,EAGzDQ,GACCnC,EAAAA,IAACY,EAAA,CAAa,UAAW,cAAckB,CAAK,GACzC,SAAAK,CAAA,CACH,CAAA,EAEJ,CAEJ"}
1
+ {"version":3,"file":"Text.cjs","sources":["../../../../../src/ui/primitives/Text/Text.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useMediaQuery } from \"hooks\";\nimport { Flex } from \"layout\";\nimport { Link } from \"primitives\";\nimport { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport {\n Text as RACText,\n type TextProps as RACTextProps,\n} from \"react-aria-components\";\nimport \"./text.css\";\n\ntype TextLineHeightProps = { lineHeight?: \"body\" | \"single\" };\n\ntype TextTruncateProps = { lineClamp?: number };\n\nexport type TextProps = TextTruncateProps & RACTextProps & TextLineHeightProps;\nexport function Text({\n className,\n elementType = \"p\",\n lineHeight = \"body\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-body-base\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n elementType={elementType}\n className={classNames}\n {...props}\n />\n );\n}\nexport type TextSmallProps = TextTruncateProps &\n RACTextProps &\n TextLineHeightProps;\nexport function TextSmall({\n className,\n elementType = \"small\",\n lineHeight = \"body\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSmallProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-body-small\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSmallStrongProps = TextTruncateProps &\n RACTextProps &\n TextLineHeightProps;\nexport function TextSmallStrong({\n className,\n elementType = \"small\",\n lineClamp,\n lineHeight = \"body\",\n style: consumerStyle,\n ...props\n}: TextSmallProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-body-small-strong\",\n `text-line-height-${lineHeight}`,\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextStrongProps = TextTruncateProps & RACTextProps;\nexport function TextStrong({\n className,\n elementType = \"strong\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextStrongProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-body-strong\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextEmphasisProps = RACTextProps;\nexport function TextEmphasis({\n className,\n elementType,\n ...props\n}: TextEmphasisProps) {\n const classNames = clsx(className, \"text-body-emphasis\");\n return (\n <RACText className={classNames} elementType={elementType} {...props} />\n );\n}\nexport type TextLinkProps = ComponentPropsWithoutRef<typeof Link>;\nexport function TextLink({ className, ...props }: TextLinkProps) {\n const classNames = clsx(className, \"text-body-link\");\n return <Link className={classNames} {...props} />;\n}\nexport type TextCodeProps = RACTextProps;\nexport function TextCode({ className, ...props }: TextCodeProps) {\n const classNames = clsx(className, \"text-body-code\");\n return <RACText className={classNames} {...props} />;\n}\n\nexport type TextInputProps = RACTextProps;\nexport function TextInput({ className, ...props }: TextInputProps) {\n const classNames = clsx(className, \"text-input\");\n return <RACText className={classNames} {...props} />;\n}\n\nexport type TextTitleHeroProps = TextTruncateProps & RACTextProps;\nexport function TextTitleHero({\n className,\n elementType = \"h1\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextTitleHeroProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-title-hero\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextTitlePageProps = TextTruncateProps & RACTextProps;\nexport function TextTitlePage({\n className,\n elementType = \"h2\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextTitlePageProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-title-page\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSubtitleProps = TextTruncateProps & RACTextProps;\nexport function TextSubtitle({\n className,\n elementType = \"p\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSubtitleProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-subtitle\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextHeadingProps = TextTruncateProps & RACTextProps;\nexport function TextHeading({\n className,\n elementType = \"h3\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextHeadingProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-heading\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\nexport type TextSubheadingProps = TextTruncateProps & RACTextProps;\nexport function TextSubheading({\n className,\n elementType = \"p\",\n lineClamp,\n style: consumerStyle,\n ...props\n}: TextSubheadingProps) {\n const classNames = clsx(\n className,\n !!lineClamp && \"sds-text-truncate\",\n \"text-subheading\",\n );\n const style = lineClamp\n ? ({ \"--text-truncate-line-clamp\": lineClamp, ...consumerStyle } as CSSProperties)\n : consumerStyle;\n return (\n <RACText\n style={style}\n className={classNames}\n elementType={elementType}\n {...props}\n />\n );\n}\n\nexport type TextPriceProps = RACTextProps & {\n currency: string;\n price: string;\n label?: string;\n size?: \"small\" | \"large\";\n};\nexport function TextPrice({\n className,\n currency,\n size = \"large\",\n price,\n label,\n ...props\n}: TextPriceProps) {\n const classNames = clsx(className, \"text-price\", `text-price-size-${size}`);\n const content = (\n <>\n <sup className=\"text-price-currency\">{currency}</sup>\n {price}\n </>\n );\n return (\n <RACText elementType=\"p\" className={classNames} {...props}>\n {size === \"small\" ? (\n <TextHeading elementType=\"span\">{content}</TextHeading>\n ) : (\n <TextTitlePage elementType=\"span\">{content}</TextTitlePage>\n )}\n\n {label && <TextSmall>{label}</TextSmall>}\n </RACText>\n );\n}\n\nexport type TextListItemProps = ComponentPropsWithoutRef<\"li\">;\nexport function TextListItem({ className, ...props }: TextListItemProps) {\n const classNames = clsx(className, \"text-list-item\");\n return <li className={classNames} {...props} />;\n}\n\nexport type TextListProps = Omit<ComponentPropsWithoutRef<\"ul\">, \"title\"> & {\n title?: ReactNode;\n density?: \"default\" | \"tight\";\n};\nexport function TextList({\n children,\n className,\n density = \"default\",\n title,\n ...props\n}: TextListProps) {\n const classNames = clsx(\n className,\n \"text-list\",\n `text-list-density-${density}`,\n );\n return (\n <ul className={classNames} {...props}>\n {title && <li className=\"text-list-title\">{title}</li>}\n {children}\n </ul>\n );\n}\n\nexport type TextLinkListProps = TextListProps;\nexport function TextLinkList({ className, ...props }: TextLinkListProps) {\n const classNames = clsx(className, \"text-link-list\");\n return <TextList className={classNames} {...props} />;\n}\n\nexport type TextContentHeadingProps = ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"center\";\n heading: string;\n subheading?: string;\n};\nexport function TextContentHeading({\n align = \"start\",\n className,\n heading,\n subheading,\n ...props\n}: TextContentHeadingProps) {\n const classNames = clsx(\n className,\n \"text-content-heading\",\n `text-align-${align}`,\n );\n return (\n <Flex direction=\"column\" gap=\"200\" className={classNames} {...props}>\n <TextHeading>{heading}</TextHeading>\n {subheading && <TextSubheading>{subheading}</TextSubheading>}\n </Flex>\n );\n}\n\nexport type TextContentTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"center\";\n title: ReactNode;\n subtitle?: ReactNode;\n};\nexport function TextContentTitle({\n align = \"start\",\n className,\n title,\n subtitle,\n ...props\n}: TextContentTitleProps) {\n const classNames = clsx(className, \"text-content-title\");\n const { isMobile } = useMediaQuery();\n return (\n <Flex direction=\"column\" gap=\"200\" className={classNames} {...props}>\n {isMobile ? (\n <TextTitlePage className={`text-align-${align}`}>{title}</TextTitlePage>\n ) : (\n <TextTitleHero className={`text-align-${align}`}>{title}</TextTitleHero>\n )}\n\n {subtitle && (\n <TextSubtitle className={`text-align-${align}`}>\n {subtitle}\n </TextSubtitle>\n )}\n </Flex>\n );\n}\n"],"names":["Text","className","elementType","lineHeight","lineClamp","consumerStyle","props","classNames","clsx","style","jsx","RACText","TextSmall","TextSmallStrong","TextStrong","TextEmphasis","TextLink","Link","TextCode","TextInput","TextTitleHero","TextTitlePage","TextSubtitle","TextHeading","TextSubheading","TextPrice","currency","size","price","label","content","jsxs","Fragment","TextListItem","TextList","children","density","title","TextLinkList","TextContentHeading","align","heading","subheading","Flex","TextContentTitle","subtitle","isMobile","useMediaQuery"],"mappings":"yVAgBO,SAASA,EAAK,CACnB,UAAAC,EACA,YAAAC,EAAc,IACd,WAAAC,EAAa,OACb,UAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAc,CACZ,MAAMC,EAAaC,EAAAA,KACjBP,EACA,CAAC,CAACG,GAAa,oBACf,iBACA,oBAAoBD,CAAU,EAAA,EAE1BM,EAAQL,EACT,CAAE,6BAA8BA,EAAW,GAAGC,GAC/CA,EACJ,OACEK,EAAAA,IAACC,EAAAA,KAAA,CACC,MAAAF,EACA,YAAAP,EACA,UAAWK,EACV,GAAGD,CAAA,CAAA,CAGV,CAIO,SAASM,EAAU,CACxB,UAAAX,EACA,YAAAC,EAAc,QACd,WAAAC,EAAa,OACb,UAAAC,EACA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AAa,GAAGD,EAC5D,SAAA,CAAAI,EAAAA,IAACa,GAAa,SAAAkB,CAAA,CAAQ,EACrBC,GAAchC,EAAAA,IAACc,EAAA,CAAgB,SAAAkB,CAAA,CAAW,CAAA,EAC7C,CAEJ,CAOO,SAASE,EAAiB,CAC/B,MAAAJ,EAAQ,QACR,UAAAvC,EACA,MAAAoC,EACA,SAAAQ,EACA,GAAGvC,CACL,EAA0B,CACxB,MAAMC,EAAaC,EAAAA,KAAKP,EAAW,oBAAoB,EACjD,CAAE,SAAA6C,CAAA,EAAaC,gBAAA,EACrB,OACEhB,OAACY,EAAAA,MAAK,UAAU,SAAS,IAAI,MAAM,UAAWpC,EAAa,GAAGD,EAC3D,SAAA,CAAAwC,EACCpC,EAAAA,IAACW,EAAA,CAAc,UAAW,cAAcmB,CAAK,GAAK,SAAAH,CAAA,CAAM,EAExD3B,MAACU,EAAA,CAAc,UAAW,cAAcoB,CAAK,GAAK,SAAAH,EAAM,EAGzDQ,GACCnC,EAAAA,IAACY,EAAA,CAAa,UAAW,cAAckB,CAAK,GACzC,SAAAK,CAAA,CACH,CAAA,EAEJ,CAEJ"}
@@ -15,7 +15,7 @@ function P({
15
15
  }) {
16
16
  const l = o(
17
17
  s,
18
- !!e && "text-truncate",
18
+ !!e && "sds-text-truncate",
19
19
  "text-body-base",
20
20
  `text-line-height-${t}`
21
21
  ), x = e ? { "--text-truncate-line-clamp": e, ...c } : c;
@@ -39,7 +39,7 @@ function y({
39
39
  }) {
40
40
  const l = o(
41
41
  s,
42
- !!e && "text-truncate",
42
+ !!e && "sds-text-truncate",
43
43
  "text-body-small",
44
44
  `text-line-height-${t}`
45
45
  ), x = e ? { "--text-truncate-line-clamp": e, ...c } : c;
@@ -63,7 +63,7 @@ function E({
63
63
  }) {
64
64
  const l = o(
65
65
  s,
66
- !!t && "text-truncate",
66
+ !!t && "sds-text-truncate",
67
67
  "text-body-small-strong",
68
68
  `text-line-height-${e}`
69
69
  ), x = t ? { "--text-truncate-line-clamp": t, ...c } : c;
@@ -86,7 +86,7 @@ function Q({
86
86
  }) {
87
87
  const a = o(
88
88
  s,
89
- !!t && "text-truncate",
89
+ !!t && "sds-text-truncate",
90
90
  "text-body-strong"
91
91
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
92
92
  return /* @__PURE__ */ r(
@@ -128,7 +128,7 @@ function g({
128
128
  }) {
129
129
  const a = o(
130
130
  s,
131
- !!t && "text-truncate",
131
+ !!t && "sds-text-truncate",
132
132
  "text-title-hero"
133
133
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
134
134
  return /* @__PURE__ */ r(
@@ -141,7 +141,7 @@ function g({
141
141
  }
142
142
  );
143
143
  }
144
- function N({
144
+ function d({
145
145
  className: s,
146
146
  elementType: n = "h2",
147
147
  lineClamp: t,
@@ -150,7 +150,7 @@ function N({
150
150
  }) {
151
151
  const a = o(
152
152
  s,
153
- !!t && "text-truncate",
153
+ !!t && "sds-text-truncate",
154
154
  "text-title-page"
155
155
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
156
156
  return /* @__PURE__ */ r(
@@ -172,7 +172,7 @@ function p({
172
172
  }) {
173
173
  const a = o(
174
174
  s,
175
- !!t && "text-truncate",
175
+ !!t && "sds-text-truncate",
176
176
  "text-subtitle"
177
177
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
178
178
  return /* @__PURE__ */ r(
@@ -185,7 +185,7 @@ function p({
185
185
  }
186
186
  );
187
187
  }
188
- function d({
188
+ function N({
189
189
  className: s,
190
190
  elementType: n = "h3",
191
191
  lineClamp: t,
@@ -194,7 +194,7 @@ function d({
194
194
  }) {
195
195
  const a = o(
196
196
  s,
197
- !!t && "text-truncate",
197
+ !!t && "sds-text-truncate",
198
198
  "text-heading"
199
199
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
200
200
  return /* @__PURE__ */ r(
@@ -216,7 +216,7 @@ function b({
216
216
  }) {
217
217
  const a = o(
218
218
  s,
219
- !!t && "text-truncate",
219
+ !!t && "sds-text-truncate",
220
220
  "text-subheading"
221
221
  ), l = t ? { "--text-truncate-line-clamp": t, ...e } : e;
222
222
  return /* @__PURE__ */ r(
@@ -242,7 +242,7 @@ function A({
242
242
  e
243
243
  ] });
244
244
  return /* @__PURE__ */ u(i, { elementType: "p", className: l, ...a, children: [
245
- t === "small" ? /* @__PURE__ */ r(d, { elementType: "span", children: x }) : /* @__PURE__ */ r(N, { elementType: "span", children: x }),
245
+ t === "small" ? /* @__PURE__ */ r(N, { elementType: "span", children: x }) : /* @__PURE__ */ r(d, { elementType: "span", children: x }),
246
246
  c && /* @__PURE__ */ r(y, { children: c })
247
247
  ] });
248
248
  }
@@ -284,7 +284,7 @@ function G({
284
284
  `text-align-${s}`
285
285
  );
286
286
  return /* @__PURE__ */ u(m, { direction: "column", gap: "200", className: a, ...c, children: [
287
- /* @__PURE__ */ r(d, { children: t }),
287
+ /* @__PURE__ */ r(N, { children: t }),
288
288
  e && /* @__PURE__ */ r(b, { children: e })
289
289
  ] });
290
290
  }
@@ -297,7 +297,7 @@ function J({
297
297
  }) {
298
298
  const a = o(n, "text-content-title"), { isMobile: l } = f();
299
299
  return /* @__PURE__ */ u(m, { direction: "column", gap: "200", className: a, ...c, children: [
300
- l ? /* @__PURE__ */ r(N, { className: `text-align-${s}`, children: t }) : /* @__PURE__ */ r(g, { className: `text-align-${s}`, children: t }),
300
+ l ? /* @__PURE__ */ r(d, { className: `text-align-${s}`, children: t }) : /* @__PURE__ */ r(g, { className: `text-align-${s}`, children: t }),
301
301
  e && /* @__PURE__ */ r(p, { className: `text-align-${s}`, children: e })
302
302
  ] });
303
303
  }
@@ -307,7 +307,7 @@ export {
307
307
  G as TextContentHeading,
308
308
  J as TextContentTitle,
309
309
  q as TextEmphasis,
310
- d as TextHeading,
310
+ N as TextHeading,
311
311
  z as TextInput,
312
312
  v as TextLink,
313
313
  D as TextLinkList,
@@ -320,6 +320,6 @@ export {
320
320
  b as TextSubheading,
321
321
  p as TextSubtitle,
322
322
  g as TextTitleHero,
323
- N as TextTitlePage
323
+ d as TextTitlePage
324
324
  };
325
325
  //# sourceMappingURL=Text.js.map