@mintlify/components 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion-cover.d.ts +12 -0
- package/dist/components/accordion/accordion-cover.d.ts.map +1 -0
- package/dist/components/accordion/accordion-cover.js +28 -28
- package/dist/components/accordion/accordion-group.d.ts +9 -0
- package/dist/components/accordion/accordion-group.d.ts.map +1 -0
- package/dist/components/accordion/accordion-group.js +1 -1
- package/dist/components/accordion/accordion-url-utils.d.ts +5 -0
- package/dist/components/accordion/accordion-url-utils.d.ts.map +1 -0
- package/dist/components/accordion/accordion.d.ts +35 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +72 -65
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/badge/badge.d.ts +29 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +18 -18
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/callout/callout.d.ts +24 -0
- package/dist/components/callout/callout.d.ts.map +1 -0
- package/dist/components/callout/callout.js +46 -46
- package/dist/components/callout/index.d.ts +3 -0
- package/dist/components/callout/index.d.ts.map +1 -0
- package/dist/components/card/card.d.ts +34 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +59 -59
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/code-block/base-code-block.d.ts +9 -0
- package/dist/components/code-block/base-code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.d.ts +74 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +34 -34
- package/dist/components/code-block/code-footer.d.ts +8 -0
- package/dist/components/code-block/code-footer.d.ts.map +1 -0
- package/dist/components/code-block/code-footer.js +9 -9
- package/dist/components/code-block/code-header.d.ts +11 -0
- package/dist/components/code-block/code-header.d.ts.map +1 -0
- package/dist/components/code-block/code-header.js +20 -20
- package/dist/components/code-block/copy-button.d.ts +16 -0
- package/dist/components/code-block/copy-button.d.ts.map +1 -0
- package/dist/components/code-block/index.d.ts +5 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/story-utils.d.ts +13 -0
- package/dist/components/code-block/story-utils.d.ts.map +1 -0
- package/dist/components/code-group/code-group.d.ts +23 -0
- package/dist/components/code-group/code-group.d.ts.map +1 -0
- package/dist/components/code-group/code-group.js +72 -72
- package/dist/components/code-group/code-select-dropdown.d.ts +10 -0
- package/dist/components/code-group/code-select-dropdown.d.ts.map +1 -0
- package/dist/components/code-group/code-snippet.d.ts +13 -0
- package/dist/components/code-group/code-snippet.d.ts.map +1 -0
- package/dist/components/code-group/dropdown.d.ts +34 -0
- package/dist/components/code-group/dropdown.d.ts.map +1 -0
- package/dist/components/code-group/dropdown.js +47 -47
- package/dist/components/code-group/index.d.ts +3 -0
- package/dist/components/code-group/index.d.ts.map +1 -0
- package/dist/components/code-group/language-dropdown.d.ts +10 -0
- package/dist/components/code-group/language-dropdown.d.ts.map +1 -0
- package/dist/components/code-group/language-dropdown.js +39 -39
- package/dist/components/code-group/language-icon.d.ts +7 -0
- package/dist/components/code-group/language-icon.d.ts.map +1 -0
- package/dist/components/color/color.d.ts +28 -0
- package/dist/components/color/color.d.ts.map +1 -0
- package/dist/components/color/color.js +37 -37
- package/dist/components/color/constants.d.ts +5 -0
- package/dist/components/color/constants.d.ts.map +1 -0
- package/dist/components/color/index.d.ts +4 -0
- package/dist/components/color/index.d.ts.map +1 -0
- package/dist/components/columns/columns.d.ts +11 -0
- package/dist/components/columns/columns.d.ts.map +1 -0
- package/dist/components/columns/constants.d.ts +5 -0
- package/dist/components/columns/constants.d.ts.map +1 -0
- package/dist/components/columns/index.d.ts +3 -0
- package/dist/components/columns/index.d.ts.map +1 -0
- package/dist/components/expandable/expandable.d.ts +21 -0
- package/dist/components/expandable/expandable.d.ts.map +1 -0
- package/dist/components/expandable/expandable.js +46 -46
- package/dist/components/expandable/index.d.ts +3 -0
- package/dist/components/expandable/index.d.ts.map +1 -0
- package/dist/components/frame/frame.d.ts +14 -0
- package/dist/components/frame/frame.d.ts.map +1 -0
- package/dist/components/frame/frame.js +21 -21
- package/dist/components/frame/index.d.ts +3 -0
- package/dist/components/frame/index.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts +19 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.js +24 -24
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/mermaid/index.d.ts +7 -0
- package/dist/components/mermaid/index.d.ts.map +1 -0
- package/dist/components/mermaid/mermaid.d.ts +12 -0
- package/dist/components/mermaid/mermaid.d.ts.map +1 -0
- package/dist/components/mermaid/mermaid.js +38 -31
- package/dist/components/mermaid/use-pan-zoom.d.ts +13 -0
- package/dist/components/mermaid/use-pan-zoom.d.ts.map +1 -0
- package/dist/components/mermaid/zoom-controls.d.ts +13 -0
- package/dist/components/mermaid/zoom-controls.d.ts.map +1 -0
- package/dist/components/mermaid/zoom-controls.js +32 -32
- package/dist/components/panel/index.d.ts +3 -0
- package/dist/components/panel/index.d.ts.map +1 -0
- package/dist/components/panel/panel.d.ts +6 -0
- package/dist/components/panel/panel.d.ts.map +1 -0
- package/dist/components/property/index.d.ts +3 -0
- package/dist/components/property/index.d.ts.map +1 -0
- package/dist/components/property/param-head.d.ts +5 -0
- package/dist/components/property/param-head.d.ts.map +1 -0
- package/dist/components/property/param-head.js +40 -40
- package/dist/components/property/pills.d.ts +15 -0
- package/dist/components/property/pills.d.ts.map +1 -0
- package/dist/components/property/pills.js +13 -13
- package/dist/components/property/property.d.ts +24 -0
- package/dist/components/property/property.d.ts.map +1 -0
- package/dist/components/property/property.js +33 -33
- package/dist/components/steps/constants.d.ts +5 -0
- package/dist/components/steps/constants.d.ts.map +1 -0
- package/dist/components/steps/index.d.ts +5 -0
- package/dist/components/steps/index.d.ts.map +1 -0
- package/dist/components/steps/steps.d.ts +35 -0
- package/dist/components/steps/steps.d.ts.map +1 -0
- package/dist/components/steps/steps.js +157 -59
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +36 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +84 -78
- package/dist/components/tile/index.d.ts +3 -0
- package/dist/components/tile/index.d.ts.map +1 -0
- package/dist/components/tile/tile.d.ts +11 -0
- package/dist/components/tile/tile.d.ts.map +1 -0
- package/dist/components/tile/tile.js +27 -27
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +14 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +95 -84
- package/dist/components/tree/context.d.ts +9 -0
- package/dist/components/tree/context.d.ts.map +1 -0
- package/dist/components/tree/file.d.ts +7 -0
- package/dist/components/tree/file.d.ts.map +1 -0
- package/dist/components/tree/file.js +9 -9
- package/dist/components/tree/folder.d.ts +11 -0
- package/dist/components/tree/folder.d.ts.map +1 -0
- package/dist/components/tree/folder.js +21 -21
- package/dist/components/tree/index.d.ts +9 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/root.d.ts +9 -0
- package/dist/components/tree/root.d.ts.map +1 -0
- package/dist/components/tree/tree-level-context.d.ts +8 -0
- package/dist/components/tree/tree-level-context.d.ts.map +1 -0
- package/dist/components/tree/use-tree-level.d.ts +3 -0
- package/dist/components/tree/use-tree-level.d.ts.map +1 -0
- package/dist/components/tree/utils.d.ts +9 -0
- package/dist/components/tree/utils.d.ts.map +1 -0
- package/dist/components/update/index.d.ts +3 -0
- package/dist/components/update/index.d.ts.map +1 -0
- package/dist/components/update/update.d.ts +22 -0
- package/dist/components/update/update.d.ts.map +1 -0
- package/dist/components/update/update.js +21 -21
- package/dist/components/view/index.d.ts +3 -0
- package/dist/components/view/index.d.ts.map +1 -0
- package/dist/components/view/view.d.ts +12 -0
- package/dist/components/view/view.d.ts.map +1 -0
- package/dist/components/view/view.js +29 -23
- package/dist/constants/brands.d.ts +3 -0
- package/dist/constants/brands.d.ts.map +1 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/selectors.d.ts +126 -0
- package/dist/constants/selectors.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-expandable-memory.d.ts +8 -0
- package/dist/hooks/use-expandable-memory.d.ts.map +1 -0
- package/dist/hooks/use-expandable.d.ts +13 -0
- package/dist/hooks/use-expandable.d.ts.map +1 -0
- package/dist/hooks/use-get-shiki-highlighted-html.d.ts +4 -0
- package/dist/hooks/use-get-shiki-highlighted-html.d.ts.map +1 -0
- package/dist/hooks/use-has-hover.d.ts +3 -0
- package/dist/hooks/use-has-hover.d.ts.map +1 -0
- package/dist/hooks/use-is-dark-theme.d.ts +5 -0
- package/dist/hooks/use-is-dark-theme.d.ts.map +1 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +4 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/icons/index.d.ts +21 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +2 -2
- package/dist/index.d.ts +3 -565
- package/dist/index.d.ts.map +1 -0
- package/dist/plugins/bg-grid.d.ts +3 -0
- package/dist/plugins/bg-grid.d.ts.map +1 -0
- package/dist/plugins/scrollbar.d.ts +3 -0
- package/dist/plugins/scrollbar.d.ts.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/copy-to-clipboard.d.ts +5 -0
- package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
- package/dist/utils/enhance-video-props.d.ts +4 -0
- package/dist/utils/enhance-video-props.d.ts.map +1 -0
- package/dist/utils/get-node-text.d.ts +3 -0
- package/dist/utils/get-node-text.d.ts.map +1 -0
- package/dist/utils/icon-utils.d.ts +19 -0
- package/dist/utils/icon-utils.d.ts.map +1 -0
- package/dist/utils/is-absolute-url.d.ts +5 -0
- package/dist/utils/is-absolute-url.d.ts.map +1 -0
- package/dist/utils/is-remote-url.d.ts +3 -0
- package/dist/utils/is-remote-url.d.ts.map +1 -0
- package/dist/utils/make-marker-ids-unique.d.ts +3 -0
- package/dist/utils/make-marker-ids-unique.d.ts.map +1 -0
- package/dist/utils/make-marker-ids-unique.js +42 -0
- package/dist/utils/render-as-child.d.ts +4 -0
- package/dist/utils/render-as-child.d.ts.map +1 -0
- package/dist/utils/shiki/code-styling.d.ts +12 -0
- package/dist/utils/shiki/code-styling.d.ts.map +1 -0
- package/dist/utils/shiki/constants.d.ts +23 -0
- package/dist/utils/shiki/constants.d.ts.map +1 -0
- package/dist/utils/shiki/get-code-styling.d.ts +10 -0
- package/dist/utils/shiki/get-code-styling.d.ts.map +1 -0
- package/dist/utils/shiki/get-shiki-background-colors.d.ts +21 -0
- package/dist/utils/shiki/get-shiki-background-colors.d.ts.map +1 -0
- package/dist/utils/shiki/index.d.ts +31 -0
- package/dist/utils/shiki/index.d.ts.map +1 -0
- package/dist/utils/shiki/lib.d.ts +6 -0
- package/dist/utils/shiki/lib.d.ts.map +1 -0
- package/dist/utils/shiki/shiki-themes.d.ts +3 -0
- package/dist/utils/shiki/shiki-themes.d.ts.map +1 -0
- package/dist/utils/shiki/snippet-presets.d.ts +28 -0
- package/dist/utils/shiki/snippet-presets.d.ts.map +1 -0
- package/dist/utils/shiki/worker-client.d.ts +10 -0
- package/dist/utils/shiki/worker-client.d.ts.map +1 -0
- package/dist/utils/slugify.d.ts +3 -0
- package/dist/utils/slugify.d.ts.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CodeBlockTheme } from '../../utils/shiki/code-styling';
|
|
2
|
+
type CodeSelectDropdownProps = {
|
|
3
|
+
selectedOption?: string;
|
|
4
|
+
setSelectedOption: (option: string) => void;
|
|
5
|
+
options: string[];
|
|
6
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
7
|
+
};
|
|
8
|
+
declare const CodeSelectDropdown: ({ selectedOption, setSelectedOption, options, codeBlockTheme, }: CodeSelectDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { CodeSelectDropdown };
|
|
10
|
+
//# sourceMappingURL=code-select-dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-select-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/code-select-dropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASjE,KAAK,uBAAuB,GAAG;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,kBAAkB,GAAI,iEAKzB,uBAAuB,4CAwDzB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CodeStyling } from '../../utils/shiki/code-styling';
|
|
3
|
+
type CodeSnippetProps = {
|
|
4
|
+
language?: string;
|
|
5
|
+
/**
|
|
6
|
+
* If `children` is a `string`, `Shiki` will be emitted
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
codeBlockThemeObject?: CodeStyling;
|
|
10
|
+
};
|
|
11
|
+
declare const CodeSnippet: import('react').MemoExoticComponent<({ language, children, codeBlockThemeObject }: CodeSnippetProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export { CodeSnippet, type CodeSnippetProps };
|
|
13
|
+
//# sourceMappingURL=code-snippet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-snippet.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/code-snippet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oBAAoB,CAAC,EAAE,WAAW,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,WAAW,qFACgC,gBAAgB,6CA4BhE,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Menu } from '@base-ui/react/menu';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
type DropdownMenuProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const DropdownMenu: {
|
|
9
|
+
({ children, open, onOpenChange }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
type DropdownMenuTriggerProps = ComponentPropsWithoutRef<typeof Menu.Trigger>;
|
|
13
|
+
declare const DropdownMenuTrigger: {
|
|
14
|
+
({ className, children, ...props }: DropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
type DropdownMenuContentProps = ComponentPropsWithoutRef<typeof Menu.Popup> & {
|
|
18
|
+
sideOffset?: number;
|
|
19
|
+
align?: "start" | "center" | "end";
|
|
20
|
+
};
|
|
21
|
+
declare const DropdownMenuContent: {
|
|
22
|
+
({ className, sideOffset, align, ...props }: DropdownMenuContentProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
type DropdownMenuItemProps = ComponentPropsWithoutRef<typeof Menu.Item> & {
|
|
26
|
+
isSelected?: boolean;
|
|
27
|
+
onSelect?: () => void;
|
|
28
|
+
};
|
|
29
|
+
declare const DropdownMenuItem: {
|
|
30
|
+
({ className, isSelected, children, onSelect, onClick, ...props }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, };
|
|
34
|
+
//# sourceMappingURL=dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,YAAY;uCAAsC,iBAAiB;;CAIxE,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AAE9E,QAAA,MAAM,mBAAmB;wCAItB,wBAAwB;;CAW1B,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,mBAAmB;iDAKtB,wBAAwB;;CAmB1B,CAAC;AAGF,KAAK,qBAAqB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,gBAAgB;uEAOnB,qBAAqB;;CAwBvB,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as a } from "../../utils/cn.js";
|
|
3
3
|
import p from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js";
|
|
4
|
-
import { MenuRoot as
|
|
5
|
-
import { MenuTrigger as
|
|
6
|
-
import { MenuPortal as
|
|
7
|
-
import { MenuPositioner as
|
|
8
|
-
import { MenuPopup as
|
|
9
|
-
import { MenuItem as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
4
|
+
import { MenuRoot as u } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js";
|
|
5
|
+
import { MenuTrigger as l } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js";
|
|
6
|
+
import { MenuPortal as h } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/portal/MenuPortal.js";
|
|
7
|
+
import { MenuPositioner as g } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js";
|
|
8
|
+
import { MenuPopup as x } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js";
|
|
9
|
+
import { MenuItem as w } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/menu/item/MenuItem.js";
|
|
10
|
+
const f = ({ children: t, open: e, onOpenChange: o }) => /* @__PURE__ */ r(u, { onOpenChange: o, open: e, children: t });
|
|
11
|
+
f.displayName = "DropdownMenu";
|
|
12
|
+
const c = ({
|
|
13
13
|
className: t,
|
|
14
14
|
children: e,
|
|
15
|
-
...
|
|
16
|
-
}) => /* @__PURE__ */
|
|
17
|
-
|
|
15
|
+
...o
|
|
16
|
+
}) => /* @__PURE__ */ r(
|
|
17
|
+
l,
|
|
18
18
|
{
|
|
19
|
-
className:
|
|
19
|
+
className: a(
|
|
20
20
|
"group group overflow-hidden rounded-lg disabled:pointer-events-none [&>span]:line-clamp-1",
|
|
21
|
-
"flex items-center gap-1 py-0.5 text-
|
|
21
|
+
"flex items-center gap-1 py-0.5 text-sm text-stone-950/50 group-hover:text-stone-950/70 dark:text-white/50 dark:group-hover:text-white/70",
|
|
22
22
|
t
|
|
23
23
|
),
|
|
24
|
-
...
|
|
24
|
+
...o,
|
|
25
25
|
children: e
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
|
|
29
|
-
const
|
|
28
|
+
c.displayName = "DropdownMenuTrigger";
|
|
29
|
+
const y = ({
|
|
30
30
|
className: t,
|
|
31
31
|
sideOffset: e = 4,
|
|
32
|
-
align:
|
|
33
|
-
...
|
|
34
|
-
}) => /* @__PURE__ */
|
|
35
|
-
|
|
32
|
+
align: o = "start",
|
|
33
|
+
...n
|
|
34
|
+
}) => /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
|
|
35
|
+
g,
|
|
36
36
|
{
|
|
37
|
-
align:
|
|
37
|
+
align: o,
|
|
38
38
|
className: "z-50",
|
|
39
39
|
collisionPadding: 16,
|
|
40
40
|
sideOffset: e,
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
children: /* @__PURE__ */ r(
|
|
42
|
+
x,
|
|
43
43
|
{
|
|
44
|
-
className:
|
|
45
|
-
"relative max-h-96 min-w-
|
|
44
|
+
className: a(
|
|
45
|
+
"relative max-h-96 min-w-(--anchor-width) overflow-y-auto rounded-2xl border-standard bg-white p-1 text-stone-950/70 shadow-stone-500/5 shadow-xl dark:bg-stone-950 dark:text-white/70 dark:shadow-none dark:shadow-stone-500/5",
|
|
46
46
|
"data-[ending-style]:fade-out-0 data-[starting-style]:fade-in-0 data-[ending-style]:zoom-out-95 data-[starting-style]:zoom-in-95",
|
|
47
47
|
t
|
|
48
48
|
),
|
|
49
49
|
style: { textRendering: "geometricPrecision" },
|
|
50
|
-
...
|
|
50
|
+
...n
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
) });
|
|
55
|
-
|
|
55
|
+
y.displayName = "DropdownMenuContent";
|
|
56
56
|
const M = ({
|
|
57
57
|
className: t,
|
|
58
58
|
isSelected: e,
|
|
59
|
-
children:
|
|
60
|
-
onSelect:
|
|
61
|
-
onClick:
|
|
62
|
-
...
|
|
59
|
+
children: o,
|
|
60
|
+
onSelect: n,
|
|
61
|
+
onClick: d,
|
|
62
|
+
...s
|
|
63
63
|
}) => /* @__PURE__ */ m(
|
|
64
|
-
|
|
64
|
+
w,
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
67
|
-
"group relative flex w-full cursor-pointer select-none items-center justify-between gap-2 rounded-md px-2 py-1 text-sm outline-0 hover:bg-
|
|
68
|
-
e ? "font-medium text-primary dark:text-primary-light" : "text-
|
|
66
|
+
className: a(
|
|
67
|
+
"group relative flex w-full cursor-pointer select-none items-center justify-between gap-2 rounded-md px-2 py-1 text-sm outline-0 hover:bg-stone-950/3 focus:bg-stone-950/5 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 dark:focus:bg-white/5 dark:hover:bg-white/3",
|
|
68
|
+
e ? "font-medium text-primary dark:text-primary-light" : "text-stone-950/50 hover:text-stone-950/75 focus:text-stone-950/75 dark:text-white/50 dark:focus:text-white/75 dark:hover:text-white/75",
|
|
69
69
|
t
|
|
70
70
|
),
|
|
71
|
-
onClick: (
|
|
72
|
-
|
|
71
|
+
onClick: (i) => {
|
|
72
|
+
d == null || d(i), n == null || n();
|
|
73
73
|
},
|
|
74
|
-
...
|
|
74
|
+
...s,
|
|
75
75
|
children: [
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
o,
|
|
77
|
+
/* @__PURE__ */ r(
|
|
78
78
|
p,
|
|
79
79
|
{
|
|
80
|
-
className:
|
|
80
|
+
className: a(
|
|
81
81
|
"size-3.5 shrink-0 text-primary dark:text-primary-light",
|
|
82
82
|
!e && "opacity-0"
|
|
83
83
|
),
|
|
@@ -89,8 +89,8 @@ const M = ({
|
|
|
89
89
|
);
|
|
90
90
|
M.displayName = "DropdownMenuItem";
|
|
91
91
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
f as DropdownMenu,
|
|
93
|
+
y as DropdownMenuContent,
|
|
94
94
|
M as DropdownMenuItem,
|
|
95
|
-
|
|
95
|
+
c as DropdownMenuTrigger
|
|
96
96
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CodeBlockTheme } from '../../utils/shiki/code-styling';
|
|
2
|
+
type LanguageDropdownProps = {
|
|
3
|
+
selectedLanguage: string;
|
|
4
|
+
setSelectedLanguage: (language: string, index: number) => void;
|
|
5
|
+
languages: string[];
|
|
6
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
7
|
+
};
|
|
8
|
+
declare const LanguageDropdown: ({ selectedLanguage, setSelectedLanguage, languages, codeBlockTheme, }: LanguageDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { LanguageDropdown };
|
|
10
|
+
//# sourceMappingURL=language-dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/language-dropdown.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAWjE,KAAK,qBAAqB,GAAG;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,uEAKvB,qBAAqB,4CAiFvB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
3
|
import { cn as p } from "../../utils/cn.js";
|
|
4
4
|
import { getDisplayName as d } from "../../utils/shiki/snippet-presets.js";
|
|
5
|
-
import { DropdownMenu as
|
|
6
|
-
import { LanguageIcon as
|
|
5
|
+
import { DropdownMenu as l, DropdownMenuTrigger as v, DropdownMenuContent as w, DropdownMenuItem as g } from "./dropdown.js";
|
|
6
|
+
import { LanguageIcon as x } from "./language-icon.js";
|
|
7
7
|
import k from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js";
|
|
8
8
|
const S = ({
|
|
9
|
-
selectedLanguage:
|
|
10
|
-
setSelectedLanguage:
|
|
9
|
+
selectedLanguage: e,
|
|
10
|
+
setSelectedLanguage: h,
|
|
11
11
|
languages: m,
|
|
12
12
|
codeBlockTheme: r = "system"
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
14
|
+
const s = m.length > 1, [n, y] = b(!1);
|
|
15
|
+
return /* @__PURE__ */ o(l, { onOpenChange: y, open: n, children: [
|
|
16
|
+
/* @__PURE__ */ i(
|
|
17
|
+
v,
|
|
18
18
|
{
|
|
19
19
|
className: "cursor-default select-none bg-transparent pb-1 font-medium text-xs dark:bg-transparent",
|
|
20
|
-
disabled: !
|
|
21
|
-
children: /* @__PURE__ */
|
|
20
|
+
disabled: !s,
|
|
21
|
+
children: /* @__PURE__ */ o(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
className: p(
|
|
25
|
-
"flex items-center gap-1 rounded-[10px] border py-[5px] pr-1.5 pl-2.5 text-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
!
|
|
25
|
+
"flex items-center gap-1 rounded-[10px] border py-[5px] pr-1.5 pl-2.5 text-stone-500 dark:text-stone-400",
|
|
26
|
+
s ? "cursor-pointer" : "cursor-default",
|
|
27
|
+
s && r === "system" && "hover:bg-stone-200/50 hover:text-primary dark:hover:bg-stone-700/70 dark:hover:text-primary-light",
|
|
28
|
+
s && r === "dark" && "hover:bg-stone-700/70 hover:text-primary-light",
|
|
29
|
+
n && "border-stone-600/50 ring-1 dark:border-stone-400/50 dark:ring-stone-800/50",
|
|
30
|
+
n && r === "system" && "ring-stone-200/70",
|
|
31
|
+
n && r === "dark" && "ring-stone-800/50",
|
|
32
|
+
!n && "border-transparent"
|
|
33
33
|
),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
35
|
+
/* @__PURE__ */ i(x, { language: e }),
|
|
36
|
+
/* @__PURE__ */ i("p", { className: "truncate font-medium", children: d(e) }),
|
|
37
|
+
s && /* @__PURE__ */ i(k, { className: "size-3.5 shrink-0" })
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
43
|
+
/* @__PURE__ */ i(
|
|
44
|
+
w,
|
|
45
45
|
{
|
|
46
46
|
align: "end",
|
|
47
47
|
className: p(
|
|
48
48
|
"min-w-[170px] overflow-y-auto border p-1",
|
|
49
|
-
r === "system" && "border-
|
|
49
|
+
r === "system" && "border-stone-200/70 bg-white dark:border-white/10 dark:bg-[#0F1117]",
|
|
50
50
|
r === "dark" && "border-white/10 bg-[#0F1117]"
|
|
51
51
|
),
|
|
52
52
|
sideOffset: 0,
|
|
53
|
-
children: m.map((t,
|
|
54
|
-
const
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
|
|
53
|
+
children: m.map((t, a) => {
|
|
54
|
+
const f = t === e;
|
|
55
|
+
return /* @__PURE__ */ o(
|
|
56
|
+
g,
|
|
57
57
|
{
|
|
58
58
|
className: p(
|
|
59
59
|
"flex items-center gap-1.5 py-1.5 text-xs",
|
|
60
60
|
r === "system" && "hover:bg-primary/10 hover:text-primary dark:hover:bg-primary-light/10 dark:hover:text-primary-light",
|
|
61
61
|
r === "dark" && "text-primary-light hover:bg-primary-light/10 hover:text-primary-light dark:text-primary-light",
|
|
62
|
-
t ===
|
|
63
|
-
t ===
|
|
64
|
-
t !==
|
|
65
|
-
t !==
|
|
62
|
+
t === e && r === "system" && "font-medium text-primary dark:text-primary-light",
|
|
63
|
+
t === e && r === "dark" && "font-medium text-primary-light dark:text-primary-light",
|
|
64
|
+
t !== e && r === "system" && "text-stone-500 dark:text-white/50",
|
|
65
|
+
t !== e && r === "dark" && "text-white/50"
|
|
66
66
|
),
|
|
67
|
-
isSelected:
|
|
68
|
-
onSelect: () =>
|
|
67
|
+
isSelected: f,
|
|
68
|
+
onSelect: () => h(t, a),
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ i(x, { language: t }),
|
|
71
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center font-medium", children: d(t) })
|
|
72
72
|
]
|
|
73
73
|
},
|
|
74
|
-
`Language${
|
|
74
|
+
`Language${a}${t}`
|
|
75
75
|
);
|
|
76
76
|
})
|
|
77
77
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type LanguageIconProps = {
|
|
2
|
+
language: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const LanguageIcon: ({ language, className }: LanguageIconProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export { LanguageIcon };
|
|
7
|
+
//# sourceMappingURL=language-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-icon.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/language-icon.tsx"],"names":[],"mappings":"AAGA,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,yBAAyB,iBAAiB,mDAsB/D,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColorVariant } from './constants';
|
|
3
|
+
type ColorProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
variant: ColorVariant;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const Color: {
|
|
9
|
+
({ children, variant, className }: ColorProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Row: ({ children, title }: ColorRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Item: ({ name, value }: ColorItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
type ColorRowProps = {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
title?: string;
|
|
16
|
+
};
|
|
17
|
+
/** @deprecated Use a single string value instead */
|
|
18
|
+
type ColorItemValueLegacy = {
|
|
19
|
+
light: string;
|
|
20
|
+
dark: string;
|
|
21
|
+
};
|
|
22
|
+
type ColorItemProps = {
|
|
23
|
+
value: string | ColorItemValueLegacy;
|
|
24
|
+
name?: string;
|
|
25
|
+
};
|
|
26
|
+
export { Color };
|
|
27
|
+
export type { ColorItemProps, ColorProps, ColorRowProps };
|
|
28
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/components/color/color.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,QAAA,MAAM,KAAK;uCAAsC,UAAU;+BAwBpB,aAAa;4BAwChB,cAAc;CA/CjD,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAkCF,oDAAoD;AACpD,KAAK,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA8GF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Classes as
|
|
4
|
-
import { useIsDarkTheme as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as C, useState as w, useRef as g, useContext as b, useEffect as k } from "react";
|
|
3
|
+
import { Classes as i } from "../../constants/selectors.js";
|
|
4
|
+
import { useIsDarkTheme as y } from "../../hooks/use-is-dark-theme.js";
|
|
5
5
|
import { CheckIcon as N } from "../../icons/index.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as l } from "../../utils/cn.js";
|
|
7
7
|
import { copyToClipboard as _ } from "../../utils/copy-to-clipboard.js";
|
|
8
8
|
import { Tooltip as v } from "../tooltip/tooltip.js";
|
|
9
|
-
const d =
|
|
9
|
+
const d = C("compact"), u = ({ children: o, variant: t, className: c }) => /* @__PURE__ */ e(d.Provider, { value: t, children: /* @__PURE__ */ e(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
|
-
className:
|
|
13
|
-
|
|
12
|
+
className: l(
|
|
13
|
+
i.Color,
|
|
14
14
|
"group flex py-6",
|
|
15
15
|
t === "table" && "flex-col gap-6",
|
|
16
16
|
t === "compact" && "flex-row flex-wrap gap-x-2 gap-y-4",
|
|
17
17
|
c
|
|
18
18
|
),
|
|
19
19
|
"data-variant": t,
|
|
20
|
-
children:
|
|
20
|
+
children: o
|
|
21
21
|
}
|
|
22
|
-
) }), T = ({ children:
|
|
22
|
+
) }), T = ({ children: o, title: t }) => /* @__PURE__ */ s(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
26
|
-
|
|
25
|
+
className: l(
|
|
26
|
+
i.ColorRow,
|
|
27
27
|
"flex flex-col gap-2 md:flex-row md:items-center"
|
|
28
28
|
),
|
|
29
29
|
children: [
|
|
@@ -35,7 +35,7 @@ const d = g("compact"), u = ({ children: r, variant: t, className: c }) => /* @_
|
|
|
35
35
|
children: /* @__PURE__ */ e(
|
|
36
36
|
"p",
|
|
37
37
|
{
|
|
38
|
-
className: "m-0 truncate font-medium text-
|
|
38
|
+
className: "m-0 truncate font-medium text-sm text-stone-900 tracking-[-0.1px] dark:text-stone-200",
|
|
39
39
|
"data-component-part": "color-row-title",
|
|
40
40
|
title: t,
|
|
41
41
|
children: t
|
|
@@ -48,28 +48,28 @@ const d = g("compact"), u = ({ children: r, variant: t, className: c }) => /* @_
|
|
|
48
48
|
{
|
|
49
49
|
className: "flex w-full gap-1 md:gap-2",
|
|
50
50
|
"data-component-part": "color-row-items-container",
|
|
51
|
-
children:
|
|
51
|
+
children: o
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
]
|
|
55
55
|
}
|
|
56
|
-
), I = ({ name:
|
|
57
|
-
const [c, m] =
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
), I = ({ name: o, value: t }) => {
|
|
57
|
+
const [c, m] = w("idle"), n = g(null), { isDarkTheme: x } = y(), r = b(d);
|
|
58
|
+
k(() => () => {
|
|
59
|
+
n.current && clearTimeout(n.current);
|
|
60
60
|
}, []);
|
|
61
61
|
const a = typeof t == "string" ? t : t[x ? "dark" : "light"], f = async () => {
|
|
62
|
-
await _(a) !== "error" && (m("copied"),
|
|
62
|
+
await _(a) !== "error" && (m("copied"), n.current && clearTimeout(n.current), n.current = setTimeout(() => m("idle"), 2e3));
|
|
63
63
|
}, p = /* @__PURE__ */ e(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
|
-
"aria-label":
|
|
66
|
+
"aria-label": o || `Color ${a}`,
|
|
67
67
|
"aria-pressed": c === "copied",
|
|
68
68
|
"aria-roledescription": c === "copied" ? "Copied" : "Copy",
|
|
69
|
-
className:
|
|
70
|
-
"relative flex cursor-copy items-center justify-center rounded-lg border border-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
className: l(
|
|
70
|
+
"relative flex cursor-copy items-center justify-center rounded-lg border border-stone-200 dark:border-stone-800",
|
|
71
|
+
r === "compact" && "aspect-square max-h-[104px]",
|
|
72
|
+
r === "table" && "aspect-square w-full md:h-10"
|
|
73
73
|
),
|
|
74
74
|
"data-component-part": "color-item-button",
|
|
75
75
|
onClick: f,
|
|
@@ -79,7 +79,7 @@ const d = g("compact"), u = ({ children: r, variant: t, className: c }) => /* @_
|
|
|
79
79
|
N,
|
|
80
80
|
{
|
|
81
81
|
"aria-hidden": !0,
|
|
82
|
-
className:
|
|
82
|
+
className: l(
|
|
83
83
|
"pointer-events-none absolute inset-0 m-auto opacity-0 transition-opacity duration-100",
|
|
84
84
|
"filter-[drop-shadow(0_0_2px_rgb(0_0_0/0.1))_drop-shadow(0_0_4px_rgb(0_0_0/0.1))] text-white dark:text-white",
|
|
85
85
|
c === "copied" && "opacity-100"
|
|
@@ -88,30 +88,30 @@ const d = g("compact"), u = ({ children: r, variant: t, className: c }) => /* @_
|
|
|
88
88
|
)
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ s(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
|
-
className:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
className: l(
|
|
95
|
+
i.ColorItem,
|
|
96
|
+
r === "compact" && "flex shrink-0 flex-col gap-2",
|
|
97
|
+
r === "table" && "w-full max-w-[50px] md:max-w-[60px]"
|
|
98
98
|
),
|
|
99
99
|
children: [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
r === "table" ? /* @__PURE__ */ e(v, { title: a, children: p }) : p,
|
|
101
|
+
r === "compact" && /* @__PURE__ */ s("div", { className: "flex w-[104px] min-w-0 flex-col gap-0.5", children: [
|
|
102
|
+
o && /* @__PURE__ */ e(
|
|
103
103
|
"p",
|
|
104
104
|
{
|
|
105
|
-
className: "m-0 truncate text-center font-medium text-
|
|
105
|
+
className: "m-0 truncate text-center font-medium text-sm text-stone-900 dark:text-stone-200",
|
|
106
106
|
"data-component-part": "color-item-name",
|
|
107
|
-
title:
|
|
108
|
-
children:
|
|
107
|
+
title: o,
|
|
108
|
+
children: o
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
111
|
/* @__PURE__ */ e(
|
|
112
112
|
"p",
|
|
113
113
|
{
|
|
114
|
-
className: "m-0 truncate text-center font-mono text-
|
|
114
|
+
className: "m-0 truncate text-center font-mono text-stone-600 text-xs dark:text-stone-400",
|
|
115
115
|
"data-component-part": "color-item-value",
|
|
116
116
|
title: a,
|
|
117
117
|
children: a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/color/constants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,+BAAgC,CAAC;AACrD,KAAK,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/color/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColCount } from './constants';
|
|
3
|
+
type ColumnsProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
cols?: ColCount | `${ColCount}`;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const Columns: ({ children, className, cols }: ColumnsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Columns };
|
|
10
|
+
export type { ColumnsProps };
|
|
11
|
+
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../../src/components/columns/columns.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,GAAG,QAAQ,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,+BAAmC,YAAY,4CAgB/D,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/columns/constants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,uBAAwB,CAAC;AAC1C,KAAK,QAAQ,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/columns/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|