@ufal-lccv/gpsub-ds 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +31 -31
  2. package/dist/{RequiredLabel.view-vhY8Ifny.js → RequiredLabel.view-CozPA47g.js} +26 -25
  3. package/dist/RequiredLabel.view-Cst1Xi0O.cjs +1 -0
  4. package/dist/{Table.view-DrGCSijo.js → Table.view-CraTHYN6.js} +37 -37
  5. package/dist/{Table.view-Cq1l_7IE.cjs → Table.view-oMq7rOZT.cjs} +9 -10
  6. package/dist/Title.view-BqxGXSW7.cjs +1 -0
  7. package/dist/Title.view-DY1vs-iO.js +54 -0
  8. package/dist/Tooltip.view-7yR4bqF1.cjs +1455 -0
  9. package/dist/{Tooltip.view-B2Qudmep.js → Tooltip.view-Cao5yOMP.js} +2351 -2177
  10. package/dist/components/atoms/LibraryCard/LibraryCard.view.d.ts +6 -2
  11. package/dist/components/atoms/LoadingBar/LoadingBar.styles.d.ts +1 -0
  12. package/dist/components/atoms/Tooltip/Tooltip.view.d.ts +4 -2
  13. package/dist/components/atoms/index.cjs.js +1 -1
  14. package/dist/components/atoms/index.es.js +9 -9
  15. package/dist/components/index.cjs.js +1 -1
  16. package/dist/components/index.es.js +35 -31
  17. package/dist/components/molecules/ActionButton/ActionButton.view.d.ts +1 -1
  18. package/dist/components/molecules/Alert/Alert.view.d.ts +1 -0
  19. package/dist/components/molecules/Alert/index.d.ts +1 -0
  20. package/dist/components/molecules/AlertInline/AlertInline.view.d.ts +1 -1
  21. package/dist/components/molecules/Confirm/ConfirmModal.view.d.ts +1 -1
  22. package/dist/components/molecules/Empty/Empty.types.d.ts +2 -1
  23. package/dist/components/molecules/Loading/Loading.view.d.ts +1 -1
  24. package/dist/components/molecules/Modal/DefaultFooter/DefaultFooter.types.d.ts +10 -0
  25. package/dist/components/molecules/Modal/DefaultFooter/DefaultFooter.view.d.ts +3 -0
  26. package/dist/components/molecules/Modal/DefaultFooter/index.d.ts +2 -0
  27. package/dist/components/molecules/Modal/Modal.view.d.ts +5 -1
  28. package/dist/components/molecules/MultiSelect/MultiSelect.view.d.ts +1 -0
  29. package/dist/components/molecules/MultiSelect/index.d.ts +1 -0
  30. package/dist/components/molecules/index.cjs.js +1 -1
  31. package/dist/components/molecules/index.d.ts +2 -0
  32. package/dist/components/molecules/index.es.js +21 -18
  33. package/dist/components/organisms/Autocomplete/Autocomplete.view.d.ts +1 -0
  34. package/dist/components/organisms/Autocomplete/index.d.ts +1 -0
  35. package/dist/components/organisms/index.cjs.js +1 -1
  36. package/dist/components/organisms/index.d.ts +1 -0
  37. package/dist/components/organisms/index.es.js +13 -11
  38. package/dist/hash-BtT4jVLO.js +25 -0
  39. package/dist/hash-CJrPvUOz.cjs +1 -0
  40. package/dist/helpers/functions/getLabelText.d.ts +2 -0
  41. package/dist/helpers/functions/index.d.ts +1 -0
  42. package/dist/helpers/index.cjs.js +1 -1
  43. package/dist/helpers/index.es.js +10 -18
  44. package/dist/index.cjs.js +1 -1
  45. package/dist/index.es.js +44 -39
  46. package/dist/types/baseProps.d.ts +8 -0
  47. package/dist/types/icons.d.ts +1 -0
  48. package/dist/types/styleGuide/index.d.ts +174 -0
  49. package/dist/types/styleGuide/position.d.ts +1 -0
  50. package/package.json +121 -120
  51. package/dist/RequiredLabel.view-Dn02h8aL.cjs +0 -1
  52. package/dist/Title.view-Bw6K4U1v.cjs +0 -1
  53. package/dist/Title.view-lFI_ZPGv.js +0 -74
  54. package/dist/Tooltip.view-DGl4VmmK.cjs +0 -1456
@@ -3,6 +3,180 @@ import * as direction from './direction';
3
3
  import * as icon from './icon';
4
4
  import * as position from './position';
5
5
  declare const _default: {
6
+ sg: Readonly<{
7
+ fonts: {
8
+ fontFamily: {
9
+ fontFamilyPrimary: string;
10
+ fontFamilySecondary: string;
11
+ fontFamilyAuxiliary: string;
12
+ };
13
+ fontWeight: {
14
+ fontWeightLight: number;
15
+ fontWeightRegular: number;
16
+ fontWeightSemiBold: number;
17
+ fontWeightBold: number;
18
+ };
19
+ fontSize: {
20
+ fontSizeBodySm: string;
21
+ fontSizeBodyMd: string;
22
+ fontSizeBodyLg: string;
23
+ fontSizeTitleSm: string;
24
+ fontSizeTitleMd: string;
25
+ fontSizeTitleLg: string;
26
+ fontSizeH3: string;
27
+ fontSizeH2: string;
28
+ fontSizeH1: string;
29
+ };
30
+ lineHeight: {
31
+ lineHeightSm: (fontSize: string) => string;
32
+ lineHeightMd: (fontSize: string) => string;
33
+ lineHeightLg: (fontSize: string) => string;
34
+ };
35
+ };
36
+ icons: {
37
+ iconSizeXl: string;
38
+ iconSizeLg: string;
39
+ iconSizeMd: string;
40
+ iconSizeAnt: string;
41
+ iconSizeSm: string;
42
+ iconSizeXs: string;
43
+ };
44
+ avatars: {
45
+ avatarSizeLg: string;
46
+ avatarSizeMd: string;
47
+ avatarSizeSm: string;
48
+ avatarSizeXs: string;
49
+ avatarSizeNano: string;
50
+ };
51
+ borders: {
52
+ borderRadius: {
53
+ borderRadiusNone: string;
54
+ borderExtraSmall: string;
55
+ borderRadiusSm: string;
56
+ borderRadiusMd: string;
57
+ borderRadiusLg: string;
58
+ borderRadiusPill: string;
59
+ borderRadiusXs: string;
60
+ };
61
+ borderWidth: {
62
+ borderWidthNone: string;
63
+ borderWidthThinner: string;
64
+ borderWidthThin: string;
65
+ };
66
+ };
67
+ shadows: {
68
+ shadowLevelNear: string;
69
+ shadowLeveldistant: string;
70
+ shadowLevelAnt: string;
71
+ shadowLevelElevation: string;
72
+ };
73
+ spacings: {
74
+ spacingInset: {
75
+ spacingInsetNano: string;
76
+ spacingInsetXs: string;
77
+ spacingInsetSm: string;
78
+ spacingInsetMd: string;
79
+ spacingInsetLg: string;
80
+ };
81
+ spacingSquish: {
82
+ spacingSquishNano: string;
83
+ spacingSquishXs: string;
84
+ spacingSquishSm: string;
85
+ spacingSquishMd: string;
86
+ spacingSquishLg: string;
87
+ };
88
+ spacingInline: {
89
+ spacingInlineNano: string;
90
+ spacingInlineXs: string;
91
+ spacingInlineAnt: string;
92
+ spacingInlineSm: string;
93
+ spacingInlineMd: string;
94
+ spacingInlineLg: string;
95
+ spacingInlineXl: string;
96
+ spacingInlineGiant: string;
97
+ spacingInlineXGiant: string;
98
+ spacingInlineAwesome: string;
99
+ };
100
+ spacingStack: {
101
+ spacingStackNano: string;
102
+ spacingStackXs: string;
103
+ spacingStackAnt: string;
104
+ spacingStackSm: string;
105
+ spacingStackLowMd: string;
106
+ spacingStackMd: string;
107
+ spacingStackLg: string;
108
+ spacingStackXl: string;
109
+ spacingStackGiant: string;
110
+ spacingStackXGiant: string;
111
+ spacingStackAwesome: string;
112
+ };
113
+ };
114
+ colors: {
115
+ brandColors: {
116
+ colorBrandPrimary: string;
117
+ colorBrandSecondary: string;
118
+ colorBrandSecDark: string;
119
+ colorBrandSeSoft: string;
120
+ colorBrandDark: string;
121
+ colorBrandSoft: string;
122
+ };
123
+ backgroundColors: {
124
+ colorBackgroundSolo: string;
125
+ colorBackgroundSky: string;
126
+ colorBackgroundGrass: string;
127
+ colorBackgroundCarpet: string;
128
+ colorBackgroundSnow: string;
129
+ };
130
+ neutralColors: {
131
+ colorNeutralBlack: string;
132
+ colorNeutralDarkest: string;
133
+ colorNeutralDark: string;
134
+ colorNeutralCloudy: string;
135
+ colorNeutralCleanest: string;
136
+ colorNeutralClean: string;
137
+ colorNeutralSoft: string;
138
+ colorNeutralLighest: string;
139
+ colorNeutralLight: string;
140
+ colorNeutralSnow: string;
141
+ };
142
+ feedbackColors: {
143
+ colorFeedbackError: string;
144
+ colorFeedbackSuccess: string;
145
+ colorFeedbackWarning: string;
146
+ colorFeedbackInfo: string;
147
+ colorFeedbackNeutral: string;
148
+ };
149
+ auxiliariesColors: {
150
+ colorAuxOneDark: string;
151
+ colorAuxTwoDark: string;
152
+ colorAuxThreeDark: string;
153
+ colorAuxFourDark: string;
154
+ colorAuxFiveDark: string;
155
+ colorAuxOneLight: string;
156
+ colorAuxTwoLight: string;
157
+ colorAuxThreeLight: string;
158
+ colorAuxFourLight: string;
159
+ colorAuxFiveLight: string;
160
+ };
161
+ petrobrasColors: {
162
+ colorPetrobrasVerdePetrobras: string;
163
+ colorPetrobrasAmareloPetrobras: string;
164
+ colorPetrobrasVerdeAgua: string;
165
+ colorPetrobrasVerdeClaro: string;
166
+ colorPetrobrasAmareloClaro: string;
167
+ colorPetrobrasLaranja: string;
168
+ colorPetrobrasAzulEscuro: string;
169
+ colorPetrobrasAzulClaro: string;
170
+ colorPetrobrasCinza: string;
171
+ };
172
+ };
173
+ opacityLevels: {
174
+ dark: number;
175
+ clarifying: number;
176
+ clear: number;
177
+ light: number;
178
+ };
179
+ }>;
6
180
  direction: typeof direction;
7
181
  icon: typeof icon;
8
182
  position: typeof position;
@@ -1,3 +1,4 @@
1
1
  export type OrthogonalPositions = 'top' | 'bottom' | 'left' | 'right';
2
2
  export type DiagonalPositions = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
3
+ export type ArrowPositions = 'start' | 'center' | 'end';
3
4
  export type Position = OrthogonalPositions | DiagonalPositions;
package/package.json CHANGED
@@ -1,120 +1,121 @@
1
- {
2
- "name": "@ufal-lccv/gpsub-ds",
3
- "version": "0.0.21",
4
- "type": "module",
5
- "description": "Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/Subweb-LCCV/gpsub-ds.git"
9
- },
10
- "main": "dist/index.cjs.js",
11
- "types": "dist/index.d.ts",
12
- "module": "dist/index.es.js",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/index.es.js",
16
- "require": "./dist/index.cjs.js",
17
- "types": "./dist/index.d.ts"
18
- },
19
- "./components": {
20
- "import": "./dist/components/index.es.js",
21
- "require": "./dist/components/index.cjs.js",
22
- "types": "./dist/components/index.d.ts"
23
- },
24
- "./components/atoms": {
25
- "import": "./dist/components/atoms/index.es.js",
26
- "require": "./dist/components/atoms/index.cjs.js",
27
- "types": "./dist/components/atoms/index.d.ts"
28
- },
29
- "./components/molecules": {
30
- "import": "./dist/components/molecules/index.es.js",
31
- "require": "./dist/components/molecules/index.cjs.js",
32
- "types": "./dist/components/molecules/index.d.ts"
33
- },
34
- "./components/organisms": {
35
- "import": "./dist/components/organisms/index.es.js",
36
- "require": "./dist/components/organisms/index.cjs.js",
37
- "types": "./dist/components/organisms/index.d.ts"
38
- },
39
- "./helpers": {
40
- "import": "./dist/helpers/index.es.js",
41
- "require": "./dist/helpers/index.cjs.js",
42
- "types": "./dist/helpers/index.d.ts"
43
- }
44
- },
45
- "files": [
46
- "dist/",
47
- "dist/components",
48
- "dist/components/atoms",
49
- "dist/components/molecules",
50
- "dist/components/organisms",
51
- "dist/helpers"
52
- ],
53
- "scripts": {
54
- "publish:public": "docker compose run --rm npm run build && npm publish --access public",
55
- "publish:private": "docker compose run --rm npm run build && npm publish --access restricted",
56
- "publish:alpha": "docker compose run --rm npm run build && npm publish --access public --tag alpha",
57
- "clean": "rimraf -rf dist",
58
- "build": "npm run clean && vite build",
59
- "build:watch": "vite build --watch",
60
- "build:publish": "docker compose run --rm npm run build && npm run publish",
61
- "lint": "eslint . --ext .ts,.tsx && tsc",
62
- "lint:fix": "eslint . --ext .ts,.tsx --fix",
63
- "prettier:fix": "prettier --write .",
64
- "prettier:check": "prettier --check ."
65
- },
66
- "keywords": [],
67
- "author": "Eric Macedo Cabral",
68
- "license": "ISC",
69
- "peerDependencies": {
70
- "react": "^18.2.0",
71
- "react-dom": "^18.2.0",
72
- "react-hook-form": "7.55.0",
73
- "sbwb-ds": "1.2.2"
74
- },
75
- "dependencies": {
76
- "debounce": "^1.2.1",
77
- "postmate": "^1.5.2",
78
- "react-datepicker": "^4.18.0",
79
- "react-router-dom": "^6.9.0",
80
- "react-text-mask": "^5.5.0",
81
- "sbwb-icons": "1.2.0",
82
- "styled-components": "^5.3.9"
83
- },
84
- "resolutions": {
85
- "@types/react": "^18.2.0",
86
- "@types/react-dom": "^18.2.0",
87
- "react": "^18.2.0",
88
- "react-dom": "^18.2.0",
89
- "sbwb-ds": "1.2.2"
90
- },
91
- "devDependencies": {
92
- "@babel/core": "^7.21.3",
93
- "@changesets/cli": "^2.29.4",
94
- "@swc/core": "^1.3.40",
95
- "@trivago/prettier-plugin-sort-imports": "^5.2.2",
96
- "@types/node": "^24.0.3",
97
- "@types/react": "^18.2.0",
98
- "@types/react-dom": "^18.2.0",
99
- "@typescript-eslint/eslint-plugin": "^6.4.0",
100
- "@typescript-eslint/parser": "^6.4.0",
101
- "@vitejs/plugin-react": "^4.7.0",
102
- "babel-loader": "^8.3.0",
103
- "eslint": "^8.57.1",
104
- "eslint-config-airbnb-typescript": "^17.1.0",
105
- "eslint-config-prettier": "^8.7.0",
106
- "eslint-config-standard-with-typescript": "^43.0.1",
107
- "eslint-plugin-import": "^2.27.5",
108
- "eslint-plugin-n": "^15.6.1",
109
- "eslint-plugin-promise": "^6.1.1",
110
- "eslint-plugin-react": "^7.32.2",
111
- "prettier": "^3.5.3",
112
- "pretty-quick": "^4.1.1",
113
- "rimraf": "^5.0.10",
114
- "sbwb-ds": "1.2.2",
115
- "typescript": "^5.6.3",
116
- "vite": "^5.4.10",
117
- "vite-plugin-dts": "^4.5.4",
118
- "vite-plugin-svgr": "^4.3.0"
119
- }
120
- }
1
+ {
2
+ "name": "@ufal-lccv/gpsub-ds",
3
+ "version": "0.0.23",
4
+ "type": "module",
5
+ "description": "Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Subweb-LCCV/gpsub-ds.git"
9
+ },
10
+ "main": "dist/index.cjs.js",
11
+ "types": "dist/index.d.ts",
12
+ "module": "dist/index.es.js",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/index.es.js",
16
+ "require": "./dist/index.cjs.js",
17
+ "types": "./dist/index.d.ts"
18
+ },
19
+ "./components": {
20
+ "import": "./dist/components/index.es.js",
21
+ "require": "./dist/components/index.cjs.js",
22
+ "types": "./dist/components/index.d.ts"
23
+ },
24
+ "./components/atoms": {
25
+ "import": "./dist/components/atoms/index.es.js",
26
+ "require": "./dist/components/atoms/index.cjs.js",
27
+ "types": "./dist/components/atoms/index.d.ts"
28
+ },
29
+ "./components/molecules": {
30
+ "import": "./dist/components/molecules/index.es.js",
31
+ "require": "./dist/components/molecules/index.cjs.js",
32
+ "types": "./dist/components/molecules/index.d.ts"
33
+ },
34
+ "./components/organisms": {
35
+ "import": "./dist/components/organisms/index.es.js",
36
+ "require": "./dist/components/organisms/index.cjs.js",
37
+ "types": "./dist/components/organisms/index.d.ts"
38
+ },
39
+ "./helpers": {
40
+ "import": "./dist/helpers/index.es.js",
41
+ "require": "./dist/helpers/index.cjs.js",
42
+ "types": "./dist/helpers/index.d.ts"
43
+ }
44
+ },
45
+ "files": [
46
+ "dist/",
47
+ "dist/components",
48
+ "dist/components/atoms",
49
+ "dist/components/molecules",
50
+ "dist/components/organisms",
51
+ "dist/helpers"
52
+ ],
53
+ "scripts": {
54
+ "publish:public": "docker compose run --rm npm run build && npm publish --access public",
55
+ "publish:private": "docker compose run --rm npm run build && npm publish --access restricted",
56
+ "publish:alpha": "docker compose run --rm npm run build && npm publish --access public --tag alpha",
57
+ "clean": "rimraf -rf dist",
58
+ "build": "npm run clean && vite build",
59
+ "build:watch": "vite build --watch",
60
+ "build:publish": "docker compose run --rm npm run build && npm run publish",
61
+ "lint": "eslint . --ext .ts,.tsx && tsc",
62
+ "lint:fix": "eslint . --ext .ts,.tsx --fix",
63
+ "prettier:fix": "prettier --write .",
64
+ "prettier:check": "prettier --check ."
65
+ },
66
+ "keywords": [],
67
+ "author": "Eric Macedo Cabral",
68
+ "license": "ISC",
69
+ "peerDependencies": {
70
+ "react": "^18.2.0",
71
+ "react-dom": "^18.2.0",
72
+ "react-hook-form": "7.55.0",
73
+ "sbwb-ds": "1.2.2",
74
+ "sbwb-ds-latest": "npm:sbwb-ds@^3.18.0"
75
+ },
76
+ "dependencies": {
77
+ "debounce": "^1.2.1",
78
+ "postmate": "^1.5.2",
79
+ "react-datepicker": "^4.18.0",
80
+ "react-router-dom": "^6.9.0",
81
+ "react-text-mask": "^5.5.0",
82
+ "sbwb-icons": "1.2.0",
83
+ "styled-components": "^5.3.9"
84
+ },
85
+ "resolutions": {
86
+ "@types/react": "^18.2.0",
87
+ "@types/react-dom": "^18.2.0",
88
+ "react": "^18.2.0",
89
+ "react-dom": "^18.2.0",
90
+ "sbwb-ds": "1.2.2"
91
+ },
92
+ "devDependencies": {
93
+ "@babel/core": "^7.21.3",
94
+ "@changesets/cli": "^2.29.4",
95
+ "@swc/core": "^1.3.40",
96
+ "@trivago/prettier-plugin-sort-imports": "^5.2.2",
97
+ "@types/node": "^24.0.3",
98
+ "@types/react": "^18.2.0",
99
+ "@types/react-dom": "^18.2.0",
100
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
101
+ "@typescript-eslint/parser": "^6.4.0",
102
+ "@vitejs/plugin-react": "^4.7.0",
103
+ "babel-loader": "^8.3.0",
104
+ "eslint": "^8.57.1",
105
+ "eslint-config-airbnb-typescript": "^17.1.0",
106
+ "eslint-config-prettier": "^8.7.0",
107
+ "eslint-config-standard-with-typescript": "^43.0.1",
108
+ "eslint-plugin-import": "^2.27.5",
109
+ "eslint-plugin-n": "^15.6.1",
110
+ "eslint-plugin-promise": "^6.1.1",
111
+ "eslint-plugin-react": "^7.32.2",
112
+ "prettier": "^3.5.3",
113
+ "pretty-quick": "^4.1.1",
114
+ "rimraf": "^5.0.10",
115
+ "sbwb-ds": "1.2.2",
116
+ "typescript": "^5.6.3",
117
+ "vite": "^5.4.10",
118
+ "vite-plugin-dts": "^4.5.4",
119
+ "vite-plugin-svgr": "^4.3.0"
120
+ }
121
+ }
@@ -1 +0,0 @@
1
- "use strict";const r=require("./Tooltip.view-DGl4VmmK.cjs"),h=require("react"),e=require("sbwb-ds"),m=({width:n="100%",height:i="fit-content",type:o,title:t,message:c,margin:x,open:a=!0,onClose:l,canClose:p=!0})=>{var d,u;const[j,b]=h.useState(a),s={info:{backgroundColor:"#D5EBFD",borderColor:e.sg.colors.feedbackColors.colorFeedbackInfo,icon:r.jsxRuntimeExports.jsx(r.InfoFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackInfo,height:"20px",width:"20px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.sg.colors.feedbackColors.colorFeedbackSuccess,icon:r.jsxRuntimeExports.jsx(r.CheckCircleFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackSuccess,height:"20px",width:"20px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.sg.colors.feedbackColors.colorFeedbackError,icon:r.jsxRuntimeExports.jsx(r.ErrorFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackError,height:"20px",width:"20px"})}};function g(){b(!1),l==null||l()}return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:j?r.jsxRuntimeExports.jsxs(r.Container,{width:n,height:i,direction:"horizontal",verticalAlign:t?"top":"center",gap:e.sg.spacings.spacingInset.spacingInsetXs,padding:e.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(d=s==null?void 0:s[o])==null?void 0:d.backgroundColor,customStyles:{border:`1px solid ${(u=s==null?void 0:s[o])==null?void 0:u.borderColor}`,borderRadius:e.sg.borders.borderRadius.borderRadiusSm,margin:x,position:"relative"},children:[o==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"20px",height:"20px"})}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:s==null?void 0:s[o].icon}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",height:"100%",children:[r.jsxRuntimeExports.jsx(r.Title,{children:t}),r.jsxRuntimeExports.jsx(r.Message,{children:c})]}),p&&r.jsxRuntimeExports.jsx(r.Container,{children:r.jsxRuntimeExports.jsx(r.Close_default,{color:e.sg.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:g,height:"20px",width:"20px"})})]}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{})})},E=({label:n,labelRender:i,infoProps:o={},withInfo:t=!0,flex:c,width:x="100%",isRequired:a=!1})=>{const l={tooltipProps:{position:"top",...o==null?void 0:o.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:x,direction:"horizontal",gap:"4px",flex:c,children:[i??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[n," ",a?r.jsxRuntimeExports.jsx(r.Required,{children:"*"}):null]}),t&&r.jsxRuntimeExports.jsx(r.Info,{...l})]})},R=({width:n="100%",flex:i,label:o="Obrigatório",margin:t="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:n,flex:i,customStyles:{margin:t},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${o}`})});exports.AlertInline=m;exports.LabelField=E;exports.RequiredLabelView=R;
@@ -1 +0,0 @@
1
- "use strict";const t=require("./Tooltip.view-DGl4VmmK.cjs"),l=require("sbwb-ds"),j=require("react"),h=require("./index-BcwQwoIM.cjs"),p=({message:r})=>t.jsxRuntimeExports.jsxs(t.ErrorMessage,{children:[t.jsxRuntimeExports.jsx(t.InfoFill_default,{color:l.sg.colors.feedbackColors.colorFeedbackError}),r]});function E({title:r,icon:i,onClick:s,disabled:e=!1}){return t.jsxRuntimeExports.jsxs(t.CardContainer,{onClick:()=>!e&&(s==null?void 0:s()),disabled:e,children:[t.jsxRuntimeExports.jsx(t.IconContainer,{disabled:e,children:i}),t.jsxRuntimeExports.jsx(t.Title$1,{children:r})]})}const d=({id:r,label:i,size:s="Medium",disabled:e=!1,onChange:n,checked:o})=>{const[x,u]=j.useState(o??!1);return j.useEffect(()=>{u(c=>o??!c)},[o]),t.jsxRuntimeExports.jsxs(t.SwitchContainer,{id:`switch-${r}`,"data-testid":"switch-component",children:[t.jsxRuntimeExports.jsxs(t.SwitchWrapper,{size:s,disabled:e,checked:o??x,"data-testid":"switch-wrapper",children:[t.jsxRuntimeExports.jsx(t.SwitchToggle,{type:"checkbox",disabled:e,checked:o??x,"data-testid":"switch-toggle",onChange:c=>{const{target:{checked:a}}=c;h.valuable(a)&&u(a),n==null||n(c)}}),t.jsxRuntimeExports.jsx(t.SwitchButton,{disabled:e,size:s})]}),t.jsxRuntimeExports.jsx(t.SwitchLabel,{size:s,disabled:e,children:i})]})},w=({text:r,color:i})=>t.jsxRuntimeExports.jsx(t.Title$2,{color:i,children:r});exports.ErrorMessage=p;exports.LibraryCard=E;exports.Switch=d;exports.Title=w;
@@ -1,74 +0,0 @@
1
- import { l as t, x, o as f, y as u, z as d, D as j, G as p, H as m, J as w, K as S, N as E, O as g } from "./Tooltip.view-B2Qudmep.js";
2
- import { sg as T } from "sbwb-ds";
3
- import { useState as $, useEffect as y } from "react";
4
- import { v as L } from "./index-_v6RoRxb.js";
5
- const b = ({ message: r }) => /* @__PURE__ */ t.jsxs(x, { children: [
6
- /* @__PURE__ */ t.jsx(f, { color: T.colors.feedbackColors.colorFeedbackError }),
7
- r
8
- ] });
9
- function k({
10
- title: r,
11
- icon: a,
12
- onClick: e,
13
- disabled: s = !1
14
- }) {
15
- return /* @__PURE__ */ t.jsxs(
16
- u,
17
- {
18
- onClick: () => !s && (e == null ? void 0 : e()),
19
- disabled: s,
20
- children: [
21
- /* @__PURE__ */ t.jsx(d, { disabled: s, children: a }),
22
- /* @__PURE__ */ t.jsx(j, { children: r })
23
- ]
24
- }
25
- );
26
- }
27
- const B = ({
28
- id: r,
29
- label: a,
30
- size: e = "Medium",
31
- disabled: s = !1,
32
- onChange: i,
33
- checked: o
34
- }) => {
35
- const [n, l] = $(o ?? !1);
36
- return y(() => {
37
- l((c) => o ?? !c);
38
- }, [o]), /* @__PURE__ */ t.jsxs(p, { id: `switch-${r}`, "data-testid": "switch-component", children: [
39
- /* @__PURE__ */ t.jsxs(
40
- m,
41
- {
42
- size: e,
43
- disabled: s,
44
- checked: o ?? n,
45
- "data-testid": "switch-wrapper",
46
- children: [
47
- /* @__PURE__ */ t.jsx(
48
- w,
49
- {
50
- type: "checkbox",
51
- disabled: s,
52
- checked: o ?? n,
53
- "data-testid": "switch-toggle",
54
- onChange: (c) => {
55
- const {
56
- target: { checked: h }
57
- } = c;
58
- L(h) && l(h), i == null || i(c);
59
- }
60
- }
61
- ),
62
- /* @__PURE__ */ t.jsx(S, { disabled: s, size: e })
63
- ]
64
- }
65
- ),
66
- /* @__PURE__ */ t.jsx(E, { size: e, disabled: s, children: a })
67
- ] });
68
- }, C = ({ text: r, color: a }) => /* @__PURE__ */ t.jsx(g, { color: a, children: r });
69
- export {
70
- b as E,
71
- k as L,
72
- B as S,
73
- C as T
74
- };