@hardwork-med/hwm-web-ds 0.0.6 → 0.0.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/README.md +2 -8
- package/dist/index.esm.js +4 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Crie ou edite o arquivo **`.npmrc`** no seu projeto:
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
# npm
|
|
26
|
-
npm i @hardwork-med/hwm-web-ds @awesome.me/kit-a7702856b7 @fortawesome/fontawesome-svg-core @fortawesome/react-fontawesome framer-motion
|
|
26
|
+
npm i @hardwork-med/hwm-web-ds '@awesome.me/kit-a7702856b7' @fortawesome/fontawesome-svg-core @fortawesome/react-fontawesome framer-motion clsx
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### 🔑 Usando **YARN** (recomendado: Yarn Berry v2+)
|
|
@@ -59,19 +59,13 @@ Se estiver usando o Yarn v1, além do `.yarnrc.yml` acima, crie também o arquiv
|
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
61
|
# yarn
|
|
62
|
-
yarn add @hardwork-med/hwm-web-ds @awesome.me/kit-a7702856b7 @fortawesome/fontawesome-svg-core @fortawesome/react-fontawesome framer-motion
|
|
62
|
+
yarn add @hardwork-med/hwm-web-ds '@awesome.me/kit-a7702856b7' @fortawesome/fontawesome-svg-core @fortawesome/react-fontawesome framer-motion clsx
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
67
67
|
## 🚀 Uso
|
|
68
68
|
|
|
69
|
-
Antes de utilizar qualquer componente da biblioteca, **importe o CSS global da lib no ponto mais alto da sua aplicação** (como `src/index.tsx` ou `src/layout.tsx`):
|
|
70
|
-
|
|
71
|
-
```tsx
|
|
72
|
-
import '@hardwork-med/hwm-web-ds/dist/index.css'
|
|
73
|
-
```
|
|
74
|
-
|
|
75
69
|
Exemplo com o componente `Icon`:
|
|
76
70
|
|
|
77
71
|
```tsx
|
package/dist/index.esm.js
CHANGED
|
@@ -29,22 +29,20 @@ function styleInject(css, ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var css_248z = "/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--tw-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--tw-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--tw-default-transition-duration:150ms;--tw-default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--tw-default-font-family:var(--tw-font-sans);--tw-default-mono-font-family:var(--tw-font-mono)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--tw-default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--tw-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-variation-settings:var(--tw-default-font-variation-settings,normal);line-height:1.5;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--tw-default-mono-font-feature-settings,normal);font-family:var(--tw-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-size:1em;font-variation-settings:var(--tw-default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:transparent;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.tw\\:transition-all{transition-duration:var(--tw-duration,var(--tw-default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function))}}@layer utilities{.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}[data-theme-area=CM]{--color-theme-area-base:var(--color-area-cm)}[data-theme-area=CG]{--color-theme-area-base:var(--color-area-cg)}[data-theme-area=GO]{--color-theme-area-base:var(--color-area-go)}[data-theme-area=PD]{--color-theme-area-base:var(--color-area-pd)}[data-theme-area=MP]{--color-theme-area-base:var(--color-area-mp)}.default-click-animation{cursor:pointer;transition-duration:var(--tw-duration,var(--tw-default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function));&:hover{@media (hover:hover){--tw-scale-x:98%;--tw-scale-y:98%;--tw-scale-z:98%;scale:var(--tw-scale-x) var(--tw-scale-y)}}&:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@keyframes progressSuccess{0%{width:0}to{width:100%}}@layer base{*{scrollbar-color:auto;scrollbar-width:auto}}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}";
|
|
32
|
+
var css_248z = "/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--tw-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--tw-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--tw-color-green-500:oklch(72.3% 0.219 149.579);--tw-default-transition-duration:150ms;--tw-default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--tw-default-font-family:var(--tw-font-sans);--tw-default-mono-font-family:var(--tw-font-mono)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--tw-default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--tw-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-variation-settings:var(--tw-default-font-variation-settings,normal);line-height:1.5;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--tw-default-mono-font-feature-settings,normal);font-family:var(--tw-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-size:1em;font-variation-settings:var(--tw-default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:transparent;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.tw\\:text-green-500{color:var(--tw-color-green-500)}.tw\\:transition-all{transition-duration:var(--tw-duration,var(--tw-default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function))}}@layer utilities{.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}[data-theme-area=CM]{--color-theme-area-base:var(--color-area-cm)}[data-theme-area=CG]{--color-theme-area-base:var(--color-area-cg)}[data-theme-area=GO]{--color-theme-area-base:var(--color-area-go)}[data-theme-area=PD]{--color-theme-area-base:var(--color-area-pd)}[data-theme-area=MP]{--color-theme-area-base:var(--color-area-mp)}.default-click-animation{cursor:pointer;transition-duration:var(--tw-duration,var(--tw-default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function));&:hover{@media (hover:hover){--tw-scale-x:98%;--tw-scale-y:98%;--tw-scale-z:98%;scale:var(--tw-scale-x) var(--tw-scale-y)}}&:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@keyframes progressSuccess{0%{width:0}to{width:100%}}@layer base{*{scrollbar-color:auto;scrollbar-width:auto}}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}";
|
|
33
33
|
styleInject(css_248z,{"insertAt":"top"});
|
|
34
34
|
|
|
35
35
|
function Icon({ fontSize = 14, duotone = false, duotoneColor, primaryOpacity = 1, secondaryOpacity = 0.4, ...props }) {
|
|
36
|
-
const defaultDuotoneColor = ['#fff', '#fff'];
|
|
37
36
|
const styles = {
|
|
38
37
|
...props.style,
|
|
39
|
-
fontSize,
|
|
40
38
|
...(duotone && {
|
|
41
|
-
['--fa-primary-color']: !!duotoneColor
|
|
42
|
-
['--fa-secondary-color']: !!duotoneColor &&
|
|
39
|
+
['--fa-primary-color']: !!duotoneColor ? duotoneColor[0] : undefined,
|
|
40
|
+
['--fa-secondary-color']: !!duotoneColor && duotoneColor[1] ? duotoneColor[1] : undefined,
|
|
43
41
|
['--fa-primary-opacity']: primaryOpacity,
|
|
44
42
|
['--fa-secondary-opacity']: secondaryOpacity
|
|
45
43
|
})
|
|
46
44
|
};
|
|
47
|
-
return (jsx(FontAwesomeIcon, { ...props, style: styles, className: clsx(props.className, 'tw:transition-all') }));
|
|
45
|
+
return (jsx(FontAwesomeIcon, { ...props, fontSize: fontSize, style: styles, className: clsx(props.className, 'tw:transition-all') }));
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
export { Icon };
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/common/Icon/Icon.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import clsx from 'clsx'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport type { IconProps } from './Icon.types'\n\nexport default function Icon({\n fontSize = 14,\n duotone = false,\n duotoneColor,\n primaryOpacity = 1,\n secondaryOpacity = 0.4,\n ...props\n}: IconProps) {\n
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/common/Icon/Icon.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import clsx from 'clsx'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport type { IconProps } from './Icon.types'\n\nconst defaultDuotoneColor = ['#fff', '#fff']\n\nexport default function Icon({\n fontSize = 14,\n duotone = false,\n duotoneColor,\n primaryOpacity = 1,\n secondaryOpacity = 0.4,\n ...props\n}: IconProps) {\n\n const styles = {\n ...props.style,\n ...(duotone && {\n ['--fa-primary-color' as any]: !!duotoneColor ? duotoneColor[0] : undefined,\n ['--fa-secondary-color' as any]: !!duotoneColor && duotoneColor[1] ? duotoneColor[1] : undefined,\n ['--fa-primary-opacity' as any]: primaryOpacity,\n ['--fa-secondary-opacity' as any]: secondaryOpacity\n })\n }\n\n return (\n <FontAwesomeIcon\n {...props}\n fontSize={fontSize}\n style={styles}\n className={clsx(\n props.className,\n 'tw:transition-all'\n )}\n />\n )\n}\n"],"names":["_jsx"],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;;;;ACnBc,SAAU,IAAI,CAAC,EACzB,QAAQ,GAAG,EAAE,EACb,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,cAAc,GAAG,CAAC,EAClB,gBAAgB,GAAG,GAAG,EACtB,GAAG,KAAK,EACA,EAAA;AAER,IAAA,MAAM,MAAM,GAAG;QACX,GAAG,KAAK,CAAC,KAAK;QACd,IAAI,OAAO,IAAI;AACX,YAAA,CAAC,oBAA2B,GAAG,CAAC,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS;YAC3E,CAAC,sBAA6B,GAAG,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS;YAChG,CAAC,sBAA6B,GAAG,cAAc;YAC/C,CAAC,wBAA+B,GAAG;SACtC;KACJ;IAED,QACIA,GAAA,CAAC,eAAe,EAAA,EAAA,GACR,KAAK,EACT,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,IAAI,CACX,KAAK,CAAC,SAAS,EACf,mBAAmB,CACtB,EAAA,CACH;AAEV;;;;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED