@atom-learning/components 6.5.3 → 6.6.0-beta.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 (61) hide show
  1. package/dist/components/accordion/AccordionContent.js +1 -0
  2. package/dist/components/accordion/AccordionContent.js.map +1 -1
  3. package/dist/components/accordion/AccordionTrigger.js +1 -0
  4. package/dist/components/accordion/AccordionTrigger.js.map +1 -1
  5. package/dist/components/action-icon/ActionIcon.js +1 -0
  6. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  7. package/dist/components/alert-dialog/AlertDialogContent.js +1 -0
  8. package/dist/components/alert-dialog/AlertDialogContent.js.map +1 -1
  9. package/dist/components/badge/Badge.colorscheme.config.js.map +1 -1
  10. package/dist/components/calendar/Day.js +2 -0
  11. package/dist/components/calendar/Day.js.map +1 -1
  12. package/dist/components/carousel/CarouselPagination.js +1 -0
  13. package/dist/components/carousel/CarouselPagination.js.map +1 -1
  14. package/dist/components/carousel/CarouselSlider.js +1 -1
  15. package/dist/components/carousel/CarouselSlider.js.map +1 -1
  16. package/dist/components/checkbox/Checkbox.js +1 -1
  17. package/dist/components/checkbox/Checkbox.js.map +1 -1
  18. package/dist/components/combobox/ComboboxInput.js +1 -1
  19. package/dist/components/combobox/ComboboxInput.js.map +1 -1
  20. package/dist/components/combobox/ComboboxPopover.js +1 -0
  21. package/dist/components/combobox/ComboboxPopover.js.map +1 -1
  22. package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -1
  23. package/dist/components/data-table/DataTableRowSelectionCheckbox.js.map +1 -1
  24. package/dist/components/data-table/DataTableSelectAllRowsCheckbox.js.map +1 -1
  25. package/dist/components/dialog/DialogContent.js +1 -0
  26. package/dist/components/dialog/DialogContent.js.map +1 -1
  27. package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
  28. package/dist/components/input/Input.js +3 -0
  29. package/dist/components/input/Input.js.map +1 -1
  30. package/dist/components/loader/Loader.js.map +1 -1
  31. package/dist/components/number-input/NumberInputStepper.js.map +1 -1
  32. package/dist/components/progress-bar/ProgressBar.js +1 -0
  33. package/dist/components/progress-bar/ProgressBar.js.map +1 -1
  34. package/dist/components/radio-button/RadioButton.js +1 -27
  35. package/dist/components/radio-button/RadioButton.js.map +1 -1
  36. package/dist/components/radio-card/RadioCard.js +1 -0
  37. package/dist/components/radio-card/RadioCard.js.map +1 -1
  38. package/dist/components/segmented-control/SegmentedControlItem.js +2 -0
  39. package/dist/components/segmented-control/SegmentedControlItem.js.map +1 -1
  40. package/dist/components/slider/SliderSteps.js +1 -1
  41. package/dist/components/slider/SliderSteps.js.map +1 -1
  42. package/dist/components/switch/Switch.js +1 -0
  43. package/dist/components/switch/Switch.js.map +1 -1
  44. package/dist/components/table/TableCell.js +1 -0
  45. package/dist/components/table/TableCell.js.map +1 -1
  46. package/dist/components/textarea/Textarea.js +1 -0
  47. package/dist/components/textarea/Textarea.js.map +1 -1
  48. package/dist/components/tile/Tile.js +1 -0
  49. package/dist/components/tile/Tile.js.map +1 -1
  50. package/dist/components/toast/Toast.js +1 -0
  51. package/dist/components/toast/Toast.js.map +1 -1
  52. package/dist/components/toast/ToastProvider.js +1 -0
  53. package/dist/components/toast/ToastProvider.js.map +1 -1
  54. package/dist/components/tree/TreeIcon.js +1 -1
  55. package/dist/components/tree/TreeIcon.js.map +1 -1
  56. package/dist/components/tree/TreeListItem.js +1 -1
  57. package/dist/components/tree/TreeListItem.js.map +1 -1
  58. package/dist/docgen.json +1 -1
  59. package/dist/index.cjs.js +1 -1
  60. package/dist/index.cjs.js.map +1 -1
  61. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"RadioCard.js","names":[],"sources":["../../../src/components/radio-card/RadioCard.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n"],"mappings":";;;;AAKA,IAAM,IAAkB,EAAO,EAAW,MAAM;CAC9C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,OAAO;GACL,MAAM,CAAC,WAAW;GAClB,OAAO,CAAC,mBAAmB;GAC5B;EACD,MAAM;GACJ,IAAI,CAAC,QAAQ,OAAO;GACpB,IAAI,CAAC,QAAQ,OAAO;GACrB;EACD,aAAa;GACX,MAAM,CAAC,SAAS;GAChB,OAAO,CAAC,QAAQ;GACjB;EACF;CACF,CAAC,EAEI,IAAc,EAAO,OAAO;CAChC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,sBAAsB;GACpB,MAAM,EAAE;GACR,OAAO,EAAE;GACV;EACD,OAAO;GACL,MAAM,CAAC,OAAO;GACd,OAAO,EAAE;GACV;EACF;CACD,kBAAkB,CAChB;EACE,sBAAsB;EACtB,OAAO;EACP,OAAO,CAAC,UAAU;EACnB,EACD;EACE,sBAAsB;EACtB,OAAO;EACP,OAAO,CAAC,OAAO;EAChB,CACF;CACF,CAAC,EAEI,IAAY,EAAO,EAAW,WAAW,EAC7C,MAAM;CAAC;CAAY;CAAgB;CAAY;CAAW,EAC3D,CAAC,EAIW,KAAa,EACxB,aACA,iBAAc,IACd,UAAO,MACP,WAAQ,QACR,GAAG,QAEH,kBAAA,cAAC,GAAD;CACE,GAAI;CACG;CACM;CACP;CAMU,EAJhB,kBAAA,cAAC,GAAD;CAAoB;CAAO,sBAAsB;CAEnC,EADZ,kBAAA,cAAC,GAAA,KAAY,CACD,EACd,kBAAA,cAAC,OAAA,MAAK,EAAe,CACL"}
1
+ {"version":3,"file":"RadioCard.js","names":[],"sources":["../../../src/components/radio-card/RadioCard.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n"],"mappings":";;;;AAKA,IAAM,IAAkB,EAAO,EAAW,MAAM;CAC9C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,OAAO;GACL,MAAM,CAAC,WAAW;GAClB,OAAO,CAAC,mBAAmB;GAC5B;EACD,MAAM;GACJ,IAAI,CAAC,QAAQ,OAAO;GACpB,IAAI,CAAC,QAAQ,OAAO;GACrB;EACD,aAAa;GACX,MAAM,CAAC,SAAS;GAChB,OAAO,CAAC,QAAQ;GACjB;EACF;CACF,CAAC,EAEI,IAAc,EAAO,OAAO;CAChC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,sBAAsB;GACpB,MAAM,EAAE;GACR,OAAO,EAAE;GACV;EACD,OAAO;GACL,MAAM,CAAC,OAAO;GACd,OAAO,EAAE;GACV;EACF;CACD,kBAAkB,CAChB;EACE,sBAAsB;EACtB,OAAO;EACP,OAAO,CAAC,UAAU;EACnB,EACD;EACE,sBAAsB;EACtB,OAAO;EACP,OAAO,CAAC,OAAO;EAChB,CACF;CACF,CAAC,EAEI,IAAY,EAAO,EAAW,WAAW,EAC7C,MAAM;CAAC;CAAY;CAAgB;CAAY;CAAW,EAC3D,CAAC,EAIW,KAAa,EACxB,aACA,iBAAc,IACd,UAAO,MACP,WAAQ,QACR,GAAG,QAEH,kBAAA,cAAC,GAAD;CACE,GAAI;CACG;CACM;CACP;CAMU,EAJhB,kBAAA,cAAC,GAAD;CAAoB;CAAO,sBAAsB;CAEnC,EADZ,kBAAA,cAAC,GAAA,KAAY,CACD,EACd,kBAAA,cAAC,OAAA,MAAK,EAAe,CACL"}
@@ -6,7 +6,9 @@ import { Trigger as r } from "@radix-ui/react-tabs";
6
6
  var i = e(r, {
7
7
  base: [
8
8
  "relative",
9
+ "bg-transparent",
9
10
  "rounded-md",
11
+ "p-0",
10
12
  "z-2",
11
13
  "min-w-35",
12
14
  "border-2",
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControlItem.js","names":[],"sources":["../../../src/components/segmented-control/SegmentedControlItem.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'rounded-md',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-2', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-3', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = React.forwardRef<\n HTMLButtonElement,\n Omit<React.ComponentProps<typeof StyledItem>, 'size'>\n>(({ children, ...props }, ref) => {\n const { size, theme } = React.useContext(SegmentedControlContext)\n\n return (\n <StyledItem {...props} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n})\n\nSegmentedControlItem.displayName = 'SegmentedControlItem'\n"],"mappings":";;;;;AAOA,IAAM,IAAa,EACjB,GACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,OAAO;GACL,SAAS,CACP,8CACA,mCACD;GACD,OAAO,CACL,4CACA,iCACD;GACF;EACD,MAAM;GACJ,IAAI;IAAC;IAAgB;IAAS;IAAQ;IAAO;GAC7C,IAAI;IAAC;IAAU;IAAS;IAAQ;IAAO;GACvC,IAAI;IAAC;IAAU;IAAS;IAAQ;IAAO;GACxC;EACF;CACF,EACD,EAAE,2BAA2B,IAAM,CACpC,EAEY,IAAuB,EAAM,YAGvC,EAAE,aAAU,GAAG,KAAS,MAAQ;CACjC,IAAM,EAAE,SAAM,aAAU,EAAM,WAAW,EAAwB;AAEjE,QACE,kBAAA,cAAC,GAAD;EAAY,GAAI;EAAc;EAAa;EAAW;EAEzC,EADV,EACU;EAEf;AAEF,EAAqB,cAAc"}
1
+ {"version":3,"file":"SegmentedControlItem.js","names":[],"sources":["../../../src/components/segmented-control/SegmentedControlItem.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'bg-transparent',\n 'rounded-md',\n 'p-0',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-2', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-3', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = React.forwardRef<\n HTMLButtonElement,\n Omit<React.ComponentProps<typeof StyledItem>, 'size'>\n>(({ children, ...props }, ref) => {\n const { size, theme } = React.useContext(SegmentedControlContext)\n\n return (\n <StyledItem {...props} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n})\n\nSegmentedControlItem.displayName = 'SegmentedControlItem'\n"],"mappings":";;;;;AAOA,IAAM,IAAa,EACjB,GACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,OAAO;GACL,SAAS,CACP,8CACA,mCACD;GACD,OAAO,CACL,4CACA,iCACD;GACF;EACD,MAAM;GACJ,IAAI;IAAC;IAAgB;IAAS;IAAQ;IAAO;GAC7C,IAAI;IAAC;IAAU;IAAS;IAAQ;IAAO;GACvC,IAAI;IAAC;IAAU;IAAS;IAAQ;IAAO;GACxC;EACF;CACF,EACD,EAAE,2BAA2B,IAAM,CACpC,EAEY,IAAuB,EAAM,YAGvC,EAAE,aAAU,GAAG,KAAS,MAAQ;CACjC,IAAM,EAAE,SAAM,aAAU,EAAM,WAAW,EAAwB;AAEjE,QACE,kBAAA,cAAC,GAAD;EAAY,GAAI;EAAc;EAAa;EAAW;EAEzC,EADV,EACU;EAEf;AAEF,EAAqB,cAAc"}
@@ -4,7 +4,7 @@ import * as t from "react";
4
4
  var n = (e, t, n) => (e - t) / (n - t) * 100, r = (e, t, r) => {
5
5
  let i = n(e, t, r);
6
6
  return i <= 10 ? 0 : i >= 90 ? 100 : 50;
7
- }, i = ({ min: i, max: a, steps: o = [] }) => o.length === 0 ? null : /* @__PURE__ */ t.createElement("div", { className: "h-3 mt-3 relative w-full" }, o.map((o) => /* @__PURE__ */ t.createElement(e, {
7
+ }, i = ({ min: i, max: a, steps: o = [] }) => o.length === 0 ? null : /* @__PURE__ */ t.createElement("div", { className: "relative mt-3 h-3 w-full" }, o.map((o) => /* @__PURE__ */ t.createElement(e, {
8
8
  as: "span",
9
9
  key: o.value,
10
10
  style: {
@@ -1 +1 @@
1
- {"version":3,"file":"SliderSteps.js","names":[],"sources":["../../../src/components/slider/SliderSteps.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"h-3 mt-3 relative w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n"],"mappings":";;;AAaA,IAAM,KAAmB,GAAe,GAAa,OAC1C,IAAQ,MAAQ,IAAM,KAAQ,KAGnC,KAAqB,GAAe,GAAa,MAAwB;CAC7E,IAAM,IAAa,EAAgB,GAAO,GAAK,EAAI;AAInD,QAFI,KAAc,KAAW,IACzB,KAAc,KAAW,MACtB;GAGI,KAAe,EAAE,QAAK,QAAK,WAAQ,EAAE,OAC5C,EAAM,WAAW,IAAU,OAG7B,kBAAA,cAAC,OAAD,EAAK,WAAU,4BAcT,EAbH,EAAM,KAAK,MACV,kBAAA,cAAC,GAAD;CACE,IAAG;CACH,KAAK,EAAK;CACV,OAAO;EACL,UAAU,GAAG,EAAgB,EAAK,OAAO,GAAK,EAAI,CAAC;EACnD,iBAAiB,IAAI,EAAkB,EAAK,OAAO,GAAK,EAAI,CAAC;EAC9D;CACD,WAAU;CAGL,EADJ,EAAK,MACD,CACP,CACE"}
1
+ {"version":3,"file":"SliderSteps.js","names":[],"sources":["../../../src/components/slider/SliderSteps.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"relative mt-3 h-3 w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n"],"mappings":";;;AAaA,IAAM,KAAmB,GAAe,GAAa,OAC1C,IAAQ,MAAQ,IAAM,KAAQ,KAGnC,KAAqB,GAAe,GAAa,MAAwB;CAC7E,IAAM,IAAa,EAAgB,GAAO,GAAK,EAAI;AAInD,QAFI,KAAc,KAAW,IACzB,KAAc,KAAW,MACtB;GAGI,KAAe,EAAE,QAAK,QAAK,WAAQ,EAAE,OAC5C,EAAM,WAAW,IAAU,OAG7B,kBAAA,cAAC,OAAD,EAAK,WAAU,4BAcT,EAbH,EAAM,KAAK,MACV,kBAAA,cAAC,GAAD;CACE,IAAG;CACH,KAAK,EAAK;CACV,OAAO;EACL,UAAU,GAAG,EAAgB,EAAK,OAAO,GAAK,EAAI,CAAC;EACnD,iBAAiB,IAAI,EAAkB,EAAK,OAAO,GAAK,EAAI,CAAC;EAC9D;CACD,WAAU;CAGL,EADJ,EAAK,MACD,CACP,CACE"}
@@ -6,6 +6,7 @@ var r = e(n.Root, {
6
6
  base: [
7
7
  "appearance-none",
8
8
  "bg-grey-600",
9
+ "border-none",
9
10
  "rounded-full",
10
11
  "cursor-pointer",
11
12
  "flex",
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n"],"mappings":";;;;AAKA,IAAM,IAAe,EAAO,EAAY,MAAM;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,SAAS,OAAO;EACrB,IAAI,CAAC,OAAO,OAAO;EACpB,EACF;CACF,CAAC,EAEI,IAAc,EAAO,EAAY,OAAO;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,sCAAsC,SAAS;EACpD,IAAI,CAAC,sCAAsC,SAAS;EACrD,EACF;CACF,CAAC,EAIW,KAAU,EAAE,UAAO,MAAM,GAAG,QACvC,kBAAA,cAAC,GAAD;CAAoB;CAAM,GAAI;CAEf,EADb,kBAAA,cAAC,GAAD,EAAmB,SAAQ,CAAA,CACd;AAGjB,EAAO,cAAc"}
1
+ {"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n"],"mappings":";;;;AAKA,IAAM,IAAe,EAAO,EAAY,MAAM;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,SAAS,OAAO;EACrB,IAAI,CAAC,OAAO,OAAO;EACpB,EACF;CACF,CAAC,EAEI,IAAc,EAAO,EAAY,OAAO;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,sCAAsC,SAAS;EACpD,IAAI,CAAC,sCAAsC,SAAS;EACrD,EACF;CACF,CAAC,EAIW,KAAU,EAAE,UAAO,MAAM,GAAG,QACvC,kBAAA,cAAC,GAAD;CAAoB;CAAM,GAAI;CAEf,EADb,kBAAA,cAAC,GAAD,EAAmB,SAAQ,CAAA,CACd;AAGjB,EAAO,cAAc"}
@@ -3,6 +3,7 @@ import { styled as e } from "../../styled.js";
3
3
  var t = e("td", { base: [
4
4
  "border-t",
5
5
  "border-t-grey-100",
6
+ "box-border",
6
7
  "text-grey-800",
7
8
  "font-body",
8
9
  "leading-normal",
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","names":[],"sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n"],"mappings":";;AAEA,IAAa,IAAY,EAAO,MAAM,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,EAAU,cAAc"}
1
+ {"version":3,"file":"TableCell.js","names":[],"sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n"],"mappings":";;AAEA,IAAa,IAAY,EAAO,MAAM,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,EAAU,cAAc"}
@@ -6,6 +6,7 @@ var n = e("textarea", {
6
6
  "shadow-none",
7
7
  "appearance-none",
8
8
  "rounded-md",
9
+ "box-border",
9
10
  "text-grey-1000",
10
11
  "font-body",
11
12
  "font-normal",
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTextarea = styled('textarea', {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n }\n ]\n})\n\nexport type TextareaProps = React.ComponentProps<typeof StyledTextarea>\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (props, ref) => <StyledTextarea {...props} ref={ref} />\n)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";;;AAIA,IAAM,IAAiB,EAAO,YAAY;CACxC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;IACD;GACD,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,OAAO,EACL,OAAO,EAAE,EACV;EACF;CACD,iBAAiB,EACf,YAAY,YACb;CACD,kBAAkB,CAChB;EACE,OAAO;EACP,YAAY;EACZ,OAAO,CAAC,gBAAgB;EACzB,EACD;EACE,OAAO;EACP,YAAY;EACZ,OAAO,CAAC,mBAAmB,8BAA8B;EAC1D,CACF;CACF,CAAC,EAIW,IAAW,EAAM,YAC3B,GAAO,MAAQ,kBAAA,cAAC,GAAD;CAAgB,GAAI;CAAY;CAAO,CAAA,CACxD;AAED,EAAS,cAAc"}
1
+ {"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTextarea = styled('textarea', {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n }\n ]\n})\n\nexport type TextareaProps = React.ComponentProps<typeof StyledTextarea>\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (props, ref) => <StyledTextarea {...props} ref={ref} />\n)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";;;AAIA,IAAM,IAAiB,EAAO,YAAY;CACxC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;IACD;GACD,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,OAAO,EACL,OAAO,EAAE,EACV;EACF;CACD,iBAAiB,EACf,YAAY,YACb;CACD,kBAAkB,CAChB;EACE,OAAO;EACP,YAAY;EACZ,OAAO,CAAC,gBAAgB;EACzB,EACD;EACE,OAAO;EACP,YAAY;EACZ,OAAO,CAAC,mBAAmB,8BAA8B;EAC1D,CACF;CACF,CAAC,EAIW,IAAW,EAAM,YAC3B,GAAO,MAAQ,kBAAA,cAAC,GAAD;CAAgB,GAAI;CAAY;CAAO,CAAA,CACxD;AAED,EAAS,cAAc"}
@@ -4,6 +4,7 @@ import n from "react";
4
4
  //#region src/components/tile/Tile.tsx
5
5
  var r = e("div", {
6
6
  base: [
7
+ "box-border",
7
8
  "flex",
8
9
  "flex-col",
9
10
  "relative",
@@ -1 +1 @@
1
- {"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype TTileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, TTileProps>(\n ({ children, borderRadius = 'lg', colorScheme = {}, ...rest }, ref) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n )\n)\n\nTile.displayName = 'Tile'\n"],"mappings":";;;;AAQA,IAAa,IAAa,EACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,cAAc;GACZ,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GACnB;EACD,QAAQ,EACN,MAAM,CAAC,oBAAoB,EAC5B;EACD,UAAU,EACR,MAAM,CACJ,wEACA,sCACD,EACF;EACF;CACF,EACD,EAAE,2BAA2B,IAAM,CACpC,EAMY,IAAO,EAAM,YACvB,EAAE,aAAU,kBAAe,MAAM,iBAAc,EAAE,EAAE,GAAG,KAAQ,MAC7D,kBAAA,cAAC,GAAD;CACE,SAAA;CACA,MAAK;CACL,QAAO;CACP,aAAY;CACZ,GAAI;CAKQ,EAHZ,kBAAA,cAAC,GAAD;CAAiB;CAAmB;CAAc,GAAI;CAEzC,EADV,EACU,CACD,CAEjB;AAED,EAAK,cAAc"}
1
+ {"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype TTileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, TTileProps>(\n ({ children, borderRadius = 'lg', colorScheme = {}, ...rest }, ref) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n )\n)\n\nTile.displayName = 'Tile'\n"],"mappings":";;;;AAQA,IAAa,IAAa,EACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,cAAc;GACZ,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GACnB;EACD,QAAQ,EACN,MAAM,CAAC,oBAAoB,EAC5B;EACD,UAAU,EACR,MAAM,CACJ,wEACA,sCACD,EACF;EACF;CACF,EACD,EAAE,2BAA2B,IAAM,CACpC,EAMY,IAAO,EAAM,YACvB,EAAE,aAAU,kBAAe,MAAM,iBAAc,EAAE,EAAE,GAAG,KAAQ,MAC7D,kBAAA,cAAC,GAAD;CACE,SAAA;CACA,MAAK;CACL,QAAO;CACP,aAAY;CACZ,GAAI;CAKQ,EAHZ,kBAAA,cAAC,GAAD;CAAiB;CAAmB;CAAc,GAAI;CAEzC,EADV,EACU,CACD,CAEjB;AAED,EAAK,cAAc"}
@@ -11,6 +11,7 @@ var a = e("div", {
11
11
  "pointer-events-auto",
12
12
  "rounded-md",
13
13
  "shadow-md",
14
+ "box-border",
14
15
  "text-white",
15
16
  "min-h-12",
16
17
  "relative",
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"mappings":";;;;;;AAQA,IAAa,IAAc,EAAO,OAAO;CACvC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,SAAS,CAAC,UAAU;EACpB,OAAO,CAAC,UAAU;EAClB,SAAS,CAAC,aAAa;EACvB,OAAO,CAAC,YAAY;EACrB,EACF;CACF,CAAC,EAEW,KAAS,MAAoD;CACxE,IAAM,EAAE,YAAS,GAAiB;AAClC,QAAO,kBAAA,cAAC,GAAD;EAAa,MAAM,EAAM,QAAQ;EAAM,GAAI;EAAS,CAAA;;AAG7D,EAAM,OAAO,GACb,EAAM,QAAQ"}
1
+ {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"mappings":";;;;;;AAQA,IAAa,IAAc,EAAO,OAAO;CACvC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,SAAS,CAAC,UAAU;EACpB,OAAO,CAAC,UAAU;EAClB,SAAS,CAAC,aAAa;EACvB,OAAO,CAAC,YAAY;EACrB,EACF;CACF,CAAC,EAEW,KAAS,MAAoD;CACxE,IAAM,EAAE,YAAS,GAAiB;AAClC,QAAO,kBAAA,cAAC,GAAD;EAAa,MAAM,EAAM,QAAQ;EAAM,GAAI;EAAS,CAAA;;AAG7D,EAAM,OAAO,GACb,EAAM,QAAQ"}
@@ -21,6 +21,7 @@ var l = e("div", { base: [
21
21
  "justify-center",
22
22
  "items-center",
23
23
  "rounded-sm",
24
+ "box-border",
24
25
  "min-h-12",
25
26
  "[--slide-opacity-out:0]",
26
27
  "[--slide-direction-out-y:-100%]"
@@ -1 +1 @@
1
- {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,IAAoB,EAAO,OAAO,EACtC,MAAM;CAAC;CAAS;CAAgB;CAAW;CAAuB;CAAW,EAC9E,CAAC,EAEI,IAAe,EAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,SAAS;EACP,MAAM,CAAC,yCAAyC;EAChD,OAAO,CAAC,aAAa,0CAA0C;EAChE,EACF;CACF,CAAC,EAEW,KAAiB,EAC5B,aACA,mBACqD;CACrD,IAAM,EAAE,WAAQ,gBAAa,GAAY,EACnC,EAAE,eAAY,aAAU,oBAAiB,oBAAiB;AAEhE,QACE,kBAAA,cAAA,EAAA,UAAA,MACE,kBAAA,cAAC,GAAD;EACE,cAAc;EACd,cAAc;EACH;EA2CO,EAzCjB,EAAO,KAAK,MAAU;EACrB,IAAM,EAAE,SAAS,MAAa,GAExB,IAAS,EAAgB,EAAM,IAAI;GACvC,cAAc;GACd,QAAQ;GACT,CAAC;AAQF,SACE,kBAAA,cAAC,GAAD;GACE,KAAK,EAAM;GACN,MATI,MAA8B;AACzC,IAAI,KAAM,EAAM,WAAW,KAAA,KACzB,EAAa,EAAM,IAAI,EAAG,uBAAuB,CAAC,OAAO;;GAQzD,SAAS,EAAM;GACf,MAAM,EAAM;GACZ,aAAW,EAAM;GACjB,OAAO,EAAE,YAAY,GAAG,EAAO,KAAK;GACpC,WAAU;GAgBG,EAdb,kBAAA,cAAC,EAAa,UAAd,EAAuB,OAAO,GAaN,EAZrB,OAAO,KAAa,aACnB,EAAS,EAAM,GACb,EAAM,eAAe,EAAS,GAChC,IAEA,kBAAA,cAAC,GAAD,EAAO,WAAU,SAKT,EAJL,EAAM,SAAS,WAAW,kBAAA,cAAC,EAAM,MAAP,EAAY,IAAI,GAAS,CAAA,EACpD,kBAAA,cAAC,GAAA,MAAM,EAAgB,EACvB,kBAAA,cAAC,GAAA,KAAS,EACV,kBAAA,cAAC,EAAM,OAAA,KAAQ,CACT,CAEY,CACX;GAEjB,CACgB,EACnB,EACA;;AAIP,EAAc,cAAc"}
1
+ {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,IAAoB,EAAO,OAAO,EACtC,MAAM;CAAC;CAAS;CAAgB;CAAW;CAAuB;CAAW,EAC9E,CAAC,EAEI,IAAe,EAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,SAAS;EACP,MAAM,CAAC,yCAAyC;EAChD,OAAO,CAAC,aAAa,0CAA0C;EAChE,EACF;CACF,CAAC,EAEW,KAAiB,EAC5B,aACA,mBACqD;CACrD,IAAM,EAAE,WAAQ,gBAAa,GAAY,EACnC,EAAE,eAAY,aAAU,oBAAiB,oBAAiB;AAEhE,QACE,kBAAA,cAAA,EAAA,UAAA,MACE,kBAAA,cAAC,GAAD;EACE,cAAc;EACd,cAAc;EACH;EA2CO,EAzCjB,EAAO,KAAK,MAAU;EACrB,IAAM,EAAE,SAAS,MAAa,GAExB,IAAS,EAAgB,EAAM,IAAI;GACvC,cAAc;GACd,QAAQ;GACT,CAAC;AAQF,SACE,kBAAA,cAAC,GAAD;GACE,KAAK,EAAM;GACN,MATI,MAA8B;AACzC,IAAI,KAAM,EAAM,WAAW,KAAA,KACzB,EAAa,EAAM,IAAI,EAAG,uBAAuB,CAAC,OAAO;;GAQzD,SAAS,EAAM;GACf,MAAM,EAAM;GACZ,aAAW,EAAM;GACjB,OAAO,EAAE,YAAY,GAAG,EAAO,KAAK;GACpC,WAAU;GAgBG,EAdb,kBAAA,cAAC,EAAa,UAAd,EAAuB,OAAO,GAaN,EAZrB,OAAO,KAAa,aACnB,EAAS,EAAM,GACb,EAAM,eAAe,EAAS,GAChC,IAEA,kBAAA,cAAC,GAAD,EAAO,WAAU,SAKT,EAJL,EAAM,SAAS,WAAW,kBAAA,cAAC,EAAM,MAAP,EAAY,IAAI,GAAS,CAAA,EACpD,kBAAA,cAAC,GAAA,MAAM,EAAgB,EACvB,kBAAA,cAAC,GAAA,KAAS,EACV,kBAAA,cAAC,EAAM,OAAA,KAAQ,CACT,CAEY,CACX;GAEjB,CACgB,EACnB,EACA;;AAIP,EAAc,cAAc"}
@@ -5,7 +5,7 @@ import * as n from "react";
5
5
  var r = ({ className: r, ...i }) => /* @__PURE__ */ n.createElement(e, {
6
6
  size: "md",
7
7
  ...i,
8
- className: t("shrink-0 self-start my-1", r)
8
+ className: t("my-1 shrink-0 self-start", r)
9
9
  });
10
10
  //#endregion
11
11
  export { r as TreeIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"TreeIcon.js","names":[],"sources":["../../../src/components/tree/TreeIcon.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\n\nexport const TreeIcon = ({\n className,\n ...props\n}: React.ComponentProps<typeof Icon>): JSX.Element => (\n <Icon\n size=\"md\"\n {...props}\n className={clsx('shrink-0 self-start my-1', className)}\n />\n)\n"],"mappings":";;;;AAKA,IAAa,KAAY,EACvB,cACA,GAAG,QAEH,kBAAA,cAAC,GAAD;CACE,MAAK;CACL,GAAI;CACJ,WAAW,EAAK,4BAA4B,EAAU;CACtD,CAAA"}
1
+ {"version":3,"file":"TreeIcon.js","names":[],"sources":["../../../src/components/tree/TreeIcon.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\n\nexport const TreeIcon = ({\n className,\n ...props\n}: React.ComponentProps<typeof Icon>): JSX.Element => (\n <Icon\n size=\"md\"\n {...props}\n className={clsx('my-1 shrink-0 self-start', className)}\n />\n)\n"],"mappings":";;;;AAKA,IAAa,KAAY,EACvB,cACA,GAAG,QAEH,kBAAA,cAAC,GAAD;CACE,MAAK;CACL,GAAI;CACJ,WAAW,EAAK,4BAA4B,EAAU;CACtD,CAAA"}
@@ -5,7 +5,7 @@ var n = t.forwardRef(({ className: n, ...r }, i) => /* @__PURE__ */ t.createElem
5
5
  ...r,
6
6
  ref: i,
7
7
  role: "treeitem",
8
- className: e("not-first:mt-0.5 flex items-center gap-2", n)
8
+ className: e("flex items-center gap-2 not-first:mt-0.5", n)
9
9
  }));
10
10
  //#endregion
11
11
  export { n as TreeListItem };
@@ -1 +1 @@
1
- {"version":3,"file":"TreeListItem.js","names":[],"sources":["../../../src/components/tree/TreeListItem.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = React.forwardRef<HTMLLIElement, TreeListItemProps>(\n ({ className, ...props }, ref) => (\n <li\n {...props}\n ref={ref}\n role=\"treeitem\"\n className={clsx('not-first:mt-0.5 flex items-center gap-2', className)}\n />\n )\n)\n"],"mappings":";;;AAKA,IAAa,IAAe,EAAM,YAC/B,EAAE,cAAW,GAAG,KAAS,MACxB,kBAAA,cAAC,MAAD;CACE,GAAI;CACC;CACL,MAAK;CACL,WAAW,EAAK,4CAA4C,EAAU;CACtE,CAAA,CAEL"}
1
+ {"version":3,"file":"TreeListItem.js","names":[],"sources":["../../../src/components/tree/TreeListItem.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = React.forwardRef<HTMLLIElement, TreeListItemProps>(\n ({ className, ...props }, ref) => (\n <li\n {...props}\n ref={ref}\n role=\"treeitem\"\n className={clsx('flex items-center gap-2 not-first:mt-0.5', className)}\n />\n )\n)\n"],"mappings":";;;AAKA,IAAa,IAAe,EAAM,YAC/B,EAAE,cAAW,GAAG,KAAS,MACxB,kBAAA,cAAC,MAAD;CACE,GAAI;CACC;CACL,MAAK;CACL,WAAW,EAAK,4CAA4C,EAAU;CACtE,CAAA,CAEL"}