@infonomic/uikit 5.43.1 → 6.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.
- package/README.md +1 -1
- package/dist/components/accordion/accordion.d.ts +9 -9
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +4 -4
- package/dist/components/accordion/accordion.module.css +6 -5
- package/dist/components/accordion/accordion_module.css +4 -4
- package/dist/components/avatar/avatar.js +2 -2
- package/dist/components/badge/badge.d.ts +5 -13
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +12 -9
- package/dist/components/button/button-group.d.ts +9 -7
- package/dist/components/button/button-group.d.ts.map +1 -1
- package/dist/components/button/button-group.js +26 -36
- package/dist/components/button/button.d.ts +6 -13
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +19 -18
- package/dist/components/button/button.module.css +32 -54
- package/dist/components/button/button_module.css +7 -10
- package/dist/components/button/combo-button.d.ts +1 -1
- package/dist/components/button/combo-button.d.ts.map +1 -1
- package/dist/components/button/combo-button.js +13 -9
- package/dist/components/button/combo-button.module.css +16 -7
- package/dist/components/button/combo-button_module.css +22 -4
- package/dist/components/button/icon-button.d.ts +2 -3
- package/dist/components/button/icon-button.d.ts.map +1 -1
- package/dist/components/card/card.d.ts +5 -12
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +13 -9
- package/dist/components/chips/chip.d.ts +5 -11
- package/dist/components/chips/chip.d.ts.map +1 -1
- package/dist/components/chips/chip.js +36 -28
- package/dist/components/chips/chip.module.css +22 -36
- package/dist/components/chips/chip_module.css +3 -6
- package/dist/components/dropdown/dropdown.d.ts +28 -14
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.js +34 -20
- package/dist/components/forms/calendar.d.ts +1 -1
- package/dist/components/forms/calendar.d.ts.map +1 -1
- package/dist/components/forms/calendar.js +38 -29
- package/dist/components/forms/checkbox.astro +13 -8
- package/dist/components/forms/checkbox.d.ts +6 -2
- package/dist/components/forms/checkbox.d.ts.map +1 -1
- package/dist/components/forms/checkbox.js +11 -7
- package/dist/components/forms/checkbox.module.css +20 -20
- package/dist/components/forms/checkbox_module.css +13 -10
- package/dist/components/forms/input.module.css +10 -11
- package/dist/components/forms/input_module.css +3 -5
- package/dist/components/forms/radio-group.d.ts +6 -5
- package/dist/components/forms/radio-group.d.ts.map +1 -1
- package/dist/components/forms/radio-group.js +9 -4
- package/dist/components/forms/radio-group.module.css +13 -22
- package/dist/components/forms/radio-group_module.css +6 -24
- package/dist/components/forms/select.d.ts +4 -5
- package/dist/components/forms/select.d.ts.map +1 -1
- package/dist/components/forms/select.js +27 -29
- package/dist/components/forms/select.module.css +22 -22
- package/dist/components/forms/select.module.js +15 -15
- package/dist/components/forms/select_module.css +15 -15
- package/dist/components/hamburger/hamburger.astro +23 -15
- package/dist/components/hamburger/hamburger.d.ts +8 -6
- package/dist/components/hamburger/hamburger.d.ts.map +1 -1
- package/dist/components/hamburger/hamburger.js +18 -22
- package/dist/components/hamburger/hamburger.module.css +142 -0
- package/dist/components/hamburger/hamburger.module.js +10 -0
- package/dist/components/hamburger/hamburger_module.css +169 -0
- package/dist/components/notifications/@types/toast.d.ts +9 -7
- package/dist/components/notifications/@types/toast.d.ts.map +1 -1
- package/dist/components/notifications/toast.d.ts +12 -16
- package/dist/components/notifications/toast.d.ts.map +1 -1
- package/dist/components/notifications/toast.js +73 -57
- package/dist/components/notifications/toast.module.css +151 -177
- package/dist/components/notifications/toast.module.js +8 -12
- package/dist/components/notifications/toast_module.css +114 -159
- package/dist/components/pager/first-button.d.ts +2 -2
- package/dist/components/pager/first-button.d.ts.map +1 -1
- package/dist/components/pager/first-button.js +23 -16
- package/dist/components/pager/last-button.d.ts +2 -2
- package/dist/components/pager/last-button.d.ts.map +1 -1
- package/dist/components/pager/last-button.js +23 -16
- package/dist/components/pager/next-button.d.ts +2 -2
- package/dist/components/pager/next-button.d.ts.map +1 -1
- package/dist/components/pager/next-button.js +27 -20
- package/dist/components/pager/number-button.d.ts +2 -2
- package/dist/components/pager/number-button.d.ts.map +1 -1
- package/dist/components/pager/number-button.js +28 -23
- package/dist/components/pager/pagination.d.ts +8 -13
- package/dist/components/pager/pagination.d.ts.map +1 -1
- package/dist/components/pager/previous-button.d.ts +2 -2
- package/dist/components/pager/previous-button.d.ts.map +1 -1
- package/dist/components/pager/previous-button.js +25 -18
- package/dist/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +4 -2
- package/dist/components/tabs/tabs.d.ts +13 -13
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +8 -8
- package/dist/components/tabs/tabs.module.css +8 -17
- package/dist/components/tabs/tabs_module.css +2 -6
- package/dist/components/tooltip/tooltip.d.ts +6 -8
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +49 -20
- package/dist/components/tooltip/tooltip.module.css +43 -10
- package/dist/components/tooltip/tooltip.module.js +7 -1
- package/dist/components/tooltip/tooltip_module.css +36 -4
- package/dist/hooks/use-focus-trap/index.d.ts +2 -0
- package/dist/hooks/use-focus-trap/index.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap/index.js +1 -0
- package/dist/hooks/use-focus-trap/scope-tab.d.ts +11 -0
- package/dist/hooks/use-focus-trap/scope-tab.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap/scope-tab.js +19 -0
- package/dist/hooks/use-focus-trap/tabbable.d.ts +14 -0
- package/dist/hooks/use-focus-trap/tabbable.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap/tabbable.js +36 -0
- package/dist/hooks/use-focus-trap/use-focus-trap.d.ts +11 -0
- package/dist/hooks/use-focus-trap/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap/use-focus-trap.js +45 -0
- package/dist/icons/chevron-up-icon.d.ts +7 -0
- package/dist/icons/chevron-up-icon.d.ts.map +1 -0
- package/dist/icons/chevron-up-icon.js +27 -0
- package/dist/lib/ripple.d.ts +25 -0
- package/dist/lib/ripple.d.ts.map +1 -0
- package/dist/lib/ripple.js +53 -0
- package/dist/loaders/@types/index.d.ts.map +1 -0
- package/dist/loaders/ellipses.d.ts +1 -1
- package/dist/loaders/ellipses.d.ts.map +1 -1
- package/dist/loaders/ring.d.ts +1 -1
- package/dist/loaders/ring.d.ts.map +1 -1
- package/dist/loaders/spinner.d.ts +1 -1
- package/dist/loaders/spinner.d.ts.map +1 -1
- package/dist/styles/components-vanilla.css +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.js +118 -116
- package/dist/widgets/datepicker/datepicker.module.css +6 -5
- package/dist/widgets/datepicker/datepicker_module.css +4 -4
- package/dist/widgets/drawer/drawer-wrapper.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer-wrapper.js +1 -1
- package/dist/widgets/modal/modal-wrapper.d.ts.map +1 -1
- package/dist/widgets/modal/modal-wrapper.js +1 -1
- package/package.json +21 -29
- package/src/astro.d.ts +2 -2
- package/src/components/accordion/accordion.module.css +6 -5
- package/src/components/accordion/accordion.stories.tsx +10 -13
- package/src/components/accordion/accordion.tsx +13 -13
- package/src/components/avatar/avatar.tsx +2 -2
- package/src/components/badge/badge.tsx +20 -29
- package/src/components/button/button-group.tsx +60 -44
- package/src/components/button/button.module.css +32 -54
- package/src/components/button/button.tsx +35 -47
- package/src/components/button/combo-button.module.css +16 -7
- package/src/components/button/combo-button.tsx +17 -9
- package/src/components/button/icon-button.tsx +3 -5
- package/src/components/card/card.tsx +20 -32
- package/src/components/chips/chip.module.css +22 -36
- package/src/components/chips/chip.stories.tsx +2 -2
- package/src/components/chips/chip.tsx +59 -57
- package/src/components/dropdown/dropdown.stories.tsx +2 -4
- package/src/components/dropdown/dropdown.tsx +86 -40
- package/src/components/forms/calendar.tsx +43 -33
- package/src/components/forms/checkbox-group.tsx +1 -1
- package/src/components/forms/checkbox.astro +13 -8
- package/src/components/forms/checkbox.module.css +20 -20
- package/src/components/forms/checkbox.tsx +11 -6
- package/src/components/forms/input.module.css +10 -11
- package/src/components/forms/radio-group.module.css +13 -22
- package/src/components/forms/radio-group.tsx +13 -11
- package/src/components/forms/select.module.css +22 -22
- package/src/components/forms/select.tsx +36 -33
- package/src/components/hamburger/hamburger.astro +23 -15
- package/src/components/hamburger/hamburger.module.css +142 -0
- package/src/components/hamburger/hamburger.stories.tsx +35 -0
- package/src/components/hamburger/hamburger.tsx +37 -29
- package/src/components/notifications/@types/toast.ts +9 -7
- package/src/components/notifications/toast.module.css +151 -177
- package/src/components/notifications/toast.stories.tsx +21 -23
- package/src/components/notifications/toast.tsx +90 -86
- package/src/components/pager/first-button.tsx +24 -26
- package/src/components/pager/last-button.tsx +24 -25
- package/src/components/pager/next-button.tsx +24 -23
- package/src/components/pager/number-button.tsx +37 -36
- package/src/components/pager/pagination.tsx +4 -11
- package/src/components/pager/previous-button.tsx +24 -24
- package/src/components/scroll-area/scroll-area.tsx +3 -3
- package/src/components/tabs/tabs.module.css +8 -17
- package/src/components/tabs/tabs.stories.tsx +5 -5
- package/src/components/tabs/tabs.tsx +17 -16
- package/src/components/tooltip/tooltip.module.css +43 -10
- package/src/components/tooltip/tooltip.stories.tsx +4 -4
- package/src/components/tooltip/tooltip.tsx +56 -28
- package/src/hooks/use-focus-trap/index.ts +1 -0
- package/src/hooks/use-focus-trap/scope-tab.ts +48 -0
- package/src/hooks/use-focus-trap/tabbable.ts +72 -0
- package/src/hooks/use-focus-trap/use-focus-trap.ts +83 -0
- package/src/icons/chevron-up-icon.tsx +37 -0
- package/src/lib/ripple.ts +95 -0
- package/src/loaders/ellipses.tsx +1 -1
- package/src/loaders/ring.tsx +1 -1
- package/src/loaders/spinner.tsx +1 -1
- package/src/styles/components/hamburger.css +8 -6
- package/src/styles/functional/colors.css +97 -202
- package/src/styles/theme/theme.css +1 -1
- package/src/widgets/datepicker/datepicker.module.css +6 -5
- package/src/widgets/datepicker/datepicker.tsx +137 -135
- package/src/widgets/drawer/drawer-wrapper.tsx +1 -1
- package/src/widgets/modal/modal-wrapper.tsx +1 -1
- package/dist/loaders/types/index.d.ts.map +0 -1
- /package/dist/loaders/{types → @types}/index.d.ts +0 -0
- /package/dist/loaders/{types → @types}/index.js +0 -0
- /package/src/loaders/{types → @types}/index.ts +0 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ In addition to our thoughts above, this kit is built around the philosophy of ad
|
|
|
14
14
|
|
|
15
15
|
Having lived through a full generation of 'all-in-one' and difficult to override themed UI kits like Bootstrap and Material UI, the trend towards composable headless (unstyled) component libraries is a welcome one - and one that forms the basis of this kit.
|
|
16
16
|
|
|
17
|
-
Many of the current components are built on
|
|
17
|
+
Many of the current components are now built on Base UI. The great thing about wrapping these components in a client-consumable interface and library, is that in theory at least, the consumer of our kit's components won't have to worry about implementation details, or migration from Base UI or other another library. The 'contract' and core styling semantics will never change.
|
|
18
18
|
|
|
19
19
|
## Design Goals
|
|
20
20
|
|
|
@@ -4,29 +4,29 @@
|
|
|
4
4
|
* style the accordion here in order to provide a base for customization.
|
|
5
5
|
*/
|
|
6
6
|
import type React from 'react';
|
|
7
|
-
import { Accordion as AccordionPrimitive } from '
|
|
7
|
+
import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
|
|
8
8
|
export type AccordionRootElement = React.ComponentRef<'div'>;
|
|
9
9
|
export type AccordionItemElement = React.ComponentRef<'div'>;
|
|
10
|
-
export type AccordionHeaderElement = React.ComponentRef<'
|
|
10
|
+
export type AccordionHeaderElement = React.ComponentRef<'h3'>;
|
|
11
11
|
export type AccordionTriggerElement = React.ComponentRef<'button'>;
|
|
12
|
-
export type
|
|
12
|
+
export type AccordionPanelElement = React.ComponentRef<'div'>;
|
|
13
13
|
export declare const Accordion: {
|
|
14
14
|
Root: ({ children, className, ref, ...props }: {
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
className?: string;
|
|
17
17
|
ref?: React.RefObject<AccordionRootElement>;
|
|
18
|
-
} &
|
|
19
|
-
Item: ({ ref, children, className, ...props }: AccordionPrimitive.
|
|
18
|
+
} & React.ComponentProps<typeof AccordionPrimitive.Root>) => React.JSX.Element;
|
|
19
|
+
Item: ({ ref, children, className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item> & {
|
|
20
20
|
ref?: React.RefObject<AccordionItemElement>;
|
|
21
21
|
}) => React.JSX.Element;
|
|
22
|
-
Header: ({ ref, children, className, ...props }: AccordionPrimitive.
|
|
22
|
+
Header: ({ ref, children, className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Header> & {
|
|
23
23
|
ref?: React.RefObject<AccordionHeaderElement>;
|
|
24
24
|
}) => React.JSX.Element;
|
|
25
|
-
Trigger: ({ ref, children, className, ...props }: AccordionPrimitive.
|
|
25
|
+
Trigger: ({ ref, children, className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger> & {
|
|
26
26
|
ref?: React.RefObject<AccordionTriggerElement>;
|
|
27
27
|
}) => React.JSX.Element;
|
|
28
|
-
|
|
29
|
-
ref?: React.RefObject<
|
|
28
|
+
Panel: ({ ref, children, className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Panel> & {
|
|
29
|
+
ref?: React.RefObject<AccordionPanelElement>;
|
|
30
30
|
}) => React.JSX.Element;
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAK1E,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAuB5D,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAoB5D,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;AAoB7D,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;AAoBlE,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAoB7D,eAAO,MAAM,SAAS;mDAhGnB;QACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;QACzB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAA;KAC5C,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC;mDAkBrD,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,GAAG;QACxD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAA;KAC5C;qDAkBE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,MAAM,CAAC,GAAG;QAC1D,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAA;KAC9C;sDAkBE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,GAAG;QAC3D,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAA;KAC/C;oDAkBE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,GAAG;QACzD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC7C;CAkBA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
3
4
|
import classnames from "classnames";
|
|
4
|
-
import { Accordion } from "radix-ui";
|
|
5
5
|
import accordion_module from "./accordion.module.js";
|
|
6
6
|
const Root = ({ children, className, ref, ...props })=>/*#__PURE__*/ jsx(Accordion.Root, {
|
|
7
7
|
ref: ref,
|
|
@@ -33,8 +33,8 @@ const Trigger = function({ ref, children, className, ...props }) {
|
|
|
33
33
|
children: children
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
const
|
|
37
|
-
return /*#__PURE__*/ jsx(Accordion.
|
|
36
|
+
const Panel = function({ ref, children, className, ...props }) {
|
|
37
|
+
return /*#__PURE__*/ jsx(Accordion.Panel, {
|
|
38
38
|
className: classnames('infonomic-accordion-content', accordion_module.content, className),
|
|
39
39
|
...props,
|
|
40
40
|
ref: ref,
|
|
@@ -46,6 +46,6 @@ const accordion_Accordion = {
|
|
|
46
46
|
Item: Item,
|
|
47
47
|
Header: Header,
|
|
48
48
|
Trigger: Trigger,
|
|
49
|
-
|
|
49
|
+
Panel: Panel
|
|
50
50
|
};
|
|
51
51
|
export { accordion_Accordion as Accordion };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
+
|
|
4
5
|
.item,
|
|
5
6
|
:global(.infonomic-accordion-item) {
|
|
6
7
|
overflow: hidden;
|
|
@@ -25,11 +26,11 @@
|
|
|
25
26
|
:global(.infonomic-accordion-content) {
|
|
26
27
|
overflow: hidden;
|
|
27
28
|
|
|
28
|
-
&[data-
|
|
29
|
+
&[data-open] {
|
|
29
30
|
animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
&[data-
|
|
33
|
+
&[data-ending-style] {
|
|
33
34
|
animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -40,17 +41,17 @@
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
to {
|
|
43
|
-
height: var(--
|
|
44
|
+
height: var(--accordion-panel-height);
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
@keyframes accordionSlideUp {
|
|
48
49
|
from {
|
|
49
|
-
height: var(--
|
|
50
|
+
height: var(--accordion-panel-height);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
to {
|
|
53
54
|
height: 0;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
}
|
|
57
|
+
}
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:is(.content-KoW8ID, .infonomic-accordion-content)[data-
|
|
25
|
+
:is(.content-KoW8ID, .infonomic-accordion-content)[data-open] {
|
|
26
26
|
animation: .3s cubic-bezier(.87, 0, .13, 1) accordionSlideDown-gllXUs;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
:is(.content-KoW8ID, .infonomic-accordion-content)[data-
|
|
29
|
+
:is(.content-KoW8ID, .infonomic-accordion-content)[data-ending-style] {
|
|
30
30
|
animation: .3s cubic-bezier(.87, 0, .13, 1) accordionSlideUp-mpDLB0;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
to {
|
|
39
|
-
height: var(--
|
|
39
|
+
height: var(--accordion-panel-height);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
@keyframes accordionSlideUp-mpDLB0 {
|
|
44
44
|
from {
|
|
45
|
-
height: var(--
|
|
45
|
+
height: var(--accordion-panel-height);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
to {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
3
4
|
import classnames from "classnames";
|
|
4
|
-
import { Avatar } from "radix-ui";
|
|
5
5
|
import avatar_module from "./avatar.module.js";
|
|
6
6
|
const url = 'https://picsum.photos/150';
|
|
7
7
|
const avatar_Avatar = ({ initials })=>/*#__PURE__*/ jsxs(Avatar.Root, {
|
|
@@ -14,7 +14,7 @@ const avatar_Avatar = ({ initials })=>/*#__PURE__*/ jsxs(Avatar.Root, {
|
|
|
14
14
|
}),
|
|
15
15
|
/*#__PURE__*/ jsx(Avatar.Fallback, {
|
|
16
16
|
className: classnames('infonomic-avatar-fallback', avatar_module["avatar-fallback"]),
|
|
17
|
-
|
|
17
|
+
delay: 600,
|
|
18
18
|
children: /*#__PURE__*/ jsx("span", {
|
|
19
19
|
className: classnames('infonomic-avatar-text', avatar_module["avatar-text"]),
|
|
20
20
|
children: initials
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
1
2
|
import type { Intent } from '../@types/shared';
|
|
2
|
-
type
|
|
3
|
-
asChild?: false;
|
|
4
|
-
} & React.ComponentPropsWithoutRef<'div'>;
|
|
5
|
-
interface AsSlot {
|
|
6
|
-
asChild?: true;
|
|
7
|
-
}
|
|
8
|
-
export type BadgeRefType<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
|
|
9
|
-
export type BadgeProps<C extends React.ElementType = 'div'> = {
|
|
3
|
+
export type BadgeProps = useRender.ComponentProps<'div'> & {
|
|
10
4
|
children: React.ReactNode;
|
|
11
5
|
intent?: Intent;
|
|
12
6
|
className?: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} & (AsSlot | AsDiv);
|
|
7
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
|
+
};
|
|
16
9
|
export declare const Badge: {
|
|
17
|
-
|
|
10
|
+
({ className, intent, children, render, ref, ...rest }: BadgeProps): React.JSX.Element;
|
|
18
11
|
displayName: string;
|
|
19
12
|
};
|
|
20
|
-
export {};
|
|
21
13
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAIrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,KAAK;4DAOf,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAmBhC,CAAA"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
2
|
import classnames from "classnames";
|
|
4
3
|
import badge_module from "./badge.module.js";
|
|
5
|
-
const Badge = ({ className, intent = 'primary', children,
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
const Badge = ({ className, intent = 'primary', children, render, ref, ...rest })=>{
|
|
5
|
+
const element = useRender({
|
|
6
|
+
defaultTagName: 'div',
|
|
7
|
+
render,
|
|
8
|
+
ref,
|
|
9
|
+
props: {
|
|
10
|
+
...rest,
|
|
11
|
+
className: classnames('infonomic-badge', `infonomic-badge-${intent}`, badge_module.badge, badge_module[intent], className),
|
|
12
|
+
children
|
|
13
|
+
}
|
|
12
14
|
});
|
|
15
|
+
return element;
|
|
13
16
|
};
|
|
14
17
|
Badge.displayName = 'Badge';
|
|
15
18
|
export { Badge };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React, { type
|
|
2
|
-
import {
|
|
1
|
+
import React, { type Ref } from 'react';
|
|
2
|
+
import { Toggle } from '@base-ui/react/toggle';
|
|
3
|
+
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
3
4
|
import type { EnableRipple, Intent, Size, Variant } from './@types/button';
|
|
4
5
|
interface ButtonGroupContextType {
|
|
5
6
|
variant?: Variant;
|
|
@@ -10,13 +11,13 @@ interface ButtonGroupContextType {
|
|
|
10
11
|
inactive?: Intent;
|
|
11
12
|
value?: string | string[];
|
|
12
13
|
}
|
|
13
|
-
type
|
|
14
|
-
type SingleToggleGroupProps = Omit<
|
|
14
|
+
type ToggleGroupProps = React.ComponentProps<typeof ToggleGroup>;
|
|
15
|
+
type SingleToggleGroupProps = Omit<ToggleGroupProps, 'multiple' | 'value' | 'onValueChange'> & {
|
|
15
16
|
type: 'single';
|
|
16
17
|
value?: string;
|
|
17
18
|
onValueChange?: (value: string) => void;
|
|
18
19
|
};
|
|
19
|
-
type MultipleToggleGroupProps = Omit<
|
|
20
|
+
type MultipleToggleGroupProps = Omit<ToggleGroupProps, 'multiple' | 'value' | 'onValueChange'> & {
|
|
20
21
|
type: 'multiple';
|
|
21
22
|
value?: string[];
|
|
22
23
|
onValueChange?: (value: string[]) => void;
|
|
@@ -26,12 +27,13 @@ export type ButtonGroupProps = (SingleToggleGroupProps | MultipleToggleGroupProp
|
|
|
26
27
|
ref?: Ref<HTMLDivElement>;
|
|
27
28
|
} & ButtonGroupContextType;
|
|
28
29
|
declare const ButtonGroup: ({ className, variant, size, ripple, expandToFit, active, inactive, type, onValueChange, value, defaultValue, children, ref, ...props }: ButtonGroupProps) => React.JSX.Element;
|
|
29
|
-
type ButtonGroupItemProps =
|
|
30
|
+
type ButtonGroupItemProps = Omit<React.ComponentProps<typeof Toggle>, 'className'> & {
|
|
31
|
+
className?: string;
|
|
30
32
|
ref?: Ref<HTMLButtonElement>;
|
|
31
33
|
} & ButtonGroupContextType;
|
|
32
34
|
declare const ButtonGroupItem: {
|
|
33
35
|
({ className, children, value, ref, ...props }: ButtonGroupItemProps): React.JSX.Element;
|
|
34
|
-
displayName: string
|
|
36
|
+
displayName: string;
|
|
35
37
|
};
|
|
36
38
|
export { ButtonGroup, ButtonGroupItem };
|
|
37
39
|
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAKzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE1E,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC1B;AAWD,KAAK,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AAGhE,KAAK,sBAAsB,GAAG,IAAI,CAChC,gBAAgB,EAChB,UAAU,GAAG,OAAO,GAAG,eAAe,CACvC,GAAG;IACF,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC,CAAA;AAED,KAAK,wBAAwB,GAAG,IAAI,CAClC,gBAAgB,EAChB,UAAU,GAAG,OAAO,GAAG,eAAe,CACvC,GAAG;IACF,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,sBAAsB,GAAG,wBAAwB,CAAC,GAAG;IACnF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IAClD,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,GAAG,sBAAsB,CAAA;AAG1B,QAAA,MAAM,WAAW,GAAI,wIAelB,gBAAgB,sBAoClB,CAAA;AAID,KAAK,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG;IACnF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,GAAG,sBAAsB,CAAA;AAE1B,QAAA,MAAM,eAAe;oDAAmD,oBAAoB;;CAyB3F,CAAA;AAID,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import react from "react";
|
|
4
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
5
|
+
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
4
6
|
import classnames from "classnames";
|
|
5
|
-
import { ToggleGroup } from "radix-ui";
|
|
6
7
|
import { Button } from "./button.js";
|
|
7
8
|
import button_group_module from "./button-group.module.js";
|
|
8
9
|
const ButtonGroupContext = /*#__PURE__*/ react.createContext({
|
|
@@ -14,33 +15,23 @@ const ButtonGroupContext = /*#__PURE__*/ react.createContext({
|
|
|
14
15
|
inactive: 'noeffect'
|
|
15
16
|
});
|
|
16
17
|
const ButtonGroup = ({ className, variant = 'filled', size = 'md', ripple = true, expandToFit = false, active = 'primary', inactive = 'noeffect', type, onValueChange, value, defaultValue, children, ref, ...props })=>{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
inactive,
|
|
33
|
-
value
|
|
34
|
-
},
|
|
35
|
-
children: children
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
return /*#__PURE__*/ jsx(ToggleGroup.Root, {
|
|
39
|
-
type: "single",
|
|
40
|
-
value: value,
|
|
41
|
-
defaultValue: defaultValue,
|
|
18
|
+
const isMultiple = 'multiple' === type;
|
|
19
|
+
const handleValueChange = (newValue, event)=>{
|
|
20
|
+
if (!onValueChange) return;
|
|
21
|
+
isMultiple ? onValueChange(newValue) : onValueChange(newValue[0] ?? '');
|
|
22
|
+
};
|
|
23
|
+
const normalizedValue = null == value ? void 0 : Array.isArray(value) ? value : [
|
|
24
|
+
value
|
|
25
|
+
];
|
|
26
|
+
const normalizedDefault = null == defaultValue ? void 0 : Array.isArray(defaultValue) ? defaultValue : [
|
|
27
|
+
defaultValue
|
|
28
|
+
];
|
|
29
|
+
return /*#__PURE__*/ jsx(ToggleGroup, {
|
|
30
|
+
multiple: isMultiple,
|
|
31
|
+
defaultValue: normalizedDefault,
|
|
32
|
+
value: normalizedValue,
|
|
42
33
|
ref: ref,
|
|
43
|
-
onValueChange:
|
|
34
|
+
onValueChange: handleValueChange,
|
|
44
35
|
className: classnames(button_group_module["button-group"], className),
|
|
45
36
|
...props,
|
|
46
37
|
children: /*#__PURE__*/ jsx(ButtonGroupContext, {
|
|
@@ -57,25 +48,24 @@ const ButtonGroup = ({ className, variant = 'filled', size = 'md', ripple = true
|
|
|
57
48
|
})
|
|
58
49
|
});
|
|
59
50
|
};
|
|
60
|
-
ButtonGroupContext.displayName =
|
|
51
|
+
ButtonGroupContext.displayName = 'ButtonGroup';
|
|
61
52
|
const ButtonGroupItem = ({ className, children, value, ref, ...props })=>{
|
|
62
53
|
const context = react.useContext(ButtonGroupContext);
|
|
63
54
|
const active = Array.isArray(context.value) ? context.value.includes(value) : context.value === value;
|
|
64
|
-
return /*#__PURE__*/ jsx(
|
|
65
|
-
asChild: true,
|
|
55
|
+
return /*#__PURE__*/ jsx(Toggle, {
|
|
66
56
|
value: value,
|
|
67
57
|
ref: ref,
|
|
68
|
-
|
|
69
|
-
children: /*#__PURE__*/ jsx(Button, {
|
|
58
|
+
render: /*#__PURE__*/ jsx(Button, {
|
|
70
59
|
className: className,
|
|
71
60
|
fullWidth: context.expandToFit,
|
|
72
61
|
variant: context.variant,
|
|
73
62
|
intent: active ? context.active : context.inactive,
|
|
74
63
|
size: context.size,
|
|
75
|
-
ripple: context.ripple
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
ripple: context.ripple
|
|
65
|
+
}),
|
|
66
|
+
...props,
|
|
67
|
+
children: children
|
|
78
68
|
});
|
|
79
69
|
};
|
|
80
|
-
ButtonGroupItem.displayName =
|
|
70
|
+
ButtonGroupItem.displayName = 'ButtonGroupItem';
|
|
81
71
|
export { ButtonGroup, ButtonGroupItem };
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
3
|
import type { Intent, Size, Variant } from './@types/button.js';
|
|
3
|
-
export type
|
|
4
|
-
type AsButton = {
|
|
5
|
-
asChild?: false;
|
|
6
|
-
} & React.ComponentPropsWithoutRef<'button'>;
|
|
7
|
-
interface AsSlot {
|
|
8
|
-
asChild?: true;
|
|
9
|
-
}
|
|
10
|
-
export type ButtonProps<C extends React.ElementType = 'button'> = {
|
|
4
|
+
export type ButtonProps = useRender.ComponentProps<'button'> & {
|
|
11
5
|
variant?: Variant;
|
|
12
6
|
size?: Size;
|
|
13
7
|
type?: 'submit' | 'reset' | 'button';
|
|
@@ -15,9 +9,8 @@ export type ButtonProps<C extends React.ElementType = 'button'> = {
|
|
|
15
9
|
fullWidth?: boolean;
|
|
16
10
|
ripple?: boolean;
|
|
17
11
|
className?: string;
|
|
18
|
-
children
|
|
19
|
-
ref?: React.
|
|
20
|
-
} &
|
|
21
|
-
export declare const Button:
|
|
22
|
-
export {};
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
14
|
+
} & React.HTMLAttributes<HTMLElement>;
|
|
15
|
+
export declare const Button: ({ variant, size, type, intent, fullWidth, ripple, className, children, render, ref, ...rest }: ButtonProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
23
16
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE/D,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CACnC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAErC,eAAO,MAAM,MAAM,GAAI,+FAYpB,WAAW,2EAiCb,CAAA"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import classnames from "classnames";
|
|
5
|
-
import
|
|
5
|
+
import { Ripple } from "../../lib/ripple.js";
|
|
6
6
|
import button_module from "./button.module.js";
|
|
7
|
-
const Button = ({ variant = 'filled', size = 'md', type = 'button', intent = 'primary', fullWidth = false, ripple = true, className, children,
|
|
8
|
-
const
|
|
9
|
-
|
|
7
|
+
const Button = ({ variant = 'filled', size = 'md', type = 'button', intent = 'primary', fullWidth = false, ripple = true, className, children, render, ref, ...rest })=>{
|
|
8
|
+
const defaultProps = {
|
|
9
|
+
type,
|
|
10
|
+
className: classnames('infonomic-button', `infonomic-button-${intent}`, `infonomic-button-${variant}`, `infonomic-button-${size}`, button_module.button, button_module[variant], button_module[size], button_module[intent], {
|
|
11
|
+
[button_module.fullWidth]: true === fullWidth
|
|
12
|
+
}, className),
|
|
13
|
+
children
|
|
14
|
+
};
|
|
10
15
|
if (true === ripple) {
|
|
11
|
-
const rippleEffect = new
|
|
12
|
-
onMouseDown = (e)=>{
|
|
13
|
-
if (rest.onMouseDown) rest.onMouseDown(e);
|
|
16
|
+
const rippleEffect = new Ripple();
|
|
17
|
+
defaultProps.onMouseDown = (e)=>{
|
|
14
18
|
rippleEffect.create(e, 'filled' === variant || 'gradient' === variant ? 'light' : 'dark');
|
|
15
19
|
};
|
|
16
20
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, className),
|
|
23
|
-
onMouseDown: onMouseDown,
|
|
24
|
-
...rest,
|
|
25
|
-
children: children
|
|
21
|
+
const element = useRender({
|
|
22
|
+
defaultTagName: 'button',
|
|
23
|
+
render,
|
|
24
|
+
ref,
|
|
25
|
+
props: mergeProps(defaultProps, rest)
|
|
26
26
|
});
|
|
27
|
+
return element;
|
|
27
28
|
};
|
|
28
29
|
export { Button };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
+
|
|
9
10
|
.button,
|
|
10
11
|
:global(.infonomic-button) {
|
|
11
12
|
border: none;
|
|
@@ -18,11 +19,11 @@
|
|
|
18
19
|
align-items: center;
|
|
19
20
|
white-space: nowrap;
|
|
20
21
|
justify-content: center;
|
|
21
|
-
outline:
|
|
22
|
+
outline: 1px solid transparent;
|
|
22
23
|
outline-offset: 2px;
|
|
23
24
|
transition:
|
|
24
25
|
background-color var(--transition-normal),
|
|
25
|
-
|
|
26
|
+
outline-color var(--transition-normal);
|
|
26
27
|
border-radius: var(--border-radius-sm);
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -37,10 +38,7 @@
|
|
|
37
38
|
.button:active,
|
|
38
39
|
:global(.infonomic-button):focus,
|
|
39
40
|
:global(.infonomic-button):active {
|
|
40
|
-
|
|
41
|
-
--ring-offset-shadow: var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
|
|
42
|
-
--ring-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
43
|
-
box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000);
|
|
41
|
+
outline-color: var(--ring-color);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
.button.square,
|
|
@@ -116,14 +114,10 @@
|
|
|
116
114
|
.filled[disabled],
|
|
117
115
|
:global(.infonomic-button-filled):disabled,
|
|
118
116
|
:global(.infonomic-button-filled)[disabled] {
|
|
119
|
-
background-color: var(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
color: var(
|
|
124
|
-
--button-variant-filled-foreground-disabled,
|
|
125
|
-
oklch(from var(--button-variant-filled-foreground) calc(l * 0.9) calc(c * 0.85) h)
|
|
126
|
-
);
|
|
117
|
+
background-color: var(--button-variant-filled-disabled,
|
|
118
|
+
oklch(from var(--button-variant-filled) calc(l * 1.1) calc(c * 0.85) h));
|
|
119
|
+
color: var(--button-variant-filled-foreground-disabled,
|
|
120
|
+
oklch(from var(--button-variant-filled-foreground) calc(l * 0.9) calc(c * 0.85) h));
|
|
127
121
|
}
|
|
128
122
|
|
|
129
123
|
/* -------------------------------------------------------- */
|
|
@@ -151,14 +145,10 @@
|
|
|
151
145
|
.filled-weak[disabled],
|
|
152
146
|
:global(.infonomic-button-filled-weak):disabled,
|
|
153
147
|
:global(.infonomic-button-filled-weak)[disabled] {
|
|
154
|
-
background-color: var(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
color: var(
|
|
159
|
-
--button-variant-filled-weak-foreground-disabled,
|
|
160
|
-
oklch(from var(--button-variant-filled-weak-foreground) calc(l * 0.9) calc(c * 0.85) h)
|
|
161
|
-
);
|
|
148
|
+
background-color: var(--button-variant-filled-weak-disabled,
|
|
149
|
+
oklch(from var(--button-variant-filled-weak) calc(l * 1.1) calc(c * 0.85) h));
|
|
150
|
+
color: var(--button-variant-filled-weak-foreground-disabled,
|
|
151
|
+
oklch(from var(--button-variant-filled-weak-foreground) calc(l * 0.9) calc(c * 0.85) h));
|
|
162
152
|
}
|
|
163
153
|
|
|
164
154
|
.outlined,
|
|
@@ -172,14 +162,10 @@
|
|
|
172
162
|
.outlined[disabled],
|
|
173
163
|
:global(.infonomic-button-outlined):disabled,
|
|
174
164
|
:global(.infonomic-button-outlined)[disabled] {
|
|
175
|
-
border-color: var(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
color: var(
|
|
180
|
-
--button-variant-outlined-foreground-disabled,
|
|
181
|
-
oklch(from var(--button-variant-outlined-foreground) calc(l * 1.1) calc(c * 0.7) h)
|
|
182
|
-
);
|
|
165
|
+
border-color: var(--button-variant-outlined-border-disabled,
|
|
166
|
+
oklch(from var(--button-variant-outlined-border) calc(l * 1.5) calc(c * 0.8) h));
|
|
167
|
+
color: var(--button-variant-outlined-foreground-disabled,
|
|
168
|
+
oklch(from var(--button-variant-outlined-foreground) calc(l * 1.1) calc(c * 0.7) h));
|
|
183
169
|
}
|
|
184
170
|
|
|
185
171
|
.outlined:hover,
|
|
@@ -197,11 +183,9 @@
|
|
|
197
183
|
.gradient,
|
|
198
184
|
:global(.infonomic-button-gradient) {
|
|
199
185
|
color: var(--button-variant-gradient-foreground);
|
|
200
|
-
background: linear-gradient(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
var(--button-variant-gradient-end)
|
|
204
|
-
);
|
|
186
|
+
background: linear-gradient(45deg,
|
|
187
|
+
var(--button-variant-gradient-start),
|
|
188
|
+
var(--button-variant-gradient-end));
|
|
205
189
|
}
|
|
206
190
|
|
|
207
191
|
.gradient:disabled,
|
|
@@ -209,24 +193,18 @@
|
|
|
209
193
|
:global(.infonomic-button-gradient):disabled,
|
|
210
194
|
:global(.infonomic-button-gradient)[disabled] {
|
|
211
195
|
background: unset;
|
|
212
|
-
background-color: var(
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
color: var(
|
|
217
|
-
--button-variant-gradient-foreground-disabled,
|
|
218
|
-
oklch(from var(--button-variant-gradient-foreground) calc(l * 0.9) calc(c * 0.85) h)
|
|
219
|
-
);
|
|
196
|
+
background-color: var(--button-variant-gradient-disabled,
|
|
197
|
+
oklch(from var(--button-variant-gradient-end) calc(l * 1.2) calc(c * 0.85) h));
|
|
198
|
+
color: var(--button-variant-gradient-foreground-disabled,
|
|
199
|
+
oklch(from var(--button-variant-gradient-foreground) calc(l * 0.9) calc(c * 0.85) h));
|
|
220
200
|
}
|
|
221
201
|
|
|
222
202
|
.gradient:hover,
|
|
223
203
|
:global(.infonomic-button-gradient):hover {
|
|
224
204
|
color: var(--button-variant-gradient-foreground);
|
|
225
|
-
background: linear-gradient(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var(--button-variant-gradient-end)
|
|
229
|
-
);
|
|
205
|
+
background: linear-gradient(45deg,
|
|
206
|
+
var(--button-variant-gradient-start),
|
|
207
|
+
var(--button-variant-gradient-end));
|
|
230
208
|
}
|
|
231
209
|
|
|
232
210
|
.gradient:focus,
|
|
@@ -542,4 +520,4 @@
|
|
|
542
520
|
width: 100%;
|
|
543
521
|
display: flex;
|
|
544
522
|
}
|
|
545
|
-
}
|
|
523
|
+
}
|