@loja-integrada/admin-components 0.9.6 → 0.9.7
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/Button/Button.d.ts +1 -1
- package/dist/Forms/Checkbox/Checkbox.d.ts +1 -1
- package/dist/admin-components.cjs.development.js +18 -6
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +18 -6
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/Button/Button.tsx +6 -0
- package/src/Forms/Checkbox/Checkbox.tsx +10 -2
|
@@ -15,7 +15,7 @@ export interface ButtonProps extends ButtonAnchorProps {
|
|
|
15
15
|
/** Button variant
|
|
16
16
|
* @default primary
|
|
17
17
|
* */
|
|
18
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'info' | 'warning' | 'danger' | 'outline';
|
|
18
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'info' | 'warning' | 'danger' | 'outline' | 'onlyText';
|
|
19
19
|
/**
|
|
20
20
|
* Button is loading
|
|
21
21
|
* */
|
|
@@ -3,5 +3,5 @@ export declare const Checkbox: React.MemoExoticComponent<React.ForwardRefExoticC
|
|
|
3
3
|
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
label?: string | React.ReactNode;
|
|
5
5
|
indeterminate?: boolean;
|
|
6
|
-
boxAlign?: 'center' | 'baseline';
|
|
6
|
+
boxAlign?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
7
7
|
}
|
|
@@ -581,7 +581,8 @@ var listOfStylesHover = {
|
|
|
581
581
|
info: "hover:bg-secondary-bold",
|
|
582
582
|
warning: "hover:bg-warning-dark",
|
|
583
583
|
danger: "hover:bg-danger-dark",
|
|
584
|
-
outline: "hover:bg-primary-light"
|
|
584
|
+
outline: "hover:bg-primary-light",
|
|
585
|
+
onlyText: "hover:bg-base-2"
|
|
585
586
|
};
|
|
586
587
|
var listOfStylesActive = {
|
|
587
588
|
primary: "active:bg-primary-bold",
|
|
@@ -589,13 +590,15 @@ var listOfStylesActive = {
|
|
|
589
590
|
tertiary: "active:bg-tertiary-bold",
|
|
590
591
|
warning: "active:bg-warning-bold",
|
|
591
592
|
danger: "hover:bg-danger-bold",
|
|
592
|
-
outline: "active:shadow-inner active:bg-base-1"
|
|
593
|
+
outline: "active:shadow-inner active:bg-base-1",
|
|
594
|
+
onlyText: "active:bg-base-1"
|
|
593
595
|
};
|
|
594
596
|
var listOfStylesFocus = {
|
|
595
597
|
primary: "focus:ring-1 focus:ring-primary-dark focus:ring-opacity-50",
|
|
596
598
|
secondary: "focus:ring focus:ring-focus",
|
|
597
599
|
danger: "focus:ring-1 focus:ring-danger-dark",
|
|
598
|
-
outline: "focus:ring-2 focus:ring-focus focus:ring-offset-1"
|
|
600
|
+
outline: "focus:ring-2 focus:ring-focus focus:ring-offset-1",
|
|
601
|
+
onlyText: "focus:bg-base-1"
|
|
599
602
|
};
|
|
600
603
|
var listOfStyles = {
|
|
601
604
|
primary: "bg-primary text-base-1 " + listOfStylesHover['primary'] + " " + listOfStylesActive['primary'] + " " + listOfStylesFocus['primary'],
|
|
@@ -604,7 +607,8 @@ var listOfStyles = {
|
|
|
604
607
|
info: "bg-secondary-dark text-base-1 " + listOfStylesHover['info'],
|
|
605
608
|
warning: "bg-warning text-on-base " + listOfStylesHover['warning'] + " " + listOfStylesActive['warning'],
|
|
606
609
|
danger: "bg-danger text-base-1 " + listOfStylesHover['danger'] + " " + listOfStylesActive['danger'] + " " + listOfStylesFocus['danger'],
|
|
607
|
-
outline: "bg-transparent text-inverted-2 border border-inverted-2 " + listOfStylesHover['outline'] + " " + listOfStylesActive['outline'] + " " + listOfStylesFocus['outline']
|
|
610
|
+
outline: "bg-transparent text-inverted-2 border border-inverted-2 " + listOfStylesHover['outline'] + " " + listOfStylesActive['outline'] + " " + listOfStylesFocus['outline'],
|
|
611
|
+
onlyText: "bg-transparent border-transparent text-inverted-2 px-0 " + listOfStylesHover['onlyText'] + " " + listOfStylesActive['onlyText'] + " " + listOfStylesFocus['onlyText']
|
|
608
612
|
};
|
|
609
613
|
var defaultDisabledStyle = "bg-base-3 cursor-default text-on-base-2 shadow-none ring-0 border-0 hover:bg-base-3 hover:text-on-base-2 ";
|
|
610
614
|
var listOfStylesDisabled = {
|
|
@@ -614,7 +618,8 @@ var listOfStylesDisabled = {
|
|
|
614
618
|
info: defaultDisabledStyle,
|
|
615
619
|
warning: defaultDisabledStyle,
|
|
616
620
|
danger: defaultDisabledStyle,
|
|
617
|
-
outline: defaultDisabledStyle
|
|
621
|
+
outline: defaultDisabledStyle,
|
|
622
|
+
onlyText: "bg-transparent text-on-base-3 shadow-none ring-0 border-0"
|
|
618
623
|
};
|
|
619
624
|
var listOfSizes = {
|
|
620
625
|
small: "text-f7 h-8",
|
|
@@ -1632,9 +1637,16 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1632
1637
|
var checkboxIconClasses = "transition duration-200 ease-in-out " + (isChecked || isIndeterminate ? 'scale-100' : 'scale-0');
|
|
1633
1638
|
var checkboxIconContainerClasses = "border border-card-stroke transition duration-200 ease-in-out\n " + (disabled ? 'bg-base-4' : isChecked || isIndeterminate ? 'bg-primary border-primary' : 'bg-base-1') + "\n " + (isCenterBoxAlign ? 'items-center' : '') + "\n rounded w-4 h-4 flex justify-center m-px\n ";
|
|
1634
1639
|
var checkboxLabelClasses = "ml-1 input-label text-f6 tracking-4 leading-6 " + (disabled ? 'text-inverted-2' : '');
|
|
1640
|
+
var alignOptions = {
|
|
1641
|
+
start: 'items-start',
|
|
1642
|
+
end: 'items-end',
|
|
1643
|
+
center: 'items-center',
|
|
1644
|
+
baseline: 'items-baseline',
|
|
1645
|
+
stretch: 'items-stretch'
|
|
1646
|
+
};
|
|
1635
1647
|
return React__default.createElement("label", {
|
|
1636
1648
|
htmlFor: inputId,
|
|
1637
|
-
className: "inline-flex
|
|
1649
|
+
className: "inline-flex " + alignOptions[boxAlign] + " cursor-pointer"
|
|
1638
1650
|
}, React__default.createElement("span", {
|
|
1639
1651
|
className: "rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
|
|
1640
1652
|
}, React__default.createElement("input", Object.assign({
|