@rededor/cura 1.3.0 → 1.4.0-alpha.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/dist/cjs/cura-accordion_12.cjs.entry.js +9 -9
- package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +2 -2
- package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
- package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
- package/dist/cjs/cura-modal.cjs.entry.js +50 -0
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-radio.cjs.entry.js +1 -1
- package/dist/cjs/cura-switch.cjs.entry.js +1 -1
- package/dist/cjs/cura-toast.cjs.entry.js +1 -1
- package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cura-modal/cura-modal.css +211 -0
- package/dist/collection/components/cura-modal/cura-modal.js +134 -0
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js +85 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -0
- package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +2 -2
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/components/cura-checkbox.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-dropdown-search-option-title.js +1 -1
- package/dist/components/cura-dropdown-search-option.js +2 -2
- package/dist/components/cura-dropdown-search.js +2 -2
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-input-date.js +1 -1
- package/dist/components/cura-label2.js +1 -1
- package/dist/components/cura-loader-bar2.js +1 -1
- package/dist/components/cura-loader-circle2.js +1 -1
- package/dist/components/cura-modal.d.ts +11 -0
- package/dist/components/cura-modal.js +84 -0
- package/dist/components/cura-modal.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-radio.js +1 -1
- package/dist/components/cura-select-option2.js +1 -1
- package/dist/components/cura-select2.js +3 -3
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/cura-tooltip.js +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/{p-022b22b6.entry.js → p-075b02de.entry.js} +2 -2
- package/dist/cura/{p-df851816.entry.js → p-0e28f1c8.entry.js} +2 -2
- package/dist/cura/{p-c444e692.entry.js → p-1f53580a.entry.js} +2 -2
- package/dist/cura/{p-2b9eadc7.entry.js → p-3536c96b.entry.js} +2 -2
- package/dist/cura/{p-22e921d9.entry.js → p-7090d4a7.entry.js} +2 -2
- package/dist/cura/{p-93525d68.entry.js → p-71a2dcef.entry.js} +2 -2
- package/dist/cura/p-9a7e3f48.entry.js +2 -0
- package/dist/cura/p-9a7e3f48.entry.js.map +1 -0
- package/dist/cura/{p-e3d3bc3d.entry.js → p-dbd9eab3.entry.js} +2 -2
- package/dist/cura/{p-b883e098.entry.js → p-e5b0dd74.entry.js} +2 -2
- package/dist/cura/p-ebed83d1.entry.js +2 -0
- package/dist/cura/{p-639c1b67.entry.js → p-ed839f1e.entry.js} +2 -2
- package/dist/cura/{p-2c0f5497.entry.js → p-eea093b2.entry.js} +2 -2
- package/dist/cura/{p-9e3d26fe.entry.js → p-f375a612.entry.js} +2 -2
- package/dist/esm/cura-accordion_12.entry.js +9 -9
- package/dist/esm/cura-checkbox.entry.js +1 -1
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
- package/dist/esm/cura-dropdown-search.entry.js +2 -2
- package/dist/esm/cura-input-date.entry.js +1 -1
- package/dist/esm/cura-loader-bar.entry.js +1 -1
- package/dist/esm/cura-modal.entry.js +46 -0
- package/dist/esm/cura-modal.entry.js.map +1 -0
- package/dist/esm/cura-radio.entry.js +1 -1
- package/dist/esm/cura-switch.entry.js +1 -1
- package/dist/esm/cura-toast.entry.js +1 -1
- package/dist/esm/cura-tooltip.entry.js +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cura-modal/cura-modal.d.ts +28 -0
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +70 -0
- package/dist/types/components.d.ts +56 -0
- package/package.json +2 -2
- package/dist/cura/p-9991f7db.entry.js +0 -2
- /package/dist/cura/{p-022b22b6.entry.js.map → p-075b02de.entry.js.map} +0 -0
- /package/dist/cura/{p-df851816.entry.js.map → p-0e28f1c8.entry.js.map} +0 -0
- /package/dist/cura/{p-c444e692.entry.js.map → p-1f53580a.entry.js.map} +0 -0
- /package/dist/cura/{p-2b9eadc7.entry.js.map → p-3536c96b.entry.js.map} +0 -0
- /package/dist/cura/{p-22e921d9.entry.js.map → p-7090d4a7.entry.js.map} +0 -0
- /package/dist/cura/{p-93525d68.entry.js.map → p-71a2dcef.entry.js.map} +0 -0
- /package/dist/cura/{p-e3d3bc3d.entry.js.map → p-dbd9eab3.entry.js.map} +0 -0
- /package/dist/cura/{p-b883e098.entry.js.map → p-e5b0dd74.entry.js.map} +0 -0
- /package/dist/cura/{p-9991f7db.entry.js.map → p-ebed83d1.entry.js.map} +0 -0
- /package/dist/cura/{p-639c1b67.entry.js.map → p-ed839f1e.entry.js.map} +0 -0
- /package/dist/cura/{p-2c0f5497.entry.js.map → p-eea093b2.entry.js.map} +0 -0
- /package/dist/cura/{p-9e3d26fe.entry.js.map → p-f375a612.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGO,MAAM,YAAY,GAAG;;IAE1B,KAAK,EAAE;QACL,OAAO,EAAE;YACP,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,SAAS;SACjB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;SAClB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACn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AG,SAAS,CAAC;YAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;KACF;;;;ICvBD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;IAC3B,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,EAAC,GAAG,EAAC,EAAE,CAAC,CAAC,CAAC;IACzE,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;QAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBO,MAAM,aAAa,GAAG,eAAe;;SCU5B,QAAQ,CAAC,OAAmB,EAAE,CAAC,GAAG,MAAM;IACtD,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/api/theme-presets/theme-default.ts","src/api/theme-presets/theme-maternity.ts","src/api/theme-presets/theme-oncology.ts","src/api/theme-presets/theme-richet.ts","src/api/theme-presets/theme-legacy-default.ts","src/api/theme-presets/theme-presets.ts","src/api/theme-presets/static.ts","src/api/modules/cura-theme-colors-module.ts","src/api/modules/cura-theme-spacing-module.ts","src/api/modules/cura-theme-fonts-module.ts","src/api/modules/cura-theme-breakpoints-module.ts","src/api/modules/cura-theme-module.ts","src/api/cura-api.ts","src/rededor-cura-start.ts","@stencil/core/internal/app-globals","src/index.ts"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Richet Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeRichet = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '153,197,255',\n '300': '67,142,241',\n '500': '0,47,108',\n '700': '1,39,91',\n '900': '0,33,77'\n },\n secondary: {\n '100': '243,237,227',\n '300': '216,194,163',\n '500': '208,173,103',\n '700': '201,155,64',\n '900': '149,104,15'\n },\n accent: {\n '100': '167,230,215',\n '300': '130,225,209',\n '500': '44,213,196',\n '700': '26,188,169',\n '900': '0,150,129'\n }\n },\n};\n","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeRichet } from './theme-richet';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'richet': ThemeRichet,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.rootElement.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n","export { Components, JSX } from './components';\nimport CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n\ndeclare global {\n export interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport function CuraInit(options: CuraConfig, w = window) {\n w.CuraInit = options;\n}\n"],"version":3}
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGO,MAAM,YAAY,GAAG;;IAE1B,KAAK,EAAE;QACL,OAAO,EAAE;YACP,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,SAAS;SACjB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;SAClB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,WAAW;SACnB;KACF;;IAED,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;KACR;;IAED,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,wCAAwC;QAC9C,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE;YACP,IAAI,EAAE,GAAG;YACT,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE,GAAG;YACX,IAAI,EAAE,GAAG;YACT,KAAK,EAAE,GAAG;SACX;KACF;CACF;;AChDD;;;AAKO,MAAM,cAAc,mCAEtB,YAAY;;;IAIf,KAAK,EAAE;QACL,OAAO,EAAE;Y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AAC1E;;ACjBO,MAAM,aAAa,GAAG,eAAe;;SCU5B,QAAQ,CAAC,OAAmB,EAAE,CAAC,GAAG,MAAM;IACtD,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/api/theme-presets/theme-default.ts","src/api/theme-presets/theme-maternity.ts","src/api/theme-presets/theme-oncology.ts","src/api/theme-presets/theme-richet.ts","src/api/theme-presets/theme-legacy-default.ts","src/api/theme-presets/theme-presets.ts","src/api/theme-presets/static.ts","src/api/modules/cura-theme-colors-module.ts","src/api/modules/cura-theme-spacing-module.ts","src/api/modules/cura-theme-fonts-module.ts","src/api/modules/cura-theme-breakpoints-module.ts","src/api/modules/cura-theme-module.ts","src/api/cura-api.ts","src/rededor-cura-start.ts","@stencil/core/internal/app-globals","src/index.ts"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Richet Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeRichet = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '153,197,255',\n '300': '67,142,241',\n '500': '0,47,108',\n '700': '1,39,91',\n '900': '0,33,77'\n },\n secondary: {\n '100': '243,237,227',\n '300': '216,194,163',\n '500': '208,173,103',\n '700': '201,155,64',\n '900': '149,104,15'\n },\n accent: {\n '100': '167,230,215',\n '300': '130,225,209',\n '500': '44,213,196',\n '700': '26,188,169',\n '900': '0,150,129'\n }\n },\n};\n","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeRichet } from './theme-richet';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'richet': ThemeRichet,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.rootElement.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n","export { Components, JSX } from './components';\nimport CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n\ndeclare global {\n export interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport function CuraInit(options: CuraConfig, w = window) {\n w.CuraInit = options;\n}\n"],"version":3}
|
package/dist/cura/cura.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-fd5ed6b0.js";export{s as setNonce}from"./p-fd5ed6b0.js";import{g as l}from"./p-82b99090.js";var a=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};a().then((async e=>{await l();return o([["p-
|
|
1
|
+
import{p as e,b as o}from"./p-fd5ed6b0.js";export{s as setNonce}from"./p-fd5ed6b0.js";import{g as l}from"./p-82b99090.js";var a=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};a().then((async e=>{await l();return o([["p-71a2dcef",[[65,"cura-button",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],background:[513],fontColor:[513,"font-color"],textAlign:[513,"text-align"],justify:[516],styles:[32],hovered:[32]},null,{background:["setColors"],color:["setColors"]}],[1,"cura-accordion-item",{label:[513],iconSize:[514,"icon-size"],labelIcon:[513,"label-icon"],openIcon:[513,"open-icon"],closeIcon:[513,"close-icon"],iconColor:[513,"icon-color"],colorMode:[1,"color-mode"],level:[514],opened:[1540],styles:[32]}],[1,"cura-accordion",{color:[513],colorMode:[513,"color-mode"],iconSize:[514,"icon-size"],labelIcon:[513,"label-icon"],openIcon:[513,"open-icon"],closeIcon:[513,"close-icon"],iconColor:[513,"icon-color"],behavior:[513],level:[514],styles:[32]},null,{color:["handleChangeColor"]}],[1,"cura-page-template",{contentwidth:[513]}],[65,"cura-input-text",{mode:[1537],status:[1537],size:[1537],type:[513],inputMode:[513,"input-mode"],label:[513],name:[513],placeholder:[513],value:[1032],iconName:[1537,"icon-name"],helperText:[1537,"helper-text"],disabled:[516],required:[516],maskPreset:[8,"mask-preset"],enableSelectionMode:[1540,"enable-selection-mode"],maskRegex:[1537,"mask-regex"],maskAdvanced:[1544,"mask-advanced"],maxlength:[1538],readOnly:[516,"read-only"],isLoading:[1540,"is-loading"],clearIcon:[1540,"clear-icon"],hideErrorIcon:[4,"hide-error-icon"],autocomplete:[513],isHovered:[32],isFocused:[32],styles:[32]},null,{styles:["connectedCallback"],size:["getClasses"],status:["renderIcon"],mode:["renderIcon"],maskPreset:["initializeMask"],maskRegex:["initializeMask"],maskAdvanced:["initializeMask"]}],[65,"cura-select",{label:[513],placeholder:[513],value:[1537],mode:[513],size:[513],status:[1537],disabled:[516],required:[516],searchBehavior:[516,"search-behavior"],isHovered:[32],isFocused:[32],isOpen:[32],options:[32],activeIndex:[32],textInput:[32]},null,{activeIndex:["updateOptionHighlights"],textInput:["filterOptions"],value:["handleValueChange"]}],[1,"cura-select-option",{value:[513],selected:[516],active:[516],size:[1],styles:[32]},null,{size:["getSize"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],spotColor:[513,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},null,{color:["handleChangeColor"],spotColor:["handleChangeColor"]}],[1,"cura-paragraph",{size:[513],spotColor:[513,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},null,{color:["handleChangeColor"],spotColor:["handleChangeColor"]}],[1,"cura-loader-circle",{size:[513],color:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]},null,{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}],[1,"cura-label",{size:[513],weight:[513],spotColor:[513,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},null,{color:["handleChangeColor"],spotColor:["handleChangeColor"]}]]],["p-f375a612",[[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:["updateDateSettings"]}]]],["p-3536c96b",[[1,"cura-tooltip",{elementId:[1,"element-id"],interactive:[4],delay:[2],maxWidth:[1,"max-width"],position:[513],label:[513],closeButton:[516,"close-button"],isMobile:[32]},[[9,"resize","onWindowResize"],[9,"scroll","onWindowScroll"]]]]],["p-7090d4a7",[[1,"cura-dropdown-search",{size:[1537],status:[513],disabled:[516],name:[513],required:[1540],selected:[1540],value:[1537],placeholder:[1537],label:[1537],iconName:[513,"icon-name"],dropdownMaxHeight:[513,"dropdown-max-height"],overlayVisible:[32],isDropdownOpen:[32],styles:[32],isMobile:[32],mode:[32],inputTextRef:[32],isOnBlurInput:[32],hoveredIndex:[32],options:[32]},null,{value:["onValueChange"]}]]],["p-d635501a",[[1,"cura-icons-view",{selected:[32]}]]],["p-ed839f1e",[[1,"cura-toast",{type:[1],position:[1],icon:[513],label:[513],closeButton:[516,"close-button"],loader:[516],autoCloseDelay:[514,"auto-close-delay"],styles:[32],progress:[32]},null,{type:["handleChangeType"],position:["handleChangeType"]}]]],["p-eda28278",[[1,"cura-alert",{type:[1],floating:[516],label:[513],closeable:[516],icon:[513],styles:[32]},null,{type:["setColors"]}]]],["p-81c66f2b",[[65,"cura-button-outline",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],background:[1],fontColor:[1,"font-color"],textAlign:[513,"text-align"],justify:[516],styles:[32],hovered:[32]},null,{background:["setColors"],color:["setColors","getSymbolColor"],fontColor:["getSymbolColor"]}]]],["p-5bb8302c",[[1,"cura-button-select",{selected:[1540],iconName:[1537,"icon-name"],size:[513],counter:[1544],disabled:[516],background:[1],color:[1],iconPosition:[513,"icon-position"],hovered:[32],styles:[32]},null,{background:["setColors"],color:["setColors"]}]]],["p-dbd9eab3",[[65,"cura-checkbox",{checked:[1540],indeterminate:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],size:[513],background:[1],iconColor:[1,"icon-color"],color:[1],styles:[32]},null,{size:["sizeHandler"],color:["setColors"],background:["setColors","assignColor"],iconColor:["assignColor"]}]]],["p-9a7e3f48",[[1,"cura-modal",{open:[1540],background:[1],topOffset:[2,"top-offset"],styles:[32]},null,{background:["setColors"],topOffset:["setOffsetTop"]}]]],["p-0e28f1c8",[[65,"cura-radio",{checked:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],background:[1],size:[1],color:[1],styles:[32]},null,{size:["sizeHandler"],color:["setColors"],background:["setColors","assignColor"]}]]],["p-bfb5e9e1",[[1,"cura-badge-distance",{distance:[2],label:[513],styles:[32],displayDistance:[32]},null,{distance:["formatDistance"]}]]],["p-eea093b2",[[1,"cura-dropdown-search-option",{value:[513],selected:[1540],selectable:[516],hovered:[1540],styles:[32]},null,{selected:["updateIconColor"]}]]],["p-ebed83d1",[[1,"cura-dropdown-search-option-title"]]],["p-075b02de",[[65,"cura-switch",{checked:[1540],disabled:[516],label:[513],ontabindex:[514],position:[513],size:[513],background:[1],color:[1],styles:[32]},null,{size:["sizeHandler"],color:["setColors"],background:["setColors"]}]]],["p-01e301d4",[[1,"cura-avatar",{size:[1],backgroundColor:[513,"background-color"],borderColor:[513,"border-color"],borderRadius:[513,"border-radius"],border:[516],type:[513],imageSrc:[1537,"image-src"],imageSrcDefault:[513,"image-src-default"],floating:[516],styles:[32]},null,{size:["sizeHandler"]}]]],["p-a7ecea4a",[[1,"cura-card",{hasPadding:[1028,"has-padding"],hasShadow:[1028,"has-shadow"],type:[1025],colorMode:[1025,"color-mode"],href:[1537],target:[513],styles:[32]}]]],["p-e5b0dd74",[[1,"cura-display",{level:[514],size:[513],spotColor:[1,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},null,{color:["handleChangeColor"],spotColor:["handleChangeColor"]}]]],["p-7853ab16",[[1,"cura-calendar",{period:[513],width:[513],minWidth:[513,"min-width"],maxWidth:[513,"max-width"],mode:[513],dateFormat:[1537,"date-format"],locale:[513],type:[513],disable:[16],enable:[16],defaultDate:[1537,"default-date"],customDates:[16],limitRange:[514,"limit-range"],disablePassDates:[1540,"disable-pass-dates"],disableFutureDates:[1540,"disable-future-dates"],collapsed:[1540],floating:[1540],embedded:[1540],currentDate:[32],selectedDates:[32],rangeStart:[32],defaultDates:[32],selectMonth:[32],selectYear:[32],styles:[32]},null,{customDates:["watchDefaultDatesArray"],defaultDate:["handleDefaultDateChange"]}]]],["p-0308cf6b",[[1,"cura-badge-number",{number:[514],color:[513]}]]],["p-1f53580a",[[1,"cura-loader-bar",{color:[1],progress:[2],styles:[32]},null,{color:["handleChangeColor"],progress:["handleProgress"]}]]],["p-b0451cb3",[[65,"cura-button-transparent",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[513],fontColor:[513,"font-color"],textAlign:[513,"text-align"],justify:[516],hovered:[32],styles:[32]},null,{fontColor:["getSymbolColor"],color:["getSymbolColor"]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=cura.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","type","size","disabled","isLoading","iconName","iconset","iconPosition","iconOnly","target","color","background","fontColor","textAlign","justify","styles","hovered","label","iconSize","labelIcon","openIcon","closeIcon","iconColor","colorMode","level","opened","behavior","contentwidth","mode","status","inputMode","name","placeholder","value","helperText","required","maskPreset","enableSelectionMode","maskRegex","maskAdvanced","maxlength","readOnly","clearIcon","hideErrorIcon","autocomplete","isHovered","isFocused","searchBehavior","isOpen","activeIndex","textInput","selected","active","weight","spotColor","marginBlock","lineHeight","enableRangeDates","disableFutureDates","disablePassDates","isCalendarVisible","dates","dateSettings","elementId","interactive","delay","maxWidth","position","closeButton","isMobile","dropdownMaxHeight","overlayVisible","isDropdownOpen","inputTextRef","isOnBlurInput","hoveredIndex","icon","loader","autoCloseDelay","progress","floating","closeable","counter","checked","indeterminate","ontabindex","distance","displayDistance","selectable","backgroundColor","borderColor","borderRadius","border","imageSrc","imageSrcDefault","hasPadding","hasShadow","period","width","minWidth","dateFormat","locale","disable","enable","defaultDate","customDates","limitRange","collapsed","embedded","currentDate","selectedDates","rangeStart","defaultDates","selectMonth","selectYear","number"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,kCAA8B,CAAAC,KAAS,MAAAC,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAd,KAAA,MAAAe,OAAA,MAAAC,MAAA,IAAAC,WAAA,MAAAC,UAAA,mBAAAC,UAAA,mBAAAC,QAAA,MAAAC,OAAA,KAAAC,QAAA,YAAAL,WAAA,cAAAD,MAAA,0CAAAO,MAAA,MAAAC,SAAA,kBAAAC,UAAA,mBAAAC,SAAA,kBAAAC,UAAA,mBAAAC,UAAA,mBAAAC,UAAA,iBAAAC,MAAA,MAAAC,OAAA,OAAAV,OAAA,4BAAAL,MAAA,MAAAa,UAAA,mBAAAL,SAAA,kBAAAC,UAAA,mBAAAC,SAAA,kBAAAC,UAAA,mBAAAC,UAAA,mBAAAI,SAAA,MAAAF,MAAA,MAAAT,OAAA,YAAAL,MAAA,iDAAAiB,aAAA,+BAAAC,KAAA,OAAAC,OAAA,OAAA3B,KAAA,OAAAD,KAAA,MAAA6B,UAAA,mBAAAb,MAAA,MAAAc,KAAA,MAAAC,YAAA,MAAAC,MAAA,OAAA5B,SAAA,mBAAA6B,WAAA,qBAAA/B,SAAA,MAAAgC,SAAA,MAAAC,WAAA,kBAAAC,oBAAA,+BAAAC,UAAA,oBAAAC,aAAA,uBAAAC,UAAA,OAAAC,SAAA,kBAAArC,UAAA,oB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A,OAAA1B,SAAA,MAAAgC,SAAA,MAAAlB,MAAA,MAAAoE,WAAA,MAAAlB,SAAA,MAAAlC,MAAA,MAAAF,KAAA,MAAA7B,KAAA,MAAAS,WAAA,IAAAW,UAAA,iBAAAZ,MAAA,IAAAK,OAAA,YAAAb,KAAA,gBAAAQ,MAAA,cAAAC,WAAA,4BAAAW,UAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","type","size","disabled","isLoading","iconName","iconset","iconPosition","iconOnly","target","color","background","fontColor","textAlign","justify","styles","hovered","label","iconSize","labelIcon","openIcon","closeIcon","iconColor","colorMode","level","opened","behavior","contentwidth","mode","status","inputMode","name","placeholder","value","helperText","required","maskPreset","enableSelectionMode","maskRegex","maskAdvanced","maxlength","readOnly","clearIcon","hideErrorIcon","autocomplete","isHovered","isFocused","searchBehavior","isOpen","activeIndex","textInput","selected","active","weight","spotColor","marginBlock","lineHeight","enableRangeDates","disableFutureDates","disablePassDates","isCalendarVisible","dates","dateSettings","elementId","interactive","delay","maxWidth","position","closeButton","isMobile","dropdownMaxHeight","overlayVisible","isDropdownOpen","inputTextRef","isOnBlurInput","hoveredIndex","icon","loader","autoCloseDelay","progress","floating","closeable","counter","checked","indeterminate","ontabindex","open","topOffset","distance","displayDistance","selectable","backgroundColor","borderColor","borderRadius","border","imageSrc","imageSrcDefault","hasPadding","hasShadow","period","width","minWidth","dateFormat","locale","disable","enable","defaultDate","customDates","limitRange","collapsed","embedded","currentDate","selectedDates","rangeStart","defaultDates","selectMonth","selectYear","number"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,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C,WAAA,KAAAC,aAAA,KAAAC,YAAA,KAAAC,WAAA,KAAArG,OAAA,YAAA4F,YAAA,2BAAAD,YAAA,uEAAAW,OAAA,MAAA3G,MAAA,+CAAAA,MAAA,IAAAqE,SAAA,IAAAhE,OAAA,YAAAL,MAAA,sBAAAqE,SAAA,qEAAA9E,KAAA,MAAAC,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAd,KAAA,MAAAe,OAAA,MAAAC,MAAA,MAAAE,UAAA,mBAAAC,UAAA,mBAAAC,QAAA,MAAAE,QAAA,KAAAD,OAAA,YAAAH,UAAA,mBAAAF,MAAA,wBAAAZ,EAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,c as e,h as t,H as r}from"./p-fd5ed6b0.js";import{f as i}from"./p-f9b8f665.js";const s='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box}.container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap);text-align:left}.position{flex-direction:row}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}';const l=s;const o=class{constructor(t){a(this,t);this.onchange=e(this,"onchange",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.sizes={large:{size:64},medium:{size:48},small:{size:40}};this.isDarkbackground=()=>this.background==="dark";this.toggleSwitch=()=>{if(this.disabled)return null;this.checked=!this.checked;this.internals.setFormValue(this.checked.toString());this.onchange.emit({checked:this.checked})};this.checked=false;this.disabled=false;this.label="";this.ontabindex=0;this.position="left";this.size="medium";this.background="light";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":`${this.sizes[this.size].size}px`,"--size":`${i[this.size].size}px`,"--gap":`${i[this.size].gap}px`})}setColors(){const a=[{name:"--info-base",background:"info-base"},{name:"--neutral-black-shadow",background:"neutral-black",opacity:.16},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--neutral-medium",background:"neutral-medium"},{name:"--neutral-pale",background:"neutral-pale"},{name:"--neutral-dark-base",background:`neutral-${this.isDarkbackground()?"dark":"base"}`},{name:"--neutral-darker-medium",background:`neutral-${this.isDarkbackground()?"darker":"medium"}`},{name:"--neutral-black-neutral-pale",background:`${this.isDarkbackground()?"neutral-black":"neutral-pale"}`},{name:"--neutral-black-neutral-base",background:`${this.isDarkbackground()?"neutral-dark":"neutral-base"}`},{name:"--color-base-light",background:`${this.color}-light`},{name:"--color-dark",background:`${this.color}-dark`}];a.forEach((a=>{this.styles[a.name]=window.CuraAPI.theme.colors.getColor(a.background,a===null||a===void 0?void 0:a.opacity)}));this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler();this.setColors()}formAssociatedCallback(a){a.ariaLabel=this.label}formStateRestoreCallback(a){this.checked=a.value==="true";this.internals.setFormValue(this.checked.toString())}formResetCallback(){this.checked=false;this.internals.setValidity({});this.internals.setFormValue(this.checked.toString())}formDisabledCallback(a){this.disabled=a}assignColor(a,e){if(this.disabled)return this.isDarkbackground()?"neutral-dark":"neutral-dark";return this.isDarkbackground()?a:e}getClasses(){const a={};a["container"]=true;a["checked"]=this.checked;a["disabled"]=this.disabled;a["position"]=this.position==="right";return a}render(){return t(r,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as a,c as e,h as t,H as r}from"./p-fd5ed6b0.js";import{f as i}from"./p-f9b8f665.js";const s='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box}.container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap);text-align:left}.position{flex-direction:row}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}';const l=s;const o=class{constructor(t){a(this,t);this.onchange=e(this,"onchange",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.sizes={large:{size:64},medium:{size:48},small:{size:40}};this.isDarkbackground=()=>this.background==="dark";this.toggleSwitch=()=>{if(this.disabled)return null;this.checked=!this.checked;this.internals.setFormValue(this.checked.toString());this.onchange.emit({checked:this.checked})};this.checked=false;this.disabled=false;this.label="";this.ontabindex=0;this.position="left";this.size="medium";this.background="light";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":`${this.sizes[this.size].size}px`,"--size":`${i[this.size].size}px`,"--gap":`${i[this.size].gap}px`})}setColors(){const a=[{name:"--info-base",background:"info-base"},{name:"--neutral-black-shadow",background:"neutral-black",opacity:.16},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--neutral-medium",background:"neutral-medium"},{name:"--neutral-pale",background:"neutral-pale"},{name:"--neutral-dark-base",background:`neutral-${this.isDarkbackground()?"dark":"base"}`},{name:"--neutral-darker-medium",background:`neutral-${this.isDarkbackground()?"darker":"medium"}`},{name:"--neutral-black-neutral-pale",background:`${this.isDarkbackground()?"neutral-black":"neutral-pale"}`},{name:"--neutral-black-neutral-base",background:`${this.isDarkbackground()?"neutral-dark":"neutral-base"}`},{name:"--color-base-light",background:`${this.color}-light`},{name:"--color-dark",background:`${this.color}-dark`}];a.forEach((a=>{this.styles[a.name]=window.CuraAPI.theme.colors.getColor(a.background,a===null||a===void 0?void 0:a.opacity)}));this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler();this.setColors()}formAssociatedCallback(a){a.ariaLabel=this.label}formStateRestoreCallback(a){this.checked=a.value==="true";this.internals.setFormValue(this.checked.toString())}formResetCallback(){this.checked=false;this.internals.setValidity({});this.internals.setFormValue(this.checked.toString())}formDisabledCallback(a){this.disabled=a}assignColor(a,e){if(this.disabled)return this.isDarkbackground()?"neutral-dark":"neutral-dark";return this.isDarkbackground()?a:e}getClasses(){const a={};a["container"]=true;a["checked"]=this.checked;a["disabled"]=this.disabled;a["position"]=this.position==="right";return a}render(){return t(r,{key:"7d90b4378da63462ce63f48a54b73c1ae73e75cd"},t("div",{key:"880d8117e073b11e33acfe2915b4aa2695f6eda4",class:this.getClasses(),style:this.styles},t("div",{key:"475056ce32564bd91dc48cd0d9d08059db77c030",class:"info"},t("cura-label",{key:"f391c5eb73fbae218a7037d0381fd49b9c739298",style:{textAlign:this.position==="right"?"right":"left"},class:"label",weight:"bold",size:this.size==="large"?"medium":"xsmall",lineHeight:"125%",color:this.assignColor("neutral-white","neutral-black")},this.label),t("cura-label",{key:"d587a5d17813f65a77563ce70f0c5e924bbf737d",style:{textAlign:this.position==="right"?"right":"left"},color:this.assignColor("primary-lighter","neutral-dark"),size:"xsmall",class:"message"},t("slot",{key:"9cb6d99b2c6e7f0f398fb2899823717c9b1b565e"}))),t("div",{key:"c7fd172953c607baa30186dd1429b39af28093ca",onClick:this.toggleSwitch,class:"control"},t("div",{key:"0392a5ea1bd31068aa8af7f95fe21f3c7bf7797e",class:`track ${this.size.toLowerCase()}`},t("div",{key:"98d36e0853ec222beaefd6da984483cbc872a5fa",class:`thumb ${this.size.toLowerCase()}`,tabIndex:this.ontabindex})))))}static get formAssociated(){return true}static get watchers(){return{size:["sizeHandler"],color:["setColors"],background:["setColors"]}}};o.style=l;export{o as cura_switch};
|
|
2
|
+
//# sourceMappingURL=p-075b02de.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,c as e,h as a,H as s,g as t}from"./p-fd5ed6b0.js";import{f as o}from"./p-f9b8f665.js";const i='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap)}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .info{display:flex;flex-direction:column}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:"";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}';const c=i;const d=class{constructor(a){r(this,a);this.onchange=e(this,"onchange",7);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}this.sizes={large:{size:20},medium:{size:14},small:{size:10}};this.isDarkbackground=()=>this.background==="dark";this.handleClick=()=>{if(this.disabled)return;this.checked=!this.checked;this.internals.setFormValue(this.value);this.onchange.emit({value:this.value,checked:this.checked})};this.checked=false;this.status="default";this.disabled=false;this.required=false;this.label="";this.ontabindex=undefined;this.position="left";this.value="";this.name="";this.background="light";this.size="medium";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-after":`${this.sizes[this.size].size}px`,"--size":`${o[this.size].size}px`,"--gap":`${o[this.size].gap}px`})}setColors(){const r=[{name:"--info-base",background:"info-base"},{name:"--color-light",background:`${this.color}-light`},{name:"--color-base",background:`${this.color}-base`},{name:"--color-dark",background:`${this.color}-dark`},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--error-lighter",background:"error-lighter"},{name:"--error-base",background:"error-base"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--primary-base-neutral-white",background:this.isDarkbackground()?"primary-base":"neutral-white"},{name:"--primary-darker-neutral-white",background:this.isDarkbackground()?"primary-darker":"neutral-white"},{name:"--primary-darker-neutral-base",background:this.isDarkbackground()?"primary-darker":"neutral-base"},{name:"--primary-base-neutral-base",background:this.isDarkbackground()?"primary-base":"neutral-base"},{name:"--primary-base-neutral-dark",background:this.isDarkbackground()?"primary-base":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--success-base-dark",background:this.isDarkbackground()?"success-base":"success-dark"},{name:"--error-base-dark",background:this.isDarkbackground()?"error-base":"error-dark"}];r.forEach((r=>{this.styles[r.name]=window.CuraAPI.theme.colors.getColor(r.background)}));this.styles=Object.assign({},this.styles)}formAssociatedCallback(r){r.ariaLabel=this.label}formStateRestoreCallback(r){this.value=r.value;this.checked=r.checked;this.internals.setFormValue(this.value)}formResetCallback(){this.value="";this.checked=false;this.internals.setValidity({});this.internals.setFormValue(this.value)}formDisabledCallback(r){this.disabled=r}connectedCallback(){this.sizeHandler();this.setColors()}getClasses(){const r={};r["container"]=true;r["checked"]=this.checked;r["disabled"]=this.disabled;r["position"]=this.position==="right";r[this.status]=true;return r}assignColor(r){if(this.disabled)return this.isDarkbackground()?"primary-darker":"neutral-medium";const e={success:{label:this.isDarkbackground()?"success-lighter":"success-darker",message:this.isDarkbackground()?"success-base":"success-dark"},error:{label:this.isDarkbackground()?"error-lighter":"neutral-darker",message:this.isDarkbackground()?"error-base":"error-dark"},default:{label:this.isDarkbackground()?"neutral-white":"neutral-black",message:this.isDarkbackground()?"primary-lighter":"neutral-dark"}};return e[this.status][r]}render(){return a(s,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r,c as e,h as a,H as s,g as t}from"./p-fd5ed6b0.js";import{f as o}from"./p-f9b8f665.js";const i='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap)}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .info{display:flex;flex-direction:column}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:"";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}';const c=i;const d=class{constructor(a){r(this,a);this.onchange=e(this,"onchange",7);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}this.sizes={large:{size:20},medium:{size:14},small:{size:10}};this.isDarkbackground=()=>this.background==="dark";this.handleClick=()=>{if(this.disabled)return;this.checked=!this.checked;this.internals.setFormValue(this.value);this.onchange.emit({value:this.value,checked:this.checked})};this.checked=false;this.status="default";this.disabled=false;this.required=false;this.label="";this.ontabindex=undefined;this.position="left";this.value="";this.name="";this.background="light";this.size="medium";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-after":`${this.sizes[this.size].size}px`,"--size":`${o[this.size].size}px`,"--gap":`${o[this.size].gap}px`})}setColors(){const r=[{name:"--info-base",background:"info-base"},{name:"--color-light",background:`${this.color}-light`},{name:"--color-base",background:`${this.color}-base`},{name:"--color-dark",background:`${this.color}-dark`},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--error-lighter",background:"error-lighter"},{name:"--error-base",background:"error-base"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--primary-base-neutral-white",background:this.isDarkbackground()?"primary-base":"neutral-white"},{name:"--primary-darker-neutral-white",background:this.isDarkbackground()?"primary-darker":"neutral-white"},{name:"--primary-darker-neutral-base",background:this.isDarkbackground()?"primary-darker":"neutral-base"},{name:"--primary-base-neutral-base",background:this.isDarkbackground()?"primary-base":"neutral-base"},{name:"--primary-base-neutral-dark",background:this.isDarkbackground()?"primary-base":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--success-base-dark",background:this.isDarkbackground()?"success-base":"success-dark"},{name:"--error-base-dark",background:this.isDarkbackground()?"error-base":"error-dark"}];r.forEach((r=>{this.styles[r.name]=window.CuraAPI.theme.colors.getColor(r.background)}));this.styles=Object.assign({},this.styles)}formAssociatedCallback(r){r.ariaLabel=this.label}formStateRestoreCallback(r){this.value=r.value;this.checked=r.checked;this.internals.setFormValue(this.value)}formResetCallback(){this.value="";this.checked=false;this.internals.setValidity({});this.internals.setFormValue(this.value)}formDisabledCallback(r){this.disabled=r}connectedCallback(){this.sizeHandler();this.setColors()}getClasses(){const r={};r["container"]=true;r["checked"]=this.checked;r["disabled"]=this.disabled;r["position"]=this.position==="right";r[this.status]=true;return r}assignColor(r){if(this.disabled)return this.isDarkbackground()?"primary-darker":"neutral-medium";const e={success:{label:this.isDarkbackground()?"success-lighter":"success-darker",message:this.isDarkbackground()?"success-base":"success-dark"},error:{label:this.isDarkbackground()?"error-lighter":"neutral-darker",message:this.isDarkbackground()?"error-base":"error-dark"},default:{label:this.isDarkbackground()?"neutral-white":"neutral-black",message:this.isDarkbackground()?"primary-lighter":"neutral-dark"}};return e[this.status][r]}render(){return a(s,{key:"07ed893348b28a188a67ee6b5e8eedb0598d2309"},a("div",{key:"b80a2b0e3db1f5dcac77617ecb9629b219460dbe",class:this.getClasses(),style:this.styles},a("div",{key:"945ceedc874bf7b8ecb48683d26fa626449fb377",class:"info"},a("div",{key:"3257b5a46d040d0177e8a791a2d810bf278f7517",class:"label-wrapper"},a("cura-label",{key:"8c68882b6e2f852a2d1929449b3c82469474fab3",class:"label",size:this.size==="large"?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&a("cura-paragraph",{key:"e9adfe5998b2c5f705589461bff38705f0ddbbc7",lineHeight:"0%",marginBlock:"0",color:"error-base"},"* ")),a("cura-label",{key:"50063f682a67c74a0ce2292cc823c21e6db90bcd",color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"c746a61b3e7ea6d4a63143b794fd8c482829e834"}))),a("input",{key:"078275db7eb3a4878d93d77b120c3caaa0b5e0b7",type:"radio",class:`radio ${this.size.toLocaleLowerCase()}`,name:this.name,value:this.value,required:this.required,tabIndex:this.ontabindex,disabled:this.disabled,checked:this.checked,onClick:this.handleClick})))}static get formAssociated(){return true}get host(){return t(this)}static get watchers(){return{size:["sizeHandler"],color:["setColors"],background:["setColors","assignColor"]}}};d.style=c;export{d as cura_radio};
|
|
2
|
+
//# sourceMappingURL=p-0e28f1c8.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,h as r,H as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,h as r,H as e,g as t}from"./p-fd5ed6b0.js";const a=":host{display:block}:host .progress-bar{position:absolute;left:0;bottom:0;width:100%;height:4px;background-color:var(--neutral-base)}:host .progress-bar span{position:absolute;left:0;bottom:0;width:var(--bar-width);height:100%;border-radius:0 2px 2px 0;background-color:var(--color-base);transition:width 0.2s linear}";const o=a;const b=class{constructor(r){s(this,r);this.color="primary-base";this.progress=0;this.styles={}}handleChangeColor(){this.setColor()}handleProgress(){this.setProgress()}connectedCallback(){this.setColor();this.setProgress()}render(){return r(e,{key:"b24471535bdf9ada29ae81baa05f5c9abe7b79f9"},r("div",{key:"15eb6b0b6abb45246c98d9e5957c492f44544062",id:"progress-bar",class:"progress-bar",style:this.styles},r("span",{key:"032eee4ae4da0d5ad88f0df735d93ed37b8be26b",class:"progress-bar-fill"})))}setColor(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-base":window.CuraAPI.theme.colors.getColor(`neutral-base`,.2),"--color-base":window.CuraAPI.theme.colors.getColor(this.color)})}setProgress(){this.styles=Object.assign(Object.assign({},this.styles),{"--bar-width":`${this.progress}%`})}get host(){return t(this)}static get watchers(){return{color:["handleChangeColor"],progress:["handleProgress"]}}};b.style=o;export{b as cura_loader_bar};
|
|
2
|
+
//# sourceMappingURL=p-1f53580a.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as r,h as a,H as e,g as o}from"./p-fd5ed6b0.js";const i=':host{position:absolute;z-index:99999;display:block;width:fit-content;height:fit-content;box-sizing:border-box}@media (max-width: 768px){:host{width:100%}}:host .container{display:flex;box-sizing:border-box;max-width:var(--max-width);height:auto;padding:calc(var(--base-spacing) * 2px);border:1px solid var(--neutral-light);border-radius:calc(var(--base-spacing) * 1px);background-color:var(--neutral-purewhite);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}@media (max-width: 768px){:host .container{max-width:90%;height:fit-content;padding:calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px) 0 calc(var(--base-spacing) * 4px);margin:0 auto;border:2px solid;border-radius:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px) 0 0;border-color:var(--neutral-light) var(--neutral-light) transparent var(--neutral-light)}}:host .container::after{content:"";position:absolute;z-index:99999;width:calc(var(--base-spacing) * 2.5px);height:calc(var(--base-spacing) * 2.5px);border:1px solid;border-radius:2px;background-color:var(--neutral-purewhite);left:var(--arrow-left);top:var(--arrow-top);border-color:var(--arrow-border-color);transform:var(--arrow-translate) rotate(45deg)}@media (max-width: 768px){:host .container::after{display:none}}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:calc(var(--base-spacing) * 1px)}@media (max-width: 768px){:host .container .content{padding-bottom:calc(var(--base-spacing) * 4px);border-bottom:1px dashed var(--neutral-light)}}:host .container .close-icon{margin-left:calc(var(--base-spacing) * 3px);cursor:pointer}:host .container .close-button{padding:calc(var(--base-spacing) * 2px) 0}';const s=i;const n=768;const c=class{constructor(a){t(this,a);this.tooltipClosed=r(this,"tooltipClosed",7);this.styles={};this.handleClose=()=>{this.closeContainer()};this.elementId="";this.interactive=true;this.delay=250;this.maxWidth="280px";this.position="top";this.label=undefined;this.closeButton=false;this.isMobile=false}onWindowResize(){this.setPosition(this.targetElement)}onWindowScroll(){this.setPosition(this.targetElement)}connectedCallback(){this.setStyle()}render(){return a(e,{key:"732345360f527ffc69743818657643616b2ee611",role:"tooltip",id:this.elementId},a("div",{key:"166aa0dd54c933f8b3b8ecc5c5c76824ef180d71",class:"container",style:this.styles},a("div",{key:"7b54ec53f3b454979c45415ddcd164a71a9ab2b0",class:"content"},a("cura-heading",{key:"71bf328ed2f9e5d704e6d06989a4bef6d7c4993d",level:4,size:"xsmall",color:"neutral-black",weight:"bold","margin-block":"0"},this.label),a("cura-paragraph",{key:"a427a4b9df7bfae50300c9947db9df825a2f7da0",color:"neutral-dark","spot-color":"secondary-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},a("slot",{key:"65875debf5bd3eec9f3070ab96cf644460897c3b"}))),this.closeButton&&!this.isMobile&&a("cura-icon",{key:"dac8229dc0f348b45ea3af9392c2001f638a0efb",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.isMobile&&a("cura-button-transparent",{key:"6c90921145206d47ab84eaee972a08b9dcad7cf0",class:"close-button",size:"small",type:"button",color:"error","icon-name":"close","icon-position":"right",onClick:this.handleClose},"OK, entendi.")))}componentDidLoad(){this.targetElement=document.querySelector(`[aria-labelledby="${this.elementId}"]`);if(!this.interactive){this.host.style.visibility="visible"}else{this.host.style.visibility="hidden";let t=null;let r=null;this.targetElement.addEventListener("mouseenter",(()=>{clearTimeout(r);t=setTimeout((()=>{this.host.style.visibility="visible"}),typeof this.delay==="number"&&this.delay>250?this.delay:250)}));this.targetElement.addEventListener("mouseleave",(()=>{clearTimeout(t);r=setTimeout((()=>{this.handleClose()}),typeof this.delay==="number"&&this.delay>250?this.delay:250)}));this.host.addEventListener("mouseenter",(()=>{if(window.getComputedStyle(this.host).visibility==="visible"){clearTimeout(r)}}));this.host.addEventListener("mouseleave",(()=>{clearTimeout(t);this.handleClose()}));this.targetElement.addEventListener("click",(()=>{if(window.getComputedStyle(this.host).visibility==="hidden"){t=setTimeout((()=>{this.host.style.visibility="visible"}),typeof this.delay==="number"&&this.delay>250?this.delay:250)}else{clearTimeout(t);this.handleClose()}}));document.addEventListener("click",(r=>{if(!this.targetElement.contains(r.target)&&!this.host.contains(r.target)){clearTimeout(t);this.handleClose()}}))}setTimeout((()=>{this.setPosition(this.targetElement)}),100)}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--max-width":this.maxWidth,"--base-spacing":window.CuraAPI.theme.spacing.getSpacing(),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor(`neutral-purewhite`),"--neutral-light":window.CuraAPI.theme.colors.getColor(`neutral-light`),"--neutral-black-shadow":window.CuraAPI.theme.colors.getColor(`neutral-black`,.16)})}getClasses(){const[t,r]=this.position.split("-");const a={};a["container"]=true;if(t){a[t]=true}if(r){a[r]=true}return a}setPosition(t){const r=window.innerWidth;const a=window.innerHeight;const e=this.host.shadowRoot.querySelector(".container");this.isMobile=r<=n;this.host.style.position=this.isMobile?"fixed":"absolute";this.host.style.bottom=this.isMobile?"0":"unset";e.style.flexDirection=this.isMobile?"column":"row";if(this.isMobile){this.host.style.left="unset";this.host.style.top="unset";return}const o={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight};const i=this.host.getBoundingClientRect();const s=10;const c=10;const l=o.width*.5+18;const h=o.height*.5+18;const d=this.styles["--neutral-light"];let p=0;let b=0;const f=Object.keys(this.getClasses()).filter((t=>["top","left","bottom","right","start","end"].includes(t)));const u=({arrowTop:t="",arrowLeft:r="",translate:a="",borderColor:e=""})=>{if(r)this.host.style.setProperty("--arrow-left",r);if(t)this.host.style.setProperty("--arrow-top",t);if(a)this.host.style.setProperty("--arrow-translate",a);if(e)this.host.style.setProperty("--arrow-border-color",e)};if(f.includes("top")||f.includes("bottom")){u({arrowLeft:"50%",translate:"translateX(-50%)"});if(f.includes("top")){b=o.top-i.height-c;u({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${d} ${d} transparent`});if(b<s){b=o.top+o.height+c;u({arrowTop:"-6px",borderColor:`${d} transparent transparent ${d}`})}}if(f.includes("bottom")){b=o.top+o.height+c;u({arrowTop:"-6px",borderColor:`${d} transparent transparent ${d}`});if(b+i.height>a-s){b=o.top-i.height-c;u({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${d} ${d} transparent`})}}p=o.left+(o.width-i.width)/2;if(f.includes("start")){p=o.left-i.width+l;u({arrowLeft:"calc(100% - 18px)"});if(p<s){p=o.left+o.width-l;u({arrowLeft:"18px"})}}if(f.includes("end")){p=o.left+o.width-l;u({arrowLeft:"18px"});if(p+i.width>r-s){p=o.left-i.width+l;u({arrowLeft:"calc(100% - 18px)"})}}}if(f.includes("right")||f.includes("left")){u({arrowTop:"50%",translate:"translateY(-50%)"});if(f.includes("right")){p=o.left+o.width+c;u({arrowLeft:"-6px",borderColor:`transparent transparent ${d} ${d}`});if(p+i.width>r-s){p=o.left-i.width-c;u({arrowLeft:"calc(100% - 6px)",borderColor:`${d} ${d} transparent transparent`})}}if(f.includes("left")){p=o.left-i.width-c;u({arrowLeft:"calc(100% - 6px)",borderColor:`${d} ${d} transparent transparent`});if(p<s){p=o.left+o.width+c;u({arrowLeft:"-6px",borderColor:`transparent transparent ${d} ${d}`})}}b=o.top+(o.height-i.height)/2;if(f.includes("start")){b=o.top-i.height+h;u({arrowTop:"calc(100% - 18px)"});if(b<s){b=o.top+o.height-h;u({arrowTop:"18px"})}}if(f.includes("end")){b=o.top+o.height-h;u({arrowTop:"18px"});if(b+i.height>a-s){b=o.top-i.height+h;u({arrowTop:"calc(100% - 18px)"})}}}this.host.style.left=`${p}px`;this.host.style.top=`${b}px`}closeContainer(){this.host.style.visibility="hidden";this.tooltipClosed.emit()}get host(){return o(this)}};c.style=s;export{c as cura_tooltip};
|
|
2
|
+
//# sourceMappingURL=p-3536c96b.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,g as s}from"./p-fd5ed6b0.js";const r=":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:1%;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;gap:4px;padding:12px 8px;background-color:var(--neutral-purewhite);border-bottom:2px solid var(--info-base);z-index:10000}.dropdown-mobile .dropdown-input-search cura-button-transparent{display:flex}.dropdown-mobile .dropdown-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile .dropdown-input-search.dropdown-open{display:flex}.dropdown-mobile .dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:block}.dropdown-mobile .dropdown-search-list{position:static;width:100%;height:calc(100vh - var(--dynamic-input-search-height, 0));max-height:none;padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:none;border:none;background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;z-index:10000}";const n=r;const d=class{constructor(e){t(this,e);this.valueChanged=i(this,"valueChanged",7);this.onselect=i(this,"onselect",7);this.overlayElement=null;this.adjustInputPosition=()=>{window.visualViewport.addEventListener("resize",(()=>{var t;const i=window.innerHeight<window.screen.height*.8;const e=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-mobile");if(e){if(i){e.style.position="absolute";e.style.bottom=`${window.screen.height-window.innerHeight}px`}else{e.style.position="fixed";e.style.bottom="0"}}window.scroll({top:0,left:0,behavior:"smooth"})}))};this.handleSlotChange=()=>{this.options=Array.from(this.host.querySelectorAll("cura-dropdown-search-option"));this.addClickListenersToOptions();this.updateHoveredIndex()};this.handleInputChange=t=>{const i=t.target;this.value=i.value;this.onValueChange(this.value)};this.handleKeyDown=t=>{if(t.key==="ArrowDown"){t.preventDefault();this.moveHighlight(1)}else if(t.key==="ArrowUp"){t.preventDefault();this.moveHighlight(-1)}else if(t.key==="Enter"){t.preventDefault();if(this.hoveredIndex>-1){this.handleOnBlur();this.onSelectedOption(this.hoveredIndex)}}};this.handleResize=()=>{this.isMobile=window.innerWidth<768;if(this.isDropdownOpen){if(this.isMobile){this.showOverlay()}else{this.removeOverlay()}}};this.size="large";this.status="default";this.disabled=false;this.name=undefined;this.required=false;this.selected=false;this.value="";this.placeholder="";this.label="";this.iconName="search";this.dropdownMaxHeight="630px";this.overlayVisible=false;this.isDropdownOpen=false;this.styles={};this.isMobile=window.innerWidth<768;this.mode="default";this.inputTextRef=undefined;this.isOnBlurInput=true;this.hoveredIndex=-1;this.options=[]}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base");this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light");this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark");this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor(`neutral-black`,.16);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark");this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter");this.styles["--breakpoints"]=window.CuraAPI.theme.breakpoints.get();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium}onValueChange(t){this.updateSelectedOption(t);this.valueChanged.emit(t)}componentWillLoad(){this.updateSelectedOption(this.value)}componentDidRender(){if(this.isDropdownOpen&&this.isMobile){this.showOverlay();this.getDropdownSearchListHeight()}else{this.removeOverlay()}}componentDidLoad(){window.addEventListener("resize",this.handleResize);window.addEventListener("resize",this.adjustInputPosition)}disconnectedCallback(){window.removeEventListener("resize",this.handleResize);window.removeEventListener("resize",this.adjustInputPosition)}showOverlay(){if(!this.overlayElement){this.overlayElement=document.createElement("div");this.overlayElement.className="dropdown-overlay";this.overlayElement.style.position="fixed";this.overlayElement.style.top="0";this.overlayElement.style.left="0";this.overlayElement.style.width="100%";this.overlayElement.style.height="100%";this.overlayElement.style.zIndex="9999";this.overlayElement.style.backgroundColor="white";document.body.appendChild(this.overlayElement)}}removeOverlay(){if(this.overlayElement&&this.overlayElement.parentNode===document.body){document.body.removeChild(this.overlayElement);this.overlayElement=null}}addClickListenersToOptions(){this.options.forEach(((t,i)=>{t.addEventListener("optionSelected",(()=>this.onSelectedOption(i)))}))}updateSelectedOption(t){const i=this.options.findIndex((i=>i.getAttribute("value")===t));this.hoveredIndex=i;this.updateOptionAttribute("hovered",this.hoveredIndex);this.updateOptionAttribute("selected",this.hoveredIndex);this.scrollIntoView();this.adjustInputPosition()}onSelectedOption(t){const i=this.options[t];if(i.selectable){const t=i.getAttribute("value")||i.textContent;this.value=t||"";this.updateSelectedOption(this.value);this.isDropdownOpen=false;this.isOnBlurInput=true;this.removeOverlay()}}moveHighlight(t){const i=this.options;const e=(this.hoveredIndex+t+i.length)%i.length;this.hoveredIndex=e;this.updateOptionAttribute("hovered",this.hoveredIndex);this.scrollIntoView()}updateOptionAttribute(t,i){this.options.forEach(((e,o)=>{e[t]=o===i}))}updateHoveredIndex(){const t=this.options;const i=this.value;this.hoveredIndex=t.findIndex((t=>t.getAttribute("value")===i))}scrollIntoView(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-search-list");const e=this.options[this.hoveredIndex];if(i&&e){const t=e.getBoundingClientRect();const o=i.getBoundingClientRect();if(t.bottom>o.bottom){i.scrollTop+=t.bottom-o.bottom}if(t.top<o.top){i.scrollTop-=o.top-t.top}}}handleOnBlur(){if(this.isOnBlurInput===true){setTimeout((()=>{this.isDropdownOpen=false;this.removeOverlay()}),200)}}getClasses(){return{"dropdown-input-search":true,"dropdown-open":this.isDropdownOpen,disabled:this.disabled,[this.status]:true}}getDropdownClasses(){return{"dropdown-search-list":true,visible:this.options.length&&this.isDropdownOpen?true:false}}hostCSSProperties(){return{"--dropdown-max-height":this.dropdownMaxHeight}}handleOnFocus(){this.isDropdownOpen=true}getDropdownSearchListHeight(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-input-search");if(i){this.host.style.setProperty("--dynamic-input-search-height",`${i.offsetHeight}px`)}}render(){const t=this.isMobile&&this.isDropdownOpen;return e(o,{key:"36a0df3dfbe9f164ccb41541fb5373b0e94c86bd",style:this.hostCSSProperties(),class:"dropdown-overlay"},e("div",{key:"e17cf1eec89b0346f49f497ffc6e5ea272fcd3eb",class:`dropdown ${t?"dropdown-mobile":""}`,style:this.styles},e("div",{key:"eb33cc0c6abd4792cb18a4e55eaed913e4f75761",class:this.getClasses()},this.isMobile&&this.isDropdownOpen&&e("cura-button-transparent",{key:"d837a3a15a89a9bd14260a32e3e218a3f53a18b1",fontColor:"dark",onClick:()=>this.isMobile=false,iconName:"arrowLeft",size:"medium",iconOnly:true,color:"primary"}),e("cura-input-text",{key:"c8a02959ee1d637fde64fbcd8be238b7562f0790",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:t?"transparent":"default",required:this.required,hideErrorIcon:this.status==="error",iconName:this.iconName||"search",value:this.value,status:this.status,onValueChange:t=>this.onValueChange(t.target.value),onInput:t=>this.handleInputChange(t),onFocus:()=>this.handleOnFocus(),onClick:()=>window.innerWidth<768?this.isMobile=true:null,onBlur:()=>{this.handleOnBlur()},placeholder:this.placeholder,size:this.size,onKeyDown:this.handleKeyDown},e("slot",{key:"9cc22d4cf269fee171456169b787be54a814189e",name:"helperText"}))),e("div",{key:"4a9ce1710312984d2af67ac3a04df504183caaf6",id:"dropdown-search-list",class:this.getDropdownClasses()},e("slot",{key:"afdeb4b938c3d6767e440f4b32316c45b2a5e86f",name:"dropdown-search-option",onSlotchange:this.handleSlotChange}))))}get host(){return s(this)}static get watchers(){return{value:["onValueChange"]}}};d.style=n;export{d as cura_dropdown_search};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,h as e,H as o,g as s}from"./p-fd5ed6b0.js";const r=":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:1%;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;gap:4px;padding:12px 8px;background-color:var(--neutral-purewhite);border-bottom:2px solid var(--info-base);z-index:10000}.dropdown-mobile .dropdown-input-search cura-button-transparent{display:flex}.dropdown-mobile .dropdown-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile .dropdown-input-search.dropdown-open{display:flex}.dropdown-mobile .dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:block}.dropdown-mobile .dropdown-search-list{position:static;width:100%;height:calc(100vh - var(--dynamic-input-search-height, 0));max-height:none;padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:none;border:none;background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;z-index:10000}";const n=r;const d=class{constructor(e){t(this,e);this.valueChanged=i(this,"valueChanged",7);this.onselect=i(this,"onselect",7);this.overlayElement=null;this.adjustInputPosition=()=>{window.visualViewport.addEventListener("resize",(()=>{var t;const i=window.innerHeight<window.screen.height*.8;const e=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-mobile");if(e){if(i){e.style.position="absolute";e.style.bottom=`${window.screen.height-window.innerHeight}px`}else{e.style.position="fixed";e.style.bottom="0"}}window.scroll({top:0,left:0,behavior:"smooth"})}))};this.handleSlotChange=()=>{this.options=Array.from(this.host.querySelectorAll("cura-dropdown-search-option"));this.addClickListenersToOptions();this.updateHoveredIndex()};this.handleInputChange=t=>{const i=t.target;this.value=i.value;this.onValueChange(this.value)};this.handleKeyDown=t=>{if(t.key==="ArrowDown"){t.preventDefault();this.moveHighlight(1)}else if(t.key==="ArrowUp"){t.preventDefault();this.moveHighlight(-1)}else if(t.key==="Enter"){t.preventDefault();if(this.hoveredIndex>-1){this.handleOnBlur();this.onSelectedOption(this.hoveredIndex)}}};this.handleResize=()=>{this.isMobile=window.innerWidth<768;if(this.isDropdownOpen){if(this.isMobile){this.showOverlay()}else{this.removeOverlay()}}};this.size="large";this.status="default";this.disabled=false;this.name=undefined;this.required=false;this.selected=false;this.value="";this.placeholder="";this.label="";this.iconName="search";this.dropdownMaxHeight="630px";this.overlayVisible=false;this.isDropdownOpen=false;this.styles={};this.isMobile=window.innerWidth<768;this.mode="default";this.inputTextRef=undefined;this.isOnBlurInput=true;this.hoveredIndex=-1;this.options=[]}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base");this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light");this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark");this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor(`neutral-black`,.16);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark");this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter");this.styles["--breakpoints"]=window.CuraAPI.theme.breakpoints.get();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium}onValueChange(t){this.updateSelectedOption(t);this.valueChanged.emit(t)}componentWillLoad(){this.updateSelectedOption(this.value)}componentDidRender(){if(this.isDropdownOpen&&this.isMobile){this.showOverlay();this.getDropdownSearchListHeight()}else{this.removeOverlay()}}componentDidLoad(){window.addEventListener("resize",this.handleResize);window.addEventListener("resize",this.adjustInputPosition)}disconnectedCallback(){window.removeEventListener("resize",this.handleResize);window.removeEventListener("resize",this.adjustInputPosition)}showOverlay(){if(!this.overlayElement){this.overlayElement=document.createElement("div");this.overlayElement.className="dropdown-overlay";this.overlayElement.style.position="fixed";this.overlayElement.style.top="0";this.overlayElement.style.left="0";this.overlayElement.style.width="100%";this.overlayElement.style.height="100%";this.overlayElement.style.zIndex="9999";this.overlayElement.style.backgroundColor="white";document.body.appendChild(this.overlayElement)}}removeOverlay(){if(this.overlayElement&&this.overlayElement.parentNode===document.body){document.body.removeChild(this.overlayElement);this.overlayElement=null}}addClickListenersToOptions(){this.options.forEach(((t,i)=>{t.addEventListener("optionSelected",(()=>this.onSelectedOption(i)))}))}updateSelectedOption(t){const i=this.options.findIndex((i=>i.getAttribute("value")===t));this.hoveredIndex=i;this.updateOptionAttribute("hovered",this.hoveredIndex);this.updateOptionAttribute("selected",this.hoveredIndex);this.scrollIntoView();this.adjustInputPosition()}onSelectedOption(t){const i=this.options[t];if(i.selectable){const t=i.getAttribute("value")||i.textContent;this.value=t||"";this.updateSelectedOption(this.value);this.isDropdownOpen=false;this.isOnBlurInput=true;this.removeOverlay()}}moveHighlight(t){const i=this.options;const e=(this.hoveredIndex+t+i.length)%i.length;this.hoveredIndex=e;this.updateOptionAttribute("hovered",this.hoveredIndex);this.scrollIntoView()}updateOptionAttribute(t,i){this.options.forEach(((e,o)=>{e[t]=o===i}))}updateHoveredIndex(){const t=this.options;const i=this.value;this.hoveredIndex=t.findIndex((t=>t.getAttribute("value")===i))}scrollIntoView(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-search-list");const e=this.options[this.hoveredIndex];if(i&&e){const t=e.getBoundingClientRect();const o=i.getBoundingClientRect();if(t.bottom>o.bottom){i.scrollTop+=t.bottom-o.bottom}if(t.top<o.top){i.scrollTop-=o.top-t.top}}}handleOnBlur(){if(this.isOnBlurInput===true){setTimeout((()=>{this.isDropdownOpen=false;this.removeOverlay()}),200)}}getClasses(){return{"dropdown-input-search":true,"dropdown-open":this.isDropdownOpen,disabled:this.disabled,[this.status]:true}}getDropdownClasses(){return{"dropdown-search-list":true,visible:this.options.length&&this.isDropdownOpen?true:false}}hostCSSProperties(){return{"--dropdown-max-height":this.dropdownMaxHeight}}handleOnFocus(){this.isDropdownOpen=true}getDropdownSearchListHeight(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-input-search");if(i){this.host.style.setProperty("--dynamic-input-search-height",`${i.offsetHeight}px`)}}render(){const t=this.isMobile&&this.isDropdownOpen;return e(o,{key:"fb9a745e5ae24c5abbf9c3c6ce8f0df2d5fcf01f",style:this.hostCSSProperties(),class:"dropdown-overlay"},e("div",{key:"efc455c59f27bb254a10bbe4c62eec3e627eebb7",class:`dropdown ${t?"dropdown-mobile":""}`,style:this.styles},e("div",{key:"4542af0eede7676c2a4ce7e4e88fa8983c0eec15",class:this.getClasses()},this.isMobile&&this.isDropdownOpen&&e("cura-button-transparent",{key:"2100335a869d32e7d4f6820bc64e02e308ab29e1",fontColor:"dark",onClick:()=>this.isMobile=false,iconName:"arrowLeft",size:"medium",iconOnly:true,color:"primary"}),e("cura-input-text",{key:"fe1c21c892226c704c36107d250aac5f5b3cf0e0",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:t?"transparent":"default",required:this.required,hideErrorIcon:this.status==="error",iconName:this.iconName||"search",value:this.value,status:this.status,onValueChange:t=>this.onValueChange(t.target.value),onInput:t=>this.handleInputChange(t),onFocus:()=>this.handleOnFocus(),onClick:()=>window.innerWidth<768?this.isMobile=true:null,onBlur:()=>{this.handleOnBlur()},placeholder:this.placeholder,size:this.size,onKeyDown:this.handleKeyDown},e("slot",{key:"b03a633b3e9e45fc4539d4e7a2282ae388bb2e96",name:"helperText"}))),e("div",{key:"e8e88a4f884e386de33cea7f3bcf175a7e78b168",id:"dropdown-search-list",class:this.getDropdownClasses()},e("slot",{key:"f3aa2664cd496ccdd984a58c25f84fd9f616d157",name:"dropdown-search-option",onSlotchange:this.handleSlotChange}))))}get host(){return s(this)}static get watchers(){return{value:["onValueChange"]}}};d.style=n;export{d as cura_dropdown_search};
|
|
2
|
+
//# sourceMappingURL=p-7090d4a7.entry.js.map
|